This commit is contained in:
zhangheng 2024-02-28 10:19:56 +08:00
parent 7e4e183993
commit 9fecec238a
4 changed files with 9 additions and 6 deletions

View File

@ -68,7 +68,7 @@ public class AgencyController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:agency:add')")
@Log(title = "机构信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@PostMapping
public AjaxResult add(@RequestBody Agency agency) {
return toAjax(agencyService.insertAgency(agency));
}
@ -78,7 +78,7 @@ public class AgencyController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:agency:edit')")
@Log(title = "机构信息", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
@PutMapping
public AjaxResult edit(@RequestBody Agency agency) {
return toAjax(agencyService.updateAgency(agency));
}

View File

@ -114,6 +114,9 @@ public class AgencyCategoryServiceImpl implements IAgencyCategoryService {
@Override
public List<AgencyCategoryTreeVO> agencyCategoryList() {
List<AgencyCategoryVO> agencyCategoryList = agencyCategoryMapper.selectAgencyCategoryVOList(null);
for (AgencyCategoryVO agencyCategory : agencyCategoryList) {
agencyCategory.setValue(agencyCategory.getId());
}
List<AgencyCategoryVO> agencyTree = buildDeptTree(agencyCategoryList);
return agencyTree.stream().map(AgencyCategoryTreeVO::new).collect(Collectors.toList());
}

View File

@ -20,7 +20,7 @@ public class AgencyCategoryTreeVO implements Serializable {
*/
private String label;
private String value;
private Long value;
/**
* 子节点
@ -51,11 +51,11 @@ public class AgencyCategoryTreeVO implements Serializable {
this.label = label;
}
public String getValue() {
public Long getValue() {
return value;
}
public void setValue(String value) {
public void setValue(Long value) {
this.value = value;
}

View File

@ -11,7 +11,7 @@ import java.util.List;
@Data
public class AgencyCategoryVO extends AgencyCategory {
private String value;
private Long value;
private List<AgencyCategoryVO> children = new ArrayList<AgencyCategoryVO>();