| @@ -92,6 +92,11 @@ public class WxProjectConfig extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="微信开放平台appid",name="openAppid") | |||
| private String openAppid; | |||
| @io.swagger.annotations.ApiModelProperty(value="B端当前版本号",name="currentVersionB") | |||
| private String currentVersionB; | |||
| @io.swagger.annotations.ApiModelProperty(value="C端当前版本号",name="currentVersionC") | |||
| private String currentVersionC; | |||
| @io.swagger.annotations.ApiModelProperty(value="A端管理员帐号",name="usernameA") | |||
| private String usernameA; | |||
| @@ -8,6 +8,9 @@ import java.util.List; | |||
| * @author luozukai | |||
| */ | |||
| public interface WxFlowConfigMapper extends CommonMapper<WxFlowConfig, Long> { | |||
| void wxFlowConfigInit(String initSql); | |||
| List<WxFlowConfig> findList(WxFlowConfig wxFlowConfig); | |||
| /** | |||
| @@ -6,11 +6,8 @@ import com.iformall.domain.po.WxMsgValidationcodeModel; | |||
| public interface WxMsgValidationcodeModelMapper extends CommonMapper<WxMsgValidationcodeModel, String> { | |||
| List<WxMsgValidationcodeModel> findList(WxMsgValidationcodeModel wxMsgValidationcodeModel); | |||
| void wxMsgValidationcodeModelInit(String initSql); | |||
| List<WxMsgValidationcodeModel> findList(WxMsgValidationcodeModel wxMsgValidationcodeModel); | |||
| } | |||
| @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.MallUserInfoVo; | |||
| @@ -14,6 +15,15 @@ import java.util.Set; | |||
| public interface MallUserInfoService { | |||
| /** | |||
| * MallUserInfo初始化 | |||
| * 返回id | |||
| * @param tenantId | |||
| * @param wxProjectConfig | |||
| * @return | |||
| */ | |||
| Long MallUserInfoInit(String tenantId, WxProjectConfig wxProjectConfig); | |||
| //// -------------------- Login ----------------------- //// | |||
| /** | |||
| * 根据用户名查询用户对象 | |||
| @@ -2,6 +2,7 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| @@ -10,6 +11,17 @@ import java.util.List; | |||
| public interface WxAppinfoService { | |||
| /** | |||
| * WxAppinfo初始化 | |||
| * --- 小程序开通后,填写此数据,并设置域名及业务域名等 | |||
| * @param tenantId | |||
| * @param payId | |||
| * @param payBillId | |||
| * @param wxProjectConfig | |||
| * @return | |||
| */ | |||
| void wxAppinfoInit(String tenantId, Long payId, Long payBillId, WxProjectConfig wxProjectConfig); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| @@ -2,12 +2,30 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxAuthorizerInfo; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.domain.vo.WxWeappInfo; | |||
| import java.util.List; | |||
| public interface WxAuthorizerInfoService { | |||
| /** | |||
| * WxAuthorizerInfo初始化 | |||
| * | |||
| * @param tenantId | |||
| * @param wxProjectConfig | |||
| * @return | |||
| */ | |||
| void wxAuthorizerInfoInit(String tenantId, WxProjectConfig wxProjectConfig); | |||
| /** | |||
| * wx_weapp_ext_set初始化 | |||
| * | |||
| * @param wxProjectConfig | |||
| * @return | |||
| */ | |||
| void wxWeappExtSetInit(WxProjectConfig wxProjectConfig); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| @@ -5,6 +5,13 @@ import com.iformall.domain.po.WxCouponSendConfig; | |||
| public interface WxCouponSendConfigService { | |||
| /** | |||
| * 初始化WxCouponSendConfig | |||
| * @param tenantId | |||
| * @return | |||
| */ | |||
| void wxCouponSendConfigInit(String tenantId); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| @@ -16,6 +16,13 @@ import java.util.Map; | |||
| * 流程审批服务 | |||
| */ | |||
| public interface WxFlowService { | |||
| /** | |||
| * wx_flow_config初始化 | |||
| * @param tenantId | |||
| */ | |||
| void wxFlowConfigInit(String tenantId); | |||
| WxFlowModel getModelByType(int flowType,TenantEntity tenantEntity); | |||
| /** | |||
| @@ -9,6 +9,15 @@ import com.iformall.domain.po.WxMallFloor; | |||
| public interface WxMallBuildingService { | |||
| /** | |||
| * WxMallBuilding初始化 | |||
| * | |||
| * @param tenantId | |||
| * @param mallBuildingJSONstr {"A座":"B2层,B1层,1层,2层,3层,4层","B座":"1层,2层,3层"} | |||
| * @return | |||
| */ | |||
| void wxMallBuildingInit(String tenantId,String mallBuildingJSONstr); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.WxMall; | |||
| @@ -8,6 +9,15 @@ import java.util.List; | |||
| public interface WxMallService { | |||
| /** | |||
| * 根据WxProjectConfig初始化WxMall | |||
| * 返回TenantId | |||
| * | |||
| * @param wxProjectConfig | |||
| * @return | |||
| */ | |||
| String wxMallInit(WxProjectConfig wxProjectConfig); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| @@ -62,5 +72,4 @@ public interface WxMallService { | |||
| @Deprecated | |||
| WxMall getByTenantIdExt(String id); | |||
| } | |||
| @@ -2,17 +2,27 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxMsgConfig; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import java.util.List; | |||
| public interface WxMsgConfigService { | |||
| /** | |||
| * WxMsgConfig初始化 | |||
| * | |||
| * @param tenantId | |||
| * @param wxProjectConfig | |||
| * @return | |||
| */ | |||
| void WxMsgConfigInit(String tenantId, WxProjectConfig wxProjectConfig); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param offset | |||
| * @param limit | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<WxMsgConfig> listAsPage(WxMsgConfig record, Integer pageIndex, Integer pageSize); | |||
| @@ -3,15 +3,24 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMsgValidationcodeModel; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| public interface WxMsgValidationcodeModelService { | |||
| /** | |||
| * wx_msg_validationcode_model 初始化 | |||
| * | |||
| * @param tenantId | |||
| * @return | |||
| */ | |||
| void wxMsgValidationcodeModelInit(String tenantId, WxProjectConfig wxProjectConfig); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param offset | |||
| * @param limit | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<WxMsgValidationcodeModel> listAsPage(WxMsgValidationcodeModel record, Integer pageIndex, Integer pageSize); | |||
| @@ -2,9 +2,18 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxPark; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| public interface WxParkService { | |||
| /** | |||
| * WxPark初始化 | |||
| * | |||
| * @param tenantId | |||
| * @return | |||
| */ | |||
| void wxParkInit(String tenantId, WxProjectConfig wxProjectConfig); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| @@ -1,11 +1,21 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxPayAccount; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.WxPayAccountBill; | |||
| public interface WxPayAccountBillService { | |||
| /** | |||
| * --- 特殊商户号开通后,填写此数据 | |||
| * WxPayAccountBill初始化 | |||
| * 返回id | |||
| * @param wxPayAccount | |||
| * @return | |||
| */ | |||
| Long wxPayAccountInit(WxPayAccount wxPayAccount); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| @@ -2,9 +2,20 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxPayAccount; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| public interface WxPayAccountService { | |||
| /** | |||
| * --- 特殊商户号开通后,填写此数据 | |||
| * WxPayAccount初始化 | |||
| * | |||
| * @param tenantId | |||
| * @param wxProjectConfig | |||
| * @return | |||
| */ | |||
| WxPayAccount wxPayAccountInit(String tenantId, WxProjectConfig wxProjectConfig); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| @@ -9,12 +9,21 @@ import java.util.List; | |||
| public interface WxQuestionService { | |||
| /** | |||
| * wx_question 初始化 | |||
| * | |||
| * @param tenantId | |||
| * @param questionJson | |||
| * @return | |||
| */ | |||
| void wxQuestionInit(String tenantId, String questionJson); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param offset | |||
| * @param limit | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<WxQuestion> listAsPage(WxQuestion record, Integer pageIndex, Integer pageSize); | |||
| @@ -9,6 +9,13 @@ import java.util.List; | |||
| public interface WxScoreRulesService { | |||
| /** | |||
| * 积分成长值设置wx_score_rules 初始化 | |||
| * @param tenantId | |||
| * @return | |||
| */ | |||
| void wxScoreRulesInit(String tenantId); | |||
| /** | |||
| * 获取租户的ScoreRules | |||
| * @param tenantEntity | |||
| @@ -5,6 +5,14 @@ import com.iformall.domain.po.WxTemplateMsg; | |||
| public interface WxTemplateMsgService { | |||
| /** | |||
| * wx_template_msg 初始化 | |||
| * 设置核销成功通知,核销失败通知 | |||
| * @param tenantId | |||
| * @return | |||
| */ | |||
| void wxTemplateMsgInit(String tenantId); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| @@ -8,19 +8,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.MallPermission; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.MallUserRole; | |||
| import com.iformall.domain.po.WxMsgValidationcode; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.MallUserInfoVo; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.MallPermissionMapper; | |||
| import com.iformall.mapper.MallUserInfoMapper; | |||
| import com.iformall.mapper.MallUserRoleMapper; | |||
| import com.iformall.mapper.WxMsgValidationcodeMapper; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.MallRoleService; | |||
| import com.iformall.service.MallUserInfoService; | |||
| import com.iformall.service.WxMallService; | |||
| import com.iformall.utils.PasswordHelper; | |||
| import org.apache.commons.collections.CollectionUtils; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| @@ -43,9 +39,18 @@ public class MallUserInfoServiceImpl implements MallUserInfoService { | |||
| @Autowired | |||
| MallUserRoleMapper userRoleMapper; | |||
| @Autowired | |||
| MallRoleMapper mallRoleMapper; | |||
| @Autowired | |||
| MallUserRoleMapper mallUserRoleMapper; | |||
| @Autowired | |||
| MallPermissionMapper mallPermissionMapper; | |||
| @Autowired | |||
| MallRolePermissionMapper mallRolePermissionMapper; | |||
| @Autowired | |||
| WxMsgValidationcodeMapper wxMsgValidationcodeMapper; | |||
| @@ -163,6 +168,45 @@ public class MallUserInfoServiceImpl implements MallUserInfoService { | |||
| mallUserInfoMapper.deleteById(id); | |||
| } | |||
| @Override | |||
| public Long MallUserInfoInit(String tenantId, WxProjectConfig wxProjectConfig) { | |||
| //创建帐号 | |||
| MallUserInfo mallUserInfo = new MallUserInfo(); | |||
| mallUserInfo.setTenantId(tenantId); | |||
| mallUserInfo.setUsername(wxProjectConfig.getUsernameA()); | |||
| mallUserInfo.setName(wxProjectConfig.getName()); | |||
| mallUserInfo.setPassword(wxProjectConfig.getPassword()); | |||
| new PasswordHelper().encryptPassword(mallUserInfo); | |||
| mallUserInfo.setCreateTime(new Date()); | |||
| mallUserInfo.setStatus(1); | |||
| mallUserInfo.setIsAdmin(1); | |||
| mallUserInfo.setPhone(wxProjectConfig.getPhone()); | |||
| mallUserInfoMapper.insert(mallUserInfo); | |||
| //创建角色 | |||
| MallRole mallRole = new MallRole(); | |||
| mallRole.setTenantId(tenantId); | |||
| mallRole.setName("系统管理员"); | |||
| mallRole.setAvailable("0"); | |||
| mallRoleMapper.insert(mallRole); | |||
| //给角色赋权限 | |||
| MallPermission mallPermission=new MallPermission(); | |||
| List<MallPermission> list = mallPermissionMapper.findList(mallPermission); | |||
| for(MallPermission m : list){ | |||
| MallRolePermission mallRolePermission = new MallRolePermission(); | |||
| mallRolePermission.setTenantId(tenantId); | |||
| mallRolePermission.setRoleId(mallRole.getId()); | |||
| mallRolePermission.setPermissionId(m.getId()); | |||
| mallRolePermissionMapper.insert(mallRolePermission); | |||
| } | |||
| //给帐号加角色 | |||
| MallUserRole mallUserRole = new MallUserRole(); | |||
| //mallUserRole.setId(idWorker.nextId()); | |||
| mallUserRole.setUid(mallUserInfo.getId()); | |||
| mallUserRole.setRoleId(mallRole.getId()); | |||
| mallUserRoleMapper.insert(mallUserRole); | |||
| return mallUserInfo.getId(); | |||
| } | |||
| @Override | |||
| public MallUserInfo getByUsername(String username) { | |||
| return mallUserInfoMapper.selectByUserName(username); | |||
| @@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumAppType; | |||
| import com.iformall.mapper.WxAppinfoMapper; | |||
| @@ -41,6 +42,30 @@ public class WxAppinfoServiceImpl implements WxAppinfoService { | |||
| return wxAppinfoMapper.findByAppId(appId); | |||
| } | |||
| @Override | |||
| public void wxAppinfoInit(String tenantId, Long payId, Long payBillId, WxProjectConfig wxProjectConfig) { | |||
| WxAppinfo wxAppinfo = new WxAppinfo(); | |||
| wxAppinfo.setTenantId(tenantId); | |||
| wxAppinfo.setType(1); | |||
| wxAppinfo.setAppId(wxProjectConfig.getAppIdB()); | |||
| wxAppinfo.setParentAppId(wxProjectConfig.getParentAppId()); | |||
| wxAppinfo.setName(wxProjectConfig.getAppNameB()); | |||
| wxAppinfo.setSecret(wxProjectConfig.getAppSecretB()); | |||
| wxAppinfo.setPayId(payId); | |||
| wxAppinfo.setPayBillId(payBillId); | |||
| wxAppinfoMapper.insert(wxAppinfo); | |||
| wxAppinfo = new WxAppinfo(); | |||
| wxAppinfo.setTenantId(tenantId); | |||
| wxAppinfo.setType(2); | |||
| wxAppinfo.setAppId(wxProjectConfig.getAppIdC()); | |||
| wxAppinfo.setParentAppId(wxProjectConfig.getParentAppId()); | |||
| wxAppinfo.setName(wxProjectConfig.getAppNameC()); | |||
| wxAppinfo.setSecret(wxProjectConfig.getAppSecretC()); | |||
| wxAppinfo.setPayId(payId); | |||
| wxAppinfo.setPayBillId(payBillId); | |||
| wxAppinfoMapper.insert(wxAppinfo); | |||
| } | |||
| @Override | |||
| public PageInfo<WxAppinfo> listAsPage(WxAppinfo record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxAppinfoMapper.findList(record)); | |||
| @@ -6,6 +6,7 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxAuthorizerInfo; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.domain.po.WxWeappExtSet; | |||
| import com.iformall.domain.vo.WxWeappInfo; | |||
| import com.iformall.enums.EnumAppType; | |||
| @@ -37,6 +38,81 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService { | |||
| WxAppinfoMapper appinfoMapper; | |||
| @Override | |||
| public void wxAuthorizerInfoInit(String tenantId, WxProjectConfig wxProjectConfig) { | |||
| WxAuthorizerInfo wxAuthorizerInfo = new WxAuthorizerInfo(); | |||
| wxAuthorizerInfo.setTenantId(tenantId); | |||
| wxAuthorizerInfo.setType(1); | |||
| wxAuthorizerInfo.setAuthorizerAppid(wxProjectConfig.getAppIdB()); | |||
| wxAuthorizerInfo.setHeadImg(wxProjectConfig.getHeadImgB()); | |||
| wxAuthorizerInfo.setQrcodeUrl(wxProjectConfig.getQrcodeUrlB()); | |||
| wxAuthorizerInfo.setCreateTime(new Date()); | |||
| wxAuthorizerInfo.setUpdateTime(new Date()); | |||
| wxAuthorizerInfo.setAuthorizationStatus(0);//授权状态,0为已授权,1为已取消授权 | |||
| wxAuthorizerInfo.setAuthTime(new Date()); | |||
| wxAuthorizerInfo.setBaseStatus(0);//微信基础版本设置状态,0为已设置,1为设置失败 | |||
| wxAuthorizerInfo.setBaseTime(new Date()); | |||
| wxAuthorizerInfo.setDomainStatus(0);//服务器域名设置状态,0为已设置,1为设置失败 | |||
| wxAuthorizerInfo.setDomainTime(new Date()); | |||
| wxAuthorizerInfo.setWebdomainStatus(0);//服务器业务域名设置状态,0为已设置,1为设置失败 | |||
| wxAuthorizerInfo.setWebdomainTime(new Date()); | |||
| wxAuthorizerInfo.setCurrentVersion(wxProjectConfig.getCurrentVersionB()); | |||
| wxAuthorizerInfo.setCurrentDesc(wxProjectConfig.getCurrentVersionB()); | |||
| wxAuthorizerInfo.setReleaseTime(new Date()); | |||
| wxAuthorizerInfo.setOpenAppid(wxProjectConfig.getOpenAppid()); | |||
| wxAuthorizerInfo.setBindOpenTime(new Date()); | |||
| wxAuthorizerInfo.setRefreshToken(""); | |||
| wxAuthorizerInfo.setAccessToken(""); | |||
| authorizerInfoMapper.insert(wxAuthorizerInfo); | |||
| wxAuthorizerInfo = new WxAuthorizerInfo(); | |||
| wxAuthorizerInfo.setTenantId(tenantId); | |||
| wxAuthorizerInfo.setType(2); | |||
| wxAuthorizerInfo.setAuthorizerAppid(wxProjectConfig.getAppIdC()); | |||
| wxAuthorizerInfo.setHeadImg(wxProjectConfig.getHeadImgC()); | |||
| wxAuthorizerInfo.setQrcodeUrl(wxProjectConfig.getQrcodeUrlC()); | |||
| wxAuthorizerInfo.setCreateTime(new Date()); | |||
| wxAuthorizerInfo.setUpdateTime(new Date()); | |||
| wxAuthorizerInfo.setAuthorizationStatus(0);//授权状态,0为已授权,1为已取消授权 | |||
| wxAuthorizerInfo.setAuthTime(new Date()); | |||
| wxAuthorizerInfo.setBaseStatus(0);//微信基础版本设置状态,0为已设置,1为设置失败 | |||
| wxAuthorizerInfo.setBaseTime(new Date()); | |||
| wxAuthorizerInfo.setDomainStatus(0);//服务器域名设置状态,0为已设置,1为设置失败 | |||
| wxAuthorizerInfo.setDomainTime(new Date()); | |||
| wxAuthorizerInfo.setWebdomainStatus(0);//服务器业务域名设置状态,0为已设置,1为设置失败 | |||
| wxAuthorizerInfo.setWebdomainTime(new Date()); | |||
| wxAuthorizerInfo.setTemplateStatus(0);//模板设置状态,0为已设置,1为设置失败 | |||
| wxAuthorizerInfo.setTemplateTime(new Date()); | |||
| wxAuthorizerInfo.setCurrentVersion(wxProjectConfig.getCurrentVersionC()); | |||
| wxAuthorizerInfo.setCurrentDesc(wxProjectConfig.getCurrentVersionC()); | |||
| wxAuthorizerInfo.setReleaseTime(new Date()); | |||
| wxAuthorizerInfo.setOpenAppid(wxProjectConfig.getOpenAppid()); | |||
| wxAuthorizerInfo.setBindOpenTime(new Date()); | |||
| wxAuthorizerInfo.setRefreshToken(""); | |||
| wxAuthorizerInfo.setAccessToken(""); | |||
| authorizerInfoMapper.insert(wxAuthorizerInfo); | |||
| } | |||
| @Override | |||
| public void wxWeappExtSetInit(WxProjectConfig wxProjectConfig) { | |||
| WxWeappExtSet wxWeappExtSet = new WxWeappExtSet(); | |||
| wxWeappExtSet.setAppId(wxProjectConfig.getAppIdB()); | |||
| wxWeappExtSet.setType(1); | |||
| wxWeappExtSet.setExtJson("{}"); | |||
| wxWeappExtSet.setReleaseJson("{}"); | |||
| wxWeappExtSet.setCreateDate(new Date()); | |||
| wxWeappExtSet.setUpdateDate(new Date()); | |||
| weappExtSetMapper.insert(wxWeappExtSet); | |||
| wxWeappExtSet = new WxWeappExtSet(); | |||
| wxWeappExtSet.setAppId(wxProjectConfig.getAppIdC()); | |||
| wxWeappExtSet.setType(2); | |||
| wxWeappExtSet.setExtJson("{}"); | |||
| wxWeappExtSet.setReleaseJson("{}"); | |||
| wxWeappExtSet.setCarSupport(0); | |||
| wxWeappExtSet.setCreateDate(new Date()); | |||
| wxWeappExtSet.setUpdateDate(new Date()); | |||
| weappExtSetMapper.insert(wxWeappExtSet); | |||
| } | |||
| @Override | |||
| public PageInfo<WxAuthorizerInfo> listAsPage(WxAuthorizerInfo record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> authorizerInfoMapper.findList(record)); | |||
| @@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxCouponSendConfig; | |||
| import com.iformall.enums.EnumCouponSendSendType; | |||
| import com.iformall.mapper.WxCouponSendConfigMapper; | |||
| import com.iformall.service.WxCouponSendConfigService; | |||
| import org.slf4j.Logger; | |||
| @@ -22,6 +23,23 @@ public class WxCouponSendConfigServiceImpl implements WxCouponSendConfigService | |||
| WxCouponSendConfigMapper wxCouponSendConfigMapper; | |||
| @Override | |||
| public void wxCouponSendConfigInit(String tenantId) { | |||
| WxCouponSendConfig wxCouponSendConfig = new WxCouponSendConfig(); | |||
| wxCouponSendConfig.setTenantId(tenantId); | |||
| wxCouponSendConfig.setValue(0);//默认停用 | |||
| wxCouponSendConfig.setCreateTime(new Date()); | |||
| wxCouponSendConfig.setUpdateTime(new Date()); | |||
| for (EnumCouponSendSendType value : EnumCouponSendSendType.values()) { | |||
| wxCouponSendConfig.setId(null); | |||
| if (value.getCode() > 1) { | |||
| wxCouponSendConfig.setSendType(value.getCode()); | |||
| wxCouponSendConfig.setRemark( value.getMessage() + "开关"); | |||
| wxCouponSendConfigMapper.insert(wxCouponSendConfig); | |||
| } | |||
| } | |||
| } | |||
| @Override | |||
| public PageInfo<WxCouponSendConfig> listAsPage(WxCouponSendConfig record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxCouponSendConfigMapper.findList(record)); | |||
| @@ -47,6 +47,7 @@ import org.springframework.transaction.annotation.Propagation; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import java.lang.reflect.Field; | |||
| import java.text.DateFormat; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.*; | |||
| @@ -99,6 +100,38 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| @Qualifier("couponChannelRedisTemplate") | |||
| RedisTemplate<String, PageInfo<WxCouponChannelVo>> cdRedisTemplate; | |||
| @Override | |||
| public void wxFlowConfigInit(String tenantId) { | |||
| DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |||
| String nowTimestr = format.format(new Date()); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| Long id1 = idWorker.nextId(); | |||
| Long id2 = idWorker.nextId(); | |||
| Long id3 = idWorker.nextId(); | |||
| String initSql = "insert into `mallink`.`wx_flow_config` ( `id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) values " + | |||
| " ( '" + id1 + "', '0', '" + tenantId + "', '营销审批', '0', '0', '" + nowTimestr + "', '" + nowTimestr + "', '3')," + | |||
| " ( '" + id2 + "', '0', '" + tenantId + "', '合同审批', '0', '0', '" + nowTimestr + "', '" + nowTimestr + "', '1')," + | |||
| " ( '" + id3 + "', '0', '" + tenantId + "', '账单审批', '0', '0', '" + nowTimestr + "', '" + nowTimestr + "', '2')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '拼团审批', '11', '0', '" + nowTimestr + "', '" + nowTimestr + "', '3')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '有价券审批', '9', '0', '" + nowTimestr + "', '" + nowTimestr + "', '1')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '卡审批', '10', '0', '" + nowTimestr + "', '" + nowTimestr + "', '2')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id1 + "', '" + tenantId + "', '砍价审批', '12', '0', '" + nowTimestr + "', '" + nowTimestr + "', '4')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '多经点位租金+物业合同签约', '19', '0', '" + nowTimestr + "', '" + nowTimestr + "', '11')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺租金+物业合同终止', '18', '0', '" + nowTimestr + "', '" + nowTimestr + "', '10')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺物业合同签约', '13', '0', '" + nowTimestr + "', '" + nowTimestr + "', '5')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺租金+物业合同签约', '17', '0', '" + nowTimestr + "', '" + nowTimestr + "', '9')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '多经点位物业合同签约', '15', '0', '" + nowTimestr + "', '" + nowTimestr + "', '7')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '多经点位物业合同终止', '16', '0', '" + nowTimestr + "', '" + nowTimestr + "', '8')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '多经点位租金+物业合同终止', '20', '0', '" + nowTimestr + "', '" + nowTimestr + "', '12')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺物业合同终止', '14', '0', '" + nowTimestr + "', '" + nowTimestr + "', '6')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺租金合同终止', '6', '0', '" + nowTimestr + "', '" + nowTimestr + "', '3')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '多经点位租金合同签约', '5', '0', '" + nowTimestr + "', '" + nowTimestr + "', '2')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '多经点位租金合同终止', '7', '0', '" + nowTimestr + "', '" + nowTimestr + "', '4')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id2 + "', '" + tenantId + "', '商铺租金合同签约', '4', '0', '" + nowTimestr + "', '" + nowTimestr + "', '1')," + | |||
| " ( '" + idWorker.nextId() + "', '" + id3 + "', '" + tenantId + "', '账单应收金额变更', '8', '0', '" + nowTimestr + "', '" + nowTimestr + "', '1');"; | |||
| wxFlowConfigMapper.wxFlowConfigInit(initSql); | |||
| } | |||
| /** | |||
| * 获取流程key | |||
| * @param flowType | |||
| @@ -1,35 +1,77 @@ | |||
| package com.iformall.service.impl; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.dto.WxMallBuildingFloorDto; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.WxMallBuilding; | |||
| import com.iformall.domain.po.WxMallFloor; | |||
| import com.iformall.mapper.WxMallBuildingMapper; | |||
| import com.iformall.mapper.WxMallFloorMapper; | |||
| import com.iformall.service.WxMallBuildingService; | |||
| import com.iformall.service.WxMallService; | |||
| import com.iformall.utils.Constant; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import java.util.Date; | |||
| import java.util.Iterator; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.stream.Collectors; | |||
| @Service | |||
| public class WxMallBuildingServiceImpl implements WxMallBuildingService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMallService wxMallService; | |||
| @Autowired | |||
| WxMallBuildingMapper wxMallBuildingMapper; | |||
| @Autowired | |||
| WxMallFloorMapper wxMallFloorMapper; | |||
| @Override | |||
| public void wxMallBuildingInit(String tenantId, String mallBuildingJSONstr) { | |||
| WxMall byTenantId = wxMallService.getByTenantId(tenantId); | |||
| JSONObject obj= JSON.parseObject(mallBuildingJSONstr); | |||
| Iterator it =obj.entrySet().iterator(); | |||
| while (it.hasNext()) { | |||
| Map.Entry<String, String> entry = (Map.Entry<String, String>) it.next(); | |||
| String[] split = entry.getValue().replace(",",",").split(","); | |||
| WxMallBuilding wxMallBuilding = new WxMallBuilding(); | |||
| wxMallBuilding.setTenantId(tenantId); | |||
| wxMallBuilding.setMallId(byTenantId.getId()); | |||
| wxMallBuilding.setBuildingName(entry.getKey()); | |||
| wxMallBuilding.setFloorNumber(split.length); | |||
| wxMallBuilding.setCreateDate(new Date()); | |||
| wxMallBuilding.setUpdateDate(new Date()); | |||
| wxMallBuildingMapper.insert(wxMallBuilding); | |||
| for (String cha:split) { | |||
| WxMallFloor wxMallFloor = new WxMallFloor(); | |||
| wxMallFloor.setTenantId(tenantId); | |||
| wxMallFloor.setMallId(byTenantId.getId()); | |||
| wxMallFloor.setBuildingId(wxMallBuilding.getId()); | |||
| wxMallFloor.setFloorName(cha); | |||
| //默认图片---------------------------------------------------- | |||
| wxMallFloor.setBackgroundImg("https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/789/9eea8e0e-15ea-4be0-a43d-31e2e9d8db8c.jpg"); | |||
| wxMallFloor.setCreateDate(new Date()); | |||
| wxMallFloor.setUpdateDate(new Date()); | |||
| wxMallFloorMapper.insert(wxMallFloor); | |||
| } | |||
| } | |||
| } | |||
| @Override | |||
| public PageInfo<WxMallBuilding> listAsPage(WxMallBuilding record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMallBuildingMapper.findList(record)); | |||
| @@ -3,6 +3,7 @@ package com.iformall.service.impl; | |||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxMallBuilding; | |||
| @@ -43,6 +44,43 @@ public class WxMallServiceImpl implements WxMallService { | |||
| @Qualifier("mallRedisTemplate") | |||
| RedisTemplate<String, WxMall> mallRedisTemplate; | |||
| @Override | |||
| public String wxMallInit(WxProjectConfig wxProjectConfig) { | |||
| WxMall wxMall = new WxMall(); | |||
| wxMall.setTenantId("-1"); | |||
| wxMall.setName(wxProjectConfig.getName()); | |||
| wxMall.setGroup(wxProjectConfig.getName());//无用 | |||
| wxMall.setCountry(wxProjectConfig.getCountry()); | |||
| wxMall.setProvince(wxProjectConfig.getProvince()); | |||
| wxMall.setCity(wxProjectConfig.getCity()); | |||
| wxMall.setAddr(wxProjectConfig.getAddr()); | |||
| wxMall.setTotalArea(wxProjectConfig.getTotalArea()); | |||
| wxMall.setOperatingArea(wxProjectConfig.getTotalArea());//无用 | |||
| wxMall.setParkArea(wxProjectConfig.getParkArea()); | |||
| wxMall.setParkPlaceNumber(wxProjectConfig.getParkPlaceNumber()); | |||
| wxMall.setServicePhone(wxProjectConfig.getServicePhone()); | |||
| wxMall.setImgUrl(wxProjectConfig.getImgUrl()); | |||
| wxMall.setImgUrlH(wxProjectConfig.getImgUrlH()); | |||
| String weapNote = "{\"carpage\": {\"desc\": \"分享个停车小程序,希望你喜欢\", \"title\": \"" | |||
| + wxProjectConfig.getName() | |||
| + "\"}, \"firstpage\": {\"desc\": \"分享个小程序,希望你喜欢\", \"title\": \"" | |||
| + wxProjectConfig.getName() | |||
| + "\"}}"; | |||
| wxMall.setWeapNote(weapNote); | |||
| //(1(全能版)、2(营销版,除了合同,账单功能),3.速享版(营销版加3个月限制)分别什么意思) | |||
| wxMall.setSaleType(wxProjectConfig.getSaleType()); | |||
| wxMall.setBusinessHours("[]"); | |||
| wxMall.setIntroduction(""); | |||
| wxMall.setImg(""); | |||
| wxMallMapper.insert(wxMall); | |||
| wxMall.setTenantId(wxMall.getId().toString()); | |||
| wxMallMapper.updateById(wxMall); | |||
| return wxMall.getTenantId(); | |||
| } | |||
| @Override | |||
| public PageInfo<WxMall> listAsPage(WxMall record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMallMapper.findList(record)); | |||
| @@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxMsgConfig; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.mapper.WxMsgConfigMapper; | |||
| import com.iformall.service.WxMsgConfigService; | |||
| import org.slf4j.Logger; | |||
| @@ -20,6 +21,36 @@ public class WxMsgConfigServiceImpl implements WxMsgConfigService { | |||
| WxMsgConfigMapper wxMsgConfigMapper; | |||
| @Override | |||
| public void WxMsgConfigInit(String tenantId, WxProjectConfig wxProjectConfig) { | |||
| WxMsgConfig wxMsgConfig = new WxMsgConfig(); | |||
| wxMsgConfig.setTenantId(tenantId); | |||
| 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.setRecharge((long) 0); | |||
| wxMsgConfig.setRemains((long) 100000); | |||
| wxMsgConfig.setTotal((long) 100000); | |||
| wxMsgConfig.setAccount("15626593768"); | |||
| wxMsgConfig.setReminderstatus(0); | |||
| wxMsgConfig.setNotifyurl("https://admin.malls.iformall.com/wxMsgCallback/receivemsg/" + tenantId); | |||
| wxMsgConfig.setModelnotifyurl("https://admin.malls.iformall.com/wxMsgCallback/receivemodel/" + tenantId); | |||
| wxMsgConfig.setVerifynotifyurl("https://admin.malls.iformall.com/wxMsgCallback/receiveverifymodel/" + tenantId); | |||
| wxMsgConfig.setAppid(wxProjectConfig.getAppIdB()); | |||
| wxMsgConfigMapper.insert(wxMsgConfig); | |||
| } | |||
| @Override | |||
| public PageInfo<WxMsgConfig> listAsPage(WxMsgConfig record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgConfigMapper.findList(record)); | |||
| @@ -9,6 +9,7 @@ import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMsgConfig; | |||
| import com.iformall.domain.po.WxMsgValidationcodeModel; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.enums.EnumMsgModelStatus; | |||
| import com.iformall.enums.EnumVerifyCode; | |||
| import com.iformall.mapper.WxMsgConfigMapper; | |||
| @@ -20,6 +21,8 @@ import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import java.text.DateFormat; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.*; | |||
| @Service | |||
| @@ -32,6 +35,52 @@ public class WxMsgValidationcodeModelServiceImpl implements WxMsgValidationcodeM | |||
| @Autowired | |||
| WxMsgConfigMapper wxMsgConfigMapper; | |||
| @Override | |||
| public void wxMsgValidationcodeModelInit(String tenantId, WxProjectConfig wxProjectConfig) { | |||
| 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);" + | |||
| "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() + "');" + | |||
| "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() + "');" + | |||
| "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() + "');" + | |||
| "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() + "');" + | |||
| "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() + "');" + | |||
| "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() + "');"; | |||
| wxMsgValidationcodeModelMapper.wxMsgValidationcodeModelInit(initSql); | |||
| } | |||
| @Override | |||
| public PageInfo<WxMsgValidationcodeModel> listAsPage(WxMsgValidationcodeModel record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgValidationcodeModelMapper.findList(record)); | |||
| @@ -3,8 +3,11 @@ package com.iformall.service.impl; | |||
| import java.util.*; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.WxPark; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.mapper.WxParkMapper; | |||
| import com.iformall.service.WxMallService; | |||
| import com.iformall.service.WxParkService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| @@ -19,6 +22,25 @@ public class WxParkServiceImpl implements WxParkService { | |||
| @Autowired | |||
| WxParkMapper wxParkMapper; | |||
| @Autowired | |||
| WxMallService wxMallService; | |||
| @Override | |||
| public void wxParkInit(String tenantId, WxProjectConfig wxProjectConfig) { | |||
| WxMall byTenantId = wxMallService.getByTenantId(tenantId); | |||
| WxPark wxPark = new WxPark(); | |||
| wxPark.setVendorParams("{}"); | |||
| wxPark.setCreateDate(new Date()); | |||
| wxPark.setUpdateDate(new Date()); | |||
| wxPark.setAddr(wxProjectConfig.getName()); | |||
| wxPark.setTenantId(tenantId); | |||
| wxPark.setNumber(byTenantId.getParkPlaceNumber()); | |||
| wxPark.setVendorType(0); | |||
| wxPark.setParkId("0"); | |||
| wxPark.setEntryExit(1); | |||
| wxPark.setStopFee(""); | |||
| wxParkMapper.insert(wxPark); | |||
| } | |||
| @Override | |||
| public PageInfo<WxPark> listAsPage(WxPark record, Integer pageIndex, Integer pageSize) { | |||
| @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxPayAccount; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.WxPayAccountBill; | |||
| import com.iformall.mapper.WxBillPropertyMapper; | |||
| @@ -28,6 +29,23 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService { | |||
| @Autowired | |||
| WxBillPropertyMapper wxBillPropertyMapper; | |||
| @Override | |||
| public Long wxPayAccountInit(WxPayAccount wxPayAccount) { | |||
| WxPayAccountBill 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()); | |||
| wxPayAccountBillMapper.insert(wxPayAccountBill); | |||
| return wxPayAccountBill.getId(); | |||
| } | |||
| @Override | |||
| public PageInfo<WxPayAccountBill> listAsPage(WxPayAccountBill record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxPayAccountBillMapper.findList(record)); | |||
| @@ -3,6 +3,7 @@ package com.iformall.service.impl; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxPayAccount; | |||
| import com.iformall.domain.po.WxProjectConfig; | |||
| import com.iformall.mapper.WxPayAccountMapper; | |||
| import com.iformall.service.WxPayAccountService; | |||
| import org.slf4j.Logger; | |||
| @@ -19,6 +20,25 @@ public class WxPayAccountServiceImpl implements WxPayAccountService { | |||
| WxPayAccountMapper wxPayAccountMapper; | |||
| @Override | |||
| public WxPayAccount wxPayAccountInit(String tenantId, WxProjectConfig wxProjectConfig) { | |||
| WxPayAccount wxPayAccount = new WxPayAccount(); | |||
| wxPayAccount.setTenantId(tenantId); | |||
| wxPayAccount.setMchId(wxProjectConfig.getMchId()); | |||
| wxPayAccount.setSubMchId(wxProjectConfig.getSubMchId()); | |||
| wxPayAccount.setApiKey(wxProjectConfig.getApiKey()); | |||
| //默认------------------------------------------------------------- | |||
| wxPayAccount.setNotifyUrl("https://admin.malls.iformall.com/wxPay/notify"); | |||
| wxPayAccount.setCertPath("/opt/iformall/service/apiclient_cert.p12"); | |||
| //---------------------------------------------------------------- | |||
| wxPayAccount.setType(1);//0:普通商户模式, 1:服务商模式(默认服务商模式) | |||
| wxPayAccount.setShare(0);//0: 未分账,1:分账(默认不分账) | |||
| wxPayAccount.setRate(wxProjectConfig.getRate()); | |||
| wxPayAccount.setRealRate(wxProjectConfig.getRealRate()); | |||
| wxPayAccountMapper.insert(wxPayAccount); | |||
| return wxPayAccount; | |||
| } | |||
| @Override | |||
| public PageInfo<WxPayAccount> listAsPage(WxPayAccount record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxPayAccountMapper.findList(record)); | |||
| @@ -2,13 +2,10 @@ package com.iformall.service.impl; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.EnumCouponSendSendType; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.WxProjectConfigService; | |||
| import com.iformall.service.*; | |||
| import com.iformall.utils.PasswordHelper; | |||
| import net.sf.saxon.expr.instruct.ForEach; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -27,421 +24,82 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { | |||
| @Autowired | |||
| WxProjectConfigMapper wxProjectConfigMapper; | |||
| @Autowired | |||
| WxMallMapper wxMallMapper; | |||
| WxMallService wxMallService; | |||
| @Autowired | |||
| WxCouponSendConfigMapper wxCouponSendConfigMapper; | |||
| WxCouponSendConfigService wxCouponSendConfigService; | |||
| @Autowired | |||
| WxMallBuildingMapper wxMallBuildingMapper; | |||
| WxMallBuildingService wxMallBuildingService; | |||
| @Autowired | |||
| WxMallFloorMapper wxMallFloorMapper; | |||
| WxPayAccountService wxPayAccountService; | |||
| @Autowired | |||
| WxPayAccountMapper wxPayAccountMapper; | |||
| WxPayAccountBillService wxPayAccountBillService; | |||
| @Autowired | |||
| WxPayAccountBillMapper wxPayAccountBillMapper; | |||
| WxAppinfoService wxAppinfoService; | |||
| @Autowired | |||
| WxAppinfoMapper wxAppinfoMapper; | |||
| WxAuthorizerInfoService wxAuthorizerInfoService; | |||
| @Autowired | |||
| WxWeappExtSetMapper wxWeappExtSetMapper; | |||
| MallUserInfoService mallUserInfoService; | |||
| @Autowired | |||
| WxAuthorizerInfoMapper wxAuthorizerInfoMapper; | |||
| MallRoleService mallRoleService; | |||
| @Autowired | |||
| MallUserInfoMapper mallUserInfoMapper; | |||
| WxMsgConfigService wxMsgConfigService; | |||
| @Autowired | |||
| MallRoleMapper mallRoleMapper; | |||
| WxParkService wxParkService; | |||
| @Autowired | |||
| MallPermissionMapper mallPermissionMapper; | |||
| WxScoreRulesService wxScoreRulesService; | |||
| @Autowired | |||
| MallRolePermissionMapper mallRolePermissionMapper; | |||
| WxTemplateMsgService wxTemplateMsgService; | |||
| @Autowired | |||
| MallUserRoleMapper mallUserRoleMapper; | |||
| WxQuestionService wxQuestionService; | |||
| @Autowired | |||
| WxMsgConfigMapper wxMsgConfigMapper; | |||
| WxMsgValidationcodeModelService wxMsgValidationcodeModelService; | |||
| @Autowired | |||
| WxParkMapper wxParkMapper; | |||
| @Autowired | |||
| WxScoreRulesMapper wxScoreRulesMapper; | |||
| @Autowired | |||
| WxTemplateMsgMapper wxTemplateMsgMapper; | |||
| @Autowired | |||
| WxWiwideInfoMapper wxWiwideInfoMapper; | |||
| @Autowired | |||
| WxQuestionMapper wxQuestionMapper; | |||
| @Autowired | |||
| WxMsgValidationcodeModelMapper wxMsgValidationcodeModelMapper; | |||
| @Autowired | |||
| WxFlowConfigMapper wxFlowConfigMapper; | |||
| WxFlowService wxFlowService; | |||
| @Override | |||
| @Transactional | |||
| public void initProjectConfig(Long id) { | |||
| WxProjectConfig wxProjectConfig = wxProjectConfigMapper.selectById(id); | |||
| if(wxProjectConfig!=null && wxProjectConfig.getDelType()<10000){ | |||
| Date nowTime = new Date(); | |||
| logger.info("wx_mall 商场---------------------init--start"); | |||
| // 1. wx_mall 商场 | |||
| WxMall wxMall = new WxMall(); | |||
| wxMall.setTenantId("-1"); | |||
| wxMall.setName(wxProjectConfig.getName()); | |||
| wxMall.setGroup(wxProjectConfig.getName());//无用 | |||
| wxMall.setCountry(wxProjectConfig.getCountry()); | |||
| wxMall.setProvince(wxProjectConfig.getProvince()); | |||
| wxMall.setCity(wxProjectConfig.getCity()); | |||
| wxMall.setAddr(wxProjectConfig.getAddr()); | |||
| wxMall.setTotalArea(wxProjectConfig.getTotalArea()); | |||
| wxMall.setOperatingArea(wxProjectConfig.getTotalArea());//无用 | |||
| wxMall.setParkArea(wxProjectConfig.getParkArea()); | |||
| wxMall.setParkPlaceNumber(wxProjectConfig.getParkPlaceNumber()); | |||
| wxMall.setServicePhone(wxProjectConfig.getServicePhone()); | |||
| wxMall.setImgUrl(wxProjectConfig.getImgUrl()); | |||
| wxMall.setImgUrlH(wxProjectConfig.getImgUrlH()); | |||
| String weapNote = "{\"carpage\": {\"desc\": \"分享个停车小程序,希望你喜欢\", \"title\": \"" | |||
| + wxProjectConfig.getName() | |||
| + "\"}, \"firstpage\": {\"desc\": \"分享个小程序,希望你喜欢\", \"title\": \"" | |||
| + wxProjectConfig.getName() | |||
| + "\"}}"; | |||
| wxMall.setWeapNote(weapNote); | |||
| //(1(全能版)、2(营销版,除了合同,账单功能),3.速享版(营销版加3个月限制)分别什么意思) | |||
| wxMall.setSaleType(wxProjectConfig.getSaleType()); | |||
| wxMall.setBusinessHours("[]"); | |||
| wxMall.setIntroduction(""); | |||
| wxMall.setImg(""); | |||
| wxMallMapper.insert(wxMall); | |||
| wxMall.setTenantId(wxMall.getId().toString()); | |||
| wxMallMapper.updateById(wxMall); | |||
| logger.info("wx_mall 商场---------------------init--success"); | |||
| String tenantId = wxMallService.wxMallInit(wxProjectConfig); | |||
| // 2. wx_coupon_send_config | |||
| logger.info("wx_coupon_send_config---------------------init--start"); | |||
| WxCouponSendConfig wxCouponSendConfig = new WxCouponSendConfig(); | |||
| wxCouponSendConfig.setTenantId(wxMall.getTenantId()); | |||
| wxCouponSendConfig.setValue(0);//默认停用 | |||
| wxCouponSendConfig.setCreateTime(nowTime); | |||
| wxCouponSendConfig.setUpdateTime(nowTime); | |||
| for (EnumCouponSendSendType value : EnumCouponSendSendType.values()) { | |||
| wxCouponSendConfig.setId(null); | |||
| if (value.getCode() > 1) { | |||
| wxCouponSendConfig.setSendType(value.getCode()); | |||
| wxCouponSendConfig.setRemark( value.getMessage() + "开关"); | |||
| wxCouponSendConfigMapper.insert(wxCouponSendConfig); | |||
| } | |||
| } | |||
| logger.info("wx_coupon_send_config ---------------------init--success"); | |||
| wxCouponSendConfigService.wxCouponSendConfigInit(tenantId); | |||
| // 3. wx_mall_building 商场楼座 | |||
| //{"A座":"B2层,B1层,1层,2层,3层,4层","B座":"1层,2层,3层"} | |||
| logger.info("wx_mall_building---floor---------------------init--start"); | |||
| JSONObject obj= JSON.parseObject(wxProjectConfig.getMallBuilding()); | |||
| Iterator it =obj.entrySet().iterator(); | |||
| while (it.hasNext()) { | |||
| Map.Entry<String, String> entry = (Map.Entry<String, String>) it.next(); | |||
| //System.out.println(entry.getKey() + "-------" + entry.getValue()); | |||
| String[] split = entry.getValue().replace(",",",").split(","); | |||
| WxMallBuilding wxMallBuilding = new WxMallBuilding(); | |||
| wxMallBuilding.setTenantId(wxMall.getTenantId()); | |||
| wxMallBuilding.setMallId(wxMall.getId()); | |||
| wxMallBuilding.setBuildingName(entry.getKey()); | |||
| wxMallBuilding.setFloorNumber(split.length); | |||
| wxMallBuilding.setCreateDate(nowTime); | |||
| wxMallBuilding.setUpdateDate(nowTime); | |||
| wxMallBuildingMapper.insert(wxMallBuilding); | |||
| for (String cha:split) { | |||
| WxMallFloor wxMallFloor = new WxMallFloor(); | |||
| wxMallFloor.setTenantId(wxMall.getTenantId()); | |||
| wxMallFloor.setMallId(wxMall.getId()); | |||
| wxMallFloor.setBuildingId(wxMallBuilding.getId()); | |||
| wxMallFloor.setFloorName(cha); | |||
| //默认图片---------------------------------------------------- | |||
| wxMallFloor.setBackgroundImg("https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/789/9eea8e0e-15ea-4be0-a43d-31e2e9d8db8c.jpg"); | |||
| wxMallFloor.setCreateDate(nowTime); | |||
| wxMallFloor.setUpdateDate(nowTime); | |||
| wxMallFloorMapper.insert(wxMallFloor); | |||
| } | |||
| } | |||
| logger.info("wx_mall_building---floor ---------------------init--success"); | |||
| wxMallBuildingService.wxMallBuildingInit(tenantId,wxProjectConfig.getMallBuilding()); | |||
| //# --- 特殊商户号开通后,填写此数据 | |||
| //# 5. wx_pay_account | |||
| logger.info("wx_pay_account---------------------init--start"); | |||
| WxPayAccount wxPayAccount = new WxPayAccount(); | |||
| wxPayAccount.setTenantId(wxMall.getTenantId()); | |||
| wxPayAccount.setMchId(wxProjectConfig.getMchId()); | |||
| wxPayAccount.setSubMchId(wxProjectConfig.getSubMchId()); | |||
| wxPayAccount.setApiKey(wxProjectConfig.getApiKey()); | |||
| //----------------------------------------------------------- | |||
| //默认 | |||
| // wxPayAccount.setNotifyUrl(wxProjectConfig.getNotifyUrl()); | |||
| // wxPayAccount.setCertPath(wxProjectConfig.getCertPath()); | |||
| wxPayAccount.setNotifyUrl("https://admin.malls.iformall.com/wxPay/notify"); | |||
| wxPayAccount.setCertPath("/opt/iformall/service/apiclient_cert.p12"); | |||
| //------------------------------------------------------------- | |||
| wxPayAccount.setType(1);//0:普通商户模式, 1:服务商模式(默认服务商模式) | |||
| wxPayAccount.setShare(0);//0: 未分账,1:分账(默认不分账) | |||
| wxPayAccount.setRate(wxProjectConfig.getRate()); | |||
| wxPayAccount.setRealRate(wxProjectConfig.getRealRate()); | |||
| wxPayAccountMapper.insert(wxPayAccount); | |||
| logger.info("wx_pay_account ---------------------init--success"); | |||
| WxPayAccount wxPayAccount = wxPayAccountService.wxPayAccountInit(tenantId,wxProjectConfig); | |||
| //# --- 特殊商户号开通后,填写此数据 | |||
| //# 6. wx_pay_account_bill | |||
| logger.info("wx_pay_account_bill---------------------init--start"); | |||
| WxPayAccountBill 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()); | |||
| wxPayAccountBillMapper.insert(wxPayAccountBill); | |||
| logger.info("wx_pay_account_bill ---------------------init--success"); | |||
| Long payBillId = wxPayAccountBillService.wxPayAccountInit(wxPayAccount); | |||
| //# --- 小程序开通后,填写此数据,并设置域名及业务域名等 | |||
| //# 7. wx_appinfo | |||
| logger.info("wx_appinfo---------------------init--start"); | |||
| WxAppinfo wxAppinfo = new WxAppinfo(); | |||
| wxAppinfo.setTenantId(wxMall.getTenantId()); | |||
| wxAppinfo.setType(1); | |||
| wxAppinfo.setAppId(wxProjectConfig.getAppIdB()); | |||
| wxAppinfo.setParentAppId(wxProjectConfig.getParentAppId()); | |||
| wxAppinfo.setName(wxProjectConfig.getAppNameB()); | |||
| wxAppinfo.setSecret(wxProjectConfig.getAppSecretB()); | |||
| wxAppinfo.setPayId(wxPayAccount.getId()); | |||
| wxAppinfo.setPayBillId(wxPayAccountBill.getId()); | |||
| wxAppinfoMapper.insert(wxAppinfo); | |||
| wxAppinfo = new WxAppinfo(); | |||
| wxAppinfo.setTenantId(wxMall.getTenantId()); | |||
| wxAppinfo.setType(2); | |||
| wxAppinfo.setAppId(wxProjectConfig.getAppIdC()); | |||
| wxAppinfo.setParentAppId(wxProjectConfig.getParentAppId()); | |||
| wxAppinfo.setName(wxProjectConfig.getAppNameC()); | |||
| wxAppinfo.setSecret(wxProjectConfig.getAppSecretC()); | |||
| wxAppinfo.setPayId(wxPayAccount.getId()); | |||
| wxAppinfo.setPayBillId(wxPayAccountBill.getId()); | |||
| wxAppinfoMapper.insert(wxAppinfo); | |||
| logger.info("wx_appinfo ---------------------init--success"); | |||
| logger.info("wx_weapp_ext_set---------------------init--start"); | |||
| WxWeappExtSet wxWeappExtSet = new WxWeappExtSet(); | |||
| wxWeappExtSet.setAppId(wxProjectConfig.getAppIdB()); | |||
| wxWeappExtSet.setType(1); | |||
| wxWeappExtSet.setExtJson("{}"); | |||
| wxWeappExtSet.setReleaseJson("{}"); | |||
| wxWeappExtSet.setCreateDate(nowTime); | |||
| wxWeappExtSet.setUpdateDate(nowTime); | |||
| wxWeappExtSetMapper.insert(wxWeappExtSet); | |||
| wxWeappExtSet = new WxWeappExtSet(); | |||
| wxWeappExtSet.setAppId(wxProjectConfig.getAppIdC()); | |||
| wxWeappExtSet.setType(2); | |||
| wxWeappExtSet.setExtJson("{}"); | |||
| wxWeappExtSet.setReleaseJson("{}"); | |||
| wxWeappExtSet.setCarSupport(0); | |||
| wxWeappExtSet.setCreateDate(nowTime); | |||
| wxWeappExtSet.setUpdateDate(nowTime); | |||
| wxWeappExtSetMapper.insert(wxWeappExtSet); | |||
| logger.info("wx_weapp_ext_set ---------------------init--success"); | |||
| SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |||
| Date authTime = new Date(); | |||
| try { | |||
| authTime = sdf.parse("2020-06-06 06:06:06"); | |||
| } catch (ParseException e) { | |||
| e.printStackTrace(); | |||
| } | |||
| logger.info("wx_authorizer_info---------------------init--start"); | |||
| WxAuthorizerInfo wxAuthorizerInfo = new WxAuthorizerInfo(); | |||
| wxAuthorizerInfo.setTenantId(wxMall.getTenantId()); | |||
| wxAuthorizerInfo.setType(1); | |||
| wxAuthorizerInfo.setAuthorizerAppid(wxProjectConfig.getAppIdB()); | |||
| wxAuthorizerInfo.setHeadImg(wxProjectConfig.getHeadImgB()); | |||
| wxAuthorizerInfo.setQrcodeUrl(wxProjectConfig.getQrcodeUrlB()); | |||
| wxAuthorizerInfo.setAuthTime(authTime); | |||
| wxAuthorizerInfo.setCreateTime(nowTime); | |||
| wxAuthorizerInfo.setUpdateTime(nowTime); | |||
| wxAuthorizerInfo.setOpenAppid(wxProjectConfig.getOpenAppid()); | |||
| wxAuthorizerInfo.setRefreshToken(""); | |||
| wxAuthorizerInfo.setAccessToken(""); | |||
| wxAuthorizerInfoMapper.insert(wxAuthorizerInfo); | |||
| wxAuthorizerInfo = new WxAuthorizerInfo(); | |||
| wxAuthorizerInfo.setTenantId(wxMall.getTenantId()); | |||
| wxAuthorizerInfo.setType(2); | |||
| wxAuthorizerInfo.setAuthorizerAppid(wxProjectConfig.getAppIdC()); | |||
| wxAuthorizerInfo.setHeadImg(wxProjectConfig.getHeadImgC()); | |||
| wxAuthorizerInfo.setQrcodeUrl(wxProjectConfig.getQrcodeUrlC()); | |||
| wxAuthorizerInfo.setAuthTime(authTime); | |||
| wxAuthorizerInfo.setCreateTime(nowTime); | |||
| wxAuthorizerInfo.setUpdateTime(nowTime); | |||
| wxAuthorizerInfo.setOpenAppid(wxProjectConfig.getOpenAppid()); | |||
| wxAuthorizerInfo.setRefreshToken(""); | |||
| wxAuthorizerInfo.setAccessToken(""); | |||
| wxAuthorizerInfoMapper.insert(wxAuthorizerInfo); | |||
| logger.info("wx_authorizer_info ---------------------init--success"); | |||
| wxAppinfoService.wxAppinfoInit(tenantId,wxPayAccount.getId(),payBillId,wxProjectConfig); | |||
| //生成id | |||
| //final IdWorker idWorker = IdWorker.get(); | |||
| //密码加密 | |||
| PasswordHelper passwordHelper = new PasswordHelper(); | |||
| // 9. mall_user_info mfadmin/m2F@of0 | |||
| // | |||
| logger.info("mall_user_info---------------------init--start"); | |||
| MallUserInfo mallUserInfo = new MallUserInfo(); | |||
| //mallUserInfo.setId(idWorker.nextId()); | |||
| mallUserInfo.setTenantId(wxMall.getTenantId()); | |||
| mallUserInfo.setUsername(wxProjectConfig.getUsernameA()); | |||
| mallUserInfo.setName(wxProjectConfig.getName()); | |||
| //mallUserInfo.setPassword("2ddc17f6073a85dd7d7b030df5392364"); | |||
| mallUserInfo.setPassword(wxProjectConfig.getPassword()); | |||
| passwordHelper.encryptPassword(mallUserInfo); | |||
| mallUserInfo.setCreateTime(nowTime); | |||
| mallUserInfo.setStatus(1); | |||
| mallUserInfo.setIsAdmin(1); | |||
| mallUserInfo.setPhone(wxProjectConfig.getPhone()); | |||
| mallUserInfoMapper.insert(mallUserInfo); | |||
| logger.info("mall_user_info ---------------------init--success"); | |||
| //# 10. mall_role | |||
| logger.info("mall_role---------------------init--start"); | |||
| MallRole mallRole = new MallRole(); | |||
| //mallRole.setId(idWorker.nextId()); | |||
| mallRole.setTenantId(wxMall.getTenantId()); | |||
| mallRole.setName("系统管理员"); | |||
| mallRole.setAvailable("0"); | |||
| mallRoleMapper.insert(mallRole); | |||
| logger.info("mall_role ---------------------init--success"); | |||
| //# 11. mall_role_permission | |||
| //默认给所有权限 | |||
| logger.info("mall_role_permission---------------------init--start"); | |||
| MallPermission mallPermission=new MallPermission(); | |||
| List<MallPermission> list = mallPermissionMapper.findList(mallPermission); | |||
| for(MallPermission m : list){ | |||
| MallRolePermission mallRolePermission = new MallRolePermission(); | |||
| mallRolePermission.setTenantId(wxMall.getTenantId()); | |||
| mallRolePermission.setRoleId(mallRole.getId()); | |||
| mallRolePermission.setPermissionId(m.getId()); | |||
| mallRolePermissionMapper.insert(mallRolePermission); | |||
| } | |||
| // List<MallRolePermission> mallRolePermissionList = new ArrayList<MallRolePermission>(); | |||
| // mallRolePermissionMapper.insertBatch(mallRolePermissionList); | |||
| logger.info("mall_role_permission ---------------------init--success"); | |||
| wxAuthorizerInfoService.wxAuthorizerInfoInit(tenantId,wxProjectConfig); | |||
| wxAuthorizerInfoService.wxWeappExtSetInit(wxProjectConfig); | |||
| // 9. mall_user_info | |||
| // 10. mall_role | |||
| // 11. mall_role_permission | |||
| //# 12. mall_user_role | |||
| logger.info("mall_user_role---------------------init--start"); | |||
| MallUserRole mallUserRole = new MallUserRole(); | |||
| //mallUserRole.setId(idWorker.nextId()); | |||
| mallUserRole.setUid(mallUserInfo.getId()); | |||
| mallUserRole.setRoleId(mallRole.getId()); | |||
| mallUserRoleMapper.insert(mallUserRole); | |||
| logger.info("mall_user_role ---------------------init--success"); | |||
| Long mallUserInfoId = mallUserInfoService.MallUserInfoInit(tenantId, wxProjectConfig); | |||
| //# 13. wx_msg_config | |||
| logger.info("wx_msg_config---------------------init--start"); | |||
| WxMsgConfig wxMsgConfig = new WxMsgConfig(); | |||
| wxMsgConfig.setTenantId(wxMall.getTenantId()); | |||
| 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.setRecharge((long) 0); | |||
| wxMsgConfig.setRemains((long) 100000); | |||
| wxMsgConfig.setTotal((long) 100000); | |||
| wxMsgConfig.setAccount("15626593768"); | |||
| wxMsgConfig.setReminderstatus(0); | |||
| wxMsgConfig.setNotifyurl("https://admin.malls.iformall.com/wxMsgCallback/receivemsg/"+wxMall.getTenantId()); | |||
| wxMsgConfig.setModelnotifyurl("https://admin.malls.iformall.com/wxMsgCallback/receivemodel/"+wxMall.getTenantId()); | |||
| wxMsgConfig.setVerifynotifyurl("https://admin.malls.iformall.com/wxMsgCallback/receiveverifymodel/"+wxMall.getTenantId()); | |||
| wxMsgConfig.setAppid(wxProjectConfig.getAppIdB()); | |||
| wxMsgConfigMapper.insert(wxMsgConfig); | |||
| logger.info("wx_msg_config ---------------------init--success"); | |||
| //# --- 14. ETCP 设置完后再填写此数据 | |||
| wxMsgConfigService.WxMsgConfigInit(tenantId, wxProjectConfig); | |||
| //# ETCP 设置完后再填写此数据 | |||
| //# 14. wx_park | |||
| logger.info("wx_park---------------------init--start"); | |||
| WxPark wxPark = new WxPark(); | |||
| wxPark.setVendorParams("{}"); | |||
| wxPark.setCreateDate(nowTime); | |||
| wxPark.setUpdateDate(nowTime); | |||
| wxPark.setAddr(wxProjectConfig.getName()); | |||
| wxPark.setTenantId(wxMall.getTenantId()); | |||
| wxPark.setNumber(wxMall.getParkPlaceNumber()); | |||
| wxPark.setVendorType(0); | |||
| wxPark.setParkId("0"); | |||
| wxPark.setEntryExit(1); | |||
| wxPark.setStopFee(""); | |||
| wxParkMapper.insert(wxPark); | |||
| logger.info("wx_park ---------------------init--success"); | |||
| wxParkService.wxParkInit(tenantId, wxProjectConfig); | |||
| //# 积分成长值设置wx_score_rules | |||
| logger.info("wx_score_rules---------------------init--start"); | |||
| WxScoreRules wxScoreRules = new WxScoreRules(); | |||
| //wxScoreRules.setId(idWorker.nextId()); | |||
| wxScoreRules.setTenantId(wxMall.getTenantId()); | |||
| wxScoreRules.setRules("[{\"id\": 1, \"desc\": \"每日登陆\", \"step\": 1, \"limit\": 0, \"score\": 0}, {\"id\": 2, \"score\": null, \"childs\": [{\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"餐饮\", \"businessId\": 1}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"娱乐\", \"businessId\": 2}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"服饰\", \"businessId\": 3}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"亲子\", \"businessId\": 4}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"超市\", \"businessId\": 5}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"美妆\", \"businessId\": 7}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"珠宝\", \"businessId\": 8}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"服务\", \"businessId\": 9}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"家居\", \"businessId\": 10}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"数码家电\", \"businessId\": 11}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"其他\", \"businessId\": 6}]}, {\"id\": 3, \"desc\": \"绑定车牌1个\", \"step\": 1, \"limit\": 1, \"score\": 0}, {\"id\": 5, \"desc\": \"授权个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}, {\"id\": 6, \"desc\": \"授权手机号\", \"step\": 1, \"limit\": 1, \"score\": 0}, {\"id\": 7, \"desc\": \"编辑个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}, {\"id\": 8, \"desc\": \"编辑个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}]"); | |||
| wxScoreRules.setCreateDate(nowTime); | |||
| wxScoreRules.setUpdateDate(nowTime); | |||
| wxScoreRules.setType(2); | |||
| wxScoreRules.setClearYear(1); | |||
| wxScoreRules.setScale(10); | |||
| wxScoreRules.setCreditLocked(1); | |||
| wxScoreRulesMapper.insert(wxScoreRules); | |||
| wxScoreRules = new WxScoreRules(); | |||
| wxScoreRules.setTenantId(wxMall.getTenantId()); | |||
| wxScoreRules.setRules("[{\"id\": 1, \"desc\": \"每日登陆\", \"step\": 1, \"limit\": 0, \"score\": 0}, {\"id\": 2, \"score\": 0, \"childs\": [{\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"餐饮\", \"businessId\": 1}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"娱乐\", \"businessId\": 2}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"服饰\", \"businessId\": 3}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"亲子\", \"businessId\": 4}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"超市\", \"businessId\": 5}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"美妆\", \"businessId\": 7}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"珠宝\", \"businessId\": 8}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"服务\", \"businessId\": 9}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"家居\", \"businessId\": 10}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"数码家电\", \"businessId\": 11}, {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"其他\", \"businessId\": 6}]}, {\"id\": 3, \"desc\": \"绑定车牌1个\", \"step\": 1, \"limit\": 1, \"score\": 0}, {\"id\": 5, \"desc\": \"授权个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}, {\"id\": 6, \"desc\": \"授权手机号\", \"step\": 1, \"limit\": 1, \"score\": 0}, {\"id\": 7, \"desc\": \"编辑个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}]"); | |||
| wxScoreRules.setCreateDate(nowTime); | |||
| wxScoreRules.setUpdateDate(nowTime); | |||
| wxScoreRules.setType(1); | |||
| wxScoreRules.setCreditLocked(0); | |||
| wxScoreRulesMapper.insert(wxScoreRules); | |||
| logger.info("wx_score_rules ---------------------init--success"); | |||
| wxScoreRulesService.wxScoreRulesInit(tenantId); | |||
| //# 17. wx_template_msg | |||
| //# C端登录,设置域名 | |||
| //# 设置核销成功通知,核销失败通知 | |||
| logger.info("wx_template_msg---------------------init--start"); | |||
| WxTemplateMsg wxTemplateMsg = new WxTemplateMsg(); | |||
| wxTemplateMsg.setTenantId(wxMall.getTenantId()); | |||
| wxTemplateMsg.setTemplateId(""); | |||
| wxTemplateMsg.setType(1); | |||
| wxTemplateMsg.setCustomParam("{\"index\":[\"keyword1\",\"keyword2\",\"keyword3\",\"keyword4\",\"keyword5\",\"keyword6\",\"keyword7\"],\"keyword1\":\"可抵{keyword1}元\",\"keyword2\":\"{keyword2}\",\"keyword3\":\"{keyword3}\",\"keyword4\":\"{keyword4}\",\"keyword5\":\"{keyword5}元\",\"keyword6\":\"{keyword6}\",\"keyword7\":\"猜也猜不到的优惠,只有幸运的人才能看到,就是你,{keyword7}\\n☟☟☟☟☟☟☟\\n☞ 快看看 ☜\\n☝︎☝︎☝︎☝︎☝︎☝︎☝︎\\n\",\"emphasis\":\"keyword1.DATA\"}"); | |||
| wxTemplateMsg.setCreateDate(nowTime); | |||
| wxTemplateMsg.setUpdateDate(nowTime); | |||
| wxTemplateMsgMapper.insert(wxTemplateMsg); | |||
| wxTemplateMsg.setId(null); | |||
| wxTemplateMsg.setType(2); | |||
| wxTemplateMsg.setCustomParam("{\"index\":[\"keyword1\",\"keyword2\",\"keyword3\",\"keyword4\"],\"keyword1\":\"可抵{keyword1}元\",\"keyword2\":\"{keyword2}\",\"keyword3\":\"{keyword3}\",\"keyword4\":\"猜也猜不到的优惠,只有幸运的人才能看到,就是你,{keyword4}\\n☟☟☟☟☟☟☟\\n☞ 快看看 ☜\\n☝︎☝︎☝︎☝︎☝︎☝︎☝︎\\n\",\"emphasis\":\"keyword1.DATA\"}"); | |||
| wxTemplateMsgMapper.insert(wxTemplateMsg); | |||
| logger.info("wx_template_msg ---------------------init--success"); | |||
| // # 18. wx_wiwide_info -- 迈外迪 服务商后台设置商户(点击获取商户bid),再找迈外迪初始化,收到激活邮件激活后,再在数据库中插入此数据 | |||
| // # 数据格式如下 | |||
| // # szld1086@iformall | |||
| // # 1391054397 | |||
| // # wuguoqiang@iformall.com | |||
| // WxWiWideInfo wxWiWideInfo = new WxWiWideInfo(); | |||
| wxTemplateMsgService.wxTemplateMsgInit(tenantId); | |||
| //# 18. wx_wiwide_info -- 迈外迪 服务商后台设置商户(点击获取商户bid),再找迈外迪初始化,收到激活邮件激活后,再在数据库中插入此数据 | |||
| //# 数据格式如下 | |||
| //# szld1086@iformall | |||
| //# 1391054397 | |||
| //# wuguoqiang@iformall.com | |||
| // # 19. wx_question | |||
| logger.info("wx_question---------------------init--start"); | |||
| @@ -455,30 +113,16 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { | |||
| + "{\"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(wxMall.getTenantId()); | |||
| JSONArray jsonObject = JSON.parseArray(questionJson); | |||
| for (Object object : jsonObject) { | |||
| wxQuestion.setId(null); | |||
| wxQuestion.setContent(object.toString()); | |||
| wxQuestionMapper.insert(wxQuestion); | |||
| } | |||
| logger.info("wx_question ---------------------init--success"); | |||
| wxQuestionService.wxQuestionInit(tenantId,questionJson); | |||
| //# 20. wx_msg_validationcode_model, 数据重新一下 | |||
| //--------EnumMsgModel | |||
| // WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel(); | |||
| // WxFlowConfig wxFlowConfig = new WxFlowConfig(); | |||
| wxMsgValidationcodeModelService.wxMsgValidationcodeModelInit(tenantId, wxProjectConfig); | |||
| //wx_flow_config | |||
| wxFlowService.wxFlowConfigInit(tenantId); | |||
| //初始化成功 删除标记 | |||
| wxProjectConfig.setDelType(10000); | |||
| wxProjectConfigMapper.updateById(wxProjectConfig); | |||
| logger.info("init--success----------------tenantId--"+wxMall.getTenantId()); | |||
| }else { | |||
| logger.info("------数据已初始化"); | |||
| } | |||
| @@ -1,5 +1,7 @@ | |||
| package com.iformall.service.impl; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.IdWorker; | |||
| @@ -31,6 +33,18 @@ public class WxQuestionServiceImpl implements WxQuestionService { | |||
| @Autowired | |||
| WxQuestionLogMapper wxQuestionLogMapper; | |||
| @Override | |||
| public void wxQuestionInit(String tenantId, String questionJson) { | |||
| WxQuestion wxQuestion = new WxQuestion(); | |||
| wxQuestion.setTenantId(tenantId); | |||
| JSONArray jsonObject = JSON.parseArray(questionJson); | |||
| for (Object object : jsonObject) { | |||
| wxQuestion.setId(null); | |||
| wxQuestion.setContent(object.toString()); | |||
| wxQuestionMapper.insert(wxQuestion); | |||
| } | |||
| } | |||
| @Override | |||
| public PageInfo<WxQuestion> listAsPage(WxQuestion record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxQuestionMapper.findList(record)); | |||
| @@ -47,6 +47,61 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||
| @Autowired | |||
| WxMerchantMapper wxMerchantMapper; | |||
| @Override | |||
| public void wxScoreRulesInit(String tenantId) { | |||
| WxScoreRules wxScoreRules = new WxScoreRules(); | |||
| wxScoreRules.setTenantId(tenantId); | |||
| wxScoreRules.setRules("[{\"id\": 1, \"desc\": \"每日登陆\", \"step\": 1, \"limit\": 0, \"score\": 0}," + | |||
| " {\"id\": 2, \"score\": null, \"childs\": " + | |||
| "[{\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"餐饮\", \"businessId\": 1}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"娱乐\", \"businessId\": 2}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"服饰\", \"businessId\": 3}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"亲子\", \"businessId\": 4}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"超市\", \"businessId\": 5}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"美妆\", \"businessId\": 7}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"珠宝\", \"businessId\": 8}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"服务\", \"businessId\": 9}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"家居\", \"businessId\": 10}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"数码家电\", \"businessId\": 11}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"其他\", \"businessId\": 6}]}," + | |||
| " {\"id\": 3, \"desc\": \"绑定车牌1个\", \"step\": 1, \"limit\": 1, \"score\": 0}," + | |||
| " {\"id\": 5, \"desc\": \"授权个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}," + | |||
| " {\"id\": 6, \"desc\": \"授权手机号\", \"step\": 1, \"limit\": 1, \"score\": 0}," + | |||
| " {\"id\": 7, \"desc\": \"编辑个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}," + | |||
| " {\"id\": 8, \"desc\": \"编辑个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}]"); | |||
| wxScoreRules.setCreateDate(new Date()); | |||
| wxScoreRules.setUpdateDate(new Date()); | |||
| wxScoreRules.setType(2); | |||
| wxScoreRules.setClearYear(1); | |||
| wxScoreRules.setScale(10); | |||
| wxScoreRules.setCreditLocked(1); | |||
| wxScoreRulesMapper.insert(wxScoreRules); | |||
| wxScoreRules = new WxScoreRules(); | |||
| wxScoreRules.setTenantId(tenantId); | |||
| wxScoreRules.setRules("[{\"id\": 1, \"desc\": \"每日登陆\", \"step\": 1, \"limit\": 0, \"score\": 0}," + | |||
| " {\"id\": 2, \"score\": 0, \"childs\": " + | |||
| "[{\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"餐饮\", \"businessId\": 1}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"娱乐\", \"businessId\": 2}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"服饰\", \"businessId\": 3}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"亲子\", \"businessId\": 4}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"超市\", \"businessId\": 5}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"美妆\", \"businessId\": 7}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"珠宝\", \"businessId\": 8}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"服务\", \"businessId\": 9}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"家居\", \"businessId\": 10}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"数码家电\", \"businessId\": 11}," + | |||
| " {\"desc\": \"线上交易1元\", \"step\": 1, \"limit\": 0, \"score\": 0, \"title\": \"其他\", \"businessId\": 6}]}," + | |||
| " {\"id\": 3, \"desc\": \"绑定车牌1个\", \"step\": 1, \"limit\": 1, \"score\": 0}," + | |||
| " {\"id\": 5, \"desc\": \"授权个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}," + | |||
| " {\"id\": 6, \"desc\": \"授权手机号\", \"step\": 1, \"limit\": 1, \"score\": 0}," + | |||
| " {\"id\": 7, \"desc\": \"编辑个人信息\", \"step\": 1, \"limit\": 1, \"score\": 0}]"); | |||
| wxScoreRules.setCreateDate(new Date()); | |||
| wxScoreRules.setUpdateDate(new Date()); | |||
| wxScoreRules.setType(1); | |||
| wxScoreRules.setCreditLocked(0); | |||
| wxScoreRulesMapper.insert(wxScoreRules); | |||
| } | |||
| @Override | |||
| public WxScoreRules getScoreRules(TenantEntity tenantEntity) { | |||
| // get pushLime from cache | |||
| @@ -22,6 +22,27 @@ public class WxTemplateMsgServiceImpl implements WxTemplateMsgService { | |||
| WxTemplateMsgMapper wxTemplateMsgMapper; | |||
| @Override | |||
| public void wxTemplateMsgInit(String tenantId) { | |||
| WxTemplateMsg wxTemplateMsg = new WxTemplateMsg(); | |||
| wxTemplateMsg.setTenantId(tenantId); | |||
| wxTemplateMsg.setTemplateId(""); | |||
| wxTemplateMsg.setType(1); | |||
| wxTemplateMsg.setCustomParam("{\"index\":[\"keyword1\",\"keyword2\",\"keyword3\",\"keyword4\",\"keyword5\",\"keyword6\",\"keyword7\"]," + | |||
| "\"keyword1\":\"可抵{keyword1}元\",\"keyword2\":\"{keyword2}\",\"keyword3\":\"{keyword3}\",\"keyword4\":\"{keyword4}\"," + | |||
| "\"keyword5\":\"{keyword5}元\",\"keyword6\":\"{keyword6}\",\"keyword7\":\"猜也猜不到的优惠,只有幸运的人才能看到,就是你," + | |||
| "{keyword7}\\n☟☟☟☟☟☟☟\\n☞ 快看看 ☜\\n☝︎☝︎☝︎☝︎☝︎☝︎☝︎\\n\",\"emphasis\":\"keyword1.DATA\"}"); | |||
| wxTemplateMsg.setCreateDate(new Date()); | |||
| wxTemplateMsg.setUpdateDate(new Date()); | |||
| wxTemplateMsgMapper.insert(wxTemplateMsg); | |||
| wxTemplateMsg.setId(null); | |||
| wxTemplateMsg.setType(2); | |||
| wxTemplateMsg.setCustomParam("{\"index\":[\"keyword1\",\"keyword2\",\"keyword3\",\"keyword4\"],\"keyword1\":\"可抵{keyword1}元\"," + | |||
| "\"keyword2\":\"{keyword2}\",\"keyword3\":\"{keyword3}\",\"keyword4\":\"猜也猜不到的优惠,只有幸运的人才能看到,就是你," + | |||
| "{keyword4}\\n☟☟☟☟☟☟☟\\n☞ 快看看 ☜\\n☝︎☝︎☝︎☝︎☝︎☝︎☝︎\\n\",\"emphasis\":\"keyword1.DATA\"}"); | |||
| wxTemplateMsgMapper.insert(wxTemplateMsg); | |||
| } | |||
| @Override | |||
| public PageInfo<WxTemplateMsg> listAsPage(WxTemplateMsg record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxTemplateMsgMapper.findList(record)); | |||
| @@ -13,7 +13,7 @@ | |||
| <result column="create_date" property="createDate" /> | |||
| <result column="update_date" property="updateDate" /> | |||
| <collection fetchType="eager" property="childs" ofType="WxFlowConfig" column="id" select="findChildList"/> | |||
| <collection fetchType="eager" property="childs" ofType="com.iformall.domain.po.WxFlowConfig" column="id" select="findChildList"/> | |||
| </resultMap> | |||
| @@ -33,7 +33,7 @@ | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="findChildList" resultType="WxFlowConfig"> | |||
| <select id="findChildList" resultType="com.iformall.domain.po.WxFlowConfig"> | |||
| SELECT * FROM wx_flow_config WHERE parent_id = #{id} ORDER BY sort ASC | |||
| </select> | |||
| @@ -41,7 +41,9 @@ | |||
| update wx_flow_config set update_date = now() where model_id = #{modelId} | |||
| </update> | |||
| <select id="wxFlowConfigInit" parameterType="String"> | |||
| ${initSql} | |||
| </select> | |||
| </mapper> | |||
| @@ -53,9 +53,8 @@ | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <select id="wxMsgValidationcodeModelInit" parameterType="String"> | |||
| ${initSql} | |||
| </select> | |||
| </mapper> | |||