Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
beb6eb75
Commit
beb6eb75
authored
Mar 31, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
民族字典 基础代码命名格式优化
parent
c4641bfe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
72 deletions
+90
-72
src/main/java/cn/timer/api/bean/clazz/NationClass.java
+50
-49
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+6
-6
src/main/java/cn/timer/api/dao/clazz/NationClassMapper.java
+17
-17
src/main/resources/mapping/clazz/NationClassMapper.xml
+17
-0
No files found.
src/main/java/cn/timer/api/
dto/yggl/YgmzDto
.java
→
src/main/java/cn/timer/api/
bean/clazz/NationClass
.java
View file @
beb6eb75
package
cn
.
timer
.
api
.
dto
.
yggl
;
package
cn
.
timer
.
api
.
bean
.
clazz
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Builder
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Builder
;
import
lombok.NoArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Tang 2019-11-15
/**
*/
* @author Tang 2019-11-15
@Entity
*/
@Data
@Entity
@Builder
@Data
@AllArgsConstructor
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName
(
"nation_class"
)
@NoArgsConstructor
@ApiModel
(
"民族"
)
@TableName
(
"nation_class"
)
public
class
YgmzDto
{
@ApiModel
(
"民族"
)
@Id
public
class
NationClass
extends
Model
<
NationClass
>
{
@GeneratedValue
@Id
@TableId
(
type
=
IdType
.
AUTO
)
@GeneratedValue
@ApiModelProperty
(
value
=
"编号"
,
example
=
"1"
)
@TableId
(
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"编号"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"民族名称 "
,
example
=
"民族名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"民族名称 "
,
example
=
"民族名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"拼音"
,
example
=
"pinyin"
)
private
String
pinyin
;
@ApiModelProperty
(
value
=
"拼音"
,
example
=
"pinyin"
)
private
String
pinyin
;
@ApiModelProperty
(
value
=
"简写"
,
example
=
"PY"
)
private
String
letter
;
@ApiModelProperty
(
value
=
"简写"
,
example
=
"PY"
)
private
String
letter
;
@ApiModelProperty
(
value
=
"这个才是排序"
,
example
=
"number"
)
private
Integer
number
;
@ApiModelProperty
(
value
=
"这个才是排序"
,
example
=
"number"
)
private
Integer
number
;
@ApiModelProperty
(
value
=
"排序"
,
example
=
"排序"
)
private
String
sort
;
@ApiModelProperty
(
value
=
"排序"
,
example
=
"排序"
)
}
private
String
sort
;
}
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
beb6eb75
...
@@ -111,7 +111,7 @@ import cn.timer.api.dao.kqmk.KqglAssoKqzdkfsMapper;
...
@@ -111,7 +111,7 @@ import cn.timer.api.dao.kqmk.KqglAssoKqzdkfsMapper;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.
yggl.YgMzDto
Mapper
;
import
cn.timer.api.dao.
clazz.NationClass
Mapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.yggl.YgglMainLzbMapper
;
import
cn.timer.api.dao.yggl.YgglMainLzbMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
...
@@ -130,7 +130,7 @@ import cn.timer.api.dto.yggl.YgKVDto;
...
@@ -130,7 +130,7 @@ import cn.timer.api.dto.yggl.YgKVDto;
import
cn.timer.api.dto.yggl.YgQueryDto
;
import
cn.timer.api.dto.yggl.YgQueryDto
;
import
cn.timer.api.dto.yggl.YgbintuDto
;
import
cn.timer.api.dto.yggl.YgbintuDto
;
import
cn.timer.api.dto.yggl.YgglCartogramDto
;
import
cn.timer.api.dto.yggl.YgglCartogramDto
;
import
cn.timer.api.
dto.yggl.YgmzDto
;
import
cn.timer.api.
bean.clazz.NationClass
;
import
cn.timer.api.dto.yggl.YgzzDto
;
import
cn.timer.api.dto.yggl.YgzzDto
;
import
cn.timer.api.utils.DateFormatUtils
;
import
cn.timer.api.utils.DateFormatUtils
;
import
cn.timer.api.utils.Md5
;
import
cn.timer.api.utils.Md5
;
...
@@ -170,7 +170,7 @@ public class YgglController {
...
@@ -170,7 +170,7 @@ public class YgglController {
// weng(民族)
// weng(民族)
@Autowired
@Autowired
private
YgMzDtoMapper
ygMzDto
Mapper
;
private
NationClassMapper
nationClass
Mapper
;
@Resource
@Resource
private
RedisUtil
redisUtil
;
private
RedisUtil
redisUtil
;
...
@@ -1558,12 +1558,12 @@ public class YgglController {
...
@@ -1558,12 +1558,12 @@ public class YgglController {
@PostMapping
(
value
=
"/mz/{id}"
)
@PostMapping
(
value
=
"/mz/{id}"
)
@ApiOperation
(
value
=
"60.展示民族/展示所有民族"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"60.展示民族/展示所有民族"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
60
)
@ApiOperationSupport
(
order
=
60
)
public
Result
<
List
<
YgmzDto
>>
selectmzs
(
@PathVariable
Integer
id
)
{
public
Result
<
List
<
NationClass
>>
selectmzs
(
@PathVariable
Integer
id
)
{
if
(
id
==
null
||
id
==
0
)
{
if
(
id
==
null
||
id
==
0
)
{
List
<
YgmzDto
>
allmz
=
new
LambdaQueryChainWrapper
<
YgmzDto
>(
ygMzDto
Mapper
).
list
();
List
<
NationClass
>
allmz
=
new
LambdaQueryChainWrapper
<
NationClass
>(
nationClass
Mapper
).
list
();
return
ResultUtil
.
data
(
allmz
,
"展示所有民族"
);
return
ResultUtil
.
data
(
allmz
,
"展示所有民族"
);
}
}
List
<
YgmzDto
>
mz
=
new
LambdaQueryChainWrapper
<
YgmzDto
>(
ygMzDtoMapper
).
eq
(
YgmzDto
:
:
getNumber
,
id
).
list
();
List
<
NationClass
>
mz
=
new
LambdaQueryChainWrapper
<
NationClass
>(
nationClassMapper
).
eq
(
NationClass
:
:
getNumber
,
id
).
list
();
return
ResultUtil
.
data
(
mz
,
"展示该民族"
);
return
ResultUtil
.
data
(
mz
,
"展示该民族"
);
}
}
...
...
src/main/java/cn/timer/api/dao/
yggl/YgMzDto
Mapper.java
→
src/main/java/cn/timer/api/dao/
clazz/NationClass
Mapper.java
View file @
beb6eb75
package
cn
.
timer
.
api
.
dao
.
yggl
;
package
cn
.
timer
.
api
.
dao
.
clazz
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.
dto.yggl.YgmzDto
;
import
cn.timer.api.
bean.clazz.NationClass
;
/**
/**
* 民族表
* 民族表
* @author Tang 2019-11-15
* @author Tang 2019-11-15
*/
*/
@Repository
@Repository
public
interface
YgMzDtoMapper
extends
BaseMapper
<
YgmzDto
>
{
public
interface
NationClassMapper
extends
BaseMapper
<
NationClass
>
{
}
}
src/main/resources/mapping/clazz/NationClassMapper.xml
0 → 100644
View file @
beb6eb75
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.timer.api.dao.clazz.NationClassMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"cn.timer.api.bean.clazz.NationClass"
id=
"nationClassMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"pinyin"
column=
"pinyin"
/>
<result
property=
"letter"
column=
"letter"
/>
<result
property=
"number"
column=
"number"
/>
<result
property=
"sort"
column=
"sort"
/>
</resultMap>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment