Commit d315c941 authored by tianyiming's avatar tianyiming

提交

parent 6c66873c
...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.EquipmentCategoryServic ...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.EquipmentCategoryServic
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...@@ -125,7 +126,10 @@ public class EquipmentCategoryController extends BaseController { ...@@ -125,7 +126,10 @@ public class EquipmentCategoryController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "装备分类列表全部数据查询", notes = "装备分类列表全部数据查询") @ApiOperation(httpMethod = "GET", value = "装备分类列表全部数据查询", notes = "装备分类列表全部数据查询")
@GetMapping(value = "/tree") @GetMapping(value = "/tree")
public ResponseModel<Object> tree(@RequestParam Long code) throws Exception { public ResponseModel<Object> tree(@RequestParam(value = "code",required = false) Long code) throws Exception {
if(ObjectUtils.isEmpty(code)){
return ResponseHelper.buildResponse(new ArrayList<>());
}
EquipmentCategory root = equipmentCategoryServiceImpl.getOne(new LambdaQueryWrapper<EquipmentCategory>().eq(EquipmentCategory::getCode, code.toString())); EquipmentCategory root = equipmentCategoryServiceImpl.getOne(new LambdaQueryWrapper<EquipmentCategory>().eq(EquipmentCategory::getCode, code.toString()));
QueryWrapper<EquipmentCategory> queryWrapper = new QueryWrapper<>(); QueryWrapper<EquipmentCategory> queryWrapper = new QueryWrapper<>();
queryWrapper.likeRight("code", code.toString().replaceAll("0+$", "")); queryWrapper.likeRight("code", code.toString().replaceAll("0+$", ""));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment