This commit is contained in:
shuo.wang
2025-04-12 14:55:28 +08:00
parent 51a532d261
commit 2eeba3e844

View File

@@ -4,14 +4,12 @@ import com.cool.store.dao.LineInfoDAO;
import com.cool.store.dao.OrderSysInfoDAO;
import com.cool.store.dao.ShopInfoDAO;
import com.cool.store.dao.ShopStageInfoDAO;
import com.cool.store.entity.EnterpriseUserDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.OrderSysInfoDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.entity.*;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.MessageEnum;
import com.cool.store.enums.OrderSysTypeEnum;
import com.cool.store.enums.UserRoleEnum;
import com.cool.store.enums.point.ShopSubStageEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.request.OrderSysInfoRequest;
@@ -61,8 +59,9 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
if (Objects.isNull(orderSysInfoDO)){
orderSysInfoDO = new OrderSysInfoDO();
}
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_15);
if (request.getType().equals(OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())) {
orderSysInfoDO.setXgjVicePresident(request.getXgjVicePresident());
orderSysInfoDO.setXgjVicePresident(request.getXgjVicePresident());
orderSysInfoDO.setXgjRegionName(request.getXgjRegionName());
orderSysInfoDO.setXgjRegionId(request.getXgjRegionId());
orderSysInfoDO.setAddresseeProvince(request.getAddresseeProvince());
@@ -72,7 +71,7 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
orderSysInfoDO.setDeclareGoodsLogisticsWarehouse(request.getDeclareGoodsLogisticsWarehouse());
orderSysInfoDO.setDeclareGoodsDate(request.getDeclareGoodsDate());
orderSysInfoDO.setWarehouseDeliveryDate(request.getWarehouseDeliveryDate());
if (Objects.isNull(orderSysInfoDO.getOrderCreateTime())) {
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus())) {
orderSysInfoDO.setOrderCreateTime(new Date());
orderSysInfoDO.setOrderCreateUser(userId);
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152);
@@ -103,7 +102,7 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
orderSysInfoDO.setReceivingMsBankAccount(request.getReceivingMsBankAccount());
orderSysInfoDO.setReceivingMsBankBranch(request.getReceivingMsBankBranch());
orderSysInfoDO.setBankUnionPayAccount(request.getBankUnionPayAccount());
if (Objects.isNull(orderSysInfoDO.getReceivingCreateTime())) {
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus())) {
orderSysInfoDO.setReceivingCreateTime(new Date());
orderSysInfoDO.setReceivingCreateUser(userId);
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153);