Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 14c9feb8
authored
Mar 24, 2021
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加获取字典集接口
1 parent
59e56ded
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
194 additions
and
0 deletions
src/main/java/com/glsx/admin/controller/SysCodeController.java
src/main/java/com/glsx/admin/pojo/request/SysCodeReq.java
src/main/java/com/glsx/admin/pojo/response/SysCodeResp.java
src/main/java/com/glsx/admin/remote/SysCodeFeignClient.java
src/main/java/com/glsx/admin/controller/SysCodeController.java
0 → 100644
View file @
14c9feb
package
com
.
glsx
.
admin
.
controller
;
import
java.util.List
;
import
com.alibaba.fastjson.JSON
;
import
com.glsx.admin.pojo.request.SysCodeReq
;
import
com.glsx.admin.pojo.response.SysCodeResp
;
import
com.glsx.admin.remote.SysCodeFeignClient
;
import
com.glsx.plat.core.web.R
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>Description: 字典集业务
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-03-24
*/
@Slf4j
@RestController
@RequestMapping
(
"/sysCode"
)
public
class
SysCodeController
{
@Autowired
private
SysCodeFeignClient
sysCodeFeignClient
;
@RequestMapping
(
value
=
"/getList"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
R
getList
(
SysCodeReq
req
)
{
log
.
info
(
"$$$$ /sysCode/getList param: {}"
,
JSON
.
toJSONString
(
req
));
List
<
SysCodeResp
>
respList
=
sysCodeFeignClient
.
getListByCondition
(
req
);
return
R
.
ok
().
data
(
respList
);
}
}
src/main/java/com/glsx/admin/pojo/request/SysCodeReq.java
0 → 100644
View file @
14c9feb
package
com
.
glsx
.
admin
.
pojo
.
request
;
import
lombok.Data
;
/**
* 车家智能系统代码集表
*/
@Data
public
class
SysCodeReq
{
/**
* 标识ID
*/
private
Long
id
;
/**
* 字典类型
*/
private
String
dictType
;
/**
* 字典键值
*/
private
String
dictKey
;
/**
* 字典值
*/
private
String
dictValue
;
/**
* 父级键值
*/
private
String
parentKey
;
/**
* 排序
*/
private
Byte
sort
;
/**
* 状态:0下线 1上线
*/
private
Byte
status
;
/**
* 分级
*/
private
Byte
level
;
}
src/main/java/com/glsx/admin/pojo/response/SysCodeResp.java
0 → 100644
View file @
14c9feb
package
com
.
glsx
.
admin
.
pojo
.
response
;
import
java.util.Date
;
import
lombok.Data
;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-03-15
*/
/**
* 车家智能系统代码集表
*/
@Data
public
class
SysCodeResp
{
/**
* 标识ID
*/
private
Long
id
;
/**
* 字典类型
*/
private
String
dictType
;
/**
* 字典键值
*/
private
String
dictKey
;
/**
* 字典值
*/
private
String
dictValue
;
/**
* 父级键值
*/
private
String
parentKey
;
/**
* 排序
*/
private
Byte
sort
;
/**
* 状态:0下线 1上线
*/
private
Byte
status
;
/**
* 分级
*/
private
Byte
level
;
/**
* 备注
*/
private
String
remark
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 创建人
*/
private
Long
createBy
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 更新人
*/
private
Long
updateBy
;
}
src/main/java/com/glsx/admin/remote/SysCodeFeignClient.java
0 → 100644
View file @
14c9feb
package
com
.
glsx
.
admin
.
remote
;
import
java.util.List
;
import
com.glsx.admin.pojo.request.SysCodeReq
;
import
com.glsx.admin.pojo.response.SysCodeResp
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author think.wang
* @date 2021-03-16
*/
@FeignClient
(
name
=
"${feign.server.name}"
,
url
=
"${feign.server.url}"
)
public
interface
SysCodeFeignClient
{
@ResponseBody
@RequestMapping
(
value
=
"/sysCode/getListByCondition"
,
method
=
{
RequestMethod
.
POST
})
List
<
SysCodeResp
>
getListByCondition
(
@RequestBody
SysCodeReq
req
);
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment