This commit is contained in:
guohb
2024-05-10 17:34:42 +08:00
parent d5eb2b9def
commit 5c59b62fbb
6 changed files with 65 additions and 14 deletions

View File

@@ -38,6 +38,8 @@ public enum MessageEnum {
MESSAGE_20("您有一个门店的加盟合同审核未通过,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"), MESSAGE_20("您有一个门店的加盟合同审核未通过,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
MESSAGE_21("加盟商已登记一位员工,请及时安排培训", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"), MESSAGE_21("加盟商已登记一位员工,请及时安排培训", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
MESSAGE_22("您收到一位员工由您带教,请查收", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"), MESSAGE_22("您收到一位员工由您带教,请查收", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
MESSAGE_23("您有一个门店待发布加盟费/保证金账单,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
; ;
private String title; private String title;
@@ -78,7 +80,6 @@ public enum MessageEnum {
switch (this) { switch (this) {
case MESSAGE_1: case MESSAGE_1:
case MESSAGE_2: case MESSAGE_2:
case MESSAGE_3:
case MESSAGE_4: case MESSAGE_4:
case MESSAGE_5: case MESSAGE_5:
case MESSAGE_6: case MESSAGE_6:
@@ -87,6 +88,7 @@ public enum MessageEnum {
case MESSAGE_9: case MESSAGE_9:
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId="+ corpId + "&appUrl=" + return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId="+ corpId + "&appUrl=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=clue&timestamp="+System.currentTimeMillis()+"&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name()); URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=clue&timestamp="+System.currentTimeMillis()+"&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name());
case MESSAGE_3:
case MESSAGE_10: case MESSAGE_10:
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId="+ corpId + "&appUrl=" + return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId="+ corpId + "&appUrl=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=interview&timestamp="+System.currentTimeMillis()+"&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name()); URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=interview&timestamp="+System.currentTimeMillis()+"&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name());
@@ -102,10 +104,15 @@ public enum MessageEnum {
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=pointPush&timestamp="+System.currentTimeMillis()+"&lineId="+ paramMap.get("lineId"), StandardCharsets.UTF_8.name()); URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=pointPush&timestamp="+System.currentTimeMillis()+"&lineId="+ paramMap.get("lineId"), StandardCharsets.UTF_8.name());
case MESSAGE_15: case MESSAGE_15:
case MESSAGE_16: case MESSAGE_16:
case MESSAGE_17:
case MESSAGE_18: case MESSAGE_18:
case MESSAGE_19: case MESSAGE_19:
case MESSAGE_20: case MESSAGE_20:
case MESSAGE_23:
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=franchiseeDetails&timestamp="+System.currentTimeMillis()+"&lineId="+ paramMap.get("lineId"), StandardCharsets.UTF_8.name());
case MESSAGE_17:
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" +
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=license&timestamp="+System.currentTimeMillis()+"&shopId="+ paramMap.get("shopId"), StandardCharsets.UTF_8.name());
case MESSAGE_21: case MESSAGE_21:
case MESSAGE_22: case MESSAGE_22:
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" + return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" +

View File

@@ -7,10 +7,7 @@ import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.RegionDao; import com.cool.store.dao.RegionDao;
import com.cool.store.dao.ShopStageInfoDAO; import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.AuditTypeEnum; import com.cool.store.enums.*;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.SMSMsgEnum;
import com.cool.store.enums.UserRoleEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum; import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.*; import com.cool.store.mapper.*;
@@ -85,6 +82,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
@Resource @Resource
LineInfoMapper lineInfoMapper; LineInfoMapper lineInfoMapper;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean submitLicense(SubmitLicenseRequest request, PartnerUserInfoVO user) { public Boolean submitLicense(SubmitLicenseRequest request, PartnerUserInfoVO user) {
@@ -108,6 +106,14 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
shopAuditInfoDO.setDataType(0); shopAuditInfoDO.setDataType(0);
shopAuditInfoMapper.insertSelective(shopAuditInfoDO); shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_41, null); shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_41, null);
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
Map<String, String> requestMap = new HashMap<>();
requestMap.put("shopId",String.valueOf(request.getShopId()));
requestMap.put("storeName",shopInfoDO.getShopName());
requestMap.put("partnerName,",lineInfoDO.getUsername());
requestMap.put("partnerMobile",lineInfoDO.getMobile());
commonService.sendMessage(Arrays.asList(shopInfoDO.getSupervisorUserId()), MessageEnum.MESSAGE_17,requestMap);
} }
return true; return true;
} }

View File

@@ -6,6 +6,7 @@ import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.ShopStageInfoDAO; import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.AuditTypeEnum; import com.cool.store.enums.AuditTypeEnum;
import com.cool.store.enums.MessageEnum;
import com.cool.store.enums.SMSMsgEnum; import com.cool.store.enums.SMSMsgEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum; import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.mapper.*; import com.cool.store.mapper.*;
@@ -20,6 +21,9 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects; import java.util.Objects;
@Service @Service
@@ -116,6 +120,15 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByPrimaryKey(request.getId()); FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByPrimaryKey(request.getId());
franchiseFeeDO.setAuditId(shopAuditInfoDO.getId()); franchiseFeeDO.setAuditId(shopAuditInfoDO.getId());
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO); franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
Map<String, String> requestMap = new HashMap<>();
requestMap.put("storeName",shopInfoDO.getShopName());
requestMap.put("partnerName",lineInfoDO.getUsername());
requestMap.put("partnerMobile",lineInfoDO.getMobile());
requestMap.put("lineId",String.valueOf(lineInfoDO.getId()));
commonService.sendMessage(Arrays.asList(lineInfoDO.getInvestmentManager()), MessageEnum.MESSAGE_18,requestMap);
return true; return true;
} }
} }

View File

@@ -6,11 +6,9 @@ import com.cool.store.dao.HyPartnerUserInfoDAO;
import com.cool.store.dao.LineInfoDAO; import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.LinePayDAO; import com.cool.store.dao.LinePayDAO;
import com.cool.store.dao.ShopStageInfoDAO; import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.FranchiseFeeDO; import com.cool.store.entity.*;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.LinePayDO;
import com.cool.store.enums.ErrorCodeEnum; import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.MessageEnum;
import com.cool.store.enums.WorkflowSubStageEnum; import com.cool.store.enums.WorkflowSubStageEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum; import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.enums.point.PayBusinessTypeEnum; import com.cool.store.enums.point.PayBusinessTypeEnum;
@@ -19,6 +17,7 @@ import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException; import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.FranchiseFeeMapper; import com.cool.store.mapper.FranchiseFeeMapper;
import com.cool.store.mapper.LineInfoMapper; import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.mapper.ShopInfoMapper;
import com.cool.store.request.LinePaySubmitRequest; import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.service.LinePayService; import com.cool.store.service.LinePayService;
import com.cool.store.utils.poi.StringUtils; import com.cool.store.utils.poi.StringUtils;
@@ -31,9 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date; import java.util.*;
import java.util.List;
import java.util.Objects;
/** /**
* @Author wxp * @Author wxp
@@ -56,6 +53,12 @@ public class LinePayServiceImpl implements LinePayService {
@Resource @Resource
ShopStageInfoDAO shopStageInfoDAO; ShopStageInfoDAO shopStageInfoDAO;
@Resource
CommonService commonService;
@Resource
ShopInfoMapper shopInfoMapper;
@Override @Override
public LinePayVO getLinePayInfo(Long lineId, Integer businessType, Long shopId) { public LinePayVO getLinePayInfo(Long lineId, Integer businessType, Long shopId) {
LinePayVO result = null; LinePayVO result = null;
@@ -87,6 +90,14 @@ public class LinePayServiceImpl implements LinePayService {
} }
franchiseFeeDO.setPayId(payId); franchiseFeeDO.setPayId(payId);
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO); franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72);
Map<String, String> requestMap = new HashMap<>();
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
requestMap.put("storeName",shopInfoDO.getShopName());
requestMap.put("partnerName",lineInfo.getUsername());
requestMap.put("partnerMobile",lineInfo.getMobile());
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_20,requestMap);
} }
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) { if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode()); lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode());

View File

@@ -958,7 +958,10 @@ public class PointServiceImpl implements PointService {
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.LICENSE_SUBMITTED); commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.LICENSE_SUBMITTED);
//发送工作通知 //发送工作通知
Map<String, String> requestMap = new HashMap<>(); Map<String, String> requestMap = new HashMap<>();
//todo requestMap参数 requestMap.put("storeName",shopInfo.getShopName());
requestMap.put("partnerName",lineInfo.getUsername());
requestMap.put("partnerMobile",lineInfo.getMobile());
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()),MessageEnum.MESSAGE_16,requestMap); commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()),MessageEnum.MESSAGE_16,requestMap);
} }
return shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, subStageStatus, auditId); return shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, subStageStatus, auditId);

View File

@@ -78,6 +78,9 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
@Resource @Resource
PreparationService preparationService; PreparationService preparationService;
@Resource
CommonService commonService;
@Override @Override
public Boolean auditResult(AuditResultRequest request) { public Boolean auditResult(AuditResultRequest request) {
log.info("SignFranchiseServiceImpl auditResult request{}", JSONObject.toJSONString(request)); log.info("SignFranchiseServiceImpl auditResult request{}", JSONObject.toJSONString(request));
@@ -96,6 +99,14 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
if (request.getAuditResult() == Constants.ZERO_INTEGER){ if (request.getAuditResult() == Constants.ZERO_INTEGER){
shopAuditInfoDO.setResultType(Constants.ONE_INTEGER); shopAuditInfoDO.setResultType(Constants.ONE_INTEGER);
shopAuditInfoDO.setRejectReason(request.getCause()); shopAuditInfoDO.setRejectReason(request.getCause());
Map<String, String> requestMap = new HashMap<>();
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
requestMap.put("storeName",shopInfoDO.getShopName());
requestMap.put("partnerName",lineInfo.getUsername());
requestMap.put("partnerMobile",lineInfo.getMobile());
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_19,requestMap);
}else if (request.getAuditResult() == Constants.ONE_INTEGER){ }else if (request.getAuditResult() == Constants.ONE_INTEGER){
shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER); shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER);
shopAuditInfoDO.setPassReason(request.getCause()); shopAuditInfoDO.setPassReason(request.getCause());