shopList增加能否修改shopCode 标识
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
package com.cool.store.vo.shop;
|
||||
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
@@ -25,16 +29,27 @@ public class MiniShopPageVO {
|
||||
@ApiModelProperty("店铺编码")
|
||||
private String shopCode;
|
||||
|
||||
public MiniShopPageVO(Long shopId, String shopName,String shopCode) {
|
||||
@ApiModelProperty("加盟合同签约完成标识,0-未完成,1-完成")
|
||||
private Boolean flag;
|
||||
|
||||
public MiniShopPageVO(Long shopId, String shopName,String shopCode,Boolean flag) {
|
||||
this.shopId = shopId;
|
||||
this.shopName = shopName;
|
||||
this.shopCode = shopCode;
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public static List<MiniShopPageVO> convertList(List<ShopInfoDO> shopInfoList) {
|
||||
public static List<MiniShopPageVO> convertList(List<ShopInfoDO> shopInfoList, Map<Long, ShopStageInfoDO> stageMap ) {
|
||||
List<MiniShopPageVO> resultList = new ArrayList<>();
|
||||
for (ShopInfoDO shopInfo : shopInfoList) {
|
||||
resultList.add(new MiniShopPageVO(shopInfo.getId(), shopInfo.getShopName(),shopInfo.getShopCode()));
|
||||
ShopStageInfoDO stageInfoDO = stageMap.get(shopInfo.getId());
|
||||
Boolean flag = Boolean.FALSE;
|
||||
if (Objects.nonNull(stageInfoDO)) {
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84.getShopSubStageStatus().equals(stageInfoDO.getShopSubStageStatus())) {
|
||||
flag = Boolean.TRUE;
|
||||
}
|
||||
}
|
||||
resultList.add(new MiniShopPageVO(shopInfo.getId(), shopInfo.getShopName(),shopInfo.getShopCode(),flag));
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user