| @@ -261,6 +261,9 @@ public class WxCouponController extends BaseController { | |||||
| if (coupon == null) { | if (coupon == null) { | ||||
| return new ResultData(ErrorCode.COUPON_IS_EMPTY); | return new ResultData(ErrorCode.COUPON_IS_EMPTY); | ||||
| } | } | ||||
| if(EnumCouponSendType.GIFT.getCode().equals(coupon.getSendType())){ | |||||
| return new ResultData(ErrorCode.COUPON_GIFT_NOTUPD_INVENTORY); | |||||
| } | |||||
| if ((wxCoupon.getValidEndDate() != null && coupon.getValidEndDate() != null && DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate())) | if ((wxCoupon.getValidEndDate() != null && coupon.getValidEndDate() != null && DateUtils.format(wxCoupon.getValidEndDate()).equals(DateUtils.format(coupon.getValidEndDate())) | ||||
| && wxCoupon.getInventory().equals(coupon.getInventory())) | && wxCoupon.getInventory().equals(coupon.getInventory())) | ||||
| || | || | ||||
| @@ -0,0 +1,15 @@ | |||||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 211, 212, 221, 222, 251, 409, 411, 416, 500, 502, 504, 505, 506, 507, 508, 511, 512, 521, 522, 523, 531, 532, 533, 591, 592, 595, 602, 605, 606, 610, 641, 671, 674, 680, 711, 901, 902, 904, 907]' WHERE `id` = 11; | |||||
| INSERT INTO `wx_flow_config`(`id`, `parent_id`, `tenant_id`, `parent_tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||||
| select CEILING(RAND()*90000000000+20000000000) ,id,tenant_id,parent_tenant_id, '商品预购审批',24,0,'2021-12-28 18:27:18', '2021-12-28 18:27:18', 5 | |||||
| from wx_flow_config where parent_id = 0 and type = 0 and name = '营销审批'; | |||||
| INSERT INTO `wx_flow_config`(`id`, `parent_id`, `tenant_id`, `parent_tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||||
| select CEILING(RAND()*90000000000+20000000000) ,id,tenant_id,parent_tenant_id, '配送商品审批',25,0,'2021-12-28 18:27:18', '2021-12-28 18:27:18', 5 | |||||
| from wx_flow_config where parent_id = 0 and type = 0 and name = '营销审批'; | |||||
| INSERT INTO `wx_flow_config`(`id`, `parent_id`, `tenant_id`, `parent_tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||||
| select CEILING(RAND()*90000000000+20000000000) ,id,tenant_id,parent_tenant_id, '积分券审批',26,0,'2021-12-28 18:27:18', '2021-12-28 18:27:18', 5 | |||||
| from wx_flow_config where parent_id = 0 and type = 0 and name = '营销审批'; | |||||
| @@ -149,6 +149,7 @@ public enum ErrorCode{ | |||||
| COUPON_IS_EMPTY_GIFT(2120, "子券不存在"), | COUPON_IS_EMPTY_GIFT(2120, "子券不存在"), | ||||
| COUPON_IS_TAKE_OFF_GIFT(2122, "子券存在作废券"), | COUPON_IS_TAKE_OFF_GIFT(2122, "子券存在作废券"), | ||||
| COUPON_VALID_DATE_ERR_GIFT(2135, "存在子券有效期在券包有效期之前"), | COUPON_VALID_DATE_ERR_GIFT(2135, "存在子券有效期在券包有效期之前"), | ||||
| COUPON_GIFT_NOTUPD_INVENTORY(2136, "子券没有库存"), | |||||
| /** | /** | ||||
| * 车流 2040 | * 车流 2040 | ||||
| */ | */ | ||||
| @@ -16,12 +16,15 @@ public enum EnumFlowKey { | |||||
| NEW_BILL_CHANGE(8, "账单应收金额变更"), | NEW_BILL_CHANGE(8, "账单应收金额变更"), | ||||
| NEW_COUPON_UPLINE(9, "有价券审批"), | |||||
| NEW_COUPON_UPLINE(9, "券审批"), | |||||
| NEW_CARD_UPLINE(10, "卡审批"), | NEW_CARD_UPLINE(10, "卡审批"), | ||||
| NEW_GROUP_UPLINE(11, "拼团"), | NEW_GROUP_UPLINE(11, "拼团"), | ||||
| NEW_PRESS_UPLINE(12, "砍价审批"), | NEW_PRESS_UPLINE(12, "砍价审批"), | ||||
| B_COUPON_MERCHANT_CREATE(22,"B端创建券"), | |||||
| B_COUPON_MERCHANT_CREATE(22,"B端创建券审批"), | |||||
| NEW_COUPON_PREORDER_UPLINE(24,"商品预购审批"), | |||||
| NEW_COUPON_DISTRIBUTION_UPLINE(25,"配送商品审批"), | |||||
| NEW_COUPON_CREDIT_UPLINE(26,"积分券审批"), | |||||
| NEW_PRO_CONTRACT(13, "商铺物业合同签约"), | NEW_PRO_CONTRACT(13, "商铺物业合同签约"), | ||||
| NEW_PRO_END(14, "商铺物业合同终止"), | NEW_PRO_END(14, "商铺物业合同终止"), | ||||
| @@ -114,12 +114,15 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| " ( '" + id1 + "', '0', '" + tenantId + "', '营销审批', '0', '0', '" + nowTimestr + "', '" + nowTimestr + "', '3')," + | " ( '" + id1 + "', '0', '" + tenantId + "', '营销审批', '0', '0', '" + nowTimestr + "', '" + nowTimestr + "', '3')," + | ||||
| " ( '" + id2 + "', '0', '" + tenantId + "', '合同审批', '0', '0', '" + nowTimestr + "', '" + nowTimestr + "', '1')," + | " ( '" + id2 + "', '0', '" + tenantId + "', '合同审批', '0', '0', '" + nowTimestr + "', '" + nowTimestr + "', '1')," + | ||||
| " ( '" + id3 + "', '0', '" + tenantId + "', '账单审批', '0', '0', '" + nowTimestr + "', '" + nowTimestr + "', '2')," + | " ( '" + id3 + "', '0', '" + tenantId + "', '账单审批', '0', '0', '" + nowTimestr + "', '" + nowTimestr + "', '2')," + | ||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '拼团审批', '11', '0', '" + nowTimestr + "', '" + nowTimestr + "', '3')," + | |||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '有价券审批', '9', '0', '" + nowTimestr + "', '" + nowTimestr + "', '1')," + | |||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '券审批', '9', '0', '" + nowTimestr + "', '" + nowTimestr + "', '1')," + | |||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '卡审批', '10', '0', '" + nowTimestr + "', '" + nowTimestr + "', '2')," + | " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '卡审批', '10', '0', '" + nowTimestr + "', '" + nowTimestr + "', '2')," + | ||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '拼团审批', '11', '0', '" + nowTimestr + "', '" + nowTimestr + "', '3')," + | |||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '砍价审批', '12', '0', '" + nowTimestr + "', '" + nowTimestr + "', '4')," + | " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '砍价审批', '12', '0', '" + nowTimestr + "', '" + nowTimestr + "', '4')," + | ||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', 'B端创建券', '22', '0', '" + nowTimestr + "', '" + nowTimestr + "', '5')," + | |||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', 'B端创建券审批', '22', '0', '" + nowTimestr + "', '" + nowTimestr + "', '5')," + | |||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '商户提现审批', '23', '0', '" + nowTimestr + "', '" + nowTimestr + "', '6')," + | " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '商户提现审批', '23', '0', '" + nowTimestr + "', '" + nowTimestr + "', '6')," + | ||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '商品预购审批', '24', '0', '" + nowTimestr + "', '" + nowTimestr + "', '5')," + | |||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '配送商品审批', '25', '0', '" + nowTimestr + "', '" + nowTimestr + "', '5')," + | |||||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '积分券审批', '26', '0', '" + nowTimestr + "', '" + nowTimestr + "', '5')," + | |||||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '多经点位租金+物业合同签约', '19', '0', '" + nowTimestr + "', '" + nowTimestr + "', '11')," + | " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '多经点位租金+物业合同签约', '19', '0', '" + nowTimestr + "', '" + nowTimestr + "', '11')," + | ||||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺租金+物业合同终止', '18', '0', '" + nowTimestr + "', '" + nowTimestr + "', '10')," + | " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺租金+物业合同终止', '18', '0', '" + nowTimestr + "', '" + nowTimestr + "', '10')," + | ||||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺物业合同签约', '13', '0', '" + nowTimestr + "', '" + nowTimestr + "', '5')," + | " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺物业合同签约', '13', '0', '" + nowTimestr + "', '" + nowTimestr + "', '5')," + | ||||
| @@ -122,9 +122,12 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| wxTopicMapper.insert(record); | wxTopicMapper.insert(record); | ||||
| if(EnumWxTopicType.SPECIAL_TOPIC.getCode().equals(record.getTopicType()) | |||||
| && StringUtils.isNotBlank(record.getCouponIds())) { | |||||
| addCouponTopic(record); | |||||
| if(EnumWxTopicType.SPECIAL_TOPIC.getCode().equals(record.getTopicType())){ | |||||
| if(StringUtils.isNotBlank(record.getCouponIds())){ | |||||
| addCouponTopic(record); | |||||
| }else{ | |||||
| record.setIsOnlyAd(EnumYesOrNo.YES.getCode()); | |||||
| } | |||||
| } | } | ||||
| return new ResultData(Result.SUCCESS,"添加成功"); | return new ResultData(Result.SUCCESS,"添加成功"); | ||||
| } else { | } else { | ||||
| @@ -135,6 +138,8 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| //优化:区分添加的和删除的 | //优化:区分添加的和删除的 | ||||
| wxCouponChannelMapper.delByTopic(record); | wxCouponChannelMapper.delByTopic(record); | ||||
| addCouponTopic(record); | addCouponTopic(record); | ||||
| }else{ | |||||
| record.setIsOnlyAd(EnumYesOrNo.YES.getCode()); | |||||
| } | } | ||||
| wxTopicMapper.couponDownLine(record); | wxTopicMapper.couponDownLine(record); | ||||
| } | } | ||||