current position:Home>Problems about Jason object in Java front end

Problems about Jason object in Java front end

2022-02-02 22:40:30 CSDN Q & A

        List<SysDept> dept = deptService.selectCodeEmlNoList(param);        dept.forEach(sysDept -> {            if (sysDept!=null&&StringUtils.isNotBlank(sysDept.getOrgCusCode())){                JSONObject temp = new JSONObject();                temp.put("code",sysDept.getOrgCusCode());                temp.put("label",sysDept.getOrgCusCode());                temp.put("code1",sysDept.getOldOrgCusCode());                temp.put("label1",sysDept.getOldOrgCusCode());                objectList.add(temp);

You need to query two fields in the database Pass together to the front end Is there any way to put this together




Refer to the answer 1:

“” + ""




Refer to the answer 2:



Refer to the answer 3:

have access to concat Function together , The sample code is as follows :

select concat(t.field1,t.field2) as f from table_name as t where 1 = 1;



Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022240285713.html

Random recommended