|
|
@@ -150,19 +150,22 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
public List<Map<String, String>> getAllCnames(Integer flag) {
|
|
|
List<Map<String, String>> list=new ArrayList<Map<String, String>>();
|
|
|
List<String> listcid=businessVarietiesMapper.getListId();
|
|
|
- System.out.println("this is service start -----------------------");
|
|
|
for (String s : listcid) {
|
|
|
Map<String, String> map=new HashMap<>();
|
|
|
String cname=getAllCname(s);
|
|
|
map.put("id", s);
|
|
|
map.put("cname", cname);
|
|
|
-
|
|
|
- list.add(map);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ if (flag==1) {
|
|
|
+ if (StringUtils.isBlank(cname)) {
|
|
|
+ map.put("cname", "平台超级业务品类");
|
|
|
+ }
|
|
|
+ list.add(map);
|
|
|
+ }else {
|
|
|
+ if (StringUtils.isNotBlank(cname)) {
|
|
|
+ list.add(map);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- System.out.println("this is service end -----------------------");
|
|
|
return list;
|
|
|
}
|
|
|
/**
|
|
|
@@ -171,15 +174,16 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
|
|
|
* @return 路径
|
|
|
*/
|
|
|
private String getAllCname(String s) {
|
|
|
- System.out.println("to get cid by id-----------------------"+s);
|
|
|
String cid=businessVarietiesMapper.getThisCid(s);
|
|
|
String cname=businessVarietiesMapper.getThisCname(cid);
|
|
|
BusinessVarieties bv=businessVarietiesMapper.selectByPrimaryKey(s);
|
|
|
String sid=bv.getSuperId();
|
|
|
if (cid.length()>4) {
|
|
|
+ if(bv.getSuperId().equals(bv.getId())){
|
|
|
+ return "";
|
|
|
+ }
|
|
|
String w=getAllCname(sid)+"-"+cname;
|
|
|
- System.out.println("return result sid-----"+sid+"----------w----------"+w);
|
|
|
- return w;
|
|
|
+ return w;
|
|
|
}else{
|
|
|
return cid.length()>3?cname:"";
|
|
|
}
|