记得上下班打卡 | git大法好,push需谨慎

Commit 19ed7855 authored by 胡佳晨's avatar 胡佳晨

提交 无可参加的活动时500

parent 07743253
......@@ -12,6 +12,7 @@ import com.liquidnet.service.goblin.dto.manage.GoblinStoreZhengzaiCommonParam;
import com.liquidnet.service.goblin.dto.manage.GoblinStoreZhengzaiItemParam;
import com.liquidnet.service.goblin.dto.vo.*;
import com.liquidnet.service.goblin.entity.GoblinMarketingZhengzai;
import com.liquidnet.service.goblin.entity.GoblinSelfMarketing;
import com.liquidnet.service.goblin.service.manage.IGoblinZhengzaiService;
import com.liquidnet.service.goblin.util.GoblinMongoUtils;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
......@@ -38,12 +39,23 @@ public class GoblinZhengzaiServiceImpl implements IGoblinZhengzaiService {
@Override
public List<GoblinSelfMarketingVo> zhengzaiCanJoin(String storeId) {
String nowStr = DateUtil.getNowTime();
List<String> marketIds = redisUtils.getStoreZhengzaiRelation(storeId);
List<GoblinSelfMarketingVo> voList = ObjectUtil.getGoblinSelfMarketingVoList();
for (String selfMarketId : marketIds) {
GoblinMarketingZhengzaiRelationVo zhengzaiRelationVo = redisUtils.getZhengzaiRelation(selfMarketId, storeId);
if (DateUtil.compareStrDay(DateUtil.getNowTime(), zhengzaiRelationVo.getShowTime()) == 1) {
voList.add(redisUtils.getSelfMarket(selfMarketId));
GoblinSelfMarketingVo vo = redisUtils.getSelfMarket(selfMarketId);
if (vo.getStatus() == null || vo.getStatus() != 7) {
if (DateUtil.compareStrDay(nowStr, vo.getStartTime()) < 0) {
vo.setStatus(0);
} else if (DateUtil.compareStrDay(nowStr, vo.getEndTime()) > 0) {
vo.setStatus(2);
} else {
vo.setStatus(1);
}
}
voList.add(vo);
}
}
return voList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment