pms国网上送代码提交
This commit is contained in:
@@ -7,6 +7,7 @@ import com.njcn.system.pojo.po.SysDicTreePO;
|
||||
import com.njcn.system.pojo.vo.DictTreeVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@@ -26,4 +27,13 @@ public interface DictTreeFeignClient {
|
||||
|
||||
@PostMapping("/query")
|
||||
HttpResult<List<DictTreeVO>> query(@RequestParam("pid") String pid) ;
|
||||
|
||||
@GetMapping("/queryAll")
|
||||
HttpResult<List<SysDicTreePO>> queryAll() ;
|
||||
|
||||
|
||||
@GetMapping("/queryTree")
|
||||
HttpResult<List<SysDicTreePO>> queryTree() ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -51,6 +51,18 @@ public class DictTreeFeignClientFallbackFactory implements FallbackFactory<DictT
|
||||
log.error("{}异常,降级处理,异常为:{}","根据字典pid获取字典树数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<SysDicTreePO>> queryAll() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取所有字典树数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<SysDicTreePO>> queryTree() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取树形数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,13 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/6/9 14:00【需求编号】
|
||||
*
|
||||
@@ -66,7 +67,13 @@ public class SysDicTreePO extends BaseEntity {
|
||||
* 状态(字典 0正常 1停用 2删除)
|
||||
*/
|
||||
@TableField(value = "`status`")
|
||||
private String status;
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 子类
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<SysDicTreePO> children;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user