| @@ -0,0 +1,200 @@ | |||
| ALTER TABLE `mallink`.`wx_coupon_0` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_1` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_2` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_3` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_4` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_5` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_6` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_7` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_8` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_9` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_10` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_11` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_12` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_13` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_14` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_15` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_16` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_17` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_18` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_19` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_20` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_21` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_22` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_23` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_24` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_25` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_26` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_27` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_28` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_29` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_30` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_31` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_32` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_33` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_34` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_35` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_36` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_37` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_38` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_39` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_40` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_41` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_42` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_43` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_44` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_45` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_46` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_47` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_48` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_49` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_50` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_51` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_52` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_53` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_54` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_55` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_56` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_57` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_58` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_59` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_60` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_61` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_62` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_63` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_64` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_65` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_66` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_67` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_68` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_69` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_70` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_71` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_72` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_73` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_74` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_75` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_76` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_77` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_78` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_79` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_80` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_81` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_82` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_83` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_84` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_85` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_86` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_87` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_88` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_89` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_90` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_91` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_92` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_93` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_94` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_95` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_96` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_97` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_98` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| ALTER TABLE `mallink`.`wx_coupon_99` | |||
| ADD COLUMN `make_merchant_id` bigint(20) DEFAULT 0 COMMENT '直连收款门店' AFTER `parent_tenant_id`; | |||
| @@ -82,8 +82,8 @@ public class UserThirdCircleOrderController extends BaseController { | |||
| if(StringUtils.isBlank(shopNumber)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"shopNumber为空"); | |||
| } | |||
| if(StringUtils.isBlank(userNumber)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"userNumber为空"); | |||
| if(StringUtils.isBlank(userNumber) && StringUtils.isBlank(userPhone)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"userNumber或userPhone为空"); | |||
| } | |||
| if(StringUtils.isNotBlank(userPhone)){ | |||
| if(!userPhone.matches("^1[0-9]{10}$")){ | |||
| @@ -327,7 +327,7 @@ public class UserThirdCircleOrderController extends BaseController { | |||
| * @return | |||
| */ | |||
| @PostMapping("/pointDeduction") | |||
| @ApiOperation(value = "积分抵扣", notes = "") | |||
| @ApiOperation(value = "积分抵扣订单", notes = "") | |||
| public ResultData pointDeduction(@RequestBody Map<String,Object> map) { | |||
| logger.info("UserThirdCircleOrderController >>>>>>>>>>>> pointDeduction >>>>>>>>>>>>>"+map.toString()); | |||
| @@ -338,7 +338,7 @@ public class UserThirdCircleOrderController extends BaseController { | |||
| String userPhone = map.get("userPhone")==null?"":map.get("userPhone").toString();//会员手机号 | |||
| String timeEnd = map.get("timeEnd")==null?"":map.get("timeEnd").toString();//***抵扣时间 | |||
| String amount = map.get("amount")==null?"":map.get("amount").toString();//***积分数量 | |||
| String summary = map.get("summary")==null?"":map.get("summary").toString();//付款摘要 | |||
| String summary = map.get("summary")==null?"":map.get("summary").toString();//摘要 | |||
| if(StringUtils.isBlank(transactionId)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"transactionId为空"); | |||
| @@ -404,4 +404,132 @@ public class UserThirdCircleOrderController extends BaseController { | |||
| } | |||
| } | |||
| /** | |||
| * | |||
| * @param | |||
| * @return | |||
| */ | |||
| @PostMapping("/pointRefund") | |||
| @ApiOperation(value = "积分退款", notes = "") | |||
| public ResultData pointRefund(@RequestBody Map<String,Object> map) { | |||
| logger.info("UserThirdCircleOrderController >>>>>>>>>>>> pointRefund >>>>>>>>>>>>>"+map.toString()); | |||
| String transactionId = map.get("transactionId")==null?"":map.get("transactionId").toString();//***订单Id | |||
| String refundTime = map.get("refundTime")==null?"":map.get("refundTime").toString();//***退款时间(yyyy-MM-dd HH:mm:ss) | |||
| String refundSummary = map.get("refundSummary")==null?"":map.get("refundSummary").toString();//退款摘要 | |||
| String refundId = map.get("refundId")==null?"":map.get("refundId").toString();//**退款Id | |||
| if(StringUtils.isBlank(transactionId)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"transactionId为空"); | |||
| } | |||
| if(refundTime == null){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"refundTime为空"); | |||
| } | |||
| Date refundTimeDate = null; | |||
| try { | |||
| refundTimeDate = sdf.parse(refundTime); | |||
| } catch (ParseException e) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"refundTime格式不正确"); | |||
| } | |||
| if(StringUtils.isBlank(refundId)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"refundId为空"); | |||
| } | |||
| WxThirdPartyOrders thirdPartyOrders = new WxThirdPartyOrders(); | |||
| thirdPartyOrders.updateTenantInfo(getTenantInfo()); | |||
| thirdPartyOrders.setSourceAppId(getAppId()); | |||
| thirdPartyOrders.setSourceAppName(getAppConfig().getName()); | |||
| thirdPartyOrders.setTransactionId(transactionId); | |||
| thirdPartyOrders.setTimeEnd(refundTimeDate); | |||
| thirdPartyOrders.setSummary(refundSummary); | |||
| thirdPartyOrders.setRefundId(refundId); | |||
| try{ | |||
| thirdPartyOrdersService.pointRefund(thirdPartyOrders); | |||
| return new ResultData(); | |||
| }catch(MallinkException e){ | |||
| logger.error(e.getMessage()); | |||
| return new ResultData(e.getErrorCode(), e.getMessage()); | |||
| }catch(Exception e){ | |||
| logger.error("异常:" + e); | |||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||
| } | |||
| } | |||
| /** | |||
| * | |||
| * @param | |||
| * @return | |||
| */ | |||
| @PostMapping("/pointChange") | |||
| @ApiOperation(value = "积分变动", notes = "") | |||
| public ResultData pointChange(@RequestBody Map<String,Object> map) { | |||
| logger.info("UserThirdCircleOrderController >>>>>>>>>>>> pointChange >>>>>>>>>>>>>"+map.toString()); | |||
| String transactionId = map.get("transactionId")==null?"":map.get("transactionId").toString();//***唯一标识 | |||
| String userNumber = map.get("userNumber")==null?"":map.get("userNumber").toString();//***会员Id | |||
| String userPhone = map.get("userPhone")==null?"":map.get("userPhone").toString();//会员手机 | |||
| String timeEnd = map.get("timeEnd")==null?"":map.get("timeEnd").toString();//***时间 | |||
| String amount = map.get("amount")==null?"":map.get("amount").toString();//***积分数量 | |||
| String summary = map.get("summary")==null?"":map.get("summary").toString();//摘要 | |||
| if(StringUtils.isBlank(transactionId)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"transactionId为空"); | |||
| } | |||
| if(StringUtils.isBlank(userNumber)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"userNumber为空"); | |||
| } | |||
| if(StringUtils.isNotBlank(userPhone)){ | |||
| if(!userPhone.matches("^1[0-9]{10}$")){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"userPhone格式不正确"); | |||
| } | |||
| } | |||
| if(StringUtils.isBlank(timeEnd)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"timeEnd为空"); | |||
| } | |||
| Date timeEndDate = null; | |||
| try { | |||
| timeEndDate = sdf.parse(timeEnd); | |||
| } catch (ParseException e) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"timeEnd格式不正确"); | |||
| } | |||
| if(StringUtils.isBlank(amount)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"amount为空"); | |||
| } | |||
| if(!NumberUtils.isCreatable(amount)){ | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"amount为非数字"); | |||
| } | |||
| try { | |||
| Integer.parseInt(amount); | |||
| } catch (NumberFormatException e) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"amount为正整数"); | |||
| } | |||
| WxThirdPartyOrders thirdPartyOrders = new WxThirdPartyOrders(); | |||
| thirdPartyOrders.updateTenantInfo(getTenantInfo()); | |||
| thirdPartyOrders.setSourceAppId(getAppId()); | |||
| thirdPartyOrders.setSourceAppName(getAppConfig().getName()); | |||
| thirdPartyOrders.setTransactionId(transactionId); | |||
| thirdPartyOrders.setUserNumber(userNumber); | |||
| thirdPartyOrders.setUserPhone(userPhone); | |||
| thirdPartyOrders.setTimeEnd(timeEndDate); | |||
| thirdPartyOrders.setAmount(Integer.parseInt(amount)); | |||
| thirdPartyOrders.setPayAmount(Integer.parseInt(amount)); | |||
| thirdPartyOrders.setSummary(summary); | |||
| try{ | |||
| thirdPartyOrdersService.pointChange(thirdPartyOrders); | |||
| return new ResultData(); | |||
| }catch(MallinkException e){ | |||
| logger.error(e.getMessage()); | |||
| return new ResultData(e.getErrorCode(), e.getMessage()); | |||
| }catch(Exception e){ | |||
| logger.error("异常:" + e); | |||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||
| } | |||
| } | |||
| } | |||
| @@ -249,6 +249,9 @@ public class WxCoupon extends TenantEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="卷包内容",name="giftList") | |||
| private String giftList; | |||
| @io.swagger.annotations.ApiModelProperty(value="直连收款门店",name="makeMerchantId") | |||
| private Long makeMerchantId; | |||
| @io.swagger.annotations.ApiModelProperty(value="EnumTtProductType",name="productType") | |||
| private Integer productType; | |||
| @@ -46,7 +46,7 @@ public class WxCouponChannel extends TenantEntity { | |||
| private Integer type; | |||
| @io.swagger.annotations.ApiModelProperty(value="券名称",name="title") | |||
| private String title; | |||
| @io.swagger.annotations.ApiModelProperty(value="EnumCouponChannelType投放频道位置(1.列表, 2.限时抢购)",name="targetAd") | |||
| @io.swagger.annotations.ApiModelProperty(value="EnumCouponChannelType 投放频道位置(1.列表, 2.限时抢购)",name="targetAd") | |||
| private Integer targetAd; | |||
| @io.swagger.annotations.ApiModelProperty(value="业态",name="business") | |||
| private Integer business; | |||
| @@ -14,7 +14,7 @@ public enum EnumScoreType { | |||
| COMPLETE_INFO(7, "完善个人信息"), | |||
| MEM_IMPORT(8, "会员导入"), | |||
| MEM_REDUCE(9, "会员成长值扣减"), | |||
| SPEND_CREDIT(10, "新增积分"), | |||
| SPEND_CREDIT(10, "新增积分"),//通过金额计算 | |||
| CHANGE_CREDIT(11, "积分兑换"), | |||
| REDUCE_CREDIT(12, "消费积分"), | |||
| ACTIVITY_JOIN(13, "活动报名"), | |||
| @@ -31,7 +31,7 @@ public enum EnumScoreType { | |||
| REFUND_CONSUMPTION(22, "消费退款"), | |||
| REFUND_REDUCE_CREDIT(23, "积分兑换退款"), | |||
| POINT_CHANGE(24, "新增积分"),//纯积分添加 | |||
| ; | |||
| public static EnumScoreType getEnum(Integer code) { | |||
| @@ -8,7 +8,8 @@ package com.iformall.enums; | |||
| public enum EnumThirdOrderType { | |||
| RMB_PAY(1,"rmb订单"), | |||
| CREDIT_PAY(2,"积分订单") | |||
| CREDIT_PAY(2,"积分订单"), | |||
| CREDIT_CHANGE(3,"积分变动") | |||
| ; | |||
| public static EnumThirdOrderType getEnum(Integer code) { | |||
| @@ -58,6 +58,10 @@ public interface WxThirdPartyOrdersService { | |||
| */ | |||
| void pointDeduction(WxThirdPartyOrders record); | |||
| void pointRefund(WxThirdPartyOrders thirdPartyOrders); | |||
| void pointChange(WxThirdPartyOrders record); | |||
| void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response); | |||
| void exportDataVo(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response); | |||
| @@ -65,4 +69,6 @@ public interface WxThirdPartyOrdersService { | |||
| Integer sumCirclePayment(BusinessCircleBase circleOrder); | |||
| Integer sumCircleRefundAmount(BusinessCircleBase circleOrder); | |||
| } | |||
| @@ -637,10 +637,10 @@ public class WxCouponServiceImpl implements WxCouponService { | |||
| private ResultData checkCouponMerchantReceiver(WxCoupon record){ | |||
| List<JSONObject> merchantParamList = JSONObject.parseArray(record.getMerchantParams(), JSONObject.class); | |||
| if(EnumCouponType.COUPON_GIFT.getCode().equals(record.getType())){ | |||
| return new ResultData(); | |||
| } | |||
| if((merchantParamList == null || merchantParamList.isEmpty())){ | |||
| // if(EnumCouponType.COUPON_GIFT.getCode().equals(record.getType())){ | |||
| // return new ResultData(); | |||
| // } | |||
| if(merchantParamList == null || merchantParamList.isEmpty()){ | |||
| return new ResultData(); | |||
| } | |||
| if(record.getSalePrice() != null && record.getSalePrice() > 0) { | |||
| @@ -708,6 +708,7 @@ public class WxCouponServiceImpl implements WxCouponService { | |||
| record.setMerchantType(EnumCouponMerchantType.ONE_MERCHANT.getCode()); | |||
| merchantId = merchantIds.get(0); | |||
| } | |||
| record.setMakeMerchantId(merchantId); | |||
| WxProfitSharingReceiver receiver = payShareServie.getReceiver(payAccount, merchantId, null, payMchTypeEnum.getCode()); | |||
| if (receiver == null) { | |||
| @@ -813,6 +813,12 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||
| if (record.getCreditType() == EnumScoreType.REFUND_CONSUMPTION.getCode()) { | |||
| return reduceCredit(record); | |||
| } | |||
| if (record.getCreditType() == EnumScoreType.REFUND_REDUCE_CREDIT.getCode()) { | |||
| return record.getCreditNum(); | |||
| } | |||
| if (record.getCreditType() == EnumScoreType.POINT_CHANGE.getCode()) { | |||
| return record.getCreditNum(); | |||
| } | |||
| return 0; | |||
| } | |||
| @@ -235,7 +235,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| jo.put("account",receiver.getReceiverAccount()); | |||
| jo.put("amount", sellerAmount); | |||
| jo.put("merchantId",receiver.getMerchantId()); | |||
| jo.put("description",receiver.getId().toString()); //为重试做准备 | |||
| jo.put("description","系统1"); | |||
| receivers.add(jo); | |||
| } | |||
| } | |||
| @@ -257,7 +257,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| jo.put("account",receiver.getReceiverAccount()); | |||
| jo.put("amount", sellerAmount); | |||
| jo.put("merchantId",receiver.getMerchantId()); | |||
| jo.put("description",receiver.getId().toString()); //为重试做准备 | |||
| jo.put("description","系统2"); | |||
| receivers.add(jo); | |||
| } | |||
| } | |||
| @@ -281,7 +281,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| jo.put("account",receiver.getReceiverAccount()); | |||
| jo.put("amount", sellerAmount); | |||
| jo.put("merchantId",receiver.getMerchantId()); | |||
| jo.put("description",receiver.getId().toString()); //为重试做准备 | |||
| jo.put("description","服务台"); | |||
| receivers.add(jo); | |||
| } | |||
| } | |||
| @@ -302,7 +302,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| jo.put("account",receiver.getReceiverAccount()); | |||
| jo.put("amount", shareAmount); | |||
| jo.put("merchantId",receiver.getMerchantId()); | |||
| jo.put("description",receiver.getId().toString()); //为重试做准备 | |||
| jo.put("description","商户"); | |||
| receivers.add(jo); | |||
| } | |||
| @@ -327,7 +327,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| updSharingOrder.setPayTimeEnd(currentDate); | |||
| updSharingOrder.setSharingOrderNo(shareResult.getShareOrderNo()); | |||
| updSharingOrder.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_ACCEPTED.getCode()); | |||
| updSharingOrder.setErrorMsg(""); | |||
| updSharingOrder.setErrorMsg(shareResult.getMsg()); | |||
| }else{ | |||
| updSharingOrder.setSharingStatus(shareResult.getCode()); | |||
| updSharingOrder.setErrorMsg(shareResult.getMsg()); | |||
| @@ -343,7 +343,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| jo.put("account",receiver.getReceiverAccount()); | |||
| jo.put("amount", shareAmount); | |||
| jo.put("merchantId",receiver.getMerchantId()); | |||
| jo.put("description",receiver.getId().toString()); | |||
| jo.put("description","商户"); | |||
| receivers.add(jo); | |||
| } | |||
| try{ | |||
| @@ -358,6 +358,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| result.setSharingOrderId(sharingOrder.getId()); | |||
| result.setSharingReceiverId(Long.valueOf(o.getString("description"))); | |||
| result.setPayAmount(o.getInteger("amount")); | |||
| result.setDescription(o.getString("description")); | |||
| result.setCreateTime(currentDate); | |||
| result.setUpdateTime(currentDate); | |||
| result.setSharingStatus(EnumProfitSharingResultStatus.PROFIT_SHARING_RESULT_PENDING.getCode()); | |||
| @@ -451,6 +451,178 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService | |||
| } | |||
| } | |||
| @Override | |||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | |||
| public void pointRefund(WxThirdPartyOrders record) { | |||
| WxThirdPartyOrders order = this.getOrderByTransactionId(EnumThirdOrderType.CREDIT_PAY,record.getTransactionId(),record.getTenantId()); | |||
| if(order == null){ | |||
| logger.error("--第三方积分退款--积分付款消息未找到--transactionId="+record.getTransactionId()); | |||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "积分抵扣订单未找到"); | |||
| }else{ | |||
| String lockKey = StringUtils.join(THIRD_CIRCLE_KEY,record.getRefundId(), ":CPR:", "lock"); | |||
| long time = System.currentTimeMillis() + 2000; | |||
| String timeStr = String.valueOf(time); | |||
| if (redisLock.lock2(lockKey, timeStr)) { | |||
| WxThirdPartyOrders refundOrder = this.getRefundOrderByRefundId(EnumThirdOrderType.CREDIT_PAY,record.getRefundId(),record.getTenantId()); | |||
| if(refundOrder != null){ | |||
| logger.error("--第三方积分退款--退款消息已存在---RefundId="+record.getRefundId()); | |||
| redisLock.unlock(lockKey, timeStr); | |||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "退款数据已存在"); | |||
| }else{ | |||
| List<WxThirdPartyOrders> refundOrders = this.getRefundOrderByTransactionId(EnumThirdOrderType.CREDIT_PAY,record.getTransactionId(),record.getTenantId()); | |||
| if(refundOrders != null && refundOrders.size()>0){ | |||
| logger.error("--第三方积分退款--已经退款--transactionId="+record.getTransactionId()); | |||
| redisLock.unlock(lockKey, timeStr); | |||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "已退款"); | |||
| }else{ | |||
| Date now = new Date(); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreateTime(now); | |||
| record.setUpdateTime(now); | |||
| record.setSourceType(EnumThirdOrderType.CREDIT_PAY.getCode()); | |||
| record.setRefundAmount(order.getPayAmount()); | |||
| record.setShopName(order.getShopName()); | |||
| record.setShopNumber(order.getShopNumber()); | |||
| record.setUserPhone(order.getUserPhone()); | |||
| record.setUserNumber(order.getUserNumber()); | |||
| record.setAmount(order.getAmount()); | |||
| record.setPayAmount(order.getPayAmount()); | |||
| record.setCUserId(order.getCUserId()); | |||
| record.setCUserNickName(order.getCUserNickName()); | |||
| record.setCUserPhone(order.getCUserPhone()); | |||
| record.setMerchantId(order.getMerchantId()); | |||
| record.setMerchantName(order.getMerchantName()); | |||
| wxThirdPartyOrdersMapper.insertRefundNoticeOrder(record); | |||
| order.setOrderStatus(2);//全额退款 | |||
| order.setUpdateTime(now); | |||
| wxThirdPartyOrdersMapper.updateOrderStatus(order); | |||
| int creditNum = 0; | |||
| if(order.getEarnPoints().equals(EnumYesOrNo.YES.getCode())){ | |||
| WxCreditHistory creditHistory = new WxCreditHistory(); | |||
| creditHistory.setTenantId(record.getFinalTenantId()); | |||
| creditHistory.setOperatorType(EnumUserType.THIRD_CIRCLE.getCode()); | |||
| creditHistory.setOperatorId(record.getCUserId()); | |||
| creditHistory.setCUserId(record.getCUserId()); | |||
| creditHistory.setCreateDate(new Date()); | |||
| creditHistory.setCouponId(record.getId()); | |||
| creditHistory.setMerchantId(record.getMerchantId()); | |||
| creditHistory.setCreditType(EnumScoreType.REFUND_REDUCE_CREDIT.getCode()); | |||
| creditHistory.setCreditNum(record.getRefundAmount()); | |||
| creditHistory.setSpend(0-record.getRefundAmount()); | |||
| creditHistory.setChangePurpose(record.getSourceAppName()+"·积分退款:商户["+record.getMerchantName()+"] ("+record.getRefundAmountStr()+") "); | |||
| creditHistory = wxCreditHistoryService.saveOrUpdate(creditHistory,record.getTenantId()); | |||
| if (creditHistory.getCreditNum() != null) { | |||
| creditNum = creditHistory.getCreditNum(); | |||
| } | |||
| if(creditNum != 0){ | |||
| record.setIncreasedPoints(creditNum); | |||
| record.setPointsUpdateTime(creditHistory.getCreateDate()); | |||
| this.updatePoints(record); | |||
| } | |||
| } | |||
| redisLock.unlock(lockKey, timeStr); | |||
| // return new ResultData(creditNum); | |||
| } | |||
| } | |||
| }else { | |||
| logger.debug("CacheAspect 读库等待中, key:{}: " + lockKey); | |||
| try { | |||
| Thread.sleep(2000); | |||
| } catch (InterruptedException e) { | |||
| e.printStackTrace(); | |||
| }finally { | |||
| redisLock.unlock(lockKey, timeStr); | |||
| } | |||
| // return new ResultData(ErrorCode.SYS_REPEAT_SUBMIT_EXCEPTION); | |||
| } | |||
| } | |||
| } | |||
| @Override | |||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | |||
| public void pointChange(WxThirdPartyOrders record) { | |||
| WxCUserBasicInfo basicInfo = null; | |||
| Long userId = null; | |||
| try { | |||
| userId = Long.parseLong(record.getUserNumber()); | |||
| } catch (NumberFormatException e) {} | |||
| if(userId != null){ | |||
| basicInfo = wxCUserBasicInfoService.getById(userId, record.getFinalTenantId()); | |||
| } | |||
| if(basicInfo == null){ | |||
| logger.error("--第三方积分变动--未找到用户---userId="+record.getUserNumber()); | |||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "未找到用户"); | |||
| } | |||
| record.setCUserId(basicInfo.getId()); | |||
| record.setCUserNickName(basicInfo.getNickName()); | |||
| record.setCUserPhone(basicInfo.getPhone()); | |||
| String lockKey = StringUtils.join(THIRD_CIRCLE_KEY,record.getTransactionId(), ":PACC:", "lock"); | |||
| long time = System.currentTimeMillis() + 2000; | |||
| String timeStr = String.valueOf(time); | |||
| if (redisLock.lock2(lockKey, timeStr)) { | |||
| WxThirdPartyOrders byTransactionId = this.getOrderByTransactionId(EnumThirdOrderType.CREDIT_CHANGE,record.getTransactionId(),record.getTenantId()); | |||
| if(byTransactionId != null){ | |||
| logger.error("--第三方积分变动--数据已存在---byTransactionId="+byTransactionId.getTransactionId()); | |||
| redisLock.unlock(lockKey, timeStr); | |||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "订单数据已存在"); | |||
| }else{ | |||
| Date now = new Date(); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreateTime(now); | |||
| record.setUpdateTime(now); | |||
| record.setSourceType(EnumThirdOrderType.CREDIT_CHANGE.getCode()); | |||
| WxCreditHistory creditHistory = new WxCreditHistory(); | |||
| creditHistory.setTenantId(record.getFinalTenantId()); | |||
| creditHistory.setCUserId(basicInfo.getId()); | |||
| creditHistory.setOperatorId(basicInfo.getId()); | |||
| creditHistory.setOperatorType(EnumUserType.THIRD_CIRCLE.getCode()); | |||
| creditHistory.setCreditNum(record.getPayAmount()); | |||
| creditHistory.setCreditType(EnumScoreType.POINT_CHANGE.getCode()); | |||
| if(creditHistory.getCreditNum() > 0){ | |||
| creditHistory.setChangePurpose(record.getSourceAppName()+"·积分新增-"+record.getPayAmount()+"{"+record.getSummary()+"}"); | |||
| }else if(creditHistory.getCreditNum() > 0){ | |||
| creditHistory.setChangePurpose(record.getSourceAppName()+"·积分扣减-"+record.getPayAmount()+"{"+record.getSummary()+"}"); | |||
| } | |||
| creditHistory.setCouponId(record.getId()); | |||
| creditHistory = wxCreditHistoryService.saveOrUpdate(creditHistory, record.getTenantId()); | |||
| Integer creditNum = 0; | |||
| if (creditHistory.getCreditNum() != null) { | |||
| creditNum = creditHistory.getCreditNum(); | |||
| } | |||
| if(creditNum == 0){ | |||
| redisLock.unlock(lockKey, timeStr); | |||
| throw new MallinkException(ErrorCode.CREDIT_ZERO.getCode(), "本次扣减积分为0"); | |||
| } | |||
| wxThirdPartyOrdersMapper.insertNoticeOrder(record); | |||
| } | |||
| redisLock.unlock(lockKey, timeStr); | |||
| }else{ | |||
| logger.debug("CacheAspect 读库等待中, key:{}: " + lockKey); | |||
| try { | |||
| Thread.sleep(2000); | |||
| } catch (InterruptedException e) { | |||
| e.printStackTrace(); | |||
| }finally { | |||
| redisLock.unlock(lockKey, timeStr); | |||
| } | |||
| } | |||
| } | |||
| @Override | |||
| public void exportData(WxThirdPartyOrders circleOrder, HttpServletRequest request, HttpServletResponse response) { | |||
| List<WxThirdPartyOrders> list = wxThirdPartyOrdersMapper.findList(circleOrder); | |||
| @@ -5,6 +5,7 @@ | |||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||
| <result column="make_merchant_id" jdbcType="BIGINT" property="makeMerchantId"/> | |||
| <result column="type" jdbcType="INTEGER" property="type"/> | |||
| <result column="cover_img" jdbcType="VARCHAR" property="coverImg"/> | |||
| <result column="cover_picture" jdbcType="VARCHAR" property="coverPicture"/> | |||
| @@ -63,6 +64,7 @@ | |||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||
| <result column="make_merchant_id" jdbcType="BIGINT" property="makeMerchantId"/> | |||
| <result column="type" jdbcType="INTEGER" property="type"/> | |||
| <result column="cover_img" jdbcType="VARCHAR" property="coverImg"/> | |||
| <result column="cover_picture" jdbcType="VARCHAR" property="coverPicture"/> | |||
| @@ -112,7 +114,7 @@ | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| distinct c.`id`,c.`tenant_id`,c.`parent_tenant_id`,c.`type`,c.`cover_img`,c.`cover_picture`,c.`detail_picture`, | |||
| distinct c.`id`,c.`tenant_id`,c.`parent_tenant_id`,c.`make_merchant_id`,c.`type`,c.`cover_img`,c.`cover_picture`,c.`detail_picture`, | |||
| c.`title`,c.`sub_title`,c.`item_group`,c.`sale_price`,c.`freight_price`,c.`use_price`,c.`use_limit_rule`,c.`use_limit_quantity`,c.`send_type`, | |||
| c.`valid_type`,c.`valid_start_date`,c.`valid_end_date`,c.pick_start_date,c.pick_end_date,c.`valid_days`,c.`detail`,c.`price`,c.tail_price,c.orig_price,c.`unit`,c.`remain_inventory`,c.`inventory`, | |||
| c.`remark`,c.`status`,c.`create_date`,c.`update_date`,c.`business`,c.`sub_business`,c.`support_transfer`,c.`subsidy_num`,c.`subsidy_type`, | |||