mirror of
https://github.com/chatopera/cosin.git
synced 2025-07-20 04:23:01 +08:00
#850 上一个提交有仍有
This commit is contained in:
parent
1b2473e2ea
commit
426a5fde68
@ -141,10 +141,10 @@ public class OrganController extends Handler {
|
||||
public ModelAndView add(ModelMap map, HttpServletRequest request, @Valid String parent, @Valid String area) {
|
||||
map.addAttribute("areaList", areaRepository.findAll());
|
||||
if (!StringUtils.isBlank(parent)) {
|
||||
map.addAttribute("organ", organRepository.findById(parent)).orElse(null);
|
||||
map.addAttribute("organ", organRepository.findById(parent).orElse(null));
|
||||
}
|
||||
if (!StringUtils.isBlank(area)) {
|
||||
map.addAttribute("area", areaRepository.findById(area)).orElse(null);
|
||||
map.addAttribute("area", areaRepository.findById(area).orElse(null));
|
||||
}
|
||||
|
||||
map.addAttribute("organList", getOwnOragans(request));
|
||||
@ -283,7 +283,7 @@ public class OrganController extends Handler {
|
||||
ModelAndView view = request(super.createView("/admin/organ/edit"));
|
||||
Organ currentOrgan = super.getOrgan(request);
|
||||
map.addAttribute("areaList", areaRepository.findAll());
|
||||
view.addObject("organData", organRepository.findById(id)).orElse(null);
|
||||
view.addObject("organData", organRepository.findById(id).orElse(null));
|
||||
view.addObject("isRootOrgan", id.equals(currentOrgan.getId()));
|
||||
map.addAttribute("organList", getOwnOragans(request));
|
||||
return view;
|
||||
@ -308,7 +308,7 @@ public class OrganController extends Handler {
|
||||
}
|
||||
map.addAttribute("cacheList", Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_AREA_DIC));
|
||||
|
||||
map.addAttribute("organData", organRepository.findById(id)).orElse(null);
|
||||
map.addAttribute("organData", organRepository.findById(id).orElse(null));
|
||||
return request(super.createView("/admin/organ/area"));
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ public class RoleController extends Handler {
|
||||
@Menu(type = "admin", subtype = "role")
|
||||
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) {
|
||||
ModelAndView view = request(super.createView("/admin/role/edit"));
|
||||
view.addObject("roleData", roleRepository.findById(id)).orElse(null);
|
||||
view.addObject("roleData", roleRepository.findById(id).orElse(null));
|
||||
return view;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ public class SystemMessageController extends Handler {
|
||||
@Menu(type = "admin", subtype = "email")
|
||||
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) {
|
||||
map.put("organList", organRes.findAll());
|
||||
map.addAttribute("email", systemMessageRepository.findById(id)).orElse(null);
|
||||
map.addAttribute("email", systemMessageRepository.findById(id).orElse(null));
|
||||
return request(super.createView("/admin/email/edit"));
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ public class SystemMessageController extends Handler {
|
||||
@Menu(type = "admin", subtype = "sms")
|
||||
public ModelAndView smsedit(ModelMap map, HttpServletRequest request, @Valid String id) {
|
||||
map.addAttribute("smsType", Dict.getInstance().getDic("com.dic.sms.type"));
|
||||
map.addAttribute("sms", systemMessageRepository.findById(id)).orElse(null);
|
||||
map.addAttribute("sms", systemMessageRepository.findById(id).orElse(null));
|
||||
return request(super.createView("/admin/sms/edit"));
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ public class MetadataController extends Handler {
|
||||
@RequestMapping("/edit")
|
||||
@Menu(type = "admin", subtype = "metadata", admin = true)
|
||||
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id) {
|
||||
map.addAttribute("metadata", metadataRes.findById(id)).orElse(null);
|
||||
map.addAttribute("metadata", metadataRes.findById(id).orElse(null));
|
||||
return request(super.createView("/admin/system/metadata/edit"));
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ public class MetadataController extends Handler {
|
||||
@RequestMapping("/properties/edit")
|
||||
@Menu(type = "admin", subtype = "metadata", admin = true)
|
||||
public ModelAndView propertiesedit(ModelMap map, HttpServletRequest request, @Valid String id) {
|
||||
map.addAttribute("tp", tablePropertiesRes.findById(id)).orElse(null);
|
||||
map.addAttribute("tp", tablePropertiesRes.findById(id).orElse(null));
|
||||
map.addAttribute("sysdicList", sysDicRes.findByParentid("0"));
|
||||
map.addAttribute("dataImplList", Dict.getInstance().getDic("com.dic.data.impl"));
|
||||
|
||||
@ -169,7 +169,7 @@ public class MetadataController extends Handler {
|
||||
public ModelAndView table(ModelMap map, HttpServletRequest request, @Valid String id) throws SQLException {
|
||||
map.addAttribute("propertiesList", tablePropertiesRes.findByDbtableid(id));
|
||||
map.addAttribute("tbid", id);
|
||||
map.addAttribute("table", metadataRes.findById(id)).orElse(null);
|
||||
map.addAttribute("table", metadataRes.findById(id).orElse(null));
|
||||
return request(super.createView("/admin/system/metadata/table"));
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class SysDicController extends Handler {
|
||||
@RequestMapping("/edit")
|
||||
@Menu(type = "admin", subtype = "sysdic")
|
||||
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String p) {
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id)).orElse(null);
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id).orElse(null));
|
||||
map.addAttribute("p", p);
|
||||
return request(super.createView("/admin/system/sysdic/edit"));
|
||||
}
|
||||
@ -116,7 +116,7 @@ public class SysDicController extends Handler {
|
||||
@RequestMapping("/dicitem")
|
||||
@Menu(type = "admin", subtype = "sysdic")
|
||||
public ModelAndView dicitem(ModelMap map, HttpServletRequest request, @Valid String id) {
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id)).orElse(null);
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id).orElse(null));
|
||||
map.addAttribute("sysDicList", sysDicRes.findByParentid(id, PageRequest.of(super.getP(request), super.getPs(request), Direction.DESC, "createtime")));
|
||||
return request(super.createView("/admin/system/sysdic/dicitem"));
|
||||
}
|
||||
@ -124,7 +124,7 @@ public class SysDicController extends Handler {
|
||||
@RequestMapping("/dicitem/add")
|
||||
@Menu(type = "admin", subtype = "sysdic")
|
||||
public ModelAndView dicitemadd(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String p) {
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id)).orElse(null);
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id).orElse(null));
|
||||
map.addAttribute("p", p);
|
||||
return request(super.createView("/admin/system/sysdic/dicitemadd"));
|
||||
}
|
||||
@ -170,7 +170,7 @@ public class SysDicController extends Handler {
|
||||
@RequestMapping("/dicitem/batadd")
|
||||
@Menu(type = "admin", subtype = "sysdic")
|
||||
public ModelAndView dicitembatadd(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String p) {
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id)).orElse(null);
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id).orElse(null));
|
||||
map.addAttribute("p", p);
|
||||
return request(super.createView("/admin/system/sysdic/batadd"));
|
||||
}
|
||||
@ -198,7 +198,7 @@ public class SysDicController extends Handler {
|
||||
|
||||
}
|
||||
}
|
||||
reloadSysDicItem(sysDicRes.findById(sysDic.getParentid())).orElse(null);
|
||||
reloadSysDicItem(sysDicRes.findById(sysDic.getParentid()).orElse(null));
|
||||
|
||||
return request(super.createView("redirect:/admin/sysdic/dicitem.html?id=" + sysDic.getParentid() + "&p=" + p));
|
||||
}
|
||||
@ -206,7 +206,7 @@ public class SysDicController extends Handler {
|
||||
@RequestMapping("/dicitem/edit")
|
||||
@Menu(type = "admin", subtype = "sysdic")
|
||||
public ModelAndView dicitemedit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String p) {
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id)).orElse(null);
|
||||
map.addAttribute("sysDic", sysDicRes.findById(id).orElse(null));
|
||||
map.addAttribute("p", p);
|
||||
return request(super.createView("/admin/system/sysdic/dicitemedit"));
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class TemplateController extends Handler {
|
||||
@RequestMapping("/list")
|
||||
@Menu(type = "admin", subtype = "template", admin = true)
|
||||
public ModelAndView list(ModelMap map, HttpServletRequest request, @Valid String type) {
|
||||
map.addAttribute("sysDic", dicRes.findById(type)).orElse(null);
|
||||
map.addAttribute("sysDic", dicRes.findById(type).orElse(null));
|
||||
map.addAttribute("templateList", templateRes.findByTemplettype(type));
|
||||
return request(super.createView("/admin/system/template/list"));
|
||||
}
|
||||
@ -103,7 +103,7 @@ public class TemplateController extends Handler {
|
||||
@RequestMapping("/add")
|
||||
@Menu(type = "admin", subtype = "template", admin = true)
|
||||
public ModelAndView add(ModelMap map, HttpServletRequest request, @Valid String type) {
|
||||
map.addAttribute("sysDic", dicRes.findById(type)).orElse(null);
|
||||
map.addAttribute("sysDic", dicRes.findById(type).orElse(null));
|
||||
return request(super.createView("/admin/system/template/add"));
|
||||
}
|
||||
|
||||
@ -124,8 +124,8 @@ public class TemplateController extends Handler {
|
||||
@RequestMapping("/edit")
|
||||
@Menu(type = "admin", subtype = "template", admin = true)
|
||||
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String type) {
|
||||
map.addAttribute("sysDic", dicRes.findById(type)).orElse(null);
|
||||
map.addAttribute("template", templateRes.findById(id)).orElse(null);
|
||||
map.addAttribute("sysDic", dicRes.findById(type).orElse(null));
|
||||
map.addAttribute("template", templateRes.findById(id).orElse(null));
|
||||
return request(super.createView("/admin/system/template/edit"));
|
||||
}
|
||||
|
||||
@ -156,8 +156,8 @@ public class TemplateController extends Handler {
|
||||
@RequestMapping("/code")
|
||||
@Menu(type = "admin", subtype = "template", admin = true)
|
||||
public ModelAndView code(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String type) {
|
||||
map.addAttribute("sysDic", dicRes.findById(type)).orElse(null);
|
||||
map.addAttribute("template", templateRes.findById(id)).orElse(null);
|
||||
map.addAttribute("sysDic", dicRes.findById(type).orElse(null));
|
||||
map.addAttribute("template", templateRes.findById(id).orElse(null));
|
||||
return request(super.createView("/admin/system/template/code"));
|
||||
}
|
||||
|
||||
|
@ -293,7 +293,7 @@ public class AccountController extends Handler {
|
||||
@RequestMapping("/edit")
|
||||
@Menu(type = "customer", subtype = "customer")
|
||||
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String ekind) {
|
||||
map.addAttribute("entCustomer", accountRes.findById(id)).orElse(null);
|
||||
map.addAttribute("entCustomer", accountRes.findById(id).orElse(null));
|
||||
map.addAttribute("ekindId", ekind);
|
||||
return request(super.createView("/apps/customer/edit"));
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ public class AgentAuditController extends Handler {
|
||||
map.addAttribute("agentuserid", agentuserid);
|
||||
map.addAttribute("agentno", agentnoid);
|
||||
map.addAttribute("skillGroups", skillGroups);
|
||||
map.addAttribute("agentservice", this.agentServiceRes.findById(agentserviceid)).orElse(null);
|
||||
map.addAttribute("agentservice", this.agentServiceRes.findById(agentserviceid).orElse(null));
|
||||
map.addAttribute("currentorgan", currentOrgan);
|
||||
}
|
||||
|
||||
@ -600,7 +600,7 @@ public class AgentAuditController extends Handler {
|
||||
map.addAttribute("agentuserid", agentuserid);
|
||||
map.addAttribute("agentserviceid", agentserviceid);
|
||||
map.addAttribute("userid", userid);
|
||||
map.addAttribute("agentUser", agentUserRes.findById(userid)).orElse(null);
|
||||
map.addAttribute("agentUser", agentUserRes.findById(userid).orElse(null));
|
||||
return request(super.createView("/apps/cca/blacklistadd"));
|
||||
}
|
||||
|
||||
|
@ -445,7 +445,7 @@
|
||||
StatusEvent statusEvent = this.statusEventRes.findById(agentService.getOwner()).orElse(null);
|
||||
if (statusEvent != null) {
|
||||
if (StringUtils.isNotBlank(statusEvent.getHostid())) {
|
||||
view.addObject("pbxHost", pbxHostRes.findById(statusEvent.getHostid())).orElse(null);
|
||||
view.addObject("pbxHost", pbxHostRes.findById(statusEvent.getHostid()).orElse(null));
|
||||
}
|
||||
view.addObject("statusEvent", statusEvent);
|
||||
}
|
||||
@ -702,7 +702,7 @@
|
||||
map.addAttribute("agentuserid", agentuserid);
|
||||
map.addAttribute("agentserviceid", agentserviceid);
|
||||
map.addAttribute("userid", userid);
|
||||
map.addAttribute("agentUser", agentUserRes.findById(userid)).orElse(null);
|
||||
map.addAttribute("agentUser", agentUserRes.findById(userid).orElse(null));
|
||||
return request(super.createView("/apps/agent/blacklistadd"));
|
||||
}
|
||||
|
||||
@ -1131,7 +1131,7 @@
|
||||
map.addAttribute("agentuserid", agentuserid);
|
||||
map.addAttribute("skillGroups", skillGroups);
|
||||
map.addAttribute("agentno", agentService.getAgentno());
|
||||
map.addAttribute("agentservice", this.agentServiceRes.findById(agentserviceid)).orElse(null);
|
||||
map.addAttribute("agentservice", this.agentServiceRes.findById(agentserviceid).orElse(null));
|
||||
map.addAttribute("currentorgan", currentOrgan);
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ public class AgentSettingsController extends Handler {
|
||||
@RequestMapping("/tag/edit")
|
||||
@Menu(type = "setting", subtype = "tag")
|
||||
public ModelAndView tagedit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String tagtype) {
|
||||
map.put("tag", tagRes.findById(id)).orElse(null);
|
||||
map.put("tag", tagRes.findById(id).orElse(null));
|
||||
map.addAttribute("tagtype", tagtype);
|
||||
return request(super.createView("/apps/setting/agent/tagedit"));
|
||||
}
|
||||
@ -322,7 +322,7 @@ public class AgentSettingsController extends Handler {
|
||||
@Menu(type = "setting", subtype = "adv")
|
||||
public ModelAndView advedit(ModelMap map, HttpServletRequest request, @Valid String adpos, @Valid String id) {
|
||||
map.addAttribute("adpos", adpos);
|
||||
map.put("ad", adTypeRes.findById(id)).orElse(null);
|
||||
map.put("ad", adTypeRes.findById(id).orElse(null));
|
||||
return request(super.createView("/apps/setting/agent/adedit"));
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ public class ContactsController extends Handler {
|
||||
@RequestMapping("/edit")
|
||||
@Menu(type = "contacts", subtype = "contacts")
|
||||
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String ckind) {
|
||||
map.addAttribute("contacts", contactsRes.findById(id)).orElse(null);
|
||||
map.addAttribute("contacts", contactsRes.findById(id).orElse(null));
|
||||
map.addAttribute("ckindId", ckind);
|
||||
return request(super.createView("/apps/contacts/edit"));
|
||||
}
|
||||
@ -297,7 +297,7 @@ public class ContactsController extends Handler {
|
||||
if (id == null) {
|
||||
return null; // id is required. Block strange requst anyway with g2.min, https://github.com/alibaba/BizCharts/issues/143
|
||||
}
|
||||
map.addAttribute("contacts", contactsRes.findById(id)).orElse(null);
|
||||
map.addAttribute("contacts", contactsRes.findById(id).orElse(null));
|
||||
|
||||
return request(super.createView("/apps/contacts/detail"));
|
||||
|
||||
@ -611,7 +611,7 @@ public class ContactsController extends Handler {
|
||||
@RequestMapping("/embed/edit")
|
||||
@Menu(type = "contacts", subtype = "embededit")
|
||||
public ModelAndView embededit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String agentserviceid) {
|
||||
map.addAttribute("contacts", contactsRes.findById(id)).orElse(null);
|
||||
map.addAttribute("contacts", contactsRes.findById(id).orElse(null));
|
||||
if (StringUtils.isNotBlank(agentserviceid)) {
|
||||
map.addAttribute("agentserviceid", agentserviceid);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class OnlineUserController extends Handler {
|
||||
|
||||
agentUserContactsRes.findOneByUserid(
|
||||
userid).ifPresent(p -> {
|
||||
map.put("contacts", contactsRes.findById(p.getContactsid())).orElse(null);
|
||||
map.put("contacts", contactsRes.findById(p.getContactsid()).orElse(null));
|
||||
});
|
||||
AgentService service = agentServiceRes.findById(agentservice).orElse(null);
|
||||
if (service != null) {
|
||||
|
@ -120,7 +120,7 @@ public class MessengerOTNController extends Handler {
|
||||
@RequestMapping("/edit")
|
||||
@Menu(type = "admin", subtype = "messenger")
|
||||
public ModelAndView edit(ModelMap map, @Valid String id, HttpServletRequest request) {
|
||||
map.addAttribute("otn", otnRepository.findById(id)).orElse(null);
|
||||
map.addAttribute("otn", otnRepository.findById(id).orElse(null));
|
||||
return request(super.createView("/admin/channel/messenger/otn/edit"));
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ public class AgentServiceProxy {
|
||||
StatusEvent statusEvent = statusEventRes.findById(agentService.getOwner()).orElse(null);
|
||||
if (statusEvent != null) {
|
||||
if (StringUtils.isNotBlank(statusEvent.getHostid())) {
|
||||
view.addObject("pbxHost", pbxHostRes.findById(statusEvent.getHostid())).orElse(null);
|
||||
view.addObject("pbxHost", pbxHostRes.findById(statusEvent.getHostid()).orElse(null));
|
||||
}
|
||||
view.addObject("statusEvent", statusEvent);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user