Commit 390448d9 by 陶光胜

观云台小程序

parent 86393a57
......@@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
......@@ -192,7 +193,7 @@ public class StoreWidgetController {
List<StoreTypeVo> storeTypeVos = this.listRegion(enterpriseId, null);
return RestResponse.success(storeTypeVos);
}
}else { //门店标签
}else if(type == 4){ //门店标签
List<StoreTagDTO> result = this.storeTagApiService.listByEnterprise(enterpriseId).getResult();
List<StoreTypeVo> list = new ArrayList<>();
if(CollectionUtils.isNotEmpty(result)){
......@@ -204,6 +205,36 @@ public class StoreWidgetController {
}
}
return RestResponse.success(list);
}else {
List<StoreTypeVo> list = new ArrayList<>();
if(storeColumnSet != null){
Set<Integer> status = storeColumnSet.getStatus();
if(CollectionUtils.isEmpty(status)){
return RestResponse.success();
}else {
Iterator<Integer> iterator = status.iterator();
while (iterator.hasNext()){
StoreTypeVo storeTypeVo = new StoreTypeVo();
storeTypeVo.setId(iterator.next()+"");
if(iterator.next() == 1){
storeTypeVo.setName("启用");
}else {
storeTypeVo.setName("不启用");
}
list.add(storeTypeVo);
}
}
}else {
StoreTypeVo storeTypeVo = new StoreTypeVo();
storeTypeVo.setId("1");
storeTypeVo.setName("启用");
list.add(storeTypeVo);
StoreTypeVo storeTypeVo1 = new StoreTypeVo();
storeTypeVo1.setId("2");
storeTypeVo1.setName("不启用");
list.add(storeTypeVo1);
}
return RestResponse.success(list);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment