// 设置实体的所有者ID为用户的位置 entity.setOwnerId(user.getPlace()); // 创建一个JSON对象 JSONObject json = new JSONObject(); // 查询用户机构岗位区域列表 List userMechanismPostAreas = userMechanismPostAreaMapper.selectUserMechanismPostAreaList(entity); // 创建一个列表用于存储业务联系人信息 List data = new ArrayList<>(); // 遍历用户机构岗位区域列表 for (UserMechanismPostArea i : userMechanismPostAreas) { // 获取BVC ID Long bvcId = i.getBvcId(); // 根据BVC ID查询业务联系人信息 BusinessContact contact = contactMapper.selectBusinessContactById(bvcId); // 将业务联系人信息添加到列表中 data.add(contact); } // 将用户机构岗位区域列表的长度设置为总数 json.put("total", userMechanismPostAreas.size()); // 将业务联系人列表添加到JSON对象中 json.put("data", data); // 返回JSON对象 return json;

Java 代码示例:获取用户机构岗位区域的业务联系人信息

原文地址: https://www.cveoy.top/t/topic/qriB 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录