fix
This commit is contained in:
@@ -63,6 +63,16 @@ public enum ShopSubStageEnum {
|
||||
this.planCompleteDays = planCompleteDays;
|
||||
}
|
||||
|
||||
public static Integer getTotalStageIsLocationAndPreparation() {
|
||||
int total=0;
|
||||
for (ShopSubStageEnum shopStageEnum : ShopSubStageEnum.values()) {
|
||||
if (shopStageEnum.getShopStageEnum().getShopStage().equals(ShopStageEnum.SHOP_STAGE_1.getShopStage())
|
||||
||shopStageEnum.getShopStageEnum().getShopStage().equals(ShopStageEnum.SHOP_STAGE_2.getShopStage())) {
|
||||
total++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static List<ShopSubStageEnum> getShopStageEnum(Integer shopStage) {
|
||||
List<ShopSubStageEnum> resultList = new ArrayList<>();
|
||||
for (ShopSubStageEnum shopStageEnum : ShopSubStageEnum.values()) {
|
||||
|
||||
@@ -415,6 +415,6 @@
|
||||
from
|
||||
xfsg_shop_stage_info
|
||||
where
|
||||
shop_id = #{shopId} and deleted = 0 and is_terminated = 1
|
||||
shop_id = #{shopId} and deleted = 0 and is_terminated = 1 and shop_stage in (1,2)
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -432,7 +432,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
Integer completionCount = shopStageInfoDAO.getCompletionCount(shopId);
|
||||
if (completionCount.equals(ShopSubStageEnum.values().length)) {
|
||||
if (completionCount.equals(ShopSubStageEnum.getTotalStageIsLocationAndPreparation())) {
|
||||
shopInfo.setShopStatus(ShopStatusEnum.DONE.getCode());
|
||||
} else {
|
||||
shopInfo.setShopStatus(ShopStatusEnum.ING.getCode());
|
||||
|
||||
Reference in New Issue
Block a user