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

Commit f3b15ac4 authored by 张国柄's avatar 张国柄

+JOB:商城:商铺活动开启关闭;

parent bc9cf052
...@@ -79,7 +79,7 @@ public class GoblinStoreMgtCouponAddParam implements Serializable { ...@@ -79,7 +79,7 @@ public class GoblinStoreMgtCouponAddParam implements Serializable {
@NotNull(message = "限领数量不能为空") @NotNull(message = "限领数量不能为空")
@Min(value = 1, message = "限领数量不能小于1") @Min(value = 1, message = "限领数量不能小于1")
private Integer receiveLimit; private Integer receiveLimit;
@ApiModelProperty(position = 19, required = true, value = "领取约束[0-不开放|1-开放]", allowableValues = "0,1") @ApiModelProperty(position = 19, required = true, value = "领取约束[0-不开放|1-开放]", allowableValues = "0,1", example = "1")
@NotNull(message = "领取约束不能为空") @NotNull(message = "领取约束不能为空")
@Pattern(regexp = "\\b(0|1)\\b", message = "领取约束参数无效") @Pattern(regexp = "\\b(0|1)\\b", message = "领取约束参数无效")
private String receiveCurb;// private String receiveCurb;//
......
...@@ -18,4 +18,7 @@ public interface FeignPlatformGoblinTaskClient { ...@@ -18,4 +18,7 @@ public interface FeignPlatformGoblinTaskClient {
@PutMapping("ggoods/task/onshelves") @PutMapping("ggoods/task/onshelves")
ResponseDto<String> goodsOnShelvesHandler(); ResponseDto<String> goodsOnShelvesHandler();
@PutMapping("gstore/task/market/activity")
ResponseDto<String> storeMarketActivityHandler();
} }
...@@ -36,4 +36,22 @@ public class PlatformGoblinTaskHandler { ...@@ -36,4 +36,22 @@ public class PlatformGoblinTaskHandler {
return fail; return fail;
} }
} }
// 商城:商铺活动开启关闭
@XxlJob(value = "sev-platform:goblinStoreMarketActivityHandler")
public ReturnT<String> goblinStoreMarketActivityHandler() {
try {
ResponseDto<String> dto = feignPlatformGoblinTaskClient.storeMarketActivityHandler();
String dtoStr = JsonUtils.toJson(dto);
log.info("result of handler:{}", dtoStr);
ReturnT<String> success = ReturnT.SUCCESS;
success.setMsg(dtoStr);
return success;
} catch (Exception e) {
log.error("exception of handler:{}", e.getMessage(), e);
ReturnT<String> fail = ReturnT.FAIL;
fail.setMsg(e.getLocalizedMessage());
return fail;
}
}
} }
...@@ -986,7 +986,7 @@ public class GoblinRedisUtils { ...@@ -986,7 +986,7 @@ public class GoblinRedisUtils {
List<GoblinStoreMarketDto> dtos; List<GoblinStoreMarketDto> dtos;
if (StringUtils.isEmpty(valStr)) { if (StringUtils.isEmpty(valStr)) {
// TODO: 2022/2/17 zhanggb mongodb 查取该商品所有参与的活动并整理集合 // TODO: 2022/2/17 zhanggb mongodb 查取该商品所有参与的活动并整理集合
dtos = ObjectUtil.getGoblinGoodsMarketDtoArrayList(); dtos = ObjectUtil.getGoblinStoreMarketDtoArrayList();
} else { } else {
dtos = JsonUtils.fromJson(valStr, new TypeReference<List<GoblinStoreMarketDto>>() { dtos = JsonUtils.fromJson(valStr, new TypeReference<List<GoblinStoreMarketDto>>() {
}); });
......
...@@ -258,7 +258,7 @@ public class ObjectUtil { ...@@ -258,7 +258,7 @@ public class ObjectUtil {
return (ArrayList<GoblinStoreMgtCouponSpuListVo>) goblinStoreMgtCouponSpuListVoArrayList.clone(); return (ArrayList<GoblinStoreMgtCouponSpuListVo>) goblinStoreMgtCouponSpuListVoArrayList.clone();
} }
public static ArrayList<GoblinStoreMarketDto> getGoblinGoodsMarketDtoArrayList() { public static ArrayList<GoblinStoreMarketDto> getGoblinStoreMarketDtoArrayList() {
return (ArrayList<GoblinStoreMarketDto>) goblinStoreMarketDtoArrayList.clone(); return (ArrayList<GoblinStoreMarketDto>) goblinStoreMarketDtoArrayList.clone();
} }
......
...@@ -36,8 +36,8 @@ public class PlatformGoblinStoreTaskController { ...@@ -36,8 +36,8 @@ public class PlatformGoblinStoreTaskController {
@Autowired @Autowired
private PlatformGoblinStoreCouponService platformGoblinStoreCouponService; private PlatformGoblinStoreCouponService platformGoblinStoreCouponService;
@PutMapping("market") @PutMapping("market/activity")
public ResponseDto<String> marketActivityProcessing() { public ResponseDto<String> storeMarketActivityHandler() {
int startNum = 0, stopNum = 0; int startNum = 0, stopNum = 0;
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
......
...@@ -78,7 +78,7 @@ public class PlatformGoblinStoreCouponService extends ServiceImpl<GoblinStoreCou ...@@ -78,7 +78,7 @@ public class PlatformGoblinStoreCouponService extends ServiceImpl<GoblinStoreCou
return storeCouponList.size(); return storeCouponList.size();
} }
} catch (Exception e) { } catch (Exception e) {
log.error("###商铺活动:优惠券处理异常[now={},storeCouponList={}]", now, JsonUtils.toJson(storeCouponIdList)); log.error("###商铺活动:优惠券处理异常[now={},storeCouponList={}]", now, JsonUtils.toJson(storeCouponIdList), e);
} }
} }
} }
......
...@@ -129,7 +129,7 @@ public class GoblinRedisUtils { ...@@ -129,7 +129,7 @@ public class GoblinRedisUtils {
List<GoblinStoreMarketDto> dtos = null; List<GoblinStoreMarketDto> dtos = null;
if (StringUtils.isEmpty(valStr)) { if (StringUtils.isEmpty(valStr)) {
// TODO: 2022/2/17 zhanggb mongodb 查取该商品所有参与的活动并整理集合 // TODO: 2022/2/17 zhanggb mongodb 查取该商品所有参与的活动并整理集合
// dtos = ObjectUtil.getGoblinGoodsMarketDtoArrayList(); dtos = ObjectUtil.getGoblinStoreMarketDtoArrayList();
} else { } else {
dtos = JsonUtils.fromJson(valStr, new TypeReference<List<GoblinStoreMarketDto>>() { dtos = JsonUtils.fromJson(valStr, new TypeReference<List<GoblinStoreMarketDto>>() {
}); });
......
...@@ -5,15 +5,13 @@ import com.liquidnet.service.base.PagedResult; ...@@ -5,15 +5,13 @@ import com.liquidnet.service.base.PagedResult;
import com.liquidnet.service.candy.entity.CandyCommonCoupon; import com.liquidnet.service.candy.entity.CandyCommonCoupon;
import com.liquidnet.service.candy.entity.CandyCouponCode; import com.liquidnet.service.candy.entity.CandyCouponCode;
import com.liquidnet.service.candy.entity.CandyUserCoupon; import com.liquidnet.service.candy.entity.CandyUserCoupon;
import com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo; import com.liquidnet.service.goblin.dto.GoblinStoreMarketDto;
import com.liquidnet.service.kylin.entity.KylinOrderCoupons; import com.liquidnet.service.kylin.entity.KylinOrderCoupons;
import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObject;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedList;
/** /**
* @author AnJiabin <anjiabin@zhengzai.tv> * @author AnJiabin <anjiabin@zhengzai.tv>
...@@ -61,6 +59,8 @@ public class ObjectUtil { ...@@ -61,6 +59,8 @@ public class ObjectUtil {
private static final PagedResult<AdamDisposedUserVo> adamDisposedUserVoPagedResult = new PagedResult<>(); private static final PagedResult<AdamDisposedUserVo> adamDisposedUserVoPagedResult = new PagedResult<>();
private static final ArrayList<KylinOrderCoupons> kylinOrderCouponsArrayList = new ArrayList<>(); private static final ArrayList<KylinOrderCoupons> kylinOrderCouponsArrayList = new ArrayList<>();
private static final ArrayList<GoblinStoreMarketDto> goblinStoreMarketDtoArrayList = new ArrayList<>();
public static ArrayList<AdamTagParentVo> getAdamTagParentVoArrayList() { public static ArrayList<AdamTagParentVo> getAdamTagParentVoArrayList() {
return (ArrayList<AdamTagParentVo>) adamTagParentVoArrayList.clone(); return (ArrayList<AdamTagParentVo>) adamTagParentVoArrayList.clone();
} }
...@@ -124,4 +124,8 @@ public class ObjectUtil { ...@@ -124,4 +124,8 @@ public class ObjectUtil {
public static ArrayList<KylinOrderCoupons> getKylinOrderCouponsArrayList() { public static ArrayList<KylinOrderCoupons> getKylinOrderCouponsArrayList() {
return (ArrayList<KylinOrderCoupons>) kylinOrderCouponsArrayList.clone(); return (ArrayList<KylinOrderCoupons>) kylinOrderCouponsArrayList.clone();
} }
public static ArrayList<GoblinStoreMarketDto> getGoblinStoreMarketDtoArrayList() {
return (ArrayList<GoblinStoreMarketDto>) goblinStoreMarketDtoArrayList.clone();
}
} }
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