diff --git a/mallinkService/src/main/java/com/iformall/domain/dto/WxCouponChannelDto.java b/mallinkService/src/main/java/com/iformall/domain/dto/WxCouponChannelDto.java index 7a0d81ef0..cc7395973 100644 --- a/mallinkService/src/main/java/com/iformall/domain/dto/WxCouponChannelDto.java +++ b/mallinkService/src/main/java/com/iformall/domain/dto/WxCouponChannelDto.java @@ -19,7 +19,7 @@ public class WxCouponChannelDto implements Serializable { private Date showBeginTime; - private Integer type; + private String type; @TableField(exist = false) @io.swagger.annotations.ApiModelProperty(value = "审批流参数", name = "flowParams") diff --git a/mallinkService/src/main/java/com/iformall/service/WxCouponChannelService.java b/mallinkService/src/main/java/com/iformall/service/WxCouponChannelService.java index 33b2e92c1..d1842ade2 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxCouponChannelService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxCouponChannelService.java @@ -71,7 +71,7 @@ public interface WxCouponChannelService { */ ResultData saveOrUpdate(WxCouponChannel record); - ResultData addBatch(Integer type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime); + ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime); void updateStatusByCouponId(Long couponId,TenantEntity tenantEntity,int status); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java index 686099490..e6fbd7044 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java @@ -144,19 +144,19 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { } @Override - public ResultData addBatch(Integer type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime) { + public ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime) { //如果当前版本是推广版,则线上只能有一个拼团,一个砍价 WxMall mall = wxMallMapper.getByTenantId(tenantEntity.getTenantId()); if (mall.getSaleType().intValue() == 4 ) { - if (null != type && (type.intValue() == EnumCouponType.COUPON_PRESS.getCode().intValue() - || type.intValue() == EnumCouponType.COUPON_GROUP.getCode().intValue())) { + if (null != type && (type.equals(String.valueOf(EnumCouponType.COUPON_PRESS.getCode().intValue())) + || type.equals(String.valueOf(EnumCouponType.COUPON_GROUP.getCode().intValue())))) { WxCouponChannel record = new WxCouponChannel(); record.updateTenantInfo(tenantEntity); record.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); - record.setType(type); + record.setType(Integer.parseInt(type)); List list = wxCouponChannelMapper.findVoList(record); if (null != list && list.size() > 0 ) { - return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED,"该版本【拼团】、【砍价】线上只能发布一个。"); + return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】线上只能发布一个。"); } } }