fix
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: StorageStatusEnum
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-30 13:47
|
||||||
|
*/
|
||||||
|
public enum StorageStatusEnum {
|
||||||
|
|
||||||
|
//入库状态1已入库 2暂未入库
|
||||||
|
IN_STORAGE(1, "已入库"),
|
||||||
|
NOT_IN_STORAGE(2, "暂未入库"),
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
StorageStatusEnum(Integer code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
<result column="city" jdbcType="VARCHAR" property="city" />
|
<result column="city" jdbcType="VARCHAR" property="city" />
|
||||||
<result column="district" jdbcType="VARCHAR" property="district" />
|
<result column="district" jdbcType="VARCHAR" property="district" />
|
||||||
<result column="township" jdbcType="VARCHAR" property="township" />
|
<result column="township" jdbcType="VARCHAR" property="township" />
|
||||||
|
<result column="storage_status" jdbcType="TINYINT" property="storageStatus" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="allColumn">
|
<sql id="allColumn">
|
||||||
@@ -79,11 +80,8 @@
|
|||||||
#{pointStatus}
|
#{pointStatus}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.storageStatus != null and request.storageStatus == 1">
|
<if test="request.storageStatus != null">
|
||||||
and point_status in (4,5,6,7)
|
and storage_status = #{request.storageStatus}
|
||||||
</if>
|
|
||||||
<if test="request.storageStatus != null and request.storageStatus == 2">
|
|
||||||
and point_status in (1,2,3,7)
|
|
||||||
</if>
|
</if>
|
||||||
<if test="request.operateUserId != null and request.operateUserId != ''">
|
<if test="request.operateUserId != null and request.operateUserId != ''">
|
||||||
and operate_user_id = #{request.operateUserId}
|
and operate_user_id = #{request.operateUserId}
|
||||||
|
|||||||
@@ -152,4 +152,7 @@ public class PointInfoDO {
|
|||||||
@Column(name = "township")
|
@Column(name = "township")
|
||||||
private String township;
|
private String township;
|
||||||
|
|
||||||
|
@Column(name = "入库状态 入库状态1已入库 2暂未入库")
|
||||||
|
private Integer storageStatus;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.cool.store.request;
|
|||||||
|
|
||||||
import com.cool.store.entity.PointDetailInfoDO;
|
import com.cool.store.entity.PointDetailInfoDO;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
import com.cool.store.entity.PointInfoDO;
|
||||||
|
import com.cool.store.enums.StorageStatusEnum;
|
||||||
import com.cool.store.utils.GeoMapUtil;
|
import com.cool.store.utils.GeoMapUtil;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -306,6 +307,7 @@ public class AddPointDetailRequest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
result.setStorageStatus(StorageStatusEnum.NOT_IN_STORAGE.getCode());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.request;
|
|||||||
|
|
||||||
import com.cool.store.entity.PointDetailInfoDO;
|
import com.cool.store.entity.PointDetailInfoDO;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
import com.cool.store.entity.PointInfoDO;
|
||||||
|
import com.cool.store.enums.StorageStatusEnum;
|
||||||
import com.cool.store.utils.GeoMapUtil;
|
import com.cool.store.utils.GeoMapUtil;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -122,6 +123,7 @@ public class MiniAddPointRequest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
result.setStorageStatus(StorageStatusEnum.NOT_IN_STORAGE.getCode());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import java.io.UnsupportedEncodingException;
|
|||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -108,11 +109,11 @@ public class CommonService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendSms(String poneNumber, SMSMsgEnum templateCode, JSONObject templateParam){
|
public void sendSms(String poneNumber, SMSMsgEnum templateCode, List<JSONObject> templateParamList){
|
||||||
sendSms(Arrays.asList(poneNumber), templateCode, templateParam);
|
sendSms(Arrays.asList(poneNumber), templateCode, templateParamList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendSms(List<String> poneNumbers, SMSMsgEnum templateCode, JSONObject templateParam){
|
public void sendSms(List<String> poneNumbers, SMSMsgEnum templateCode, List<JSONObject> templateParamList){
|
||||||
AsyncClient client = null;
|
AsyncClient client = null;
|
||||||
try {
|
try {
|
||||||
StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
|
StaticCredentialProvider provider = StaticCredentialProvider.create(Credential.builder()
|
||||||
@@ -131,10 +132,8 @@ public class CommonService {
|
|||||||
.phoneNumberJson(JSONObject.toJSONString(poneNumbers))
|
.phoneNumberJson(JSONObject.toJSONString(poneNumbers))
|
||||||
.signNameJson(JSONObject.toJSONString(Arrays.asList(signName)))
|
.signNameJson(JSONObject.toJSONString(Arrays.asList(signName)))
|
||||||
.templateCode(templateCode.getTemplateCode())
|
.templateCode(templateCode.getTemplateCode())
|
||||||
|
.templateParamJson(JSONObject.toJSONString(templateParamList))
|
||||||
.build();
|
.build();
|
||||||
if(Objects.nonNull(templateParam)){
|
|
||||||
sendBatchSmsRequest.toBuilder().templateParamJson(templateParam.toJSONString());
|
|
||||||
}
|
|
||||||
CompletableFuture<SendBatchSmsResponse> response = client.sendBatchSms(sendBatchSmsRequest);
|
CompletableFuture<SendBatchSmsResponse> response = client.sendBatchSms(sendBatchSmsRequest);
|
||||||
SendBatchSmsResponse resp = response.get();
|
SendBatchSmsResponse resp = response.get();
|
||||||
log.info("短信发送response:{}", JSONObject.toJSONString(resp));
|
log.info("短信发送response:{}", JSONObject.toJSONString(resp));
|
||||||
|
|||||||
@@ -392,11 +392,11 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
WorkflowSubStageStatusEnum workflowSubStageStatus = null;
|
WorkflowSubStageStatusEnum workflowSubStageStatus = null;
|
||||||
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
||||||
workflowSubStageStatus = WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_42;
|
workflowSubStageStatus = WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_42;
|
||||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.FIRST_INTERVIEW_REAPPOINTMENT, new JSONObject());
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.FIRST_INTERVIEW_REAPPOINTMENT, null);
|
||||||
}
|
}
|
||||||
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.getCode().equals(lineInfo.getWorkflowSubStage())){
|
||||||
workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_120;
|
workflowSubStageStatus = WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_120;
|
||||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SECOND_INTERVIEW_REAPPOINTMENT, new JSONObject());
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SECOND_INTERVIEW_REAPPOINTMENT, null);
|
||||||
}
|
}
|
||||||
return lineInfoDAO.updateWorkflowStage(lineInfo.getId(), null, workflowSubStageStatus,null);
|
return lineInfoDAO.updateWorkflowStage(lineInfo.getId(), null, workflowSubStageStatus,null);
|
||||||
}
|
}
|
||||||
@@ -417,14 +417,14 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
if(WorkflowSubStageEnum.INVITING_INTERVIEWS.equals(workflowSubStageEnum)){
|
if(WorkflowSubStageEnum.INVITING_INTERVIEWS.equals(workflowSubStageEnum)){
|
||||||
//更新线索阶段
|
//更新线索阶段
|
||||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
|
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
|
||||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_SUCCESS, new JSONObject());
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_SUCCESS, null);
|
||||||
}
|
}
|
||||||
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.equals(workflowSubStageEnum)){
|
if(WorkflowSubStageEnum.FIRST_INTERVIEWS.equals(workflowSubStageEnum)){
|
||||||
//更新线索阶段
|
//更新线索阶段
|
||||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
|
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(),userId);
|
||||||
//一审稽核
|
//一审稽核
|
||||||
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.ONE.getCode());
|
auditStatusService.insert(lineInfo.getId(),interviewInfo.getId(),auditId,AuditStageEnum.ONE.getCode());
|
||||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTENTION_PAYMENT, new JSONObject());
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.INTENTION_PAYMENT, null);
|
||||||
}
|
}
|
||||||
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.equals(workflowSubStageEnum)){
|
if(WorkflowSubStageEnum.SECOND_INTERVIEWS.equals(workflowSubStageEnum)){
|
||||||
LineInfoDO updateLine = new LineInfoDO();
|
LineInfoDO updateLine = new LineInfoDO();
|
||||||
|
|||||||
@@ -346,6 +346,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
//删除剩余未完成的审核记录
|
//删除剩余未完成的审核记录
|
||||||
pointAuditRecordDAO.deletePointAuditRecord(pointId, pointInfo.getSubmitAuditCount());
|
pointAuditRecordDAO.deletePointAuditRecord(pointId, pointInfo.getSubmitAuditCount());
|
||||||
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_2.getCode());
|
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_2.getCode());
|
||||||
|
updatePoint.setStorageStatus(StorageStatusEnum.NOT_IN_STORAGE.getCode());
|
||||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_12, pointInfo.getPointName(), pointInfo.getAddress(), request.getReason());
|
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_12, pointInfo.getPointName(), pointInfo.getAddress(), request.getReason());
|
||||||
return pointInfoDAO.updatePointInfo(updatePoint);
|
return pointInfoDAO.updatePointInfo(updatePoint);
|
||||||
}
|
}
|
||||||
@@ -365,6 +366,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
}
|
}
|
||||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, pointInfo.getPointName(), pointInfo.getAddress());
|
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, pointInfo.getPointName(), pointInfo.getAddress());
|
||||||
}
|
}
|
||||||
|
updatePoint.setStorageStatus(StorageStatusEnum.IN_STORAGE.getCode());
|
||||||
return pointInfoDAO.updatePointInfo(updatePoint);
|
return pointInfoDAO.updatePointInfo(updatePoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,7 +379,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
|
shopStageInfoDAO.batchUpdateShopStageStatus(pointInfo.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_12, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20));
|
||||||
JSONObject templateParam = new JSONObject();
|
JSONObject templateParam = new JSONObject();
|
||||||
templateParam.put("pointName", pointInfo.getAddress());
|
templateParam.put("pointName", pointInfo.getAddress());
|
||||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, templateParam);
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, Arrays.asList(templateParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -754,7 +756,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
JSONObject templateParam = new JSONObject();
|
JSONObject templateParam = new JSONObject();
|
||||||
templateParam.put("pointName", pointInfo.getAddress());
|
templateParam.put("pointName", pointInfo.getAddress());
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, templateParam);
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.SELECT_SUCCESS, Arrays.asList(templateParam));
|
||||||
}
|
}
|
||||||
updateStatusList.add(selectStatus);
|
updateStatusList.add(selectStatus);
|
||||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, updateStatusList);
|
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, updateStatusList);
|
||||||
@@ -893,7 +895,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
ShopSubStageStatusEnum subStageStatus = AuditResultTypeEnum.PASS.getCode().equals(request.getResultType()) ? ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23 : ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22;
|
ShopSubStageStatusEnum subStageStatus = AuditResultTypeEnum.PASS.getCode().equals(request.getResultType()) ? ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23 : ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22;
|
||||||
if(AuditResultTypeEnum.REJECT.getCode().equals(request.getResultType())){
|
if(AuditResultTypeEnum.REJECT.getCode().equals(request.getResultType())){
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.RENT_CONTRACT_AUDIT_FAIL, new JSONObject());
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.RENT_CONTRACT_AUDIT_FAIL, null);
|
||||||
}
|
}
|
||||||
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23.equals(subStageStatus)){
|
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23.equals(subStageStatus)){
|
||||||
//审核通过铺位变为已签约
|
//审核通过铺位变为已签约
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.cool.store.dao.*;
|
|||||||
import com.cool.store.dto.OpenCityDTO;
|
import com.cool.store.dto.OpenCityDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.MessageEnum;
|
import com.cool.store.enums.MessageEnum;
|
||||||
|
import com.cool.store.enums.SMSMsgEnum;
|
||||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.ShopService;
|
import com.cool.store.service.ShopService;
|
||||||
@@ -39,6 +40,14 @@ public class PCTestController {
|
|||||||
return ResponseResult.success(Boolean.FALSE);
|
return ResponseResult.success(Boolean.FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/sendSms")
|
||||||
|
public ResponseResult<Boolean> sendSms(){
|
||||||
|
JSONObject templateParam = new JSONObject();
|
||||||
|
templateParam.put("pointName", "杭州市西湖区");
|
||||||
|
commonService.sendSms("17681878615", SMSMsgEnum.RENT_CONTRACT_AUDIT_FAIL, null);
|
||||||
|
return ResponseResult.success(Boolean.FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/initShop")
|
@GetMapping("/initShop")
|
||||||
public ResponseResult<Boolean> initShop(@RequestParam("lineId")Long lineId){
|
public ResponseResult<Boolean> initShop(@RequestParam("lineId")Long lineId){
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||||
|
|||||||
Reference in New Issue
Block a user