xiaohanzi 5 лет назад
Родитель
Сommit
21290c288e
2 измененных файлов: 22 добавлений и 4 удалений
  1. +2
    -2
      mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java
  2. +20
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java

+ 2
- 2
mallinkAdmin/src/main/java/com/iformall/config/ShiroConfig.java Просмотреть файл

@@ -153,8 +153,8 @@ public class ShiroConfig {
//配置退出 过滤器,其中的具体的退出代码Shiro已经替我们实现了
filterChainDefinitionMap.put("/logout", "authc");

// filterChainDefinitionMap.put("/**", "corsFilter,token,authc");
filterChainDefinitionMap.put("/**", "anon");
filterChainDefinitionMap.put("/**", "corsFilter,token,authc");
// filterChainDefinitionMap.put("/**", "anon");


shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);


+ 20
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java Просмотреть файл

@@ -151,7 +151,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
if (null != type && (type.equals(String.valueOf(EnumCouponType.COUPON_PRESS.getCode().intValue()))
|| type.equals(String.valueOf(EnumCouponType.COUPON_GROUP.getCode().intValue())))) {
if (null != ids && ids.length > 1) {
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】线上只能投放一个,请勾选一个。");
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】、【限时抢购】、【预售】线上只能投放一个,请勾选一个。");
}
WxCouponChannel record = new WxCouponChannel();
@@ -160,9 +160,27 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
record.setType(Integer.parseInt(type));
List<WxCouponChannelVo> list = wxCouponChannelMapper.findVoList(record);
if (null != list && list.size() > 0 ) {
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】线上只能投放一个,已经存在已上线的活动,不能再投放。");
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】、【限时抢购】、【预售】线上只能投放一个,已经存在已上线的活动,不能再投放。");
}
}
//限时抢购
if (null != channelId && channelId.length == 1) {
String cid = channelId[0];
if (cid.equals(String.valueOf(EnumCouponChannelType.COUPON_CHANNEL_ID_TIMED.getCode()))) {
if (null != ids && ids.length > 1) {
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】、【限时抢购】、【预售】线上只能投放一个,请勾选一个。");
}
WxCouponChannel record = new WxCouponChannel();
record.updateTenantInfo(tenantEntity);
record.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
record.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_TIMED.getCode());
List<WxCouponChannelVo> list = wxCouponChannelMapper.findVoList(record);
if (null != list && list.size() > 0 ) {
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】、【限时抢购】、【预售】线上只能投放一个,已经存在已上线的活动,不能再投放。");
}
}
}
}
List<WxCouponChannelAddVo> errorList = new ArrayList<>();


Загрузка…
Отмена
Сохранить