修改小程序接口

This commit is contained in:
liuwu 2023-08-30 16:03:26 +08:00
parent 677eb54be6
commit 7be8cf9ccc
1 changed files with 3 additions and 2 deletions

View File

@ -115,13 +115,14 @@ public class WechatController extends BaseController {
for (Map.Entry<String, List<TAmentPartyAffairs>> entry : targetMap.entrySet()) for (Map.Entry<String, List<TAmentPartyAffairs>> entry : targetMap.entrySet())
{ {
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
object.put("name",entry.getKey()); object.put("text",entry.getKey());
// 同一target // 同一target
List<TAmentPartyAffairs> list1 = entry.getValue(); List<TAmentPartyAffairs> list1 = entry.getValue();
JSONArray array1 = new JSONArray(); JSONArray array1 = new JSONArray();
list1.forEach(l->{ list1.forEach(l->{
JSONObject object1 = new JSONObject(); JSONObject object1 = new JSONObject();
object1.put("name",l.getDemand()); object1.put("text",l.getDemand());
object1.put("id",l.getId());
array1.add(object1); array1.add(object1);
}); });
object.put("children",array1); object.put("children",array1);