Просмотр исходного кода

初始化一版

release_toaliyun_real
xhxu 5 лет назад
Родитель
Сommit
3509a3ee81
32 измененных файлов: 954 добавлений и 104 удалений
  1. +537
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java
  2. +3
    -0
      mallinkAdmin/src/main/resources/db/migration/V202007131031__GROUP__ADD_001.sql
  3. +1
    -5
      mallinkService/src/main/java/com/iformall/mapper/WxMallFloorMapper.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxMallMapper.java
  5. +2
    -5
      mallinkService/src/main/java/com/iformall/mapper/WxPayAccountBillMapper.java
  6. +2
    -5
      mallinkService/src/main/java/com/iformall/mapper/WxPayAccountMapper.java
  7. +4
    -0
      mallinkService/src/main/java/com/iformall/service/WxCouponSendConfigService.java
  8. +20
    -0
      mallinkService/src/main/java/com/iformall/service/WxFlowConfigService.java
  9. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxMallFloorService.java
  10. +1
    -0
      mallinkService/src/main/java/com/iformall/service/WxMallService.java
  11. +5
    -1
      mallinkService/src/main/java/com/iformall/service/WxMsgValidationcodeModelService.java
  12. +2
    -7
      mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java
  13. +2
    -7
      mallinkService/src/main/java/com/iformall/service/WxPayAccountService.java
  14. +30
    -0
      mallinkService/src/main/java/com/iformall/service/WxProjectConfigService.java
  15. +2
    -2
      mallinkService/src/main/java/com/iformall/service/WxQuestionService.java
  16. +4
    -0
      mallinkService/src/main/java/com/iformall/service/WxTemplateMsgService.java
  17. +20
    -0
      mallinkService/src/main/java/com/iformall/service/WxWiWideInfoService.java
  18. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendConfigServiceImpl.java
  19. +29
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowConfigServiceImpl.java
  20. +7
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxMallFloorServiceImpl.java
  21. +15
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java
  22. +25
    -20
      mallinkService/src/main/java/com/iformall/service/impl/WxMsgValidationcodeModelServiceImpl.java
  23. +7
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java
  24. +7
    -8
      mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountServiceImpl.java
  25. +127
    -13
      mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java
  26. +11
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxQuestionServiceImpl.java
  27. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java
  28. +40
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxWiWideInfoServiceImpl.java
  29. +5
    -0
      mallinkService/src/main/resources/mapper/WxMallFloorMapper.xml
  30. +9
    -0
      mallinkService/src/main/resources/mapper/WxMallMapper.xml
  31. +8
    -2
      mallinkService/src/main/resources/mapper/WxPayAccountBillMapper.xml
  32. +14
    -3
      mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml

+ 537
- 2
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java Просмотреть файл

@@ -1,23 +1,87 @@
package com.iformall.controller.basic;

import com.github.pagehelper.PageInfo;
import com.iformall.annotation.SystemControllerLog;
import com.iformall.common.ErrorCode;
import com.iformall.common.ResultData;
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 org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;

import java.util.*;

@RestController
@RequestMapping("wxProjectConfig")
public class WxProjectConfigController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());

@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("添加商场基础数据")
@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/building")
@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);
}
}


}

+ 3
- 0
mallinkAdmin/src/main/resources/db/migration/V202007131031__GROUP__ADD_001.sql Просмотреть файл

@@ -1,2 +1,5 @@
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`;

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`;

+ 1
- 5
mallinkService/src/main/java/com/iformall/mapper/WxMallFloorMapper.java Просмотреть файл

@@ -7,10 +7,6 @@ import com.iformall.domain.po.WxMallFloor;
public interface WxMallFloorMapper extends CommonMapper<WxMallFloor, String> {

List<WxMallFloor> findList(WxMallFloor wxMallFloor);

int deleteByBuildingId(Long buildingId);
}

+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxMallMapper.java Просмотреть файл

@@ -2,6 +2,7 @@ package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxMall;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@@ -17,4 +18,5 @@ public interface WxMallMapper extends CommonMapper<WxMall, Long> {

String queryMenusByTenantInfo(WxMall wxMall);

void undateSubmall(@Param(value = "parentTenantId")String parentTenantId, @Param(value = "tenantIds")String[] tenantIds);
}

+ 2
- 5
mallinkService/src/main/java/com/iformall/mapper/WxPayAccountBillMapper.java Просмотреть файл

@@ -11,10 +11,7 @@ import java.util.List;
public interface WxPayAccountBillMapper extends CommonMapper<WxPayAccountBill, Long> {

List<WxPayAccountBill> findList(WxPayAccountBill wxPayAccount);


WxPayAccountBill getByTenantId(String tenantId);
}

+ 2
- 5
mallinkService/src/main/java/com/iformall/mapper/WxPayAccountMapper.java Просмотреть файл

@@ -7,10 +7,7 @@ import com.iformall.domain.po.WxPayAccount;
public interface WxPayAccountMapper extends CommonMapper<WxPayAccount, Long> {

List<WxPayAccount> findList(WxPayAccount wxPayAccount);


WxPayAccount getByTenantId(String tenantId);
}

+ 4
- 0
mallinkService/src/main/java/com/iformall/service/WxCouponSendConfigService.java Просмотреть файл

@@ -3,6 +3,8 @@ package com.iformall.service;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxCouponSendConfig;

import java.util.List;

public interface WxCouponSendConfigService {

/**
@@ -21,6 +23,8 @@ public interface WxCouponSendConfigService {
* @return
*/
PageInfo<WxCouponSendConfig> listAsPage(WxCouponSendConfig record, Integer pageIndex, Integer pageSize);

List<WxCouponSendConfig> findList(WxCouponSendConfig record);
/**
* 根据Id获得实体


+ 20
- 0
mallinkService/src/main/java/com/iformall/service/WxFlowConfigService.java Просмотреть файл

@@ -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);

}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxMallFloorService.java Просмотреть файл

@@ -42,4 +42,5 @@ public interface WxMallFloorService {

ResultData getFloorList(TenantEntity tenantEntity, Long buildingId);

void deleteByBuildingId(Long buildingId);
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/service/WxMallService.java Просмотреть файл

@@ -79,4 +79,5 @@ public interface WxMallService {
*/
List<WxMall> getSubByParentTenantId(String parentTenantId);

void undateSubmall(String parentTenantId, String[] tenantIds);
}

+ 5
- 1
mallinkService/src/main/java/com/iformall/service/WxMsgValidationcodeModelService.java Просмотреть файл

@@ -5,6 +5,8 @@ import com.iformall.common.ResultData;
import com.iformall.domain.po.WxMsgValidationcodeModel;
import com.iformall.domain.po.WxProjectConfig;

import java.util.List;

public interface WxMsgValidationcodeModelService {

/**
@@ -13,7 +15,7 @@ public interface WxMsgValidationcodeModelService {
* @param tenantId
* @return
*/
void wxMsgValidationcodeModelInit(String tenantId, WxProjectConfig wxProjectConfig);
void wxMsgValidationcodeModelInit(String tenantId, String signature,String emailBgImg);

/**
* 根据实体查询分页列表
@@ -24,6 +26,8 @@ public interface WxMsgValidationcodeModelService {
* @return
*/
PageInfo<WxMsgValidationcodeModel> listAsPage(WxMsgValidationcodeModel record, Integer pageIndex, Integer pageSize);

List<WxMsgValidationcodeModel> findList(WxMsgValidationcodeModel record);
/**
* 根据Id获得实体


+ 2
- 7
mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java Просмотреть файл

@@ -55,12 +55,7 @@ public interface WxPayAccountBillService {
* @param id
*/
void deleteById(Long id);


WxPayAccountBill getByTenantId(String tenantId);
}

+ 2
- 7
mallinkService/src/main/java/com/iformall/service/WxPayAccountService.java Просмотреть файл

@@ -47,12 +47,7 @@ public interface WxPayAccountService {
* @param id
*/
void deleteById(Long id);


WxPayAccount getByTenantId(String te);
}

+ 30
- 0
mallinkService/src/main/java/com/iformall/service/WxProjectConfigService.java Просмотреть файл

@@ -1,6 +1,10 @@
package com.iformall.service;


import com.iformall.domain.po.*;

import java.util.List;

public interface WxProjectConfigService {

/**
@@ -10,4 +14,30 @@ public interface WxProjectConfigService {
*/
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);

}

+ 2
- 2
mallinkService/src/main/java/com/iformall/service/WxQuestionService.java Просмотреть файл

@@ -13,10 +13,10 @@ public interface WxQuestionService {
* wx_question 初始化
*
* @param tenantId
* @param questionJson
* @param
* @return
*/
void wxQuestionInit(String tenantId, String questionJson);
void wxQuestionInit(String tenantId);

/**
* 根据实体查询分页列表


+ 4
- 0
mallinkService/src/main/java/com/iformall/service/WxTemplateMsgService.java Просмотреть файл

@@ -3,6 +3,8 @@ package com.iformall.service;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxTemplateMsg;

import java.util.List;

public interface WxTemplateMsgService {

/**
@@ -22,6 +24,8 @@ public interface WxTemplateMsgService {
* @return
*/
PageInfo<WxTemplateMsg> listAsPage(WxTemplateMsg record, Integer pageIndex, Integer pageSize);

List<WxTemplateMsg> findList(WxTemplateMsg record);
/**
* 根据Id获得实体


+ 20
- 0
mallinkService/src/main/java/com/iformall/service/WxWiWideInfoService.java Просмотреть файл

@@ -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);

}

+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponSendConfigServiceImpl.java Просмотреть файл

@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;


@Service
@@ -45,6 +46,11 @@ public class WxCouponSendConfigServiceImpl implements WxCouponSendConfigService
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponSendConfigMapper.findList(record));
}

@Override
public List<WxCouponSendConfig> findList(WxCouponSendConfig record) {
return wxCouponSendConfigMapper.findList(record);
}

@Override
public WxCouponSendConfig getById(Long id) {
return wxCouponSendConfigMapper.selectById(id);


+ 29
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxFlowConfigServiceImpl.java Просмотреть файл

@@ -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);
}
}

+ 7
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxMallFloorServiceImpl.java Просмотреть файл

@@ -58,9 +58,11 @@ public class WxMallFloorServiceImpl implements WxMallFloorService {
List<WxMallFloor> list = wxMallFloorMapper.findList(wxMallFloor);
return new ResultData(list);
}

@Override
public void deleteByBuildingId(Long buildingId) {
wxMallFloorMapper.deleteByBuildingId(buildingId);
}


}

+ 15
- 10
mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java Просмотреть файл

@@ -109,16 +109,16 @@ public class WxMallServiceImpl implements WxMallService {

@Override
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);

@@ -294,6 +294,11 @@ public class WxMallServiceImpl implements WxMallService {
return mallList;
}

@Override
public void undateSubmall(String parentTenantId, String[] tenantIds) {
wxMallMapper.undateSubmall(parentTenantId, tenantIds);
}

private String getRedisKeyByTenantInfo(TenantEntity tenantEntity) {
StringBuilder sb = new StringBuilder();
sb.append(Constant.TENANT_KEY_PREV).append(tenantEntity.getTenantId());


+ 25
- 20
mallinkService/src/main/java/com/iformall/service/impl/WxMsgValidationcodeModelServiceImpl.java Просмотреть файл

@@ -37,48 +37,48 @@ public class WxMsgValidationcodeModelServiceImpl implements WxMsgValidationcodeM
WxMsgConfigMapper wxMsgConfigMapper;

@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");
String nowTimestr = format.format(new Date());
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 " +
" ( '" + 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`)" +
"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>', " +
" '" + 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`)" +
"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>'," +
" '" + 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`)" +
"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>', " +
"'" + 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`)" +
"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>'," +
"'" + 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`)" +
" 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>'," +
" '" + 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`)" +
" 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>'," +
" '" + nowTimestr + "', '1', null, '500', '" + wxProjectConfig.getImgUrlH() + "');";
" '" + nowTimestr + "', '1', null, '500', '" + emailBgImg + "');";
wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql);
}

@@ -87,6 +87,11 @@ public class WxMsgValidationcodeModelServiceImpl implements WxMsgValidationcodeM
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgValidationcodeModelMapper.findList(record));
}

@Override
public List<WxMsgValidationcodeModel> findList(WxMsgValidationcodeModel record) {
return wxMsgValidationcodeModelMapper.findList(record);
}

@Override
public WxMsgValidationcodeModel getById(String id) {
return wxMsgValidationcodeModelMapper.selectById(id);


+ 7
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java Просмотреть файл

@@ -83,12 +83,11 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService {
public void deleteById(Long id) {
wxPayAccountBillMapper.deleteById(id);
}

@Override
public WxPayAccountBill getByTenantId(String tenantId) {
return wxPayAccountBillMapper.getByTenantId(tenantId);
}


}

+ 7
- 8
mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountServiceImpl.java Просмотреть файл

@@ -65,12 +65,11 @@ public class WxPayAccountServiceImpl implements WxPayAccountService {
public void deleteById(Long id) {
wxPayAccountMapper.deleteById(id);
}

@Override
public WxPayAccount getByTenantId(String tenantId) {
return wxPayAccountMapper.getByTenantId(tenantId);
}


}

+ 127
- 13
mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java Просмотреть файл

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import com.iformall.domain.po.*;
import com.iformall.mapper.*;
import com.iformall.service.*;
import com.iformall.utils.Constant;
import com.iformall.utils.PasswordHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -30,6 +31,8 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService {
@Autowired
WxMallBuildingService wxMallBuildingService;
@Autowired
WxMallFloorService wxMallFloorService;
@Autowired
WxPayAccountService wxPayAccountService;
@Autowired
WxPayAccountBillService wxPayAccountBillService;
@@ -42,6 +45,12 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService {
@Autowired
MallRoleService mallRoleService;
@Autowired
MallUserRoleService mallUserRoleService;
@Autowired
MallPermissionService mallPermissionService;
@Autowired
MallRolePermissionService mallRolePermissionService;
@Autowired
WxMsgConfigService wxMsgConfigService;
@Autowired
WxParkService wxParkService;
@@ -55,6 +64,8 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService {
WxMsgValidationcodeModelService wxMsgValidationcodeModelService;
@Autowired
WxFlowService wxFlowService;
@Autowired
MallUserInfoService userInfoService;

@Override
@Transactional
@@ -102,21 +113,10 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService {
//# wuguoqiang@iformall.com

// # 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, 数据重新一下
wxMsgValidationcodeModelService.wxMsgValidationcodeModelInit(tenantId, wxProjectConfig);
wxMsgValidationcodeModelService.wxMsgValidationcodeModelInit(tenantId, wxProjectConfig.getName(), wxProjectConfig.getImgUrlH());
//wx_flow_config
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);
/**
* 初始化数据
*/
}


}

+ 11
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxQuestionServiceImpl.java Просмотреть файл

@@ -34,7 +34,17 @@ public class WxQuestionServiceImpl implements WxQuestionService {
WxQuestionLogMapper wxQuestionLogMapper;

@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.setTenantId(tenantId);
JSONArray jsonObject = JSON.parseArray(questionJson);


+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java Просмотреть файл

@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class WxTemplateMsgServiceImpl implements WxTemplateMsgService {
@@ -48,6 +49,11 @@ public class WxTemplateMsgServiceImpl implements WxTemplateMsgService {
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxTemplateMsgMapper.findList(record));
}

@Override
public List<WxTemplateMsg> findList(WxTemplateMsg record) {
return wxTemplateMsgMapper.findList(record);
}

@Override
public WxTemplateMsg getById(Long id) {
return wxTemplateMsgMapper.selectById(id);


+ 40
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxWiWideInfoServiceImpl.java Просмотреть файл

@@ -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));
}

}

+ 5
- 0
mallinkService/src/main/resources/mapper/WxMallFloorMapper.xml Просмотреть файл

@@ -73,4 +73,9 @@
</select>


<delete id="deleteByBuildingId">
delete from wx_mall_floor where building_id=#{buildingId}
</delete>


</mapper>

+ 9
- 0
mallinkService/src/main/resources/mapper/WxMallMapper.xml Просмотреть файл

@@ -179,6 +179,15 @@
and m.`parent_tenant_id` = #{parentTenantId}
</if>
</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>





+ 8
- 2
mallinkService/src/main/resources/mapper/WxPayAccountBillMapper.xml Просмотреть файл

@@ -77,12 +77,18 @@
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>

<select id="findList" parameterType="com.iformall.domain.po.WxPayAccount" resultMap="BaseResultMap">
<select id="findList" parameterType="com.iformall.domain.po.WxPayAccountBill" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_pay_account
from wx_pay_account_bill
<include refid="dynamicWhereConditions"/>
</select>

<select id="getByTenantId" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_pay_account_bill where `tenant_id` = #{tenantId}
</select>


</mapper>

+ 14
- 3
mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml Просмотреть файл

@@ -3,6 +3,8 @@
<mapper namespace="com.iformall.mapper.WxPayAccountMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPayAccount">
<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="sub_mch_id" jdbcType="VARCHAR" property="subMchId"/>
<result column="api_key" jdbcType="VARCHAR" property="apiKey"/>
@@ -15,14 +17,17 @@
</resultMap>

<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 id="dynamicWhereConditions">
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 test=" null != mchId ">
@@ -72,5 +77,11 @@
<include refid="dynamicWhereConditions"/>
</select>

<select id="getByTenantId" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_pay_account where `tenant_id` = #{tenantId}
</select>


</mapper>

Загрузка…
Отмена
Сохранить