接口加拦截
This commit is contained in:
@@ -7,6 +7,7 @@ import com.cool.store.context.LoginUserInfo;
|
|||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
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.request.OpeningOperationPlanAuditRequest;
|
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||||
@@ -55,6 +56,10 @@ public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanS
|
|||||||
log.error("auditPlan request is null");
|
log.error("auditPlan request is null");
|
||||||
throw new ServiceException("auditPlan request is null");
|
throw new ServiceException("auditPlan request is null");
|
||||||
}
|
}
|
||||||
|
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_14);
|
||||||
|
if (!shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141.getShopSubStageStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
ShopAuditInfoDO shopAuditInfoDO = request.toShopAuditInfoDO();
|
ShopAuditInfoDO shopAuditInfoDO = request.toShopAuditInfoDO();
|
||||||
shopAuditInfoDO.setSubmittedUserId(user.getUserId());
|
shopAuditInfoDO.setSubmittedUserId(user.getUserId());
|
||||||
|
|||||||
@@ -303,10 +303,12 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
}
|
}
|
||||||
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
||||||
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
||||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
|
||||||
doThing(deskStageMap, subStageList);
|
doThing(deskStageMap, subStageList);
|
||||||
for (PreparationCommonPendingVO vo : list) {
|
for (PreparationCommonPendingVO vo : list) {
|
||||||
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
if (deskStageMap.get(vo.getShopId()) != null) {
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pageInfo.setList(list);
|
pageInfo.setList(list);
|
||||||
return pageInfo;
|
return pageInfo;
|
||||||
@@ -324,10 +326,12 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
}
|
}
|
||||||
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
||||||
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
||||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
|
||||||
doThing(deskStageMap, subStageList);
|
doThing(deskStageMap, subStageList);
|
||||||
for (PreparationCommonPendingVO vo : list) {
|
for (PreparationCommonPendingVO vo : list) {
|
||||||
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
if (deskStageMap.get(vo.getShopId()) != null) {
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pageInfo.setList(list);
|
pageInfo.setList(list);
|
||||||
return pageInfo;
|
return pageInfo;
|
||||||
@@ -345,10 +349,12 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
}
|
}
|
||||||
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
||||||
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
||||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
|
||||||
doThing(deskStageMap, subStageList);
|
doThing(deskStageMap, subStageList);
|
||||||
for (PreparationCommonPendingVO vo : list) {
|
for (PreparationCommonPendingVO vo : list) {
|
||||||
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
if (deskStageMap.get(vo.getShopId()) != null) {
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pageInfo.setList(list);
|
pageInfo.setList(list);
|
||||||
return pageInfo;
|
return pageInfo;
|
||||||
@@ -365,10 +371,12 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
}
|
}
|
||||||
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
|
||||||
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
|
||||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
|
||||||
doThing(deskStageMap, subStageList);
|
doThing(deskStageMap, subStageList);
|
||||||
for (PreparationCommonPendingVO vo : list) {
|
for (PreparationCommonPendingVO vo : list) {
|
||||||
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
if (deskStageMap.get(vo.getShopId()) != null) {
|
||||||
|
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pageInfo.setList(list);
|
pageInfo.setList(list);
|
||||||
return pageInfo;
|
return pageInfo;
|
||||||
|
|||||||
@@ -5,6 +5,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.*;
|
import com.cool.store.enums.*;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
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.*;
|
||||||
@@ -54,6 +55,10 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean submitLicense(FranchiseFeeRequest request) {
|
public Boolean submitLicense(FranchiseFeeRequest request) {
|
||||||
log.info("submitLicense request:{}", JSONObject.toJSONString(request));
|
log.info("submitLicense request:{}", JSONObject.toJSONString(request));
|
||||||
|
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);
|
||||||
|
if (!shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
FranchiseFeeDO franchiseFeeDO = request.toFranchiseFeeDO();
|
FranchiseFeeDO franchiseFeeDO = request.toFranchiseFeeDO();
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71);
|
||||||
if (request.getId() != null) {
|
if (request.getId() != null) {
|
||||||
@@ -112,6 +117,10 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user) {
|
public Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user) {
|
||||||
|
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);
|
||||||
|
if (!shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||||
shopAuditInfoDO.setShopId(request.getShopId());
|
shopAuditInfoDO.setShopId(request.getShopId());
|
||||||
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
|
ShopSubStageStatusEnum shopSubStageStatusEnum = null;
|
||||||
|
|||||||
@@ -143,6 +143,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo, String userId) {
|
||||||
|
if (!lineInfo.getWorkflowStage().equals(WorkflowStageEnum.INTENT.getCode())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
lineInfo.setId(lineInfo.getId());
|
lineInfo.setId(lineInfo.getId());
|
||||||
lineInfo.setWorkflowStage(WorkflowStageEnum.STORE.getCode());
|
lineInfo.setWorkflowStage(WorkflowStageEnum.STORE.getCode());
|
||||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode());
|
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode());
|
||||||
|
|||||||
@@ -950,6 +950,10 @@ public class PointServiceImpl implements PointService {
|
|||||||
if(!ShopStageEnum.SHOP_STAGE_1.getShopStage().equals(shopInfo.getShopStage())){
|
if(!ShopStageEnum.SHOP_STAGE_1.getShopStage().equals(shopInfo.getShopStage())){
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||||
}
|
}
|
||||||
|
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_2);
|
||||||
|
if (!shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
//正新放开限制
|
//正新放开限制
|
||||||
// if(!request.getOperateUserId().equals(lineInfo.getDevelopmentManager())){
|
// if(!request.getOperateUserId().equals(lineInfo.getDevelopmentManager())){
|
||||||
|
|||||||
@@ -197,6 +197,9 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
|||||||
@Override
|
@Override
|
||||||
public void registrationCompleted(Long shopId) {
|
public void registrationCompleted(Long shopId) {
|
||||||
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_5);
|
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_5);
|
||||||
|
if (!shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50.getShopSubStageStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
if(shopStageInfoDO != null){
|
if(shopStageInfoDO != null){
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_51);
|
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_51);
|
||||||
//状态结束
|
//状态结束
|
||||||
|
|||||||
Reference in New Issue
Block a user