Authored by LUOXC

Merge branch 'gray' of http://git.yoho.cn/ufo/yohoufo-fore into gray

... ... @@ -8,13 +8,15 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface CouponViewMapper {
List<Coupon> selectByAssociatedPrd(@Param("productId") Integer productId,
List<Coupon> selectByAssociatedPrd(@Param("businessClient")String businessClient,
@Param("productId") Integer productId,
@Param("positionType") int positionType,
@Param("currentTime") int currentTime,
@Param("offset")int offset,
@Param("limit")int limit);
int selectCntByAssociatedPrd(@Param("productId") Integer productId,
int selectCntByAssociatedPrd(@Param("businessClient")String businessClient,
@Param("productId") Integer productId,
@Param("positionType") int positionType,
@Param("currentTime") int currentTime);
... ...
... ... @@ -4,12 +4,13 @@ import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.annotations.Param;
@Data
@Builder
@NoArgsConstructor@AllArgsConstructor
public class CouponQueryParamOfUseLimitType {
private String businessClient;
private Integer productId;
private int positionType;
private Integer couponType;
... ...
... ... @@ -52,6 +52,8 @@
AND cpn.`coupon_num` > cpn.`send_num`
AND cdp.position_type= #{positionType} AND cdp.`visibility`=1
AND (#{currentTime} <![CDATA[ < ]]> `end_time` OR #{currentTime} <![CDATA[ < ]]> `receive_end_time`)
and receive_start_time <![CDATA[ <= ]]> #{currentTime}
AND `business_client` LIKE CONCAT('%',#{businessClient},'%')
ORDER BY coupon_type,use_limit_type,`use_limit_value` DESC
limit #{offset},#{limit}
</select>
... ... @@ -65,6 +67,8 @@
AND cpn.`coupon_num` > cpn.`send_num`
AND cdp.position_type= #{positionType} AND cdp.`visibility`=1
AND (#{currentTime} <![CDATA[ < ]]> `end_time` OR #{currentTime} <![CDATA[ < ]]> `receive_end_time`)
and receive_start_time <![CDATA[ <= ]]> #{currentTime}
AND `business_client` LIKE CONCAT('%',#{businessClient},'%')
</select>
<sql id="query_prd_limit">
... ... @@ -84,6 +88,8 @@
AND cpn.`coupon_num` > cpn.`send_num`
AND cdp.position_type= #{positionType} AND cdp.`visibility`=1
AND (#{currentTime} <![CDATA[ < ]]> `end_time` OR #{currentTime} <![CDATA[ < ]]> `receive_end_time`)
and receive_start_time <![CDATA[ <= ]]> #{currentTime}
AND `business_client` LIKE CONCAT('%',#{businessClient},'%')
ORDER BY `use_limit_value` DESC
limit #{offset},#{limit}
</select>
... ...
... ... @@ -69,14 +69,14 @@ public class CollectiveCouponService {
final int currentDT = DateUtil.getCurrentTimeSecond();
final int positionType = PositionType.PRD_DETAIL.getCode();
int total = couponViewMapper.selectCntByAssociatedPrd(prdId,positionType,currentDT);
int total = couponViewMapper.selectCntByAssociatedPrd(req.getBusinessClient(),prdId,positionType,currentDT);
if(total == 0){
logger.warn("queryCouponListOfPrdDetail find total number zero, {}", req);
return couponInfoListBuilder.build();
}
int totalPage = PageHelper.getPageTotal(total, limit);
final int offset = PageHelper.getOffsetOfMysql(pageNum, limit);
List<Coupon> datas= couponViewMapper.selectByAssociatedPrd(prdId, positionType,currentDT,offset,limit);
List<Coupon> datas= couponViewMapper.selectByAssociatedPrd(req.getBusinessClient(),prdId, positionType,currentDT,offset,limit);
//when user login, show user coupon
final Integer uid = req.getUid();
... ... @@ -179,6 +179,7 @@ public class CollectiveCouponService {
.productId(req.getProductId())
.positionType(positionType)
.currentTime(currentDT)
.businessClient(req.getBusinessClient())
.offset(offset)
.limit(1)
.build();
... ...
... ... @@ -53,7 +53,7 @@ hystrix.command.wallet.queryUserWalletInfo.execution.isolation.thread.timeoutInM
ufo.order.pay.transferWithWalletSwitch=false
ufo.order.pay.depositRebateActivity={"startTime":"1571364000","endTime":"1572537599"}
ufo.order.pay.wechat.sign-type=MD5
ufo.order.pay.transferNeedUserApplyCash=false
ufo.order.pay.transferNeedUserApplyCash=true
# 寄存转现货开关
ufo.deposit2Instock.close = true
... ...