Переглянути джерело

优惠券站内消息提交

Duan_xu 3 роки тому
батько
коміт
45a2223a0d

+ 1 - 1
src/main/java/com/caimei/modules/coupon/redis/RedisLearn.java

@@ -27,7 +27,7 @@ public class RedisLearn {
 
 
     public static void producer( List<Integer> clubIds) {
-        Jedis jedis = new Jedis("127.0.0.1", 6379);
+        Jedis jedis = new Jedis("192.168.2.100", 6379);
 
         clubIds.forEach(clubId -> {
             // 记录机构ID

+ 7 - 1
src/main/java/com/caimei/modules/coupon/web/CmCouponController.java

@@ -134,7 +134,13 @@ public class CmCouponController extends BaseController {
 
     //优惠券站内消息推送
     private void consumer(CmCoupon cmCoupon,List<Integer> clubIds) {
-        Jedis jedis = new Jedis("127.0.0.1", 6379);
+        Jedis jedis = new Jedis("172.31.165.23",6379);
+        if(jedis==null){
+            Jedis jedisno=new Jedis("192.168.2.100", 6379);
+            if(jedisno==null){
+                Jedis jedisto=new Jedis("172.31.165.27",6379);
+            }
+        }
         // 消费消息
         while (true) {
             clubIds.forEach(clubIdb -> {

+ 7 - 1
src/main/resources/mappings/modules/newhome/NewPageFloorMapper.xml

@@ -188,7 +188,13 @@
 
 	<update id="updatrecommend">
 		UPDATE product SET
-			recommend=#{recommend}
+			recommend=#{recommend},
+		<if test="recommend==1">
+			sortIndex=1000
+		</if>
+		<if test="recommend==0">
+			sortIndex=1
+		</if>
 		WHERE productID = #{productID}
 	</update>
 

+ 11 - 3
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -614,8 +614,10 @@
 					#{id}
 				</foreach>
 			</if>
-			and a.newvalidFlag = 1
-			and a.newProductType = 1
+			AND p.newvalidFlag = 1
+			AND p.newProductType=1
+			AND p.validFlag = 2
+			AND p.showFlag!=2
 
 		</where>
 		<choose>
@@ -623,7 +625,13 @@
 				ORDER BY ${page.orderBy}
 			</when>
 		</choose>
-		order by a.sortIndex desc
+		<if test="sortIndex==1000">
+			ORDER BY a.newshowTime DESC
+		</if>
+		<if test="sortIndex!=1000">
+			order by a.sortIndex desc
+		</if>
+
 	</select>
 	<update id="updateActive">
 		UPDATE product

+ 5 - 0
src/main/webapp/WEB-INF/views/modules/newhome/newFloorcontentForm.jsp

@@ -287,12 +287,17 @@ debugger
 					</c:if>
 				</td>
 				<td>
+				<c:if test="${list.recommend !=1}">
 					<c:if test="${not empty list.sortIndex && list.sortIndex!=0}">
 					<input  id="sort" type="text" name="sortIndex" style="width:50px;" value="${list.sortIndex}"  onkeyup="onlynum(this)"  onchange="changeSort(${list.productID},this)"></td>
 				</c:if>
 				<c:if test="${empty list.sortIndex || list.sortIndex==0}">
 					<input  id="sort" type="text" name="sortIndex" style="width:50px;" value="1"  onkeyup="onlynum(this)"  onchange="changeSort(${list.productID},this)"></td>
 				</c:if>
+				</c:if>
+				<c:if test="${list.recommend eq 1}">
+					---
+				</c:if>
 				<td>
 					<c:if test="${list.recommend eq 1}"><img src="/static/images/yes.gif" width="15px" border="none"/></c:if>
 				</td>