Authored by mingdan.ge

cps活动有效期

... ... @@ -52,7 +52,7 @@
<select id="selectUidListByTime" resultType="java.lang.Integer" >
select uid
from union_share_user_apply
where status=2 and del_flag=1 and check_time > #{beginTime} and check_time &lt; #{endTime}
where status=2 and del_flag=1 and check_time >= #{beginTime} and check_time &lt; #{endTime}
</select>
<select id="selectByCondition"
resultType="com.yoho.service.model.union.response.UnionShareUserApplyListBo"
... ...
... ... @@ -1907,7 +1907,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
logger.info("participateActivity,order is {},activity is {}",order,activity);
//1、判断是否符合活动条件
//1.1 活动类型:1-订单返利比例升级,2-订单返利翻x倍,3-额外返
if (activity.getType() == 3) {
if (activity.getType() != 2) {
//额外返在活动结束后走定时任务
return false;
}
... ... @@ -1917,8 +1917,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
return false;
}
//1.3 是否活动期间
int now = DateUtil.getCurrentTimeSecond();
if (activity.getStartTime() > now || activity.getEndTime() < now) {
if (activity.getStartTime() > order.getOrderTime() || activity.getEndTime() < order.getOrderTime()) {
return false;
}
//2、参加活动
... ...
... ... @@ -23,7 +23,7 @@ public class CpsNewUserActivityTask {
@Autowired
IUnionShareService unionShareService;
// 每天08:30执行
// 每天08:40执行
@Scheduled(cron = "0 40 8 * * ?")
public void run() {
logger.info("start giving out new user rewards");
... ...