feat:选址阶段 地址优化
This commit is contained in:
@@ -841,6 +841,18 @@ public class PointServiceImpl implements PointService {
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_IS_SELECTED);
|
||||
}
|
||||
PointInfoDO updatePoint = new PointInfoDO();
|
||||
if (StringUtils.isNotBlank(shopInfo.getProvince())){
|
||||
updatePoint.setProvince(shopInfo.getProvince());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getCity())){
|
||||
updatePoint.setCity(shopInfo.getCity());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDistrict())){
|
||||
updatePoint.setDistrict(shopInfo.getDistrict());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDetailAddress())){
|
||||
updatePoint.setAddress(shopInfo.getDetailAddress());
|
||||
}
|
||||
updatePoint.setId(pointId);
|
||||
updatePoint.setSelectStatus(SelectStatusEnum.SELECT_STATUS_1.getCode());
|
||||
updatePoint.setLineId(lineId);
|
||||
@@ -950,6 +962,18 @@ public class PointServiceImpl implements PointService {
|
||||
//更新店铺所处阶段
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfo.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11);
|
||||
PointInfoDO updatePoint = new PointInfoDO();
|
||||
if (StringUtils.isNotBlank(shopInfo.getProvince())){
|
||||
updatePoint.setProvince(shopInfo.getProvince());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getCity())){
|
||||
updatePoint.setCity(shopInfo.getCity());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDistrict())){
|
||||
updatePoint.setDistrict(shopInfo.getDistrict());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDetailAddress())){
|
||||
updatePoint.setAddress(shopInfo.getDetailAddress());
|
||||
}
|
||||
updatePoint.setId(pointId);
|
||||
updatePoint.setShopId(shopInfo.getId());
|
||||
pointInfoDAO.updatePointInfo(updatePoint);
|
||||
|
||||
@@ -43,7 +43,7 @@ import static com.cool.store.enums.UserRoleEnum.*;
|
||||
public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResultService {
|
||||
|
||||
@Resource
|
||||
private PointInfoDAO pointInfoDAO;
|
||||
private PointInfoDAO pointInfoDAO;
|
||||
@Resource
|
||||
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
||||
@Resource
|
||||
@@ -171,9 +171,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
PointInfoDO pointInfoById = pointInfoDAO.getPointInfoById(shopInfoDO.getPointId());
|
||||
if (Objects.isNull(pointInfoById)){
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_SELECT);
|
||||
}
|
||||
String lockKey = "submitSignFranchise:" + request.getShopId();
|
||||
//流水
|
||||
String lockValue = UUID.randomUUID().toString();
|
||||
@@ -226,7 +223,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean reSubmitSignFranchise(AddSignFranchiseRequest request, LoginUserInfo user) {
|
||||
@@ -239,9 +235,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
PointInfoDO pointInfoById = pointInfoDAO.getPointInfoById(shopInfoDO.getPointId());
|
||||
if (Objects.isNull(pointInfoById)){
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_SELECT);
|
||||
}
|
||||
SignFranchiseDO signFranchiseDO = request.toSignFranchiseDO();
|
||||
//修改信息
|
||||
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
||||
@@ -286,18 +279,20 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
shopInfoDO.setUpdateTime(new Date());
|
||||
shopInfoDO.setStoreType(request.getStoreType());
|
||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||
pointInfoById.setProvince(request.getProvince());
|
||||
pointInfoById.setCity(request.getCity());
|
||||
pointInfoById.setDistrict(request.getDistrict());
|
||||
pointInfoById.setAddress(request.getDetailAddress());
|
||||
pointInfoById.setUpdateTime(new Date());
|
||||
pointInfoDAO.updatePointInfo(pointInfoById);
|
||||
if (Objects.nonNull(pointInfoById)) {
|
||||
pointInfoById.setProvince(request.getProvince());
|
||||
pointInfoById.setCity(request.getCity());
|
||||
pointInfoById.setDistrict(request.getDistrict());
|
||||
pointInfoById.setAddress(request.getDetailAddress());
|
||||
pointInfoById.setUpdateTime(new Date());
|
||||
pointInfoDAO.updatePointInfo(pointInfoById);
|
||||
}
|
||||
OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(request.getShopId());
|
||||
if (Objects.isNull(orderSysInfoDO)){
|
||||
if (Objects.isNull(orderSysInfoDO)) {
|
||||
orderSysInfoDO = new OrderSysInfoDO();
|
||||
orderSysInfoDO.setShopId(request.getShopId());
|
||||
orderSysInfoDAO.insertSelective(orderSysInfoDO);
|
||||
}else{
|
||||
} else {
|
||||
//同步建店资料地址
|
||||
orderSysInfoDO.setAddresseeAddress(request.getDetailAddress());
|
||||
orderSysInfoDO.setAddresseeCity(request.getCity());
|
||||
@@ -306,6 +301,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
orderSysInfoDAO.updateAddresseeAddress(orderSysInfoDO);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddSignFranchiseResponse getSignFranchise(Long shopId) {
|
||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||
@@ -557,7 +553,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
|
||||
@Override
|
||||
public Integer dateHandle() {
|
||||
return signFranchiseMapper.dateHandle();
|
||||
return signFranchiseMapper.dateHandle();
|
||||
}
|
||||
|
||||
private int timeUtils(Date time, String type) {
|
||||
|
||||
Reference in New Issue
Block a user