ky 6 years ago
parent e4b3d330b0
commit 66393f86a0

@ -365,9 +365,17 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
*/
public JSONObject pcMessage(String copycatId){
JSONObject jsonObject = new JSONObject();
Integer count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "todo").eq("copycat_id",copycatId));
Integer count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "disable").eq("copycat_id",copycatId));
List<Custom> customs = customMapper.selectList(new EntityWrapper<Custom>().eq("status_code", "disable").eq("copycat_id", copycatId));
JSONArray jsonArray = new JSONArray();
for(Custom custom:customs){
jsonArray.add(custom.getId());
}
if(count>0){
jsonObject.put("haveNew",true);
jsonObject.put("idList",jsonArray);
}else{
jsonObject.put("haveNew",false);
}
jsonObject.put("count",count);
return jsonObject;

Loading…
Cancel
Save