Merge branch 'gray' of http://git.yoho.cn/ufo/yohoufo-fore into gray
Showing
5 changed files
with
16 additions
and
6 deletions
@@ -8,13 +8,15 @@ import org.apache.ibatis.annotations.Param; | @@ -8,13 +8,15 @@ import org.apache.ibatis.annotations.Param; | ||
8 | import java.util.List; | 8 | import java.util.List; |
9 | 9 | ||
10 | public interface CouponViewMapper { | 10 | public interface CouponViewMapper { |
11 | - List<Coupon> selectByAssociatedPrd(@Param("productId") Integer productId, | 11 | + List<Coupon> selectByAssociatedPrd(@Param("businessClient")String businessClient, |
12 | + @Param("productId") Integer productId, | ||
12 | @Param("positionType") int positionType, | 13 | @Param("positionType") int positionType, |
13 | @Param("currentTime") int currentTime, | 14 | @Param("currentTime") int currentTime, |
14 | @Param("offset")int offset, | 15 | @Param("offset")int offset, |
15 | @Param("limit")int limit); | 16 | @Param("limit")int limit); |
16 | 17 | ||
17 | - int selectCntByAssociatedPrd(@Param("productId") Integer productId, | 18 | + int selectCntByAssociatedPrd(@Param("businessClient")String businessClient, |
19 | + @Param("productId") Integer productId, | ||
18 | @Param("positionType") int positionType, | 20 | @Param("positionType") int positionType, |
19 | @Param("currentTime") int currentTime); | 21 | @Param("currentTime") int currentTime); |
20 | 22 |
@@ -4,12 +4,13 @@ import lombok.AllArgsConstructor; | @@ -4,12 +4,13 @@ import lombok.AllArgsConstructor; | ||
4 | import lombok.Builder; | 4 | import lombok.Builder; |
5 | import lombok.Data; | 5 | import lombok.Data; |
6 | import lombok.NoArgsConstructor; | 6 | import lombok.NoArgsConstructor; |
7 | +import org.apache.ibatis.annotations.Param; | ||
7 | 8 | ||
8 | @Data | 9 | @Data |
9 | @Builder | 10 | @Builder |
10 | @NoArgsConstructor@AllArgsConstructor | 11 | @NoArgsConstructor@AllArgsConstructor |
11 | public class CouponQueryParamOfUseLimitType { | 12 | public class CouponQueryParamOfUseLimitType { |
12 | - | 13 | + private String businessClient; |
13 | private Integer productId; | 14 | private Integer productId; |
14 | private int positionType; | 15 | private int positionType; |
15 | private Integer couponType; | 16 | private Integer couponType; |
@@ -52,6 +52,8 @@ | @@ -52,6 +52,8 @@ | ||
52 | AND cpn.`coupon_num` > cpn.`send_num` | 52 | AND cpn.`coupon_num` > cpn.`send_num` |
53 | AND cdp.position_type= #{positionType} AND cdp.`visibility`=1 | 53 | AND cdp.position_type= #{positionType} AND cdp.`visibility`=1 |
54 | AND (#{currentTime} <![CDATA[ < ]]> `end_time` OR #{currentTime} <![CDATA[ < ]]> `receive_end_time`) | 54 | AND (#{currentTime} <![CDATA[ < ]]> `end_time` OR #{currentTime} <![CDATA[ < ]]> `receive_end_time`) |
55 | + and receive_start_time <![CDATA[ <= ]]> #{currentTime} | ||
56 | + AND `business_client` LIKE CONCAT('%',#{businessClient},'%') | ||
55 | ORDER BY coupon_type,use_limit_type,`use_limit_value` DESC | 57 | ORDER BY coupon_type,use_limit_type,`use_limit_value` DESC |
56 | limit #{offset},#{limit} | 58 | limit #{offset},#{limit} |
57 | </select> | 59 | </select> |
@@ -65,6 +67,8 @@ | @@ -65,6 +67,8 @@ | ||
65 | AND cpn.`coupon_num` > cpn.`send_num` | 67 | AND cpn.`coupon_num` > cpn.`send_num` |
66 | AND cdp.position_type= #{positionType} AND cdp.`visibility`=1 | 68 | AND cdp.position_type= #{positionType} AND cdp.`visibility`=1 |
67 | AND (#{currentTime} <![CDATA[ < ]]> `end_time` OR #{currentTime} <![CDATA[ < ]]> `receive_end_time`) | 69 | AND (#{currentTime} <![CDATA[ < ]]> `end_time` OR #{currentTime} <![CDATA[ < ]]> `receive_end_time`) |
70 | + and receive_start_time <![CDATA[ <= ]]> #{currentTime} | ||
71 | + AND `business_client` LIKE CONCAT('%',#{businessClient},'%') | ||
68 | </select> | 72 | </select> |
69 | 73 | ||
70 | <sql id="query_prd_limit"> | 74 | <sql id="query_prd_limit"> |
@@ -84,6 +88,8 @@ | @@ -84,6 +88,8 @@ | ||
84 | AND cpn.`coupon_num` > cpn.`send_num` | 88 | AND cpn.`coupon_num` > cpn.`send_num` |
85 | AND cdp.position_type= #{positionType} AND cdp.`visibility`=1 | 89 | AND cdp.position_type= #{positionType} AND cdp.`visibility`=1 |
86 | AND (#{currentTime} <![CDATA[ < ]]> `end_time` OR #{currentTime} <![CDATA[ < ]]> `receive_end_time`) | 90 | AND (#{currentTime} <![CDATA[ < ]]> `end_time` OR #{currentTime} <![CDATA[ < ]]> `receive_end_time`) |
91 | + and receive_start_time <![CDATA[ <= ]]> #{currentTime} | ||
92 | + AND `business_client` LIKE CONCAT('%',#{businessClient},'%') | ||
87 | ORDER BY `use_limit_value` DESC | 93 | ORDER BY `use_limit_value` DESC |
88 | limit #{offset},#{limit} | 94 | limit #{offset},#{limit} |
89 | </select> | 95 | </select> |
@@ -69,14 +69,14 @@ public class CollectiveCouponService { | @@ -69,14 +69,14 @@ public class CollectiveCouponService { | ||
69 | final int currentDT = DateUtil.getCurrentTimeSecond(); | 69 | final int currentDT = DateUtil.getCurrentTimeSecond(); |
70 | final int positionType = PositionType.PRD_DETAIL.getCode(); | 70 | final int positionType = PositionType.PRD_DETAIL.getCode(); |
71 | 71 | ||
72 | - int total = couponViewMapper.selectCntByAssociatedPrd(prdId,positionType,currentDT); | 72 | + int total = couponViewMapper.selectCntByAssociatedPrd(req.getBusinessClient(),prdId,positionType,currentDT); |
73 | if(total == 0){ | 73 | if(total == 0){ |
74 | logger.warn("queryCouponListOfPrdDetail find total number zero, {}", req); | 74 | logger.warn("queryCouponListOfPrdDetail find total number zero, {}", req); |
75 | return couponInfoListBuilder.build(); | 75 | return couponInfoListBuilder.build(); |
76 | } | 76 | } |
77 | int totalPage = PageHelper.getPageTotal(total, limit); | 77 | int totalPage = PageHelper.getPageTotal(total, limit); |
78 | final int offset = PageHelper.getOffsetOfMysql(pageNum, limit); | 78 | final int offset = PageHelper.getOffsetOfMysql(pageNum, limit); |
79 | - List<Coupon> datas= couponViewMapper.selectByAssociatedPrd(prdId, positionType,currentDT,offset,limit); | 79 | + List<Coupon> datas= couponViewMapper.selectByAssociatedPrd(req.getBusinessClient(),prdId, positionType,currentDT,offset,limit); |
80 | //when user login, show user coupon | 80 | //when user login, show user coupon |
81 | 81 | ||
82 | final Integer uid = req.getUid(); | 82 | final Integer uid = req.getUid(); |
@@ -179,6 +179,7 @@ public class CollectiveCouponService { | @@ -179,6 +179,7 @@ public class CollectiveCouponService { | ||
179 | .productId(req.getProductId()) | 179 | .productId(req.getProductId()) |
180 | .positionType(positionType) | 180 | .positionType(positionType) |
181 | .currentTime(currentDT) | 181 | .currentTime(currentDT) |
182 | + .businessClient(req.getBusinessClient()) | ||
182 | .offset(offset) | 183 | .offset(offset) |
183 | .limit(1) | 184 | .limit(1) |
184 | .build(); | 185 | .build(); |
@@ -53,7 +53,7 @@ hystrix.command.wallet.queryUserWalletInfo.execution.isolation.thread.timeoutInM | @@ -53,7 +53,7 @@ hystrix.command.wallet.queryUserWalletInfo.execution.isolation.thread.timeoutInM | ||
53 | ufo.order.pay.transferWithWalletSwitch=false | 53 | ufo.order.pay.transferWithWalletSwitch=false |
54 | ufo.order.pay.depositRebateActivity={"startTime":"1571364000","endTime":"1572537599"} | 54 | ufo.order.pay.depositRebateActivity={"startTime":"1571364000","endTime":"1572537599"} |
55 | ufo.order.pay.wechat.sign-type=MD5 | 55 | ufo.order.pay.wechat.sign-type=MD5 |
56 | -ufo.order.pay.transferNeedUserApplyCash=false | 56 | +ufo.order.pay.transferNeedUserApplyCash=true |
57 | 57 | ||
58 | # 寄存转现货开关 | 58 | # 寄存转现货开关 |
59 | ufo.deposit2Instock.close = true | 59 | ufo.deposit2Instock.close = true |
-
Please register or login to post a comment