| @@ -1,23 +1,87 @@ | |||||
| package com.iformall.controller.basic; | package com.iformall.controller.basic; | ||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.service.WxProjectConfigService; | |||||
| import com.iformall.domain.po.*; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxWeappInfo; | |||||
| import com.iformall.enums.EnumGroupSupport; | |||||
| import com.iformall.enums.EnumUserAdmin; | |||||
| import com.iformall.service.*; | |||||
| import com.iformall.shiro.PasswordHelper; | |||||
| import com.iformall.sms.EnumSMSChannel; | |||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.util.Assert; | |||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.*; | |||||
| @RestController | @RestController | ||||
| @RequestMapping("wxProjectConfig") | @RequestMapping("wxProjectConfig") | ||||
| public class WxProjectConfigController extends BaseController { | public class WxProjectConfigController extends BaseController { | ||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| @Autowired | @Autowired | ||||
| private WxProjectConfigService wxProjectConfigService; | |||||
| WxProjectConfigService wxProjectConfigService; | |||||
| @Autowired | |||||
| WxCouponSendConfigService wxCouponSendConfigService; | |||||
| @Autowired | |||||
| WxMallService wxMallService; | |||||
| @Autowired | |||||
| WxPayAccountService wxPayAccountService; | |||||
| @Autowired | |||||
| WxPayAccountBillService wxPayAccountBillService; | |||||
| @Autowired | |||||
| MallUserInfoService userInfoService; | |||||
| @Autowired | |||||
| WxAppinfoService wxAppinfoService; | |||||
| @Autowired | |||||
| WxMsgConfigService wxMsgConfigService; | |||||
| @Autowired | |||||
| WxParkService wxParkService; | |||||
| @Autowired | |||||
| WxWiWideInfoService wxWiWideInfoService; | |||||
| @Autowired | |||||
| WxAuthorizerInfoService wxAuthorizerInfoService; | |||||
| @Autowired | |||||
| WxScoreRulesService wxScoreRulesService; | |||||
| @Autowired | |||||
| WxTemplateMsgService wxTemplateMsgService; | |||||
| @Autowired | |||||
| WxQuestionService wxQuestionService; | |||||
| @Autowired | |||||
| WxMsgValidationcodeModelService wxMsgValidationcodeModelService; | |||||
| @Autowired | |||||
| WxFlowConfigService wxFlowConfigService; | |||||
| @Autowired | |||||
| WxMallBuildingService wxMallBuildingService; | |||||
| @Autowired | |||||
| MallUserInfoService mallUserInfoService; | |||||
| @ApiOperation("添加商场基础数据") | @ApiOperation("添加商场基础数据") | ||||
| @GetMapping(value = "/init/{id}") | @GetMapping(value = "/init/{id}") | ||||
| @@ -35,4 +99,475 @@ public class WxProjectConfigController extends BaseController { | |||||
| } | } | ||||
| @ApiOperation("查询商场集团列表") | |||||
| @GetMapping(value = "/mallList") | |||||
| @SystemControllerLog(description = "商场基础数据") | |||||
| public ResultData getMallList(@ModelAttribute WxMall wxMall, Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::getMallList"); | |||||
| try { | |||||
| if(wxMall == null){ | |||||
| wxMall = new WxMall(); | |||||
| } | |||||
| PageInfo<WxMall> page = wxMallService.listAsPage(wxMall, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("添加修改商场集团") | |||||
| @PostMapping("/init/mall") | |||||
| @SystemControllerLog(description = "商场集团-更新") | |||||
| public ResultData initMall(@RequestBody WxMall wxMall) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMall"); | |||||
| try { | |||||
| //集团版 | |||||
| if(wxMall.getSaleType().equals(100)){ | |||||
| wxMall.setGroupSupport(EnumGroupSupport.SUPPORT.getCode()); | |||||
| }else{ | |||||
| wxMall.setGroupSupport(EnumGroupSupport.SUPPORT.getCode()); | |||||
| } | |||||
| if(StringUtils.isBlank(wxMall.getBusinessHours())){ | |||||
| wxMall.setBusinessHours("[]"); | |||||
| } | |||||
| if(StringUtils.isBlank(wxMall.getIntroduction())){ | |||||
| wxMall.setIntroduction(""); | |||||
| } | |||||
| if(StringUtils.isBlank(wxMall.getImg())){ | |||||
| wxMall.setImg(""); | |||||
| } | |||||
| wxProjectConfigService.initMall(wxMall); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("添加修改商场楼座信息") | |||||
| @PostMapping("/init/building") | |||||
| @SystemControllerLog(description = "商场楼座-更新") | |||||
| public ResultData initBuilding(@RequestBody List<WxMallBuilding> wxMallBuildings) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initBuilding"); | |||||
| try { | |||||
| if(wxMallBuildings == null || wxMallBuildings.size() == 0){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| for (WxMallBuilding wxMallBuilding:wxMallBuildings) { | |||||
| if(StringUtils.isBlank(wxMallBuilding.getTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| } | |||||
| wxProjectConfigService.initBuilding(wxMallBuildings); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("添加修改特殊商户号信息") | |||||
| @PostMapping("/init/payAccount") | |||||
| @SystemControllerLog(description = "特殊商户号-更新") | |||||
| public ResultData initPayAccount(@RequestBody WxPayAccount wxPayAccount) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initPayAccount"); | |||||
| try { | |||||
| if(StringUtils.isBlank(wxPayAccount.getTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| WxPayAccount getByTenantId = wxPayAccountService.getByTenantId(wxPayAccount.getTenantId()); | |||||
| if(wxPayAccount.getId() != null && (getByTenantId == null || !getByTenantId.getId().equals(wxPayAccount.getId()))){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||||
| } | |||||
| if(wxPayAccount.getId() == null && getByTenantId != null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||||
| } | |||||
| if(StringUtils.isBlank(wxPayAccount.getNotifyUrl())){ | |||||
| wxPayAccount.setNotifyUrl("https://admin.malls.iformall.com/wxPay/notify"); | |||||
| } | |||||
| if(StringUtils.isBlank(wxPayAccount.getCertPath())){ | |||||
| wxPayAccount.setCertPath("/opt/iformall/service/apiclient_cert.p12"); | |||||
| } | |||||
| if(wxPayAccount.getType() == null){ | |||||
| wxPayAccount.setType(1);//0:普通商户模式, 1:服务商模式(默认服务商模式) | |||||
| } | |||||
| if(wxPayAccount.getShare() == null){ | |||||
| wxPayAccount.setShare(0);//0: 未分账,1:分账(默认不分账) | |||||
| } | |||||
| wxProjectConfigService.initPayAccount(wxPayAccount); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("添加修改小程序信息") | |||||
| @PostMapping("/init/appinfo") | |||||
| @SystemControllerLog(description = "小程序信息-更新") | |||||
| public ResultData initAppinfo(@RequestBody WxAppinfo wxAppinfo) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initAppinfo"); | |||||
| try { | |||||
| if(StringUtils.isBlank(wxAppinfo.getTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(wxAppinfo.getId() == null){ | |||||
| WxPayAccount byTenantId = wxPayAccountService.getByTenantId(wxAppinfo.getTenantId()); | |||||
| if(byTenantId != null){ | |||||
| wxAppinfo.setPayId(byTenantId.getId()); | |||||
| } | |||||
| WxPayAccountBill billByTenantId = wxPayAccountBillService.getByTenantId(wxAppinfo.getTenantId()); | |||||
| if(billByTenantId != null){ | |||||
| wxAppinfo.setPayBillId(billByTenantId.getId()); | |||||
| } | |||||
| } | |||||
| wxAppinfoService.saveOrUpdate(wxAppinfo); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| /** | |||||
| * 这里添加多个用户会生成多套角色 | |||||
| */ | |||||
| @ApiOperation("添加修改商场后台管理帐号") | |||||
| @PostMapping("/init/userInfo") | |||||
| @SystemControllerLog(description = "商场后台管理帐号-更新") | |||||
| public ResultData initUserInfo(@RequestBody MallUserInfo userInfo) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initUserInfo"); | |||||
| try { | |||||
| if(StringUtils.isBlank(userInfo.getTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(StringUtils.isBlank(userInfo.getUsername())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(StringUtils.isBlank(userInfo.getPhone())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| boolean bChangedPhone = false; | |||||
| if(userInfo.getId() == null){ | |||||
| if(userInfoService.cntByUserName(userInfo.getUsername()) > 0){ | |||||
| return new ResultData(ErrorCode.USER_NAME_IS_FOUND.getCode(),"用户名已存在"); | |||||
| } | |||||
| if(userInfoService.cntByUserPhone(userInfo.getPhone()) > 0){ | |||||
| return new ResultData(ErrorCode.USER_PHONE_IS_FOUND.getCode(),"手机号已存在"); | |||||
| } | |||||
| Assert.notNull(userInfo.getPassword(), "密码不能为空"); | |||||
| PasswordHelper passwordHelper = new PasswordHelper(); | |||||
| passwordHelper.encryptPassword(userInfo); | |||||
| userInfo.setIsAdmin(EnumUserAdmin.ADMIN.getCode()); | |||||
| wxProjectConfigService.initUserInfo(userInfo); | |||||
| }else{ | |||||
| MallUserInfo oldUser = userInfoService.getById(userInfo.getId()); | |||||
| if (!oldUser.getUsername().equals(userInfo.getUsername())) { | |||||
| if(userInfoService.cntByUserName(userInfo.getUsername()) > 0){ | |||||
| return new ResultData(ErrorCode.USER_NAME_IS_FOUND.getCode(),"用户名已存在"); | |||||
| } | |||||
| } | |||||
| if (!oldUser.getPhone().equals(userInfo.getPhone())) { | |||||
| if(userInfoService.cntByUserPhone(userInfo.getPhone()) > 0){ | |||||
| return new ResultData(ErrorCode.USER_PHONE_IS_FOUND.getCode(),"手机号已存在"); | |||||
| } | |||||
| bChangedPhone = true; | |||||
| } | |||||
| if (StringUtils.isNotBlank(userInfo.getPassword()) && userInfo.getPassword().length() > 0) { | |||||
| PasswordHelper passwordHelper = new PasswordHelper(); | |||||
| passwordHelper.encryptPassword(userInfo); | |||||
| } | |||||
| userInfo.setIsAdmin(EnumUserAdmin.ADMIN.getCode()); | |||||
| userInfoService.saveOrUpdate(userInfo); | |||||
| if(bChangedPhone) { | |||||
| // 手机号修改,清除bopen_id, 清除web_open_id | |||||
| userInfoService.cleanAllOpenId(userInfo); | |||||
| } | |||||
| } | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("添加修改商场短信配置") | |||||
| @PostMapping("/init/msgConfig") | |||||
| @SystemControllerLog(description = "商场后短信配置-更新") | |||||
| public ResultData initMsgConfig(@RequestBody WxMsgConfig wxMsgConfig) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initMsgConfig"); | |||||
| try { | |||||
| if(StringUtils.isBlank(wxMsgConfig.getTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(StringUtils.isBlank(wxMsgConfig.getAppid())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(wxMsgConfig.getSmsChannel() == null){ | |||||
| wxMsgConfig.setSmsChannel(EnumSMSChannel.WIWIDE.getCode()); | |||||
| } | |||||
| if(wxMsgConfig.getSmsChannel() == EnumSMSChannel.WIWIDE.getCode()){ | |||||
| wxMsgConfig.setSecret("7305150347587283553aa8898e7dbf20"); | |||||
| wxMsgConfig.setPublickey("MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvh8j/zagfxQdnSh5OIic\\r" + | |||||
| "\\nMzN+MuRuWQJPjgu4Gza4+gX3j5Ln2xNDBOTjpwyuLBjh/JcBd1cGO3lAaKCwcaix\\r" + | |||||
| "\\nsmhTq56wVXXUMgDiAChu4ud8FSvRc8G8tdZAirKVAIi3NW+/pYgpWBs/0wnF8hz4\\r" + | |||||
| "\\n8no4pyJHl9Jc1LH3VNIMz8vqzKUPc4ack4pFUXlcNj6C+sBlaurmI4/vwLqNxBGs\\r" + | |||||
| "\\n7/zyM7dv6oy3DSU/Y1qBArM1YPjfL2dNun8rmtPgJvlPwXqA7uoHPwQ2Ym3aUn59\\r" + | |||||
| "\\npkS7QI6IE8uuqNkfSte8BXLd2nIqPLFxLYLDmdll7eoyRblHcHqAYSj8stK6StC7\\r" + | |||||
| "\\nDNryNKEjTEwbgf9trUI0uvF1pfgTy2gpclnY69FtD/m0+FvLyorMq+nmBqYMjka5\\r" + | |||||
| "\\nK0txDQJPOa7gsi//uXd/cJW2SAXY9MSO1AfMi8Xq/YKRQzN9FW5iapskXFHca7uX\\r" + | |||||
| "\\ng5NhH7flr6DW+QInFlpoN6WIEAuDF1aj4O49Ikm3WxwhTqnvEkdSCfivpYQkp9Sh\\r" + | |||||
| "\\n4kQ/SQdxuT7VX+Nz6k+uMx2z4cySk33bHi0KoHbA9QFGg/54Qd0+eU4qZnd4mrgh\\r" + | |||||
| "\\nhH7/QQhL7Z9eF1U5UPrsHq2Vq3rEnN+tYQ26AuKeU8vzTxBrC/SxC6C/SMFt3f/Y\\r" + | |||||
| "\\nnuFh1UnNJZleZwyQt+ZdGO0CAwEAAQ=="); | |||||
| wxMsgConfig.setBid("465565"); | |||||
| wxMsgConfig.setAccount("15626593768"); | |||||
| wxMsgConfig.setNotifyurl("https://admin.malls.iformall.com/wxMsgCallback/receivemsg/" + wxMsgConfig.getTenantId()); | |||||
| wxMsgConfig.setModelnotifyurl("https://admin.malls.iformall.com/wxMsgCallback/receivemodel/" + wxMsgConfig.getTenantId()); | |||||
| wxMsgConfig.setVerifynotifyurl("https://admin.malls.iformall.com/wxMsgCallback/receiveverifymodel/" + wxMsgConfig.getTenantId()); | |||||
| } | |||||
| if(wxMsgConfig.getTotal() == null){ | |||||
| wxMsgConfig.setTotal((long) 100000); | |||||
| } | |||||
| wxMsgConfig.setRecharge((long) 0); | |||||
| wxMsgConfig.setRemains(wxMsgConfig.getTotal()); | |||||
| wxMsgConfig.setReminderstatus(0); | |||||
| wxMsgConfigService.saveOrUpdate(wxMsgConfig); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("添加修改停车场配置") | |||||
| @PostMapping("/init/park") | |||||
| @SystemControllerLog(description = "商场停车场配置-更新") | |||||
| public ResultData initPark(@RequestBody WxPark wxPark) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initPark"); | |||||
| try { | |||||
| if(StringUtils.isBlank(wxPark.getTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(StringUtils.isBlank(wxPark.getAddr())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(wxPark.getNumber() == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(StringUtils.isBlank(wxPark.getVendorParams())){ | |||||
| wxPark.setVendorParams("{}"); | |||||
| } | |||||
| if(wxPark.getVendorType() == null){ | |||||
| wxPark.setVendorType(0); | |||||
| } | |||||
| if(StringUtils.isBlank(wxPark.getParkId())){ | |||||
| wxPark.setParkId("0"); | |||||
| } | |||||
| if(StringUtils.isBlank(wxPark.getStopFee())){ | |||||
| wxPark.setStopFee(""); | |||||
| } | |||||
| if(wxPark.getEntryExit() == null){ | |||||
| wxPark.setEntryExit(1); | |||||
| } | |||||
| wxParkService.saveOrUpdate(wxPark); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("添加修改迈外迪信息") | |||||
| @PostMapping("/init/wiwidi") | |||||
| @SystemControllerLog(description = "迈外迪信息配置-更新") | |||||
| public ResultData initWiwidi(@RequestBody WxWiWideInfo wxWiWideInfo) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initPark"); | |||||
| try { | |||||
| if(StringUtils.isBlank(wxWiWideInfo.getTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| wxWiWideInfoService.saveOrUpdate(wxWiWideInfo); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("添加修改微信公众账号的基本信息") | |||||
| @PostMapping("/init/authorizer") | |||||
| @SystemControllerLog(description = "微信公众账号的基本信息-更新") | |||||
| public ResultData initAuthorizer(@RequestBody WxAuthorizerInfo wxAuthorizerInfo) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initAuthorizer"); | |||||
| try { | |||||
| if(StringUtils.isBlank(wxAuthorizerInfo.getTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(wxAuthorizerInfo.getAuthorizationStatus() == null){ | |||||
| wxAuthorizerInfo.setAuthorizationStatus(0);//授权状态,0为已授权,1为已取消授权 | |||||
| wxAuthorizerInfo.setAuthTime(new Date()); | |||||
| } | |||||
| if(wxAuthorizerInfo.getBaseStatus() == null){ | |||||
| wxAuthorizerInfo.setBaseStatus(0);//微信基础版本设置状态,0为已设置,1为设置失败 | |||||
| wxAuthorizerInfo.setBaseTime(new Date()); | |||||
| } | |||||
| if(wxAuthorizerInfo.getDomainStatus() == null){ | |||||
| wxAuthorizerInfo.setDomainStatus(0);//服务器域名设置状态,0为已设置,1为设置失败 | |||||
| wxAuthorizerInfo.setDomainTime(new Date()); | |||||
| } | |||||
| if(wxAuthorizerInfo.getWebdomainStatus() == null){ | |||||
| wxAuthorizerInfo.setWebdomainStatus(0);//服务器业务域名设置状态,0为已设置,1为设置失败 | |||||
| wxAuthorizerInfo.setWebdomainTime(new Date()); | |||||
| } | |||||
| if(StringUtils.isNotBlank(wxAuthorizerInfo.getCurrentVersion()) | |||||
| && wxAuthorizerInfo.getReleaseTime() != null){ | |||||
| wxAuthorizerInfo.setReleaseTime(new Date()); | |||||
| } | |||||
| if(StringUtils.isNotBlank(wxAuthorizerInfo.getOpenAppid()) | |||||
| && wxAuthorizerInfo.getBindOpenTime() != null){ | |||||
| wxAuthorizerInfo.setBindOpenTime(new Date()); | |||||
| } | |||||
| if(StringUtils.isBlank(wxAuthorizerInfo.getRefreshToken())){ | |||||
| wxAuthorizerInfo.setRefreshToken(""); | |||||
| } | |||||
| if(StringUtils.isBlank(wxAuthorizerInfo.getAccessToken())){ | |||||
| wxAuthorizerInfo.setAccessToken(""); | |||||
| } | |||||
| wxAuthorizerInfoService.saveOrUpdate(wxAuthorizerInfo); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("查询商场基础数据") | |||||
| @GetMapping(value = "/getinit/{id}") | |||||
| @SystemControllerLog(description = "商场基础数据") | |||||
| public ResultData getinit(@PathVariable Long id) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::getinit"); | |||||
| try { | |||||
| Map<String, Object> map = new HashMap<String, Object>(); | |||||
| WxMall wxMall = wxMallService.getById(id); | |||||
| map.put("wxMall",wxMall); | |||||
| List<WxMall> subWxMall = wxMallService.getSubByParentTenantId(wxMall.getTenantId()); | |||||
| map.put("subWxMall",subWxMall); | |||||
| WxCouponSendConfig wxCouponSendConfig = new WxCouponSendConfig(){{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| List<WxCouponSendConfig> wxCouponSendConfigList = wxCouponSendConfigService.findList(wxCouponSendConfig); | |||||
| map.put("wxCouponSendConfigList",wxCouponSendConfigList); | |||||
| WxScoreRules wxScoreRules = new WxScoreRules(){{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| List<WxScoreRules> wxScoreRulesList = wxScoreRulesService.findList(wxScoreRules); | |||||
| map.put("wxScoreRulesList",wxScoreRulesList); | |||||
| WxTemplateMsg wxTemplateMsg = new WxTemplateMsg(){{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| List<WxTemplateMsg> wxTemplateMsgList = wxTemplateMsgService.findList(wxTemplateMsg); | |||||
| map.put("wxTemplateMsgList",wxTemplateMsgList); | |||||
| WxQuestion wxQuestion = new WxQuestion(){{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| List<WxQuestion> wxQuestionList = wxQuestionService.findList(wxQuestion); | |||||
| map.put("wxQuestionList",wxQuestionList); | |||||
| WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel(){{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| List<WxMsgValidationcodeModel> wxMsgValidationcodeModelList = wxMsgValidationcodeModelService.findList(wxMsgValidationcodeModel); | |||||
| map.put("wxMsgValidationcodeModelList",wxMsgValidationcodeModelList); | |||||
| WxFlowConfig wxFlowConfig = new WxFlowConfig(){{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| List<WxFlowConfig> wxFlowConfigList = wxFlowConfigService.findList(wxFlowConfig); | |||||
| map.put("wxFlowConfigList",wxFlowConfigList); | |||||
| TenantEntity tenantEntity = new TenantEntity() {{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| ResultData wxMallBuildingFloorList = wxMallBuildingService.getBuildingFloorList(tenantEntity); | |||||
| map.put("wxMallBuildingFloorList",wxMallBuildingFloorList); | |||||
| WxPayAccount wxPayAccount = wxPayAccountService.getByTenantId(wxMall.getTenantId()); | |||||
| map.put("wxPayAccount",wxPayAccount); | |||||
| WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxMall.getTenantId()); | |||||
| map.put("wxPayAccountBill",wxPayAccountBill); | |||||
| WxAppinfo wxAppinfo = new WxAppinfo() {{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| List<WxAppinfo> wxAppinfoList = wxAppinfoService.getList(wxAppinfo); | |||||
| map.put("wxAppinfoList",wxAppinfoList); | |||||
| MallUserInfo mallUserInfo = new MallUserInfo() {{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| List<MallUserInfo> mallUserInfoList = mallUserInfoService.findList(mallUserInfo); | |||||
| map.put("mallUserInfoList",mallUserInfoList); | |||||
| WxMsgConfig wxMsgConfig = new WxMsgConfig() {{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| WxMsgConfig wxMsgConfigObject = wxMsgConfigService.findObject(wxMsgConfig); | |||||
| map.put("wxMsgConfig",wxMsgConfigObject); | |||||
| WxPark wxPark = new WxPark(){{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| WxPark wxParkObj = wxParkService.getByObj(wxPark); | |||||
| map.put("wxPark",wxParkObj); | |||||
| WxWiWideInfo wxWiWideInfo = new WxWiWideInfo(){{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| WxWiWideInfo wxWiWideInfoObject = wxWiWideInfoService.findObject(wxWiWideInfo); | |||||
| map.put("wxWiWideInfo",wxWiWideInfoObject); | |||||
| WxWeappInfo wxWeappInfo = new WxWeappInfo(){{ | |||||
| setTenantId(wxMall.getTenantId()); | |||||
| }}; | |||||
| List<WxWeappInfo> wxAuthorizerInfoList = wxAuthorizerInfoService.getList(wxWeappInfo); | |||||
| map.put("wxAuthorizerInfoList",wxAuthorizerInfoList); | |||||
| return new ResultData(map); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| @ApiOperation("集团新增修改子广场") | |||||
| @PostMapping("/init/submall") | |||||
| @SystemControllerLog(description = "子广场-更新") | |||||
| public ResultData initSubmall(@RequestBody WxMall wxMall) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initSubmall"); | |||||
| try { | |||||
| if(StringUtils.isBlank(wxMall.getTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| if(StringUtils.isBlank(wxMall.getParentTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| WxMall parentWxMall = wxMallService.getById(Long.parseLong(wxMall.getParentTenantId())); | |||||
| if(parentWxMall == null || parentWxMall.getSaleType() != 100 | |||||
| || !parentWxMall.equals(EnumGroupSupport.SUPPORT.getCode()) | |||||
| || StringUtils.isNotBlank(parentWxMall.getParentTenantId())){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||||
| } | |||||
| String[] tenantIds = wxMall.getTenantId().split(","); | |||||
| wxProjectConfigService.initSubmall(wxMall.getParentTenantId(),tenantIds); | |||||
| return new ResultData(); | |||||
| }catch (Exception e){ | |||||
| logger.error(e.getMessage(),e); | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||||
| } | |||||
| } | |||||
| } | } | ||||
| @@ -52,7 +52,7 @@ public class MallRoleController extends BaseController { | |||||
| @SystemControllerLog(description = "用户管理-role列表") | @SystemControllerLog(description = "用户管理-role列表") | ||||
| public ResultData list(MallRole sysRole, Integer pageNum, Integer pageSize) { | public ResultData list(MallRole sysRole, Integer pageNum, Integer pageSize) { | ||||
| logger.debug("[" + getIpAddr() + "] MallRoleController::list"); | logger.debug("[" + getIpAddr() + "] MallRoleController::list"); | ||||
| sysRole.updateTenantInfo(getTenantInfo()); | |||||
| sysRole.updateTenantInfo(ifParentUpdateTenantInfo()); | |||||
| sysRole.setSortColumns(BaseEntity.SortField.Id_DESC); | sysRole.setSortColumns(BaseEntity.SortField.Id_DESC); | ||||
| final PageInfo<MallRole> page = sysRoleService.listAsPage(sysRole, pageNum, pageSize); | final PageInfo<MallRole> page = sysRoleService.listAsPage(sysRole, pageNum, pageSize); | ||||
| for (MallRole r : page.getList()) { | for (MallRole r : page.getList()) { | ||||
| @@ -84,7 +84,7 @@ public class MallRoleController extends BaseController { | |||||
| MallRole role = sysRoleService.getById(sysRole.getId()); | MallRole role = sysRoleService.getById(sysRole.getId()); | ||||
| MallRolePermission p = new MallRolePermission(); | MallRolePermission p = new MallRolePermission(); | ||||
| p.setRoleId(role.getId()); | p.setRoleId(role.getId()); | ||||
| p.updateTenantInfo(getTenantInfo()); | |||||
| p.updateTenantInfo(ifParentUpdateTenantInfo()); | |||||
| List<MallRolePermission> pers = sysRolePermissionService.getList(p); | List<MallRolePermission> pers = sysRolePermissionService.getList(p); | ||||
| String menus = ""; | String menus = ""; | ||||
| for (MallRolePermission rp : pers) { | for (MallRolePermission rp : pers) { | ||||
| @@ -70,7 +70,7 @@ public class MallUserInfoController extends BaseController { | |||||
| public ResultData listAsPage(MallUserInfo userInfo, Integer pageNum, Integer pageSize) { | public ResultData listAsPage(MallUserInfo userInfo, Integer pageNum, Integer pageSize) { | ||||
| logger.debug("[" + getIpAddr() + "] MallUserInfoController::listAsPage"); | logger.debug("[" + getIpAddr() + "] MallUserInfoController::listAsPage"); | ||||
| userInfo.updateTenantInfo(getTenantInfo()); | |||||
| userInfo.updateTenantInfo(ifParentUpdateTenantInfo()); | |||||
| userInfo.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | userInfo.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | ||||
| final PageInfo<MallUserInfo> page = userInfoService.listAsPage(userInfo, pageNum, pageSize); | final PageInfo<MallUserInfo> page = userInfoService.listAsPage(userInfo, pageNum, pageSize); | ||||
| for (MallUserInfo u : page.getList()) { | for (MallUserInfo u : page.getList()) { | ||||
| @@ -73,7 +73,7 @@ public class SysMenuController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] MallPermissionController::list"); | logger.debug("[" + getIpAddr() + "] MallPermissionController::list"); | ||||
| MallUserInfo user = getUser(); | MallUserInfo user = getUser(); | ||||
| if (user.checkGroupAdmin()) { | if (user.checkGroupAdmin()) { | ||||
| TenantEntity tenantEntity = getTenantInfo(); | |||||
| TenantEntity tenantEntity = ifParentUpdateTenantInfo(); | |||||
| if (StringUtils.isNotBlank(tenantEntity.getParentTenantId())) { | if (StringUtils.isNotBlank(tenantEntity.getParentTenantId())) { | ||||
| user.setParentTenantId(tenantEntity.getParentTenantId()); | user.setParentTenantId(tenantEntity.getParentTenantId()); | ||||
| } | } | ||||
| @@ -1,6 +1,13 @@ | |||||
| ALTER TABLE `wx_c_user_basic_info` | ALTER TABLE `wx_c_user_basic_info` | ||||
| ADD COLUMN `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID' AFTER `tenant_id`; | ADD COLUMN `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID' AFTER `tenant_id`; | ||||
| ALTER TABLE `wx_buser` | |||||
| ADD COLUMN `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID' AFTER `tenant_id`; | |||||
| ALTER TABLE `wx_mall` | ALTER TABLE `wx_mall` | ||||
| ADD COLUMN `live_support` SMALLINT(1) DEFAULT '0' COMMENT '是否支持直播(0-不支持,1-支持)'; | ADD COLUMN `live_support` SMALLINT(1) DEFAULT '0' COMMENT '是否支持直播(0-不支持,1-支持)'; | ||||
| ALTER TABLE `wx_user_visit` | |||||
| ADD COLUMN `parent_tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID' AFTER `tenant_id`; | |||||
| CREATE OR REPLACE ALGORITHM = UNDEFINED DEFINER = `root`@`%` SQL SECURITY DEFINER VIEW `mallink`.`view_touch_user` AS select date_format(`u`.`day_date`,'%Y-%m-%d') AS `xTime`,`u`.`tenant_id` AS `tenant_id`,`u`.`parent_tenant_id` AS `parent_tenant_id`,`u`.`visit_pv` AS `pv`,`u`.`visit_uv` AS `uv`,ifnull(`o`.`couponCount`,0) AS `couponCount`,ifnull(`o`.`userCount`,0) AS `userCount`,ifnull(`v`.`verifyCount`,0) AS `verifyCount`,ifnull(`v`.`verifyUserCount`,0) AS `verifyUserCount` from ((`mallink`.`wx_user_visit` `u` left join (select `mallink`.`wx_coupon_order`.`tenant_id` AS `tenant_id`,date_format(`mallink`.`wx_coupon_order`.`create_date`,'%Y-%m-%d') AS `xTime`,count(distinct `mallink`.`wx_coupon_order`.`c_user_id`) AS `userCount`,count(0) AS `couponCount` from `mallink`.`wx_coupon_order` group by `xTime`,`mallink`.`wx_coupon_order`.`tenant_id`) `o` on(((date_format(`u`.`day_date`,'%Y-%m-%d') = `o`.`xTime`) and (`o`.`tenant_id` = `u`.`tenant_id`)))) left join (select `mallink`.`wx_coupon_order`.`tenant_id` AS `tenant_id`,date_format(`mallink`.`wx_coupon_order`.`update_date`,'%Y-%m-%d') AS `xTime`,count(0) AS `verifyCount`,count(distinct `mallink`.`wx_coupon_order`.`c_user_id`) AS `verifyUserCount` from `mallink`.`wx_coupon_order` where (`mallink`.`wx_coupon_order`.`coupon_order_status` = 1) group by `xTime`,`mallink`.`wx_coupon_order`.`tenant_id`) `v` on(((date_format(`u`.`day_date`,'%Y-%m-%d') = `v`.`xTime`) and (`v`.`tenant_id` = `u`.`tenant_id`)))); | |||||
| @@ -67,6 +67,9 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter { | |||||
| //设置userId到request里,后续根据userId,获取用户信息 | //设置userId到request里,后续根据userId,获取用户信息 | ||||
| request.setAttribute(Constant.LOGIN_USER_KEY, wxBuser.getId()); | request.setAttribute(Constant.LOGIN_USER_KEY, wxBuser.getId()); | ||||
| request.setAttribute(Constant.TENANT_ID, wxBuser.getTenantId()); | request.setAttribute(Constant.TENANT_ID, wxBuser.getTenantId()); | ||||
| if (StringUtils.isNotBlank(wxBuser.getParentTenantId())) { | |||||
| request.setAttribute(Constant.PARENT_TENANT_ID, wxBuser.getParentTenantId()); | |||||
| } | |||||
| //如果是要不需要自动设置tenantI信息 | //如果是要不需要自动设置tenantI信息 | ||||
| @@ -1,7 +1,7 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
| import com.iformall.domain.po.base.BaseTenantEntity; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| @@ -10,7 +10,7 @@ import java.util.*; | |||||
| @TableName(value = "wx_user_visit") | @TableName(value = "wx_user_visit") | ||||
| @Data | @Data | ||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class WxUserVisit extends BaseTenantEntity { | |||||
| public class WxUserVisit extends TenantEntity { | |||||
| protected Long id; | protected Long id; | ||||
| @@ -7,10 +7,6 @@ import com.iformall.domain.po.WxMallFloor; | |||||
| public interface WxMallFloorMapper extends CommonMapper<WxMallFloor, String> { | public interface WxMallFloorMapper extends CommonMapper<WxMallFloor, String> { | ||||
| List<WxMallFloor> findList(WxMallFloor wxMallFloor); | List<WxMallFloor> findList(WxMallFloor wxMallFloor); | ||||
| int deleteByBuildingId(Long buildingId); | |||||
| } | } | ||||
| @@ -2,6 +2,7 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxMall; | import com.iformall.domain.po.WxMall; | ||||
| import org.apache.ibatis.annotations.Param; | |||||
| import java.util.List; | import java.util.List; | ||||
| @@ -17,4 +18,5 @@ public interface WxMallMapper extends CommonMapper<WxMall, Long> { | |||||
| String queryMenusByTenantInfo(WxMall wxMall); | String queryMenusByTenantInfo(WxMall wxMall); | ||||
| void undateSubmall(@Param(value = "parentTenantId")String parentTenantId, @Param(value = "tenantIds")String[] tenantIds); | |||||
| } | } | ||||
| @@ -11,10 +11,7 @@ import java.util.List; | |||||
| public interface WxPayAccountBillMapper extends CommonMapper<WxPayAccountBill, Long> { | public interface WxPayAccountBillMapper extends CommonMapper<WxPayAccountBill, Long> { | ||||
| List<WxPayAccountBill> findList(WxPayAccountBill wxPayAccount); | List<WxPayAccountBill> findList(WxPayAccountBill wxPayAccount); | ||||
| WxPayAccountBill getByTenantId(String tenantId); | |||||
| } | } | ||||
| @@ -7,10 +7,7 @@ import com.iformall.domain.po.WxPayAccount; | |||||
| public interface WxPayAccountMapper extends CommonMapper<WxPayAccount, Long> { | public interface WxPayAccountMapper extends CommonMapper<WxPayAccount, Long> { | ||||
| List<WxPayAccount> findList(WxPayAccount wxPayAccount); | List<WxPayAccount> findList(WxPayAccount wxPayAccount); | ||||
| WxPayAccount getByTenantId(String tenantId); | |||||
| } | } | ||||
| @@ -3,6 +3,8 @@ package com.iformall.service; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.domain.po.WxCouponSendConfig; | import com.iformall.domain.po.WxCouponSendConfig; | ||||
| import java.util.List; | |||||
| public interface WxCouponSendConfigService { | public interface WxCouponSendConfigService { | ||||
| /** | /** | ||||
| @@ -21,6 +23,8 @@ public interface WxCouponSendConfigService { | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<WxCouponSendConfig> listAsPage(WxCouponSendConfig record, Integer pageIndex, Integer pageSize); | PageInfo<WxCouponSendConfig> listAsPage(WxCouponSendConfig record, Integer pageIndex, Integer pageSize); | ||||
| List<WxCouponSendConfig> findList(WxCouponSendConfig record); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| @@ -0,0 +1,20 @@ | |||||
| package com.iformall.service; | |||||
| import com.iformall.domain.po.WxFlowConfig; | |||||
| import java.util.List; | |||||
| /** | |||||
| * | |||||
| * wx_flow_config | |||||
| */ | |||||
| public interface WxFlowConfigService { | |||||
| /** | |||||
| * 查询列表 | |||||
| * | |||||
| * @param record | |||||
| */ | |||||
| List<WxFlowConfig> findList(WxFlowConfig record); | |||||
| } | |||||
| @@ -42,4 +42,5 @@ public interface WxMallFloorService { | |||||
| ResultData getFloorList(TenantEntity tenantEntity, Long buildingId); | ResultData getFloorList(TenantEntity tenantEntity, Long buildingId); | ||||
| void deleteByBuildingId(Long buildingId); | |||||
| } | } | ||||
| @@ -79,4 +79,5 @@ public interface WxMallService { | |||||
| */ | */ | ||||
| List<WxMall> getSubByParentTenantId(String parentTenantId); | List<WxMall> getSubByParentTenantId(String parentTenantId); | ||||
| void undateSubmall(String parentTenantId, String[] tenantIds); | |||||
| } | } | ||||
| @@ -5,6 +5,8 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.WxMsgValidationcodeModel; | import com.iformall.domain.po.WxMsgValidationcodeModel; | ||||
| import com.iformall.domain.po.WxProjectConfig; | import com.iformall.domain.po.WxProjectConfig; | ||||
| import java.util.List; | |||||
| public interface WxMsgValidationcodeModelService { | public interface WxMsgValidationcodeModelService { | ||||
| /** | /** | ||||
| @@ -13,7 +15,7 @@ public interface WxMsgValidationcodeModelService { | |||||
| * @param tenantId | * @param tenantId | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| void wxMsgValidationcodeModelInit(String tenantId, WxProjectConfig wxProjectConfig); | |||||
| void wxMsgValidationcodeModelInit(String tenantId, String signature,String emailBgImg); | |||||
| /** | /** | ||||
| * 根据实体查询分页列表 | * 根据实体查询分页列表 | ||||
| @@ -24,6 +26,8 @@ public interface WxMsgValidationcodeModelService { | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<WxMsgValidationcodeModel> listAsPage(WxMsgValidationcodeModel record, Integer pageIndex, Integer pageSize); | PageInfo<WxMsgValidationcodeModel> listAsPage(WxMsgValidationcodeModel record, Integer pageIndex, Integer pageSize); | ||||
| List<WxMsgValidationcodeModel> findList(WxMsgValidationcodeModel record); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| @@ -55,12 +55,7 @@ public interface WxPayAccountBillService { | |||||
| * @param id | * @param id | ||||
| */ | */ | ||||
| void deleteById(Long id); | void deleteById(Long id); | ||||
| WxPayAccountBill getByTenantId(String tenantId); | |||||
| } | } | ||||
| @@ -47,12 +47,7 @@ public interface WxPayAccountService { | |||||
| * @param id | * @param id | ||||
| */ | */ | ||||
| void deleteById(Long id); | void deleteById(Long id); | ||||
| WxPayAccount getByTenantId(String te); | |||||
| } | } | ||||
| @@ -1,6 +1,10 @@ | |||||
| package com.iformall.service; | package com.iformall.service; | ||||
| import com.iformall.domain.po.*; | |||||
| import java.util.List; | |||||
| public interface WxProjectConfigService { | public interface WxProjectConfigService { | ||||
| /** | /** | ||||
| @@ -10,4 +14,30 @@ public interface WxProjectConfigService { | |||||
| */ | */ | ||||
| void initProjectConfig(Long id); | void initProjectConfig(Long id); | ||||
| /** | |||||
| * 初始化新增修改wxmall | |||||
| * @param wxMall | |||||
| */ | |||||
| void initMall(WxMall wxMall); | |||||
| /** | |||||
| * 初始化新增修改wxMallBuilding | |||||
| * @param wxMallBuildings | |||||
| */ | |||||
| void initBuilding(List<WxMallBuilding> wxMallBuildings); | |||||
| /** | |||||
| * 初始化新增修改wxPayAccount | |||||
| * @param wxPayAccount | |||||
| */ | |||||
| void initPayAccount(WxPayAccount wxPayAccount); | |||||
| /** | |||||
| * 初始化新增userInfo | |||||
| * @param userInfo | |||||
| */ | |||||
| void initUserInfo(MallUserInfo userInfo); | |||||
| void initSubmall(String parentTenantId, String[] tenantIds); | |||||
| } | } | ||||
| @@ -13,10 +13,10 @@ public interface WxQuestionService { | |||||
| * wx_question 初始化 | * wx_question 初始化 | ||||
| * | * | ||||
| * @param tenantId | * @param tenantId | ||||
| * @param questionJson | |||||
| * @param | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| void wxQuestionInit(String tenantId, String questionJson); | |||||
| void wxQuestionInit(String tenantId); | |||||
| /** | /** | ||||
| * 根据实体查询分页列表 | * 根据实体查询分页列表 | ||||
| @@ -3,6 +3,8 @@ package com.iformall.service; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.domain.po.WxTemplateMsg; | import com.iformall.domain.po.WxTemplateMsg; | ||||
| import java.util.List; | |||||
| public interface WxTemplateMsgService { | public interface WxTemplateMsgService { | ||||
| /** | /** | ||||
| @@ -22,6 +24,8 @@ public interface WxTemplateMsgService { | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<WxTemplateMsg> listAsPage(WxTemplateMsg record, Integer pageIndex, Integer pageSize); | PageInfo<WxTemplateMsg> listAsPage(WxTemplateMsg record, Integer pageIndex, Integer pageSize); | ||||
| List<WxTemplateMsg> findList(WxTemplateMsg record); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| @@ -0,0 +1,20 @@ | |||||
| package com.iformall.service; | |||||
| import com.iformall.domain.po.WxWiWideInfo; | |||||
| /** | |||||
| * | |||||
| * 迈外迪信息 | |||||
| */ | |||||
| public interface WxWiWideInfoService { | |||||
| /** | |||||
| * 保存或更新实体 | |||||
| * | |||||
| * @param record | |||||
| */ | |||||
| void saveOrUpdate(WxWiWideInfo record); | |||||
| WxWiWideInfo findObject(WxWiWideInfo record); | |||||
| } | |||||
| @@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | |||||
| @Service | @Service | ||||
| @@ -45,6 +46,11 @@ public class WxCouponSendConfigServiceImpl implements WxCouponSendConfigService | |||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponSendConfigMapper.findList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponSendConfigMapper.findList(record)); | ||||
| } | } | ||||
| @Override | |||||
| public List<WxCouponSendConfig> findList(WxCouponSendConfig record) { | |||||
| return wxCouponSendConfigMapper.findList(record); | |||||
| } | |||||
| @Override | @Override | ||||
| public WxCouponSendConfig getById(Long id) { | public WxCouponSendConfig getById(Long id) { | ||||
| return wxCouponSendConfigMapper.selectById(id); | return wxCouponSendConfigMapper.selectById(id); | ||||
| @@ -0,0 +1,29 @@ | |||||
| package com.iformall.service.impl; | |||||
| import com.iformall.common.IdWorker; | |||||
| import com.iformall.domain.po.WxFlowConfig; | |||||
| import com.iformall.domain.po.WxWiWideInfo; | |||||
| import com.iformall.mapper.WxFlowConfigMapper; | |||||
| import com.iformall.mapper.WxWiwideInfoMapper; | |||||
| import com.iformall.service.WxFlowConfigService; | |||||
| import com.iformall.service.WxWiWideInfoService; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| import java.util.List; | |||||
| @Service | |||||
| public class WxFlowConfigServiceImpl implements WxFlowConfigService { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| WxFlowConfigMapper wxFlowConfigMapper; | |||||
| @Override | |||||
| public List<WxFlowConfig> findList(WxFlowConfig record) { | |||||
| return wxFlowConfigMapper.findList(record); | |||||
| } | |||||
| } | |||||
| @@ -58,9 +58,11 @@ public class WxMallFloorServiceImpl implements WxMallFloorService { | |||||
| List<WxMallFloor> list = wxMallFloorMapper.findList(wxMallFloor); | List<WxMallFloor> list = wxMallFloorMapper.findList(wxMallFloor); | ||||
| return new ResultData(list); | return new ResultData(list); | ||||
| } | } | ||||
| @Override | |||||
| public void deleteByBuildingId(Long buildingId) { | |||||
| wxMallFloorMapper.deleteByBuildingId(buildingId); | |||||
| } | |||||
| } | } | ||||
| @@ -109,16 +109,16 @@ public class WxMallServiceImpl implements WxMallService { | |||||
| @Override | @Override | ||||
| public int save(WxMall record) { | public int save(WxMall record) { | ||||
| if (record.getId() == null) { | |||||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||||
| final IdWorker idWorker = IdWorker.get(); | |||||
| Long id = idWorker.nextId(); | |||||
| record.setId(id); | |||||
| } | |||||
| if(StringUtils.isBlank(record.getTenantId())) { | |||||
| record.setTenantId(String.valueOf(record.getId())); | |||||
| } | |||||
| // if (record.getId() == null) { | |||||
| // //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||||
| // final IdWorker idWorker = IdWorker.get(); | |||||
| // Long id = idWorker.nextId(); | |||||
| // record.setId(id); | |||||
| // } | |||||
| // | |||||
| // if(StringUtils.isBlank(record.getTenantId())) { | |||||
| // record.setTenantId(String.valueOf(record.getId())); | |||||
| // } | |||||
| int ret = wxMallMapper.insert(record); | int ret = wxMallMapper.insert(record); | ||||
| @@ -294,6 +294,11 @@ public class WxMallServiceImpl implements WxMallService { | |||||
| return mallList; | return mallList; | ||||
| } | } | ||||
| @Override | |||||
| public void undateSubmall(String parentTenantId, String[] tenantIds) { | |||||
| wxMallMapper.undateSubmall(parentTenantId, tenantIds); | |||||
| } | |||||
| private String getRedisKeyByTenantInfo(TenantEntity tenantEntity) { | private String getRedisKeyByTenantInfo(TenantEntity tenantEntity) { | ||||
| StringBuilder sb = new StringBuilder(); | StringBuilder sb = new StringBuilder(); | ||||
| sb.append(Constant.TENANT_KEY_PREV).append(tenantEntity.getTenantId()); | sb.append(Constant.TENANT_KEY_PREV).append(tenantEntity.getTenantId()); | ||||
| @@ -37,48 +37,48 @@ public class WxMsgValidationcodeModelServiceImpl implements WxMsgValidationcodeM | |||||
| WxMsgConfigMapper wxMsgConfigMapper; | WxMsgConfigMapper wxMsgConfigMapper; | ||||
| @Override | @Override | ||||
| public void wxMsgValidationcodeModelInit(String tenantId, WxProjectConfig wxProjectConfig) { | |||||
| public void wxMsgValidationcodeModelInit(String tenantId, String signature, String emailBgImg) { | |||||
| DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||||
| String nowTimestr = format.format(new Date()); | String nowTimestr = format.format(new Date()); | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| String initSql = "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`) values " + | String initSql = "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`) values " + | ||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '2', '代办通知', '" + wxProjectConfig.getName() + "', '{userName}提交了一个合同待您审批,电脑登陆{page} 查看您的待办。', '" + nowTimestr + "', '1', '0', '226', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '3', '审批通知', '" + wxProjectConfig.getName() + "', '{userName}同意编号{contract}的合同审批,已呈送至{toUserName},登录{page}查看审批进度。', '" + nowTimestr + "', '1', '0', '227', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '4', '通过审批通知', '" + wxProjectConfig.getName() + "', '编号{contract}的合同已通过审批,请登录{page} 跟进后续工作。', '" + nowTimestr + "', '1', '0', '228', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '5', '驳回通知', '" + wxProjectConfig.getName() + "', '编号{contract}的合同审批被驳回,请登录{page} 查看审批明细。', '" + nowTimestr + "', '1', '0', '229', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '6', '验证码', '" + wxProjectConfig.getName() + "', '{s6}(动态验证码),请在1分钟内填写', '" + nowTimestr + "', '1', '1', '115', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '7', '账单待缴模板', '" + wxProjectConfig.getName() + "', '您当期的待缴账单为{price}元,截止日期为{date} ,请登录{app}小程序查看账单并交费。', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '8', '账单欠缴模板', '" + wxProjectConfig.getName() + "', '截止今日您的账单共计欠缴{price}元,请登录{app}小程序查看账单并交费。', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '9', '场景投放', '" + wxProjectConfig.getName() + "', '亲爱的vip,悄悄地送您一张{title},请到{app}微信小程序中使用吧!', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '11', '商户分账账户新增通知商户', '" + wxProjectConfig.getName() + "', '您于{time}提交了{merchant}商户的收款账户[{account}]绑定,后续销售分成及营销补贴将存入该账户', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '13', '商户分账账户变更通知商户', '" + wxProjectConfig.getName() + "', '您于{time}将{merchant}商户的收款账户变更为[{account}],后续销售分成及营销补贴将存入该账户', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '14', '商户分账账户不使用回执', '" + wxProjectConfig.getName() + "', '商管已同意[{account}]作为{merchant}商户的收款账户。后续的销售分成及营销补贴将存入此账户', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '15', '商户分账账户使用回执', '" + wxProjectConfig.getName() + "', '商管拒绝将[{account}]作为{merchant}商户的收款账户。如有疑问请联系商管', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '16', '商户分账账户删除提醒', '" + wxProjectConfig.getName() + "', '{merchant}商户的收款账户[{account}]于{time}取消绑定,营销活动与销售分成将无法正常进行,请尽快绑定新收款账户', '" + nowTimestr + "', '1', '0', null, null);" + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '2', '代办通知', '" + signature + "', '{userName}提交了一个合同待您审批,电脑登陆{page} 查看您的待办。', '" + nowTimestr + "', '1', '0', '226', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '3', '审批通知', '" + signature + "', '{userName}同意编号{contract}的合同审批,已呈送至{toUserName},登录{page}查看审批进度。', '" + nowTimestr + "', '1', '0', '227', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '4', '通过审批通知', '" + signature + "', '编号{contract}的合同已通过审批,请登录{page} 跟进后续工作。', '" + nowTimestr + "', '1', '0', '228', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '5', '驳回通知', '" + signature + "', '编号{contract}的合同审批被驳回,请登录{page} 查看审批明细。', '" + nowTimestr + "', '1', '0', '229', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '6', '验证码', '" + signature + "', '{s6}(动态验证码),请在1分钟内填写', '" + nowTimestr + "', '1', '1', '115', null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '7', '账单待缴模板', '" + signature + "', '您当期的待缴账单为{price}元,截止日期为{date} ,请登录{app}小程序查看账单并交费。', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '8', '账单欠缴模板', '" + signature + "', '截止今日您的账单共计欠缴{price}元,请登录{app}小程序查看账单并交费。', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '9', '场景投放', '" + signature + "', '亲爱的vip,悄悄地送您一张{title},请到{app}微信小程序中使用吧!', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '11', '商户分账账户新增通知商户', '" + signature + "', '您于{time}提交了{merchant}商户的收款账户[{account}]绑定,后续销售分成及营销补贴将存入该账户', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '13', '商户分账账户变更通知商户', '" + signature + "', '您于{time}将{merchant}商户的收款账户变更为[{account}],后续销售分成及营销补贴将存入该账户', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '14', '商户分账账户不使用回执', '" + signature + "', '商管已同意[{account}]作为{merchant}商户的收款账户。后续的销售分成及营销补贴将存入此账户', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '15', '商户分账账户使用回执', '" + signature + "', '商管拒绝将[{account}]作为{merchant}商户的收款账户。如有疑问请联系商管', '" + nowTimestr + "', '1', '0', null, null)," + | |||||
| " ( '" + idWorker.nextId() + "', '" + tenantId + "', '16', '商户分账账户删除提醒', '" + signature + "', '{merchant}商户的收款账户[{account}]于{time}取消绑定,营销活动与销售分成将无法正常进行,请尽快绑定新收款账户', '" + nowTimestr + "', '1', '0', null, null);" + | |||||
| "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | ||||
| "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '10', '审批通过通知', '富茂', " + | "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '10', '审批通过通知', '富茂', " + | ||||
| " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <script> document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + \\'px\\';</script>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;padding:0 40px;\\\" src=\\\"https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/changrong-logo.png\\\"/>\\n </header>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding:56px 55px 0;\\\">审批通过通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px;\\\">编号<span>{contract}</span>的{bustype}已经审批通过,请登录<a href=\\\"{page}\\\">{page}</a>跟进后续工作</div>\\n </div>\\n </div>\\n</body>\\n\\n</html>', " + | " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <script> document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + \\'px\\';</script>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;padding:0 40px;\\\" src=\\\"https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/changrong-logo.png\\\"/>\\n </header>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding:56px 55px 0;\\\">审批通过通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px;\\\">编号<span>{contract}</span>的{bustype}已经审批通过,请登录<a href=\\\"{page}\\\">{page}</a>跟进后续工作</div>\\n </div>\\n </div>\\n</body>\\n\\n</html>', " + | ||||
| " '" + nowTimestr + "', '1', null, '500', '" + wxProjectConfig.getImgUrlH() + "');" + | |||||
| " '" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "');" + | |||||
| "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | ||||
| "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '11', '待缴账单通知', '富茂', " + | "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '11', '待缴账单通知', '富茂', " + | ||||
| " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <style>\\n *{\\n margin: 0;\\n padding: 0;\\n }\\n </style>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;margin-left: 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <content>\\n <div style=\\\"background: #fff;padding-bottom: 40px;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding-top: 56px;padding-left: 55px;\\\">待缴账单通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding:36px 55px 0;\\\">您当前的待缴账单为<span style=\\\"font-weight:400;color:rgba(200,89,98,1);margin:0 10px;\\\">{price}</span>元,截止日期为<span>{date}</span>请登录<span>您的商户端</span>小程序查看账单并缴费</div>\\n </div>\\n <div style=\\\"height: auto;width: 100%;line-height: 40px; background: rgba(245,245,245,1);padding: 30px 0;\\\">\\n <div style=\\\"overflow: hidden;\\\">\\n <span style=\\\"display: block; font-size:18px;width:80px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">租金账单</span>\\n <div style=\\\"margin: 0 5%;width:90%;overflow: hidden;\\\">\\n <div style=\\\"width: 33.3%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">账单类型</div>\\n <div style=\\\"width: 33.3%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">账单金额(元)</div>\\n <div style=\\\"width: 33.3%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">缴费时间</div>\\n </div>\\n {billList}\\n </div>\\n </div>\\n <div style=\\\"background: #fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold; font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;margin-top: 26px;margin-left: 55px;padding-top: 56px;\\\">遇到问题?</div>\\n <div style=\\\"overflow: hidden;line-height: 60px;padding-bottom: 40px;\\\">\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">请联系商管负责人:</span>\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 25px;\\\"><span>{linkName}</span><span style=\\\"margin-left: 16px; font-family:MicrosoftYaHei;font-weight:400;color:rgba(64,103,139,1);\\\">{linkPhone}</span></span>\\n </div>\\n </div>\\n </content>\\n </div>\\n</body>\\n\\n</html>'," + | " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <style>\\n *{\\n margin: 0;\\n padding: 0;\\n }\\n </style>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;margin-left: 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <content>\\n <div style=\\\"background: #fff;padding-bottom: 40px;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding-top: 56px;padding-left: 55px;\\\">待缴账单通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding:36px 55px 0;\\\">您当前的待缴账单为<span style=\\\"font-weight:400;color:rgba(200,89,98,1);margin:0 10px;\\\">{price}</span>元,截止日期为<span>{date}</span>请登录<span>您的商户端</span>小程序查看账单并缴费</div>\\n </div>\\n <div style=\\\"height: auto;width: 100%;line-height: 40px; background: rgba(245,245,245,1);padding: 30px 0;\\\">\\n <div style=\\\"overflow: hidden;\\\">\\n <span style=\\\"display: block; font-size:18px;width:80px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">租金账单</span>\\n <div style=\\\"margin: 0 5%;width:90%;overflow: hidden;\\\">\\n <div style=\\\"width: 33.3%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">账单类型</div>\\n <div style=\\\"width: 33.3%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">账单金额(元)</div>\\n <div style=\\\"width: 33.3%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">缴费时间</div>\\n </div>\\n {billList}\\n </div>\\n </div>\\n <div style=\\\"background: #fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold; font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;margin-top: 26px;margin-left: 55px;padding-top: 56px;\\\">遇到问题?</div>\\n <div style=\\\"overflow: hidden;line-height: 60px;padding-bottom: 40px;\\\">\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">请联系商管负责人:</span>\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 25px;\\\"><span>{linkName}</span><span style=\\\"margin-left: 16px; font-family:MicrosoftYaHei;font-weight:400;color:rgba(64,103,139,1);\\\">{linkPhone}</span></span>\\n </div>\\n </div>\\n </content>\\n </div>\\n</body>\\n\\n</html>'," + | ||||
| " '" + nowTimestr + "', '1', null, '500', '" + wxProjectConfig.getImgUrlH() + "');" + | |||||
| " '" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "');" + | |||||
| "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | ||||
| "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '12', '审批通知', '富茂', " + | "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '12', '审批通知', '富茂', " + | ||||
| "'<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <script> document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + \\'px\\';</script>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;padding:0 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding:56px 55px 0;\\\">审批通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px;\\\"><span>{userName}</span>同意编号<span>{contract}</span>的{bustype}审批,已呈送<span>{toUserName},</span>请登录<a href=\\\"{page}\\\">{page}</a>查看审批进度</div>\\n </div>\\n </div>\\n</body>\\n\\n</html>', " + | "'<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <script> document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + \\'px\\';</script>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;padding:0 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding:56px 55px 0;\\\">审批通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px;\\\"><span>{userName}</span>同意编号<span>{contract}</span>的{bustype}审批,已呈送<span>{toUserName},</span>请登录<a href=\\\"{page}\\\">{page}</a>查看审批进度</div>\\n </div>\\n </div>\\n</body>\\n\\n</html>', " + | ||||
| "'" + nowTimestr + "', '1', null, '500', '" + wxProjectConfig.getImgUrlH() + "');" + | |||||
| "'" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "');" + | |||||
| "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | ||||
| "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '13', '欠缴账单通知', '富茂', " + | "values ( '" + idWorker.nextId() + "', '" + tenantId + "', '13', '欠缴账单通知', '富茂', " + | ||||
| " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <style>\\n *{\\n margin: 0;\\n padding: 0;\\n }\\n </style>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;margin-left: 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <content>\\n <div style=\\\"background: #fff;padding-bottom: 40px;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding: 56px 55px 0;\\\">欠缴账单通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px 0;\\\">您当前的欠缴账单为<span style=\\\"font-weight:400;color:rgba(200,89,98,1);margin:0 10px;\\\">{price}</span>元,截止日期为<span>{date}</span>请登录<span>您的商户端</span>小程序查看账单并缴费</div>\\n </div>\\n <div style=\\\"height: auto;width: 100%;line-height: 40px; background: rgba(245,245,245,1);padding: 30px 0;\\\">\\n <div style=\\\"overflow: hidden;\\\">\\n <span style=\\\"display: block; font-size:18px;width:80px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">租金账单</span>\\n <div style=\\\"margin: 0 5%;width:90%;overflow: hidden;font-size:14px;\\\">\\n <div style=\\\"width: 25%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">账单类型</div>\\n <div style=\\\"width: 25%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">账单金额(元)</div>\\n <div style=\\\"width: 25%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">缴费时间</div>\\n <div style=\\\"width: 25%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">逾期天数</div>\\n </div>\\n {billList}\\n </div>\\n </div>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold; font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;margin-top: 26px;margin-left: 55px;padding-top: 56px;\\\">遇到问题?</div>\\n <div style=\\\"overflow: hidden;line-height: 60px;padding-bottom: 40px;\\\">\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">请联系商管负责人:</span>\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 25px;\\\"><span>{linkName}</span><span style=\\\"margin-left: 16px; font-family:MicrosoftYaHei;font-weight:400;color:rgba(64,103,139,1);\\\">{linkPhone}</span></span>\\n </div>\\n </div>\\n </content>\\n </div>\\n</body>\\n\\n</html>'," + | " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <style>\\n *{\\n margin: 0;\\n padding: 0;\\n }\\n </style>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;margin-left: 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <content>\\n <div style=\\\"background: #fff;padding-bottom: 40px;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding: 56px 55px 0;\\\">欠缴账单通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px 0;\\\">您当前的欠缴账单为<span style=\\\"font-weight:400;color:rgba(200,89,98,1);margin:0 10px;\\\">{price}</span>元,截止日期为<span>{date}</span>请登录<span>您的商户端</span>小程序查看账单并缴费</div>\\n </div>\\n <div style=\\\"height: auto;width: 100%;line-height: 40px; background: rgba(245,245,245,1);padding: 30px 0;\\\">\\n <div style=\\\"overflow: hidden;\\\">\\n <span style=\\\"display: block; font-size:18px;width:80px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">租金账单</span>\\n <div style=\\\"margin: 0 5%;width:90%;overflow: hidden;font-size:14px;\\\">\\n <div style=\\\"width: 25%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">账单类型</div>\\n <div style=\\\"width: 25%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">账单金额(元)</div>\\n <div style=\\\"width: 25%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">缴费时间</div>\\n <div style=\\\"width: 25%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\\\">逾期天数</div>\\n </div>\\n {billList}\\n </div>\\n </div>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold; font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;margin-top: 26px;margin-left: 55px;padding-top: 56px;\\\">遇到问题?</div>\\n <div style=\\\"overflow: hidden;line-height: 60px;padding-bottom: 40px;\\\">\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">请联系商管负责人:</span>\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 25px;\\\"><span>{linkName}</span><span style=\\\"margin-left: 16px; font-family:MicrosoftYaHei;font-weight:400;color:rgba(64,103,139,1);\\\">{linkPhone}</span></span>\\n </div>\\n </div>\\n </content>\\n </div>\\n</body>\\n\\n</html>'," + | ||||
| "'" + nowTimestr + "', '1', null, '500', '" + wxProjectConfig.getImgUrlH() + "');" + | |||||
| "'" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "');" + | |||||
| "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | ||||
| " values ( '" + idWorker.nextId() + "', '" + tenantId + "', '14', '待办通知', '富茂'," + | " values ( '" + idWorker.nextId() + "', '" + tenantId + "', '14', '待办通知', '富茂'," + | ||||
| " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <style>\\n *{\\n margin: 0;\\n padding: 0;\\n }\\n </style>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;margin-left: 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <content>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding: 56px 55px 0;\\\">待办通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px 40px;\\\"><span>{name}</span><span>提交了一个{bustype}待您审批,电脑登录</span><a href=\\\"{page}\\\" target=\\\"_blank\\\">{page}</a>查看您的待办</div>\\n </div>\\n <div style=\\\"height: auto;width: 100%;line-height: 40px; background: rgba(245,245,245,1);padding: 30px 0;\\\">\\n <div style=\\\"overflow: hidden;\\\">\\n <div style=\\\"float: left;font-size:18px;width:cale(20%-55px);font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">申请时间:</div>\\n <div style=\\\"float: left;font-size:18px;width:cale(80%-55px);font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 55px;\\\">{applyTime}</div>\\n </div>\\n <div style=\\\"overflow: hidden;\\\">\\n <div style=\\\"float: left;font-size:18px;width:cale(20%-55px);font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">申请进度:</div>\\n <div style=\\\"float: left;width:cale(80%-55px);margin-left: 55px;\\\">\\n \\n {taskList}\\n </div>\\n </div>\\n </div>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;margin-top: 26px;padding: 56px 55px 0;\\\">遇到问题?</div>\\n <div style=\\\"overflow: hidden;line-height: 60px;padding-bottom: 40px;\\\">\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">请联系申请人:</span>\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 25px;\\\"><span>{linkName}</span><span style=\\\"margin-left: 16px; font-family:MicrosoftYaHei;font-weight:400;color:rgba(64,103,139,1);\\\">{linkPhone}</span></span>\\n </div>\\n </div>\\n </content>\\n </div>\\n</body>\\n\\n</html>'," + | " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <style>\\n *{\\n margin: 0;\\n padding: 0;\\n }\\n </style>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;margin-left: 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <content>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding: 56px 55px 0;\\\">待办通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px 40px;\\\"><span>{name}</span><span>提交了一个{bustype}待您审批,电脑登录</span><a href=\\\"{page}\\\" target=\\\"_blank\\\">{page}</a>查看您的待办</div>\\n </div>\\n <div style=\\\"height: auto;width: 100%;line-height: 40px; background: rgba(245,245,245,1);padding: 30px 0;\\\">\\n <div style=\\\"overflow: hidden;\\\">\\n <div style=\\\"float: left;font-size:18px;width:cale(20%-55px);font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">申请时间:</div>\\n <div style=\\\"float: left;font-size:18px;width:cale(80%-55px);font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 55px;\\\">{applyTime}</div>\\n </div>\\n <div style=\\\"overflow: hidden;\\\">\\n <div style=\\\"float: left;font-size:18px;width:cale(20%-55px);font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">申请进度:</div>\\n <div style=\\\"float: left;width:cale(80%-55px);margin-left: 55px;\\\">\\n \\n {taskList}\\n </div>\\n </div>\\n </div>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;margin-top: 26px;padding: 56px 55px 0;\\\">遇到问题?</div>\\n <div style=\\\"overflow: hidden;line-height: 60px;padding-bottom: 40px;\\\">\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">请联系申请人:</span>\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 25px;\\\"><span>{linkName}</span><span style=\\\"margin-left: 16px; font-family:MicrosoftYaHei;font-weight:400;color:rgba(64,103,139,1);\\\">{linkPhone}</span></span>\\n </div>\\n </div>\\n </content>\\n </div>\\n</body>\\n\\n</html>'," + | ||||
| " '" + nowTimestr + "', '1', null, '500', '" + wxProjectConfig.getImgUrlH() + "');" + | |||||
| " '" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "');" + | |||||
| "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | "insert into `mallink`.`wx_msg_validationcode_model` ( `id`, `tenant_id`, `type`, `name`, `signature`, `content`, `createtime`, `status`, `minutes`, `model_id`, `email_bg_img`)" + | ||||
| " values ( '" + idWorker.nextId() + "', '" + tenantId + "', '15', '驳回通知', '富茂', " + | " values ( '" + idWorker.nextId() + "', '" + tenantId + "', '15', '驳回通知', '富茂', " + | ||||
| " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <style>\\n *{\\n margin: 0;\\n padding: 0;\\n }\\n </style>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;margin-left: 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <content>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding: 56px 55px 0;\\\">审批通过通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding:36px 55px 40px;\\\">编号<span>{contract}</span>的{bustype}审批被驳回,请登录<a href=\\\"{page}\\\">{page}</a>查看审批明细</div>\\n </div>\\n <div style=\\\"height: auto;width: 100%;line-height: 40px; background: rgba(245,245,245,1);padding: 30px 0;\\\">\\n <div style=\\\"overflow: hidden;\\\">\\n <span style=\\\"display: block;float: left; font-size:18px;width:80px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">驳回人:</span>\\n <span style=\\\"display: block;float: left; width:calc(100% - 240px);font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 55px;\\\">{name}</span>\\n </div>\\n <div style=\\\"overflow: hidden;\\\">\\n <span style=\\\"display: block;float: left; font-size:18px;width:80px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">驳回原因:</span>\\n <span style=\\\"display: block;float: left;width:calc(100% - 240px); font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 55px;\\\">{remark}</span>\\n </div>\\n </div>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding: 56px 55px 0;margin-top: 26px;\\\">遇到问题?</div>\\n <div style=\\\"overflow: hidden;line-height: 60px;padding-bottom: 40px;\\\">\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">请联系驳回人:</span>\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 25px;\\\"><span>{linkName}</span><span style=\\\"margin-left: 16px; font-family:MicrosoftYaHei;font-weight:400;color:rgba(64,103,139,1);\\\">{linkPhone}</span></span>\\n </div>\\n </div>\\n </content>\\n </div>\\n</body>\\n\\n</html>'," + | " '<!DOCTYPE html>\\n<html>\\n\\n<head>\\n <meta charset=\\\"utf-8\\\">\\n <meta name=\\\"viewport\\\" content=\\\"width=device-width,initial-scale=1.0\\\">\\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0, user-scalable=no\\\" />\\n <meta name=\\\"renderer\\\" content=\\\"webkit\\\">\\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge,chrome=1\\\">\\n <title>富茂审批邮件</title>\\n <title></title>\\n <style>\\n *{\\n margin: 0;\\n padding: 0;\\n }\\n </style>\\n</head>\\n\\n<body>\\n <div id=\\\"box\\\" style=\\\"padding:80px 20%;background:#E9E7E7;min-height:100vh;\\\">\\n <header style=\\\"height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;\\\">\\n <img style=\\\"height:auto;width:292px;display:flex;align-self: center;justify-content: center;margin-left: 40px;\\\" src=\\\"{bg}\\\"/>\\n </header>\\n <content>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding: 56px 55px 0;\\\">审批通过通知</div>\\n <div style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding:36px 55px 40px;\\\">编号<span>{contract}</span>的{bustype}审批被驳回,请登录<a href=\\\"{page}\\\">{page}</a>查看审批明细</div>\\n </div>\\n <div style=\\\"height: auto;width: 100%;line-height: 40px; background: rgba(245,245,245,1);padding: 30px 0;\\\">\\n <div style=\\\"overflow: hidden;\\\">\\n <span style=\\\"display: block;float: left; font-size:18px;width:80px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">驳回人:</span>\\n <span style=\\\"display: block;float: left; width:calc(100% - 240px);font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 55px;\\\">{name}</span>\\n </div>\\n <div style=\\\"overflow: hidden;\\\">\\n <span style=\\\"display: block;float: left; font-size:18px;width:80px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">驳回原因:</span>\\n <span style=\\\"display: block;float: left;width:calc(100% - 240px); font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 55px;\\\">{remark}</span>\\n </div>\\n </div>\\n <div style=\\\"background:#fff;\\\">\\n <div style=\\\"font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding: 56px 55px 0;margin-top: 26px;\\\">遇到问题?</div>\\n <div style=\\\"overflow: hidden;line-height: 60px;padding-bottom: 40px;\\\">\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(153,153,153,1);margin-left: 55px;\\\">请联系驳回人:</span>\\n <span style=\\\"font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);margin-left: 25px;\\\"><span>{linkName}</span><span style=\\\"margin-left: 16px; font-family:MicrosoftYaHei;font-weight:400;color:rgba(64,103,139,1);\\\">{linkPhone}</span></span>\\n </div>\\n </div>\\n </content>\\n </div>\\n</body>\\n\\n</html>'," + | ||||
| " '" + nowTimestr + "', '1', null, '500', '" + wxProjectConfig.getImgUrlH() + "');"; | |||||
| " '" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "');"; | |||||
| wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql); | wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql); | ||||
| } | } | ||||
| @@ -87,6 +87,11 @@ public class WxMsgValidationcodeModelServiceImpl implements WxMsgValidationcodeM | |||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgValidationcodeModelMapper.findList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgValidationcodeModelMapper.findList(record)); | ||||
| } | } | ||||
| @Override | |||||
| public List<WxMsgValidationcodeModel> findList(WxMsgValidationcodeModel record) { | |||||
| return wxMsgValidationcodeModelMapper.findList(record); | |||||
| } | |||||
| @Override | @Override | ||||
| public WxMsgValidationcodeModel getById(String id) { | public WxMsgValidationcodeModel getById(String id) { | ||||
| return wxMsgValidationcodeModelMapper.selectById(id); | return wxMsgValidationcodeModelMapper.selectById(id); | ||||
| @@ -83,12 +83,11 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService { | |||||
| public void deleteById(Long id) { | public void deleteById(Long id) { | ||||
| wxPayAccountBillMapper.deleteById(id); | wxPayAccountBillMapper.deleteById(id); | ||||
| } | } | ||||
| @Override | |||||
| public WxPayAccountBill getByTenantId(String tenantId) { | |||||
| return wxPayAccountBillMapper.getByTenantId(tenantId); | |||||
| } | |||||
| } | } | ||||
| @@ -65,12 +65,11 @@ public class WxPayAccountServiceImpl implements WxPayAccountService { | |||||
| public void deleteById(Long id) { | public void deleteById(Long id) { | ||||
| wxPayAccountMapper.deleteById(id); | wxPayAccountMapper.deleteById(id); | ||||
| } | } | ||||
| @Override | |||||
| public WxPayAccount getByTenantId(String tenantId) { | |||||
| return wxPayAccountMapper.getByTenantId(tenantId); | |||||
| } | |||||
| } | } | ||||
| @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray; | |||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.mapper.*; | import com.iformall.mapper.*; | ||||
| import com.iformall.service.*; | import com.iformall.service.*; | ||||
| import com.iformall.utils.Constant; | |||||
| import com.iformall.utils.PasswordHelper; | import com.iformall.utils.PasswordHelper; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| @@ -30,6 +31,8 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { | |||||
| @Autowired | @Autowired | ||||
| WxMallBuildingService wxMallBuildingService; | WxMallBuildingService wxMallBuildingService; | ||||
| @Autowired | @Autowired | ||||
| WxMallFloorService wxMallFloorService; | |||||
| @Autowired | |||||
| WxPayAccountService wxPayAccountService; | WxPayAccountService wxPayAccountService; | ||||
| @Autowired | @Autowired | ||||
| WxPayAccountBillService wxPayAccountBillService; | WxPayAccountBillService wxPayAccountBillService; | ||||
| @@ -42,6 +45,12 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { | |||||
| @Autowired | @Autowired | ||||
| MallRoleService mallRoleService; | MallRoleService mallRoleService; | ||||
| @Autowired | @Autowired | ||||
| MallUserRoleService mallUserRoleService; | |||||
| @Autowired | |||||
| MallPermissionService mallPermissionService; | |||||
| @Autowired | |||||
| MallRolePermissionService mallRolePermissionService; | |||||
| @Autowired | |||||
| WxMsgConfigService wxMsgConfigService; | WxMsgConfigService wxMsgConfigService; | ||||
| @Autowired | @Autowired | ||||
| WxParkService wxParkService; | WxParkService wxParkService; | ||||
| @@ -55,6 +64,8 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { | |||||
| WxMsgValidationcodeModelService wxMsgValidationcodeModelService; | WxMsgValidationcodeModelService wxMsgValidationcodeModelService; | ||||
| @Autowired | @Autowired | ||||
| WxFlowService wxFlowService; | WxFlowService wxFlowService; | ||||
| @Autowired | |||||
| MallUserInfoService userInfoService; | |||||
| @Override | @Override | ||||
| @Transactional | @Transactional | ||||
| @@ -102,21 +113,10 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { | |||||
| //# wuguoqiang@iformall.com | //# wuguoqiang@iformall.com | ||||
| // # 19. wx_question | // # 19. wx_question | ||||
| logger.info("wx_question---------------------init--start"); | |||||
| String questionJson = "[{\"flag\": \"single\", \"title\": \"请问您的职业是?\", \"answers\": [{\"id\": \"59\", \"name\": \"学生\"}, {\"id\": \"60\", \"name\": \"上班族\"}, {\"id\": \"61\", \"name\": \"企业高管\"}, {\"id\": \"62\", \"name\": \"个体户\"}, {\"id\": \"63\", \"name\": \"自由职业\"}, {\"id\": \"64\", \"name\": \"其他\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"请问您目前的学历是?\", \"answers\": [{\"id\": \"34\", \"name\": \"高中\"}, {\"id\": \"35\", \"name\": \"大专\"}, {\"id\": \"36\", \"name\": \"本科\"}, {\"id\": \"37\", \"name\": \"硕士及以上\"}, {\"id\": \"38\", \"name\": \"博士及以上\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"请问您是如何到达商场的?\", \"answers\": [{\"id\": \"127\", \"name\": \"走路\"}, {\"id\": \"128\", \"name\": \"乘车\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"请问您和父母一起居住吗?\", \"answers\": [{\"id\": \"65\", \"name\": \"不是,我已租房\"}, {\"id\": \"66\", \"name\": \"是,我已购房\"}, {\"id\": \"67\", \"name\": \"不是,我和室友住宿舍\"}]}," | |||||
| + "{\"flag\": \"multi\", \"title\": \"请问您的孩子愿意与您一起?\", \"answers\": [{\"id\": \"57\", \"name\": \"逛街\"}, {\"id\": \"57\", \"name\": \"玩乐\"}, {\"id\": \"57\", \"name\": \"阅读\"}, {\"id\": \"55\", \"name\": \"我还没有宝宝\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"主人,您结婚了吗?\", \"answers\": [{\"id\": \"56\", \"name\": \"结婚啦\"}, {\"id\": \"55\", \"name\": \"还没有哦\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"您是?\", \"answers\": [{\"id\": \"42\", \"name\": \"贫下中农\"}, {\"id\": \"43\", \"name\": \"小康家庭\"}, {\"id\": \"44\", \"name\": \"中产家庭\"}, {\"id\": \"45\", \"name\": \"富裕家庭\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"请问您是?\", \"answers\": [{\"id\": \"104\", \"name\": \"实惠型消费\"}, {\"id\": \"105\", \"name\": \"享乐型消费\"}, {\"id\": \"106\", \"name\": \"品质型消费\"}]}," | |||||
| + "{\"flag\": \"multi\", \"title\": \"请问您喜欢哪种口味的食物?\", \"answers\": [{\"id\": \"92\", \"name\": \"轻餐\"}, {\"id\": \"93\", \"name\": \"小吃快餐\"}, {\"id\": \"94\", \"name\": \"西餐\"}, {\"id\": \"95\", \"name\": \"日料中餐甜点\"}, {\"id\": \"96\", \"name\": \"火锅\"}]}," | |||||
| + "{\"flag\": \"multi\", \"title\": \"请问您的爱好是?\", \"answers\": [{\"id\": \"121\", \"name\": \"时尚\"}, {\"id\": \"122\", \"name\": \"旅游\"}, {\"id\": \"123\", \"name\": \"运动\"}, {\"id\": \"124\", \"name\": \"电玩\"}, {\"id\": \"125\", \"name\": \"看书\"}, {\"id\": \"126\", \"name\": \"其他\"}]}]"; | |||||
| wxQuestionService.wxQuestionInit(tenantId,questionJson); | |||||
| wxQuestionService.wxQuestionInit(tenantId); | |||||
| //# 20. wx_msg_validationcode_model, 数据重新一下 | //# 20. wx_msg_validationcode_model, 数据重新一下 | ||||
| wxMsgValidationcodeModelService.wxMsgValidationcodeModelInit(tenantId, wxProjectConfig); | |||||
| wxMsgValidationcodeModelService.wxMsgValidationcodeModelInit(tenantId, wxProjectConfig.getName(), wxProjectConfig.getImgUrlH()); | |||||
| //wx_flow_config | //wx_flow_config | ||||
| wxFlowService.wxFlowConfigInit(tenantId); | wxFlowService.wxFlowConfigInit(tenantId); | ||||
| //初始化成功 删除标记 | //初始化成功 删除标记 | ||||
| @@ -129,5 +129,119 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { | |||||
| } | } | ||||
| @Override | |||||
| @Transactional | |||||
| public void initMall(WxMall wxMall) { | |||||
| if(wxMall.getId() == null){ | |||||
| wxMall.setTenantId("-1"); | |||||
| wxMallService.save(wxMall); | |||||
| wxMall.setTenantId(wxMall.getId().toString()); | |||||
| // 2. wx_coupon_send_config | |||||
| wxCouponSendConfigService.wxCouponSendConfigInit(wxMall.getTenantId()); | |||||
| //# 积分成长值设置wx_score_rules | |||||
| wxScoreRulesService.wxScoreRulesInit(wxMall.getTenantId()); | |||||
| //# 17. wx_template_msg | |||||
| //# 设置核销成功通知,核销失败通知 | |||||
| wxTemplateMsgService.wxTemplateMsgInit(wxMall.getTenantId()); | |||||
| // # 19. wx_question | |||||
| wxQuestionService.wxQuestionInit(wxMall.getTenantId()); | |||||
| //# 20. wx_msg_validationcode_model, 数据重新一下 | |||||
| wxMsgValidationcodeModelService.wxMsgValidationcodeModelInit(wxMall.getTenantId(), wxMall.getName(), wxMall.getImgUrlH()); | |||||
| //wx_flow_config | |||||
| wxFlowService.wxFlowConfigInit(wxMall.getTenantId()); | |||||
| } | |||||
| wxMallService.update(wxMall); | |||||
| } | |||||
| @Override | |||||
| @Transactional | |||||
| public void initBuilding(List<WxMallBuilding> wxMallBuildings) { | |||||
| for (WxMallBuilding wxMallBuilding:wxMallBuildings) { | |||||
| wxMallBuilding.setMallId(Long.parseLong(wxMallBuilding.getTenantId())); | |||||
| if(wxMallBuilding.getFloors() != null && wxMallBuilding.getFloors().size() > 0){ | |||||
| wxMallBuilding.setFloorNumber(wxMallBuilding.getFloors().size()); | |||||
| wxMallBuildingService.saveOrUpdate(wxMallBuilding); | |||||
| for (WxMallFloor wxMallFloor:wxMallBuilding.getFloors()) { | |||||
| wxMallFloor.setTenantId(wxMallBuilding.getTenantId()); | |||||
| wxMallFloor.setParentTenantId(wxMallBuilding.getParentTenantId()); | |||||
| wxMallFloor.setMallId(Long.parseLong(wxMallBuilding.getTenantId())); | |||||
| wxMallFloor.setBuildingId(wxMallBuilding.getId()); | |||||
| wxMallFloor.setBackgroundImg(Constant.floor_back_img); | |||||
| wxMallFloorService.saveOrUpdate(wxMallFloor); | |||||
| } | |||||
| }else{ | |||||
| wxMallBuilding.setFloorNumber(0); | |||||
| wxMallBuildingService.saveOrUpdate(wxMallBuilding); | |||||
| wxMallFloorService.deleteByBuildingId(wxMallBuilding.getId()); | |||||
| } | |||||
| } | |||||
| } | |||||
| @Override | |||||
| @Transactional | |||||
| public void initPayAccount(WxPayAccount wxPayAccount) { | |||||
| wxPayAccountService.saveOrUpdate(wxPayAccount); | |||||
| WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxPayAccount.getTenantId()); | |||||
| if(wxPayAccountBill == null){ | |||||
| wxPayAccountBill = new WxPayAccountBill(); | |||||
| wxPayAccountBill.setTenantId(wxPayAccount.getTenantId()); | |||||
| } | |||||
| wxPayAccountBill.setMchId(wxPayAccount.getMchId()); | |||||
| wxPayAccountBill.setSubMchId(wxPayAccount.getSubMchId()); | |||||
| wxPayAccountBill.setApiKey(wxPayAccount.getApiKey()); | |||||
| wxPayAccountBill.setNotifyUrl(wxPayAccount.getNotifyUrl()); | |||||
| wxPayAccountBill.setCertPath(wxPayAccount.getCertPath()); | |||||
| wxPayAccountBill.setType(wxPayAccount.getType()); | |||||
| wxPayAccountBill.setShare(!(wxPayAccount.getShare() == 0)); | |||||
| wxPayAccountBill.setRate(wxPayAccount.getRate()); | |||||
| wxPayAccountBill.setRealRate(wxPayAccount.getRealRate()); | |||||
| wxPayAccountBillService.saveOrUpdate(wxPayAccountBill); | |||||
| WxAppinfo wxAppinfo = new WxAppinfo(); | |||||
| wxAppinfo.setTenantId(wxPayAccount.getTenantId()); | |||||
| List<WxAppinfo> list = wxAppinfoService.getList(wxAppinfo); | |||||
| if(list != null && list.size() > 0){ | |||||
| for (WxAppinfo wa:list) { | |||||
| wa.setPayId(wxPayAccount.getId()); | |||||
| wa.setPayBillId(wxPayAccountBill.getId()); | |||||
| wxAppinfoService.saveOrUpdate(wa); | |||||
| } | |||||
| } | |||||
| } | |||||
| @Override | |||||
| @Transactional | |||||
| public void initUserInfo(MallUserInfo userInfo) { | |||||
| userInfoService.saveOrUpdate(userInfo); | |||||
| //创建角色 | |||||
| MallRole mallRole = new MallRole(); | |||||
| mallRole.setTenantId(userInfo.getTenantId()); | |||||
| mallRole.setName("系统管理员"); | |||||
| mallRole.setAvailable("0"); | |||||
| mallRoleService.saveOrUpdate(mallRole); | |||||
| //给角色赋权限 | |||||
| MallPermission mallPermission=new MallPermission(); | |||||
| List<MallPermission> list = mallPermissionService.getList(mallPermission); | |||||
| for(MallPermission m : list){ | |||||
| MallRolePermission mallRolePermission = new MallRolePermission(); | |||||
| mallRolePermission.setTenantId(userInfo.getTenantId()); | |||||
| mallRolePermission.setRoleId(mallRole.getId()); | |||||
| mallRolePermission.setPermissionId(m.getId()); | |||||
| mallRolePermissionService.saveOrUpdate(mallRolePermission); | |||||
| } | |||||
| //给帐号加角色 | |||||
| MallUserRole mallUserRole = new MallUserRole(); | |||||
| mallUserRole.setUid(userInfo.getId()); | |||||
| mallUserRole.setRoleId(mallRole.getId()); | |||||
| mallUserRoleService.saveOrUpdate(mallUserRole); | |||||
| } | |||||
| @Override | |||||
| public void initSubmall(String parentTenantId, String[] tenantIds) { | |||||
| wxMallService.undateSubmall(parentTenantId,tenantIds); | |||||
| /** | |||||
| * 初始化数据 | |||||
| */ | |||||
| } | |||||
| } | } | ||||
| @@ -34,7 +34,17 @@ public class WxQuestionServiceImpl implements WxQuestionService { | |||||
| WxQuestionLogMapper wxQuestionLogMapper; | WxQuestionLogMapper wxQuestionLogMapper; | ||||
| @Override | @Override | ||||
| public void wxQuestionInit(String tenantId, String questionJson) { | |||||
| public void wxQuestionInit(String tenantId) { | |||||
| String questionJson = "[{\"flag\": \"single\", \"title\": \"请问您的职业是?\", \"answers\": [{\"id\": \"59\", \"name\": \"学生\"}, {\"id\": \"60\", \"name\": \"上班族\"}, {\"id\": \"61\", \"name\": \"企业高管\"}, {\"id\": \"62\", \"name\": \"个体户\"}, {\"id\": \"63\", \"name\": \"自由职业\"}, {\"id\": \"64\", \"name\": \"其他\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"请问您目前的学历是?\", \"answers\": [{\"id\": \"34\", \"name\": \"高中\"}, {\"id\": \"35\", \"name\": \"大专\"}, {\"id\": \"36\", \"name\": \"本科\"}, {\"id\": \"37\", \"name\": \"硕士及以上\"}, {\"id\": \"38\", \"name\": \"博士及以上\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"请问您是如何到达商场的?\", \"answers\": [{\"id\": \"127\", \"name\": \"走路\"}, {\"id\": \"128\", \"name\": \"乘车\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"请问您和父母一起居住吗?\", \"answers\": [{\"id\": \"65\", \"name\": \"不是,我已租房\"}, {\"id\": \"66\", \"name\": \"是,我已购房\"}, {\"id\": \"67\", \"name\": \"不是,我和室友住宿舍\"}]}," | |||||
| + "{\"flag\": \"multi\", \"title\": \"请问您的孩子愿意与您一起?\", \"answers\": [{\"id\": \"57\", \"name\": \"逛街\"}, {\"id\": \"57\", \"name\": \"玩乐\"}, {\"id\": \"57\", \"name\": \"阅读\"}, {\"id\": \"55\", \"name\": \"我还没有宝宝\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"主人,您结婚了吗?\", \"answers\": [{\"id\": \"56\", \"name\": \"结婚啦\"}, {\"id\": \"55\", \"name\": \"还没有哦\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"您是?\", \"answers\": [{\"id\": \"42\", \"name\": \"贫下中农\"}, {\"id\": \"43\", \"name\": \"小康家庭\"}, {\"id\": \"44\", \"name\": \"中产家庭\"}, {\"id\": \"45\", \"name\": \"富裕家庭\"}]}," | |||||
| + "{\"flag\": \"single\", \"title\": \"请问您是?\", \"answers\": [{\"id\": \"104\", \"name\": \"实惠型消费\"}, {\"id\": \"105\", \"name\": \"享乐型消费\"}, {\"id\": \"106\", \"name\": \"品质型消费\"}]}," | |||||
| + "{\"flag\": \"multi\", \"title\": \"请问您喜欢哪种口味的食物?\", \"answers\": [{\"id\": \"92\", \"name\": \"轻餐\"}, {\"id\": \"93\", \"name\": \"小吃快餐\"}, {\"id\": \"94\", \"name\": \"西餐\"}, {\"id\": \"95\", \"name\": \"日料中餐甜点\"}, {\"id\": \"96\", \"name\": \"火锅\"}]}," | |||||
| + "{\"flag\": \"multi\", \"title\": \"请问您的爱好是?\", \"answers\": [{\"id\": \"121\", \"name\": \"时尚\"}, {\"id\": \"122\", \"name\": \"旅游\"}, {\"id\": \"123\", \"name\": \"运动\"}, {\"id\": \"124\", \"name\": \"电玩\"}, {\"id\": \"125\", \"name\": \"看书\"}, {\"id\": \"126\", \"name\": \"其他\"}]}]"; | |||||
| WxQuestion wxQuestion = new WxQuestion(); | WxQuestion wxQuestion = new WxQuestion(); | ||||
| wxQuestion.setTenantId(tenantId); | wxQuestion.setTenantId(tenantId); | ||||
| JSONArray jsonObject = JSON.parseArray(questionJson); | JSONArray jsonObject = JSON.parseArray(questionJson); | ||||
| @@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | |||||
| @Service | @Service | ||||
| public class WxTemplateMsgServiceImpl implements WxTemplateMsgService { | public class WxTemplateMsgServiceImpl implements WxTemplateMsgService { | ||||
| @@ -48,6 +49,11 @@ public class WxTemplateMsgServiceImpl implements WxTemplateMsgService { | |||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxTemplateMsgMapper.findList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxTemplateMsgMapper.findList(record)); | ||||
| } | } | ||||
| @Override | |||||
| public List<WxTemplateMsg> findList(WxTemplateMsg record) { | |||||
| return wxTemplateMsgMapper.findList(record); | |||||
| } | |||||
| @Override | @Override | ||||
| public WxTemplateMsg getById(Long id) { | public WxTemplateMsg getById(Long id) { | ||||
| return wxTemplateMsgMapper.selectById(id); | return wxTemplateMsgMapper.selectById(id); | ||||
| @@ -0,0 +1,40 @@ | |||||
| package com.iformall.service.impl; | |||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||||
| import com.iformall.common.IdWorker; | |||||
| import com.iformall.domain.po.WxWiWideInfo; | |||||
| import com.iformall.mapper.WxWiwideInfoMapper; | |||||
| import com.iformall.service.WxWiWideInfoService; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| import java.util.List; | |||||
| @Service | |||||
| public class WxWiWideInfoServiceImpl implements WxWiWideInfoService { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| WxWiwideInfoMapper wxWiwideInfoMapper; | |||||
| @Override | |||||
| public void saveOrUpdate(WxWiWideInfo record) { | |||||
| if (record.getId() == null) { | |||||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||||
| final IdWorker idWorker = IdWorker.get(); | |||||
| record.setId(idWorker.nextId()); | |||||
| wxWiwideInfoMapper.insert(record); | |||||
| } else { | |||||
| wxWiwideInfoMapper.updateById(record); | |||||
| } | |||||
| } | |||||
| @Override | |||||
| public WxWiWideInfo findObject(WxWiWideInfo record) { | |||||
| return wxWiwideInfoMapper.selectOne(new QueryWrapper(record)); | |||||
| } | |||||
| } | |||||
| @@ -175,9 +175,12 @@ | |||||
| <sql id="dynamicWhereConditionsVo"> | <sql id="dynamicWhereConditionsVo"> | ||||
| where 1 = 1 | where 1 = 1 | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != boxId "> | <if test=" null != boxId "> | ||||
| and `box_id` = #{boxId} | and `box_id` = #{boxId} | ||||
| @@ -27,9 +27,12 @@ | |||||
| and `id` = #{id} | and `id` = #{id} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != boxId "> | <if test=" null != boxId "> | ||||
| and `box_id` = #{boxId} | and `box_id` = #{boxId} | ||||
| @@ -106,9 +109,12 @@ | |||||
| <sql id="dynamicWhereConditionsVo"> | <sql id="dynamicWhereConditionsVo"> | ||||
| where 1 = 1 | where 1 = 1 | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != boxId "> | <if test=" null != boxId "> | ||||
| and `box_id` = #{boxId} | and `box_id` = #{boxId} | ||||
| @@ -232,9 +238,12 @@ | |||||
| tenant_id | tenant_id | ||||
| FROM kw_meter_data | FROM kw_meter_data | ||||
| where 1 = 1 | where 1 = 1 | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != meterId "> | <if test=" null != meterId "> | ||||
| and `meter_id` = #{meterId} | and `meter_id` = #{meterId} | ||||
| </if> | </if> | ||||
| @@ -152,8 +152,11 @@ | |||||
| <include refid="allSafeColumns"/> | <include refid="allSafeColumns"/> | ||||
| from mall_user_info | from mall_user_info | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id`=#{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != bopenId "> | <if test=" null != bopenId "> | ||||
| and `bopen_id`=#{bopenId} | and `bopen_id`=#{bopenId} | ||||
| @@ -174,8 +177,11 @@ | |||||
| update mall_user_info | update mall_user_info | ||||
| set `web_open_id` = null | set `web_open_id` = null | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id`=#{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != username "> | <if test=" null != username "> | ||||
| and username=#{username} | and username=#{username} | ||||
| @@ -189,8 +195,11 @@ | |||||
| update mall_user_info | update mall_user_info | ||||
| set `web_open_id` = null, `bopen_id` = null | set `web_open_id` = null, `bopen_id` = null | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id`=#{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != username "> | <if test=" null != username "> | ||||
| and username=#{username} | and username=#{username} | ||||
| @@ -205,8 +214,11 @@ | |||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from mall_user_info | from mall_user_info | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id`=#{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != phone "> | <if test=" null != phone "> | ||||
| and `phone`=#{phone} | and `phone`=#{phone} | ||||
| @@ -83,9 +83,12 @@ | |||||
| select a.id,a.cover_img,a.title,a.activity_start_time,a.activity_end_time,aj.`status` | select a.id,a.cover_img,a.title,a.activity_start_time,a.activity_end_time,aj.`status` | ||||
| from wx_activity_join aj left join wx_activity a on aj.activity_id=a.id | from wx_activity_join aj left join wx_activity a on aj.activity_id=a.id | ||||
| where aj.user_id=#{userId} | where aj.user_id=#{userId} | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and aj.`tenant_id` = #{tenantId} | and aj.`tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and aj.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != statusStr and ''!=statusStr"> | <if test=" null != statusStr and ''!=statusStr"> | ||||
| and aj.`status` in (${statusStr}) and a.`status`=2 | and aj.`status` in (${statusStr}) and a.`status`=2 | ||||
| </if> | </if> | ||||
| @@ -278,7 +278,7 @@ | |||||
| </select> | </select> | ||||
| <update id="insertBillAction"> | <update id="insertBillAction"> | ||||
| insert into wx_bill_action(id,user_name,`action`,bill_id,details,tenant_id) | |||||
| insert into wx_bill_action(id,user_name,`action`,bill_id,details,tenant_id,parent_tenant_id) | |||||
| select | select | ||||
| (select unix_timestamp(now()) + CEILING(RAND()*90000+10000) + CEILING(RAND()*90000+10000) + CEILING(RAND()*90000+10000)) id | (select unix_timestamp(now()) + CEILING(RAND()*90000+10000) + CEILING(RAND()*90000+10000) + CEILING(RAND()*90000+10000)) id | ||||
| ,'系统端' user_name,7 `action`,b.id bill_id, | ,'系统端' user_name,7 `action`,b.id bill_id, | ||||
| @@ -292,7 +292,7 @@ | |||||
| b.owe * (c.late_pay_ratio) /10000 | b.owe * (c.late_pay_ratio) /10000 | ||||
| ,2) | ,2) | ||||
| ) | ) | ||||
| ,'元') details,b.tenant_id | |||||
| ,'元') details,b.tenant_id,b.parent_tenant_id | |||||
| from wx_bill_property b left join wx_property_contract c on(b.`property_contract_id`=c.id) | from wx_bill_property b left join wx_property_contract c on(b.`property_contract_id`=c.id) | ||||
| where c.late_pay_ratio >0 | where c.late_pay_ratio >0 | ||||
| and DATEDIFF(now(), date_add(b.receive_date,interval(c.late_pay_day) day)) >0 | and DATEDIFF(now(), date_add(b.receive_date,interval(c.late_pay_day) day)) >0 | ||||
| @@ -279,7 +279,7 @@ | |||||
| </select> | </select> | ||||
| <update id="insertBillAction"> | <update id="insertBillAction"> | ||||
| insert into wx_bill_action(id,user_name,`action`,bill_id,details,tenant_id) | |||||
| insert into wx_bill_action(id,user_name,`action`,bill_id,details,tenant_id,parent_tenant_id) | |||||
| select | select | ||||
| (select unix_timestamp(now()) + CEILING(RAND()*90000+10000) + CEILING(RAND()*90000+10000)+ CEILING(RAND()*90000+10000) ) id | (select unix_timestamp(now()) + CEILING(RAND()*90000+10000) + CEILING(RAND()*90000+10000)+ CEILING(RAND()*90000+10000) ) id | ||||
| ,'系统端' user_name,7 `action`,b.id bill_id, | ,'系统端' user_name,7 `action`,b.id bill_id, | ||||
| @@ -293,7 +293,7 @@ | |||||
| b.owe * (c.late_pay_ratio) /10000 | b.owe * (c.late_pay_ratio) /10000 | ||||
| ,2) | ,2) | ||||
| ) | ) | ||||
| ,'元') details,b.tenant_id | |||||
| ,'元') details,b.tenant_id,b.parent_tenant_id | |||||
| from wx_bill_rent b left join wx_rent_contract c on(b.rent_contract_id=c.id) | from wx_bill_rent b left join wx_rent_contract c on(b.rent_contract_id=c.id) | ||||
| where c.late_pay_ratio >0 | where c.late_pay_ratio >0 | ||||
| and DATEDIFF(now(), date_add(b.receive_date,interval(c.late_pay_day) day)) >0 | and DATEDIFF(now(), date_add(b.receive_date,interval(c.late_pay_day) day)) >0 | ||||
| @@ -28,7 +28,12 @@ | |||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != id ">and `id` = #{id}</if> | <if test=" null != id ">and `id` = #{id}</if> | ||||
| <if test=" null != tenantId ">and `tenant_id` = #{tenantId}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| @@ -66,13 +66,12 @@ | |||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and `id` = #{id} | and `id` = #{id} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id`= #{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId "> | |||||
| and `parent_tenant_id`= #{parentTenantId} | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != openId "> | <if test=" null != openId "> | ||||
| @@ -4,6 +4,7 @@ | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCUserFromB"> | <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCUserFromB"> | ||||
| <id column="id" jdbcType="BIGINT" property="id" /> | <id column="id" jdbcType="BIGINT" property="id" /> | ||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | ||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | |||||
| <result column="merchant_id" jdbcType="INTEGER" property="merchantId" /> | <result column="merchant_id" jdbcType="INTEGER" property="merchantId" /> | ||||
| <result column="b_user_id" jdbcType="BIGINT" property="bUserId" /> | <result column="b_user_id" jdbcType="BIGINT" property="bUserId" /> | ||||
| <result column="c_user_id" jdbcType="BIGINT" property="cUserId" /> | <result column="c_user_id" jdbcType="BIGINT" property="cUserId" /> | ||||
| @@ -16,13 +17,18 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`merchant_id`,`b_user_id`,`c_user_id`,`info`,`create_time`,`update_time`,`openid`,`app_id` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`b_user_id`,`c_user_id`,`info`,`create_time`,`update_time`,`openid`,`app_id` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where 1 = 1 | where 1 = 1 | ||||
| <if test=" null != id "> and `id` = #{id} </if> | |||||
| <if test=" null != tenantId "> and `tenant_id` = #{tenantId} </if> | |||||
| <if test=" null != id "> and `id` = #{id} </if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != merchantId "> and `merchant_id` = #{merchantId} </if> | <if test=" null != merchantId "> and `merchant_id` = #{merchantId} </if> | ||||
| <if test=" null != bUserId "> and `b_user_id` = #{bUserId} </if> | <if test=" null != bUserId "> and `b_user_id` = #{bUserId} </if> | ||||
| <if test=" null != cUserId "> and `c_user_id` = #{cUserId} </if> | <if test=" null != cUserId "> and `c_user_id` = #{cUserId} </if> | ||||
| @@ -124,18 +124,24 @@ | |||||
| update wx_coupon_channel | update wx_coupon_channel | ||||
| set status=#{status}, update_date=#{updateDate} | set status=#{status}, update_date=#{updateDate} | ||||
| where coupon_id=#{couponId} | where coupon_id=#{couponId} | ||||
| <if test=" null != tenantId "> | |||||
| and tenant_id = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| </update> | </update> | ||||
| <update id="updateEndTimeByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel"> | <update id="updateEndTimeByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel"> | ||||
| update wx_coupon_channel | update wx_coupon_channel | ||||
| set end_time = #{endTime} | set end_time = #{endTime} | ||||
| where coupon_id=#{couponId} | where coupon_id=#{couponId} | ||||
| <if test=" null != tenantId "> | |||||
| and tenant_id = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| </update> | </update> | ||||
| <sql id="CouponChannelVoColumns"> | <sql id="CouponChannelVoColumns"> | ||||
| @@ -214,8 +220,11 @@ | |||||
| <if test="status != null"> | <if test="status != null"> | ||||
| and cc.status=#{status} | and cc.status=#{status} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and cc.tenant_id = #{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and cc.`tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and cc.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| </select> | </select> | ||||
| @@ -226,12 +226,18 @@ | |||||
| <select id="touchUsersReportList" resultType="com.iformall.domain.vo.TouchUsersReportVo" parameterType="com.iformall.domain.dto.MarkingCouponDataReportDto"> | <select id="touchUsersReportList" resultType="com.iformall.domain.vo.TouchUsersReportVo" parameterType="com.iformall.domain.dto.MarkingCouponDataReportDto"> | ||||
| SELECT xTime, tenant_id, pv, uv, couponCount, userCount, verifyCount, verifyUserCount | SELECT xTime, tenant_id, pv, uv, couponCount, userCount, verifyCount, verifyUserCount | ||||
| FROM view_touch_user | FROM view_touch_user | ||||
| WHERE view_touch_user.tenant_id=#{tenantId} | |||||
| WHERE 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test="startTime != null"> | <if test="startTime != null"> | ||||
| and view_touch_user.xTime >= DATE_FORMAT(#{startTime},'%Y-%m-%d') | |||||
| and xTime >= DATE_FORMAT(#{startTime},'%Y-%m-%d') | |||||
| </if> | </if> | ||||
| <if test="endTime != null"> | <if test="endTime != null"> | ||||
| and view_touch_user.xTime <= DATE_FORMAT(#{endTime},'%Y-%m-%d') | |||||
| and xTime <= DATE_FORMAT(#{endTime},'%Y-%m-%d') | |||||
| </if> | </if> | ||||
| GROUP BY xTime | GROUP BY xTime | ||||
| order by xTime desc | order by xTime desc | ||||
| @@ -852,8 +858,11 @@ | |||||
| left join wx_shop s on ms.shop_id=s.id | left join wx_shop s on ms.shop_id=s.id | ||||
| left join wx_coupon_merchant cm on ms.merchant_id=cm.merchant_id | left join wx_coupon_merchant cm on ms.merchant_id=cm.merchant_id | ||||
| where ms.is_del=0 and s.building=#{building} | where ms.is_del=0 and s.building=#{building} | ||||
| <if test=" null != tenantId "> | |||||
| and ms.tenant_id=#{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and ms.`tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and ms.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test="null!=floor"> | <if test="null!=floor"> | ||||
| and s.floor=#{floor} | and s.floor=#{floor} | ||||
| @@ -145,8 +145,11 @@ | |||||
| <update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel"> | <update id="updateStatusByCouponId" parameterType="com.iformall.domain.po.WxCouponChannel"> | ||||
| update wx_coupon_send set status=#{status} | update wx_coupon_send set status=#{status} | ||||
| where coupon_id=#{couponId} | where coupon_id=#{couponId} | ||||
| <if test=" null != tenantId "> | |||||
| and tenant_id = #{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| </update> | </update> | ||||
| @@ -198,9 +198,12 @@ | |||||
| select count(0) | select count(0) | ||||
| from wx_credit_history | from wx_credit_history | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != cUserId "> | <if test=" null != cUserId "> | ||||
| and `c_user_id` = #{cUserId} | and `c_user_id` = #{cUserId} | ||||
| </if> | </if> | ||||
| @@ -3,8 +3,6 @@ | |||||
| <mapper namespace="com.iformall.mapper.WxDataRuleTargetMapper"> | <mapper namespace="com.iformall.mapper.WxDataRuleTargetMapper"> | ||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxDataRuleTarget"> | <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxDataRuleTarget"> | ||||
| <id column="id" jdbcType="BIGINT" property="id"/> | <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="parent" jdbcType="BIGINT" property="parent"/> | <result column="parent" jdbcType="BIGINT" property="parent"/> | ||||
| <result column="name" jdbcType="VARCHAR" property="name"/> | <result column="name" jdbcType="VARCHAR" property="name"/> | ||||
| <result column="tag" jdbcType="VARCHAR" property="tag"/> | <result column="tag" jdbcType="VARCHAR" property="tag"/> | ||||
| @@ -13,7 +11,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`parent`,`name`,`tag`,`create_time`,`update_time` | |||||
| `id`,`parent`,`name`,`tag`,`create_time`,`update_time` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -23,17 +21,6 @@ | |||||
| and `id` = #{id} | and `id` = #{id} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != name "> | <if test=" null != name "> | ||||
| and `name` like concat('%',#{name},'%') | and `name` like concat('%',#{name},'%') | ||||
| </if> | </if> | ||||
| @@ -85,9 +85,11 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id` = #{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != gameId "> | <if test=" null != gameId "> | ||||
| @@ -73,4 +73,9 @@ | |||||
| </select> | </select> | ||||
| <delete id="deleteByBuildingId"> | |||||
| delete from wx_mall_floor where building_id=#{buildingId} | |||||
| </delete> | |||||
| </mapper> | </mapper> | ||||
| @@ -180,6 +180,15 @@ | |||||
| and m.`parent_tenant_id` = #{parentTenantId} | and m.`parent_tenant_id` = #{parentTenantId} | ||||
| </if> | </if> | ||||
| </select> | </select> | ||||
| <update id="undateSubmall"> | |||||
| update wx_mall set parent_tenant_id = null where parent_tenant_id = #{parentTenantId} ; | |||||
| update wx_mall set parent_tenant_id = #{parentTenantId} where tenant_id in | |||||
| <foreach collection="tenantIds" item="item" index="index" open="(" | |||||
| separator="," close=")"> | |||||
| #{item} | |||||
| </foreach> | |||||
| </update> | |||||
| @@ -295,9 +295,12 @@ | |||||
| FROM wx_merchant m | FROM wx_merchant m | ||||
| left join wx_business bu on bu.id = m.business_id | left join wx_business bu on bu.id = m.business_id | ||||
| <where> | <where> | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and m.`tenant_id` = #{tenantId} | and m.`tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and m.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != status "> | <if test=" null != status "> | ||||
| and m.`status` = #{status} | and m.`status` = #{status} | ||||
| </if> | </if> | ||||
| @@ -250,9 +250,12 @@ | |||||
| ms.create_date create_date,ms.subsidy subsidy,ms.real_subsidy,ms.status,ms.freeze | ms.create_date create_date,ms.subsidy subsidy,ms.real_subsidy,ms.status,ms.freeze | ||||
| from wx_merchant_subsidy ms left join wx_merchant m on ms.merchant_id=m.id | from wx_merchant_subsidy ms left join wx_merchant m on ms.merchant_id=m.id | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and ms.`tenant_id` = #{tenantId} | and ms.`tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and ms.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != orderId "> | <if test=" null != orderId "> | ||||
| and ms.`order_id` = #{orderId} | and ms.`order_id` = #{orderId} | ||||
| </if> | </if> | ||||
| @@ -30,12 +30,14 @@ | |||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and `id` = #{id} | and `id` = #{id} | ||||
| </if> | |||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| </if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != batchNo "> | <if test=" null != batchNo "> | ||||
| and `batch_no` like concat('%', #{batchNo},'%') | and `batch_no` like concat('%', #{batchNo},'%') | ||||
| @@ -23,8 +23,11 @@ | |||||
| and `id` = #{id} | and `id` = #{id} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id`=#{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != type "> | <if test=" null != type "> | ||||
| @@ -63,7 +66,14 @@ | |||||
| </select> | </select> | ||||
| <update id="updateLimitNum" parameterType="com.iformall.domain.po.WxMsgLimit"> | <update id="updateLimitNum" parameterType="com.iformall.domain.po.WxMsgLimit"> | ||||
| update wx_msg_limit set limit_num = limit_num - 1 where `id` = #{id} and `tenant_id` = #{tenantId} and limit_num > 0 | |||||
| update wx_msg_limit set limit_num = limit_num - 1 where `id` = #{id} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| and limit_num > 0 | |||||
| </update> | </update> | ||||
| <delete id="delLimitNum" parameterType="com.iformall.domain.po.WxMsgLimit"> | <delete id="delLimitNum" parameterType="com.iformall.domain.po.WxMsgLimit"> | ||||
| @@ -82,8 +82,11 @@ | |||||
| <if test=" null != modelId"> | <if test=" null != modelId"> | ||||
| and `model_id` = #{modelId} | and `model_id` = #{modelId} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id`=#{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| limit 1 | limit 1 | ||||
| </select> | </select> | ||||
| @@ -237,9 +237,12 @@ | |||||
| update wx_order set order_status=#{orderStatus} | update wx_order set order_status=#{orderStatus} | ||||
| where product_id=#{productId} | where product_id=#{productId} | ||||
| and press_end_date is not null and order_status in (6,7) | and press_end_date is not null and order_status in (6,7) | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| </update> | </update> | ||||
| <update id="updateOrderGroupStatusByCouponId" parameterType="com.iformall.domain.po.WxOrder"> | <update id="updateOrderGroupStatusByCouponId" parameterType="com.iformall.domain.po.WxOrder"> | ||||
| @@ -502,9 +505,12 @@ | |||||
| LEFT JOIN wx_c_user cu on cu.id = o.c_user_id | LEFT JOIN wx_c_user cu on cu.id = o.c_user_id | ||||
| LEFT JOIN wx_c_user_basic_info cubi on cubi.id = o.c_user_id | LEFT JOIN wx_c_user_basic_info cubi on cubi.id = o.c_user_id | ||||
| where o.order_status = '0' and o.`type` = 1 | where o.order_status = '0' and o.`type` = 1 | ||||
| <if test=" null != tenantId "> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and o.`tenant_id` = #{tenantId} | and o.`tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and o.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != merchantId "> | <if test=" null != merchantId "> | ||||
| and bu.`merchant_id` = #{merchantId} | and bu.`merchant_id` = #{merchantId} | ||||
| </if> | </if> | ||||
| @@ -20,9 +20,12 @@ | |||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and `id` = #{id} | and `id` = #{id} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != orderId "> | <if test=" null != orderId "> | ||||
| and `order_id` = #{orderId} | and `order_id` = #{orderId} | ||||
| </if> | </if> | ||||
| @@ -77,12 +77,18 @@ | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | <if test=" null != sortColumns">order by ${sortColumns}</if> | ||||
| </sql> | </sql> | ||||
| <select id="findList" parameterType="com.iformall.domain.po.WxPayAccount" resultMap="BaseResultMap"> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxPayAccountBill" resultMap="BaseResultMap"> | |||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_pay_account | |||||
| from wx_pay_account_bill | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="getByTenantId" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_pay_account_bill where `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -3,6 +3,8 @@ | |||||
| <mapper namespace="com.iformall.mapper.WxPayAccountMapper"> | <mapper namespace="com.iformall.mapper.WxPayAccountMapper"> | ||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPayAccount"> | <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPayAccount"> | ||||
| <id column="id" jdbcType="BIGINT" property="id"/> | <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="mch_id" jdbcType="VARCHAR" property="mchId"/> | <result column="mch_id" jdbcType="VARCHAR" property="mchId"/> | ||||
| <result column="sub_mch_id" jdbcType="VARCHAR" property="subMchId"/> | <result column="sub_mch_id" jdbcType="VARCHAR" property="subMchId"/> | ||||
| <result column="api_key" jdbcType="VARCHAR" property="apiKey"/> | <result column="api_key" jdbcType="VARCHAR" property="apiKey"/> | ||||
| @@ -15,14 +17,17 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`mch_id`,`sub_mch_id`,`api_key`,`notify_url`,`cert_path`,`type`,`share`,`rate`,`real_rate` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`mch_id`,`sub_mch_id`,`api_key`,`notify_url`,`cert_path`,`type`,`share`,`rate`,`real_rate` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where 1 = 1 | where 1 = 1 | ||||
| <if test=" null != id "> | |||||
| and `id` = #{id} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != mchId "> | <if test=" null != mchId "> | ||||
| @@ -72,5 +77,11 @@ | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="getByTenantId" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_pay_account where `tenant_id` = #{tenantId} | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -173,7 +173,12 @@ | |||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_pay_order | from wx_pay_order | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId "> and `tenant_id` = #{tenantId} </if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| and order_id in ( | and order_id in ( | ||||
| select id from wx_order where `tenant_id` = #{tenantId} and type = 1 and order_status = 0 | select id from wx_order where `tenant_id` = #{tenantId} and type = 1 and order_status = 0 | ||||
| ); | ); | ||||
| @@ -130,7 +130,13 @@ | |||||
| left join wx_mall_building b on s.building=b.id | left join wx_mall_building b on s.building=b.id | ||||
| left join wx_brand br on rc.brand=br.id | left join wx_brand br on rc.brand=br.id | ||||
| <where> | <where> | ||||
| <if test=" null != tenantId ">rc.tenant_id=#{tenantId}</if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and rc.`tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and rc.`parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like | <if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like | ||||
| concat('%',#{merchantName},'%') | concat('%',#{merchantName},'%') | ||||
| @@ -565,6 +565,12 @@ | |||||
| <select id="getCountByWxShop" parameterType="com.iformall.domain.po.WxShop" resultType="Long"> | <select id="getCountByWxShop" parameterType="com.iformall.domain.po.WxShop" resultType="Long"> | ||||
| select count(*) from wx_shop w where w.is_del=0 | select count(*) from wx_shop w where w.is_del=0 | ||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test="null != type"> | <if test="null != type"> | ||||
| and `type`=#{type} | and `type`=#{type} | ||||
| </if> | </if> | ||||
| @@ -4,6 +4,7 @@ | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxUserVisit"> | <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxUserVisit"> | ||||
| <id column="id" jdbcType="BIGINT" property="id" /> | <id column="id" jdbcType="BIGINT" property="id" /> | ||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | ||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | |||||
| <result column="ref_date" jdbcType="VARCHAR" property="refDate" /> | <result column="ref_date" jdbcType="VARCHAR" property="refDate" /> | ||||
| <result column="day_date" jdbcType="TIMESTAMP" property="dayDate" /> | <result column="day_date" jdbcType="TIMESTAMP" property="dayDate" /> | ||||
| <result column="session_cnt" jdbcType="INTEGER" property="sessionCnt" /> | <result column="session_cnt" jdbcType="INTEGER" property="sessionCnt" /> | ||||
| @@ -18,7 +19,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`ref_date`,`day_date`,`session_cnt`,`visit_pv`,`visit_uv`,`visit_uv_new`,`stay_time_uv`,`stay_time_session`,`visit_depth`,`app_id`,`create_date` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`ref_date`,`day_date`,`session_cnt`,`visit_pv`,`visit_uv`,`visit_uv_new`,`stay_time_uv`,`stay_time_session`,`visit_depth`,`app_id`,`create_date` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -28,9 +29,11 @@ | |||||
| and `id` = #{id} | and `id` = #{id} | ||||
| </if> | </if> | ||||
| <if test=" null != tenantId "> | |||||
| and `tenant_id` =#{tenantId} | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | </if> | ||||
| <if test=" null != refDate "> | <if test=" null != refDate "> | ||||
| @@ -107,7 +110,13 @@ | |||||
| parameterType="com.iformall.domain.dto.MarkingCouponDataReportDto"> | parameterType="com.iformall.domain.dto.MarkingCouponDataReportDto"> | ||||
| SELECT DATE_FORMAT(day_date,'%Y-%m-%d') as xTime,visit_pv as pv,visit_uv as uv | SELECT DATE_FORMAT(day_date,'%Y-%m-%d') as xTime,visit_pv as pv,visit_uv as uv | ||||
| from wx_user_visit | from wx_user_visit | ||||
| where tenant_id=#{tenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test="startTime != null"> | <if test="startTime != null"> | ||||
| and day_date >= #{startTime} | and day_date >= #{startTime} | ||||
| </if> | </if> | ||||
| @@ -122,7 +131,13 @@ | |||||
| <select id="touchUsersReportData" resultType="com.iformall.domain.vo.TouchUsersReportVo" parameterType="hashmap"> | <select id="touchUsersReportData" resultType="com.iformall.domain.vo.TouchUsersReportVo" parameterType="hashmap"> | ||||
| SELECT DATE_FORMAT(day_date,'%m/%d') as xTime,visit_pv as pv,visit_uv as uv | SELECT DATE_FORMAT(day_date,'%m/%d') as xTime,visit_pv as pv,visit_uv as uv | ||||
| from wx_user_visit | from wx_user_visit | ||||
| where tenant_id=#{tenantId} | |||||
| where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test="startTime != null"> | <if test="startTime != null"> | ||||
| and day_date >= #{startTime} | and day_date >= #{startTime} | ||||
| </if> | </if> | ||||
| @@ -133,7 +148,13 @@ | |||||
| </select> | </select> | ||||
| <select id="queryVisitUv" resultType="Long" parameterType="hashmap"> | <select id="queryVisitUv" resultType="Long" parameterType="hashmap"> | ||||
| select count(visit_uv) from wx_user_visit where tenant_id=#{tenantId} | |||||
| select count(visit_uv) from wx_user_visit where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test="startTime != null"> | <if test="startTime != null"> | ||||
| and day_date >= #{startTime} | and day_date >= #{startTime} | ||||
| </if> | </if> | ||||