更新项目详情
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
package com.hellogithub.service;
|
package com.hellogithub.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hellogithub.dao.categoryDao;
|
import com.hellogithub.dao.categoryDao;
|
||||||
import com.hellogithub.dao.projectDao;
|
import com.hellogithub.dao.projectDao;
|
||||||
import com.hellogithub.entity.categoryEntity;
|
import com.hellogithub.entity.categoryEntity;
|
||||||
import com.hellogithub.entity.projectEntity;
|
import com.hellogithub.entity.projectEntity;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -130,13 +133,16 @@ public class projectService {
|
|||||||
return projectDao.addProjectLookcount(id);
|
return projectDao.addProjectLookcount(id);
|
||||||
}
|
}
|
||||||
public String retProjectLabel(String id ){
|
public String retProjectLabel(String id ){
|
||||||
Map<String,String > dataMap = new HashMap<>();
|
Map<String,List<String>> dataMap = new HashMap<>();
|
||||||
|
List<String> strs=new ArrayList<>();
|
||||||
List<categoryEntity> categoryEntityList = projectDao.retProjectLabel(id);
|
List<categoryEntity> categoryEntityList = projectDao.retProjectLabel(id);
|
||||||
for(int i=0;i<categoryEntityList.size();i++)
|
for(int i=0;i<categoryEntityList.size();i++)
|
||||||
{
|
{
|
||||||
categoryEntity categoryEntity=categoryEntityList.get(i);
|
categoryEntity categoryEntity=categoryEntityList.get(i);
|
||||||
dataMap.put("CategoryName",categoryEntity.getCategoryName());
|
strs.add(categoryEntity.getCategoryName());
|
||||||
|
|
||||||
}
|
}
|
||||||
return dataMap.toString();
|
dataMap.put("CategoryName",strs);
|
||||||
|
return JSONArray.toJSONString(dataMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user