| @@ -54,6 +54,7 @@ public class WxScoreHistoryController extends BaseController { | |||||
| if (checkMemberStatus(wxScoreHistory.getCUserId())) { | if (checkMemberStatus(wxScoreHistory.getCUserId())) { | ||||
| return new ResultData(ErrorCode.MEMBER_IS_LOCKED); | return new ResultData(ErrorCode.MEMBER_IS_LOCKED); | ||||
| } | } | ||||
| wxScoreHistory.updateTenantInfo(getTenantInfo()); | |||||
| wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -66,6 +67,7 @@ public class WxScoreHistoryController extends BaseController { | |||||
| if (checkMemberStatus(wxScoreHistory.getCUserId())) { | if (checkMemberStatus(wxScoreHistory.getCUserId())) { | ||||
| return new ResultData(ErrorCode.MEMBER_IS_LOCKED); | return new ResultData(ErrorCode.MEMBER_IS_LOCKED); | ||||
| } | } | ||||
| wxScoreHistory.updateTenantInfo(getTenantInfo()); | |||||
| wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -43,6 +43,7 @@ public class WxMsgConfigController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxMsgConfigController::add"); | logger.debug("[" + getIpAddr() + "] WxMsgConfigController::add"); | ||||
| //Assert.notNull(wxMsgConfig.getName(), "角色名不能为空"); | //Assert.notNull(wxMsgConfig.getName(), "角色名不能为空"); | ||||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | ||||
| wxMsgConfig.updateTenantInfo(getTenantInfo()); | |||||
| wxMsgConfigService.saveOrUpdate(wxMsgConfig); | wxMsgConfigService.saveOrUpdate(wxMsgConfig); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -52,6 +53,7 @@ public class WxMsgConfigController extends BaseController { | |||||
| @SystemControllerLog(description = "短信-配置-更新") | @SystemControllerLog(description = "短信-配置-更新") | ||||
| public ResultData update(@RequestBody WxMsgConfig wxMsgConfig) { | public ResultData update(@RequestBody WxMsgConfig wxMsgConfig) { | ||||
| logger.debug("[" + getIpAddr() + "] WxMsgConfigController::update"); | logger.debug("[" + getIpAddr() + "] WxMsgConfigController::update"); | ||||
| wxMsgConfig.updateTenantInfo(getTenantInfo()); | |||||
| wxMsgConfigService.saveOrUpdate(wxMsgConfig); | wxMsgConfigService.saveOrUpdate(wxMsgConfig); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -56,6 +56,7 @@ public class WxMsgSignatureController extends BaseController { | |||||
| @SystemControllerLog(description = "消息签名-更新") | @SystemControllerLog(description = "消息签名-更新") | ||||
| public ResultData update(@RequestBody WxMsgSignature wxMsgSignature) { | public ResultData update(@RequestBody WxMsgSignature wxMsgSignature) { | ||||
| logger.debug("[" + getIpAddr() + "] WxMsgSignatureController::update"); | logger.debug("[" + getIpAddr() + "] WxMsgSignatureController::update"); | ||||
| wxMsgSignature.updateTenantInfo(getTenantInfo()); | |||||
| wxMsgSignatureService.saveOrUpdate(wxMsgSignature); | wxMsgSignatureService.saveOrUpdate(wxMsgSignature); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -41,6 +41,7 @@ public class WxMsgValidationcodeController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::add"); | logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::add"); | ||||
| //Assert.notNull(wxMsgValidationcode.getName(), "角色名不能为空"); | //Assert.notNull(wxMsgValidationcode.getName(), "角色名不能为空"); | ||||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | ||||
| wxMsgValidationcode.updateTenantInfo(getTenantInfo()); | |||||
| wxMsgValidationcodeService.saveOrUpdate(wxMsgValidationcode); | wxMsgValidationcodeService.saveOrUpdate(wxMsgValidationcode); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -49,6 +50,7 @@ public class WxMsgValidationcodeController extends BaseController { | |||||
| @SystemControllerLog(description = "消息验证码-更新") | @SystemControllerLog(description = "消息验证码-更新") | ||||
| public ResultData update(@RequestBody WxMsgValidationcode wxMsgValidationcode) { | public ResultData update(@RequestBody WxMsgValidationcode wxMsgValidationcode) { | ||||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::update"); | logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::update"); | ||||
| wxMsgValidationcode.updateTenantInfo(getTenantInfo()); | |||||
| wxMsgValidationcodeService.saveOrUpdate(wxMsgValidationcode); | wxMsgValidationcodeService.saveOrUpdate(wxMsgValidationcode); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -41,6 +41,9 @@ public class WxMsgCallbackServiceImpl implements WxMsgCallbackService { | |||||
| @Autowired | @Autowired | ||||
| WxCouponPasswordMapper wxCouponPasswordMapper; | WxCouponPasswordMapper wxCouponPasswordMapper; | ||||
| @Autowired | |||||
| WxMallMapper wxMallMapper; | |||||
| @Override | @Override | ||||
| public PageInfo<WxMsgCallback> listAsPage(WxMsgCallback record, Integer pageIndex, Integer pageSize) { | public PageInfo<WxMsgCallback> listAsPage(WxMsgCallback record, Integer pageIndex, Integer pageSize) { | ||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgCallbackMapper.findList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgCallbackMapper.findList(record)); | ||||
| @@ -74,6 +77,10 @@ public class WxMsgCallbackServiceImpl implements WxMsgCallbackService { | |||||
| logger.info("短信发送回调SIGN校验成功"); | logger.info("短信发送回调SIGN校验成功"); | ||||
| WxMsgConfig wxMsgConfig = new WxMsgConfig(); | WxMsgConfig wxMsgConfig = new WxMsgConfig(); | ||||
| wxMsgConfig.setTenantId(tenantId); | wxMsgConfig.setTenantId(tenantId); | ||||
| WxMall byTenantId = wxMallMapper.getByTenantId(tenantId); | |||||
| if(StringUtils.isNotBlank(byTenantId.getParentTenantId())){ | |||||
| wxMsgConfig.setParentTenantId(byTenantId.getParentTenantId()); | |||||
| } | |||||
| List<WxMsgConfig> list = wxMsgConfigMapper.findList(wxMsgConfig); | List<WxMsgConfig> list = wxMsgConfigMapper.findList(wxMsgConfig); | ||||
| List<WxMsgCallback> wxMsgCallbacks = JSONArray.parseArray(param.get("item"), WxMsgCallback.class); | List<WxMsgCallback> wxMsgCallbacks = JSONArray.parseArray(param.get("item"), WxMsgCallback.class); | ||||
| wxMsgConfig = list.get(0); | wxMsgConfig = list.get(0); | ||||
| @@ -109,7 +116,7 @@ public class WxMsgCallbackServiceImpl implements WxMsgCallbackService { | |||||
| Long callbackId = wxMsgCallback.getId(); | Long callbackId = wxMsgCallback.getId(); | ||||
| wxMsgCallback.setId(idWorker.nextId()); | wxMsgCallback.setId(idWorker.nextId()); | ||||
| wxMsgCallback.setCallbackId(callbackId); | wxMsgCallback.setCallbackId(callbackId); | ||||
| wxMsgCallback.setTenantId(tenantId); | |||||
| wxMsgCallback.updateTenantInfo(wxMsgConfig); | |||||
| wxMsgCallback.setSign(param.get("sign")); | wxMsgCallback.setSign(param.get("sign")); | ||||
| wxMsgCallback.setCreatetime(new Date()); | wxMsgCallback.setCreatetime(new Date()); | ||||
| wxMsgCallbackMapper.insert(wxMsgCallback); | wxMsgCallbackMapper.insert(wxMsgCallback); | ||||
| @@ -83,7 +83,7 @@ public class WxMsgModelServiceImpl implements WxMsgModelService { | |||||
| if (wxMsgModel.getId() == null) { | if (wxMsgModel.getId() == null) { | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| wxMsgModel.setId(idWorker.nextId()); | wxMsgModel.setId(idWorker.nextId()); | ||||
| wxMsgModel.setTenantId(wxMsgModel.getTenantId()); | |||||
| wxMsgModel.updateTenantInfo(wxMsgModel); | |||||
| if(jsonObjectResult.get("data") != null){ | if(jsonObjectResult.get("data") != null){ | ||||
| String data = jsonObjectResult.get("data").toString(); | String data = jsonObjectResult.get("data").toString(); | ||||
| wxMsgModel.setModelId(Integer.valueOf(data)); | wxMsgModel.setModelId(Integer.valueOf(data)); | ||||
| @@ -110,7 +110,7 @@ public class WxMsgModelServiceImpl implements WxMsgModelService { | |||||
| if (wxMsgModel.getId() == null) { | if (wxMsgModel.getId() == null) { | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| wxMsgModel.setId(idWorker.nextId()); | wxMsgModel.setId(idWorker.nextId()); | ||||
| wxMsgModel.setTenantId(wxMsgModel.getTenantId()); | |||||
| wxMsgModel.updateTenantInfo(wxMsgModel); | |||||
| wxMsgModel.setCreatetime(new Date()); | wxMsgModel.setCreatetime(new Date()); | ||||
| wxMsgModel.setStatus(1); | wxMsgModel.setStatus(1); | ||||
| wxMsgModelMapper.insert(wxMsgModel); | wxMsgModelMapper.insert(wxMsgModel); | ||||
| @@ -36,16 +36,19 @@ public class WxMsgRecordServiceImpl implements WxMsgRecordService { | |||||
| }else if(data instanceof WxMsg){ | }else if(data instanceof WxMsg){ | ||||
| WxMsg wxMsg = (WxMsg)data; | WxMsg wxMsg = (WxMsg)data; | ||||
| msgRecord.setTenantId(wxMsg.getTenantId()); | msgRecord.setTenantId(wxMsg.getTenantId()); | ||||
| msgRecord.setParentTenantId(wxMsg.getParentTenantId()); | |||||
| msgRecord.setMsgType(wxMsg.getMsgType()); | msgRecord.setMsgType(wxMsg.getMsgType()); | ||||
| msgRecord.setReceiver(wxMsg.getPhones()); | msgRecord.setReceiver(wxMsg.getPhones()); | ||||
| }else if(data instanceof MailMsg){ | }else if(data instanceof MailMsg){ | ||||
| MailMsg wxMsg = (MailMsg)data; | MailMsg wxMsg = (MailMsg)data; | ||||
| msgRecord.setTenantId(wxMsg.getTenantId()); | msgRecord.setTenantId(wxMsg.getTenantId()); | ||||
| msgRecord.setParentTenantId(wxMsg.getParentTenantId()); | |||||
| msgRecord.setMsgType(wxMsg.getMsgType()); | msgRecord.setMsgType(wxMsg.getMsgType()); | ||||
| msgRecord.setReceiver(JsonUtil.obj2Json(wxMsg.getTo())); | msgRecord.setReceiver(JsonUtil.obj2Json(wxMsg.getTo())); | ||||
| }else if(data instanceof SmartAppMsg){ | }else if(data instanceof SmartAppMsg){ | ||||
| SmartAppMsg wxMsg = (SmartAppMsg)data; | SmartAppMsg wxMsg = (SmartAppMsg)data; | ||||
| msgRecord.setTenantId(wxMsg.getTenantId()); | msgRecord.setTenantId(wxMsg.getTenantId()); | ||||
| msgRecord.setParentTenantId(wxMsg.getParentTenantId()); | |||||
| msgRecord.setMsgType(wxMsg.getMsgType()); | msgRecord.setMsgType(wxMsg.getMsgType()); | ||||
| msgRecord.setReceiver(wxMsg.getTo()); | msgRecord.setReceiver(wxMsg.getTo()); | ||||
| } | } | ||||
| @@ -323,6 +323,7 @@ public class WxMsgServiceImpl implements WxMsgService { | |||||
| wxMsgCallback.setId(idWorker.nextId()); | wxMsgCallback.setId(idWorker.nextId()); | ||||
| wxMsgCallback.setPhone(phone); | wxMsgCallback.setPhone(phone); | ||||
| wxMsgCallback.setTenantId(wxmsg.getTenantId()); | wxMsgCallback.setTenantId(wxmsg.getTenantId()); | ||||
| wxMsgCallback.setParentTenantId(wxmsg.getParentTenantId()); | |||||
| wxMsgCallback.setBatchNo(batchNo); | wxMsgCallback.setBatchNo(batchNo); | ||||
| wxMsgCallback.setMsgId(wxmsg.getId()); | wxMsgCallback.setMsgId(wxmsg.getId()); | ||||
| wxMsgCallback.setStatus(EnumMsgSendStatus.MSG_SENDING.getCode()); | wxMsgCallback.setStatus(EnumMsgSendStatus.MSG_SENDING.getCode()); | ||||
| @@ -137,7 +137,6 @@ public class WxMsgValidationcodeModelServiceImpl implements WxMsgValidationcodeM | |||||
| if (wxMsgModel.getId() == null) { | if (wxMsgModel.getId() == null) { | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| wxMsgModel.setId(idWorker.nextId()); | wxMsgModel.setId(idWorker.nextId()); | ||||
| wxMsgModel.setTenantId(wxMsgModel.getTenantId()); | |||||
| if(jsonObjectResult.get("data") != null){ | if(jsonObjectResult.get("data") != null){ | ||||
| String data = jsonObjectResult.get("data").toString(); | String data = jsonObjectResult.get("data").toString(); | ||||
| wxMsgModel.setModelId(Integer.valueOf(data)); | wxMsgModel.setModelId(Integer.valueOf(data)); | ||||
| @@ -164,7 +163,6 @@ public class WxMsgValidationcodeModelServiceImpl implements WxMsgValidationcodeM | |||||
| if (wxMsgModel.getId() == null) { | if (wxMsgModel.getId() == null) { | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| wxMsgModel.setId(idWorker.nextId()); | wxMsgModel.setId(idWorker.nextId()); | ||||
| wxMsgModel.setTenantId(wxMsgModel.getTenantId()); | |||||
| wxMsgModel.setCreatetime(new Date()); | wxMsgModel.setCreatetime(new Date()); | ||||
| wxMsgModel.setStatus(1); | wxMsgModel.setStatus(1); | ||||
| wxMsgValidationcodeModelMapper.insert(wxMsgModel); | wxMsgValidationcodeModelMapper.insert(wxMsgModel); | ||||
| @@ -124,7 +124,7 @@ public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeServic | |||||
| WxMsgCallback wxMsgCallback = new WxMsgCallback(); | WxMsgCallback wxMsgCallback = new WxMsgCallback(); | ||||
| wxMsgCallback.setId(idWorker.nextId()); | wxMsgCallback.setId(idWorker.nextId()); | ||||
| wxMsgCallback.setPhone(phone); | wxMsgCallback.setPhone(phone); | ||||
| wxMsgCallback.setTenantId(wxmsg.getTenantId()); | |||||
| wxMsgCallback.updateTenantInfo(wxmsg); | |||||
| wxMsgCallback.setBatchNo(batchNo); | wxMsgCallback.setBatchNo(batchNo); | ||||
| wxMsgCallback.setMsgId(wxmsg.getId()); | wxMsgCallback.setMsgId(wxmsg.getId()); | ||||
| wxMsgCallback.setStatus(EnumMsgSendStatus.MSG_SENDING.getCode()); | wxMsgCallback.setStatus(EnumMsgSendStatus.MSG_SENDING.getCode()); | ||||
| @@ -92,7 +92,7 @@ public class WxOrderPressServiceImpl implements WxOrderPressService { | |||||
| int total = coupon.getPrice() - coupon.getSalePrice(); | int total = coupon.getPrice() - coupon.getSalePrice(); | ||||
| WxOrderPress orderPress = new WxOrderPress(); | WxOrderPress orderPress = new WxOrderPress(); | ||||
| orderPress.setId(idWorker.nextId()); | orderPress.setId(idWorker.nextId()); | ||||
| orderPress.setTenantId(order.getTenantId()); | |||||
| orderPress.updateTenantInfo(order); | |||||
| orderPress.setCouponId(order.getProductId()); | orderPress.setCouponId(order.getProductId()); | ||||
| orderPress.setOrderId(order.getId()); | orderPress.setOrderId(order.getId()); | ||||
| orderPress.setUserId(cUserId); | orderPress.setUserId(cUserId); | ||||
| @@ -189,7 +189,7 @@ public class WxOrderPressServiceImpl implements WxOrderPressService { | |||||
| * 检查 小程序模板消息是否超限 | * 检查 小程序模板消息是否超限 | ||||
| */ | */ | ||||
| WxMsgLimit msgLimit = new WxMsgLimit(); | WxMsgLimit msgLimit = new WxMsgLimit(); | ||||
| msgLimit.setTenantId(user.getTenantId()); | |||||
| msgLimit.updateTenantInfo(user); | |||||
| msgLimit.setType(formType); | msgLimit.setType(formType); | ||||
| msgLimit.setLimitId(formId); | msgLimit.setLimitId(formId); | ||||
| if(wxMsgLimitService.checkIsLimit(msgLimit)) { | if(wxMsgLimitService.checkIsLimit(msgLimit)) { | ||||
| @@ -2244,6 +2244,7 @@ public class WxOrderServiceImpl implements WxOrderService { | |||||
| int left_total = total; | int left_total = total; | ||||
| WxOrderPress orderPress = new WxOrderPress(); | WxOrderPress orderPress = new WxOrderPress(); | ||||
| orderPress.setId(IdWorker.get().nextId()); | orderPress.setId(IdWorker.get().nextId()); | ||||
| orderPress.updateTenantInfo(user); | |||||
| orderPress.setCouponId(record.getProductId()); | orderPress.setCouponId(record.getProductId()); | ||||
| orderPress.setOrderId(orderNumber); | orderPress.setOrderId(orderNumber); | ||||
| orderPress.setUserId(user.getId()); | orderPress.setUserId(user.getId()); | ||||
| @@ -117,6 +117,7 @@ public class WxMerchantController extends BaseController { | |||||
| @SystemControllerLog(description = "商户-更新账户") | @SystemControllerLog(description = "商户-更新账户") | ||||
| public ResultData updateMerchantAccount(@RequestBody WxMerchant wxMerchant) { | public ResultData updateMerchantAccount(@RequestBody WxMerchant wxMerchant) { | ||||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantAccount"); | logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantAccount"); | ||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||||
| return wxMerchantService.updateMerchantAccount(wxMerchant); | return wxMerchantService.updateMerchantAccount(wxMerchant); | ||||
| } | } | ||||
| @@ -43,6 +43,7 @@ public class WxMsgConfigController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxMsgConfigController::add"); | logger.debug("[" + getIpAddr() + "] WxMsgConfigController::add"); | ||||
| //Assert.notNull(wxMsgConfig.getName(), "角色名不能为空"); | //Assert.notNull(wxMsgConfig.getName(), "角色名不能为空"); | ||||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | ||||
| wxMsgConfig.updateTenantInfo(getTenantInfo()); | |||||
| wxMsgConfigService.saveOrUpdate(wxMsgConfig); | wxMsgConfigService.saveOrUpdate(wxMsgConfig); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -52,6 +53,7 @@ public class WxMsgConfigController extends BaseController { | |||||
| @SystemControllerLog(description = "短信-配置-更新") | @SystemControllerLog(description = "短信-配置-更新") | ||||
| public ResultData update(@RequestBody WxMsgConfig wxMsgConfig) { | public ResultData update(@RequestBody WxMsgConfig wxMsgConfig) { | ||||
| logger.debug("[" + getIpAddr() + "] WxMsgConfigController::update"); | logger.debug("[" + getIpAddr() + "] WxMsgConfigController::update"); | ||||
| wxMsgConfig.updateTenantInfo(getTenantInfo()); | |||||
| wxMsgConfigService.saveOrUpdate(wxMsgConfig); | wxMsgConfigService.saveOrUpdate(wxMsgConfig); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -40,6 +40,7 @@ public class WxMsgValidationcodeController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::add"); | logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::add"); | ||||
| //Assert.notNull(wxMsgValidationcode.getName(), "角色名不能为空"); | //Assert.notNull(wxMsgValidationcode.getName(), "角色名不能为空"); | ||||
| //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | //Assert.isTrue(!checkUnique(sysRole.getName(), null), "重复的角色名"); | ||||
| wxMsgValidationcode.updateTenantInfo(getTenantInfo()); | |||||
| wxMsgValidationcodeService.saveOrUpdate(wxMsgValidationcode); | wxMsgValidationcodeService.saveOrUpdate(wxMsgValidationcode); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -48,6 +49,7 @@ public class WxMsgValidationcodeController extends BaseController { | |||||
| @SystemControllerLog(description = "消息验证码-更新") | @SystemControllerLog(description = "消息验证码-更新") | ||||
| public ResultData update(@RequestBody WxMsgValidationcode wxMsgValidationcode) { | public ResultData update(@RequestBody WxMsgValidationcode wxMsgValidationcode) { | ||||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::update"); | logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeController::update"); | ||||
| wxMsgValidationcode.updateTenantInfo(getTenantInfo()); | |||||
| wxMsgValidationcodeService.saveOrUpdate(wxMsgValidationcode); | wxMsgValidationcodeService.saveOrUpdate(wxMsgValidationcode); | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||