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

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

~API:优惠券列表:筛选状态字段类型更正;

~API:优惠券编辑:关联商品为空处理;
parent eff576fc
......@@ -29,7 +29,7 @@ public class GoblinStoreMgtCouponFilterParam implements Serializable {
@ApiModelProperty(position = 14, required = false, value = "卡券编码[64]")
private String storeCouponNo;
@ApiModelProperty(position = 15, required = false, value = "卡券状态[0-等待开始|1-活动中|2-活动结束|3-停用]", allowableValues = "0,1,2,3")
private Integer state;
private String state;
@ApiModelProperty(position = 16, required = false, value = "开始日期[yyyy-MM-dd HH:mm:ss]")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "开始日期格式有误")
private String startTime;
......
......@@ -57,10 +57,9 @@ public interface IGoblinstoreMgtCouponService {
*
* @param uid UID
* @param storeCouponBasicVo GoblinStoreCouponBasicVo
* @param beforeSpuIdList List<String>
* @return boolean
*/
boolean couponEdit(String uid, GoblinStoreCouponBasicVo storeCouponBasicVo, List<String> beforeSpuIdList);
boolean couponEdit(String uid, GoblinStoreCouponBasicVo storeCouponBasicVo);
/**
* 商铺活动:优惠券库存编辑
......
......@@ -271,16 +271,12 @@ public class GoblinStoreMgtCouponController {
storeCouponBasicVo.setStoreCouponNo(storeCouponVo.getStoreCouponNo());
List<String> spuIdList = storeCouponBasicVo.getSpuIdList();
if (storeCouponBasicVo.getUseScope().equals("1") && !CollectionUtils.isEmpty(spuIdList)) {
if (storeCouponBasicVo.getUseScope().equals("1") && null != spuIdList) {
spuIdList.removeIf(spuId -> null == goblinRedisUtils.getGoodsInfoVo(spuId));
storeCouponBasicVo.setSpuIdList(spuIdList);
}
List<String> beforeSpuIdList = null;
if (storeCouponVo.getUseScope().equals("1")) {
beforeSpuIdList = goblinRedisUtils.getStoreCouponSpuIds(storeCouponId);
}
boolean resultFlg = goblinstoreMgtCouponService.couponEdit(currentUid, storeCouponBasicVo, beforeSpuIdList);
boolean resultFlg = goblinstoreMgtCouponService.couponEdit(currentUid, storeCouponBasicVo);
return resultFlg ? ResponseDto.success() : ResponseDto.failure();
}
......
......@@ -205,7 +205,7 @@ public class GoblinStoreMgtCouponServiceImpl implements IGoblinstoreMgtCouponSer
}
@Override
public boolean couponEdit(String uid, GoblinStoreCouponBasicVo storeCouponBasicVo, List<String> beforeSpuIdList) {
public boolean couponEdit(String uid, GoblinStoreCouponBasicVo storeCouponBasicVo) {
String storeCouponId = storeCouponBasicVo.getStoreCouponId();
LocalDateTime now = LocalDateTime.now();
......@@ -214,6 +214,7 @@ public class GoblinStoreMgtCouponServiceImpl implements IGoblinstoreMgtCouponSer
if (goblinMongoUtils.updateMgtStoreCouponBasicVo(storeCouponBasicVo)) {
goblinRedisUtils.del(GoblinRedisConst.STORE_COUPON.concat(storeCouponId));// 删除REDIS缓存
goblinRedisUtils.del(GoblinRedisConst.STORE_COUPON_RULE.concat(storeCouponId));// 删除REDIS缓存
LinkedList<String> toMqSqls = CollectionUtil.linkedListString();
toMqSqls.add(SqlMapping.get("goblin_store_coupon.update"));
......
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