该店铺已完成试运营
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.NewStoreOpeningDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.NewStoreOpeningDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
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.NewStoreOpeningRequest;
|
||||
import com.cool.store.service.NewStoreOpeningService;
|
||||
import com.cool.store.vo.NewStoreOpeningVO;
|
||||
@@ -22,6 +27,9 @@ public class NewStoreOpeningServiceImpl implements NewStoreOpeningService {
|
||||
@Resource
|
||||
private NewStoreOpeningDAO newStoreOpeningDAO;
|
||||
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
|
||||
@Override
|
||||
public List<NewStoreOpeningVO> storeTodoList(Long shopId) {
|
||||
List<NewStoreOpeningDO> storeOpeningDOList = newStoreOpeningDAO.storeTodoList(shopId);
|
||||
@@ -41,6 +49,13 @@ public class NewStoreOpeningServiceImpl implements NewStoreOpeningService {
|
||||
|
||||
@Override
|
||||
public void addStoreTodo(NewStoreOpeningRequest newStoreOpeningRequest) {
|
||||
// 判断是否可以添加
|
||||
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(newStoreOpeningRequest.getShopId(), ShopSubStageEnum.SHOP_STAGE_17);
|
||||
|
||||
if(shopStageInfoDO != null && shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_171.getShopSubStageStatus())){
|
||||
throw new ServiceException("该店铺已经完成试运营,不能再添加待办事项");
|
||||
}
|
||||
|
||||
NewStoreOpeningDO newStoreOpeningDO = new NewStoreOpeningDO();
|
||||
newStoreOpeningDO.setShopId(newStoreOpeningRequest.getShopId());
|
||||
newStoreOpeningDO.setTodoItem(newStoreOpeningRequest.getTodoItem());
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.point.ShopStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageFieldEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.OpenAcceptanceRequest;
|
||||
import com.cool.store.request.ShopAcceptanceRequest;
|
||||
@@ -143,6 +144,10 @@ public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService
|
||||
shopInfoDO.setId(shopAcceptanceRequest.getShopId());
|
||||
shopInfoDO.setPlanOpenTime(shopAcceptanceRequest.getPlanOpenTime());
|
||||
shopInfoDAO.updateShopInfo(shopInfoDO);
|
||||
//开业验收完成
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_161);
|
||||
//新店开业试运营
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user