Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
f05cdc43
Commit
f05cdc43
authored
Mar 26, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字典添加字段
parent
252adb44
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
5 deletions
+96
-5
DictDTO.java
.../src/main/java/com/gic/haoban/manage/api/dto/DictDTO.java
+40
-0
TabHaobanDict.java
...a/com/gic/haoban/manage/service/entity/TabHaobanDict.java
+40
-0
DictApiServiceImpl.java
...n/manage/service/service/out/impl/DictApiServiceImpl.java
+1
-1
DictMapper.xml
...-manage3-service/src/main/resources/mapper/DictMapper.xml
+15
-4
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/DictDTO.java
View file @
f05cdc43
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
DictDTO
implements
Serializable
{
private
String
dictId
;
...
...
@@ -15,8 +16,47 @@ public class DictDTO implements Serializable {
private
String
dictContent
;
private
String
optUserId
;
private
String
optUserName
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getOptUserId
()
{
return
optUserId
;
}
public
void
setOptUserId
(
String
optUserId
)
{
this
.
optUserId
=
optUserId
;
}
public
String
getOptUserName
()
{
return
optUserName
;
}
public
void
setOptUserName
(
String
optUserName
)
{
this
.
optUserName
=
optUserName
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getDictId
()
{
return
dictId
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanDict.java
View file @
f05cdc43
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
TabHaobanDict
implements
Serializable
{
private
String
dictId
;
...
...
@@ -15,6 +16,45 @@ public class TabHaobanDict implements Serializable {
private
String
dictContent
;
private
String
optUserId
;
private
String
optUserName
;
private
Date
createTime
;
private
Date
updateTime
;
public
String
getOptUserId
()
{
return
optUserId
;
}
public
void
setOptUserId
(
String
optUserId
)
{
this
.
optUserId
=
optUserId
;
}
public
String
getOptUserName
()
{
return
optUserName
;
}
public
void
setOptUserName
(
String
optUserName
)
{
this
.
optUserName
=
optUserName
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
private
static
final
long
serialVersionUID
=
1L
;
public
String
getDictId
()
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DictApiServiceImpl.java
View file @
f05cdc43
...
...
@@ -32,7 +32,7 @@ public class DictApiServiceImpl implements DictApiService{
dictMapper
.
insert
(
tab
);
}
else
{
TabHaobanDict
tab
=
EntityUtil
.
changeEntity
(
TabHaobanDict
.
class
,
dto
);
dictMapper
.
updateByPrimaryKey
(
tab
);
dictMapper
.
updateByPrimaryKey
Selective
(
tab
);
}
}
...
...
haoban-manage3-service/src/main/resources/mapper/DictMapper.xml
View file @
f05cdc43
...
...
@@ -7,10 +7,13 @@
<result
column=
"dict_key"
property=
"dictKey"
jdbcType=
"VARCHAR"
/>
<result
column=
"dict_title"
property=
"dictTitle"
jdbcType=
"VARCHAR"
/>
<result
column=
"dict_desc"
property=
"dictDesc"
jdbcType=
"VARCHAR"
/>
<result
column=
"dict_content"
property=
"dictContent"
jdbcType=
"VARCHAR"
/>
<result
column=
"opt_user_name"
property=
"optUserName"
jdbcType=
"VARCHAR"
/>
<result
column=
"opt_user_id"
property=
"optUserId"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
dict_id, dict_name, dict_key, dict_title, dict_desc, dict_content
dict_id, dict_name, dict_key, dict_title, dict_desc, dict_content
,opt_user_name,opt_user_id,create_time,update_time
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
...
...
@@ -23,11 +26,12 @@
where dict_id = #{dictId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanDict"
>
insert into tab_haoban_dict (dict_id, dict_name, dict_key,
dict_title, dict_desc, dict_content
insert into tab_haoban_dict (dict_id, dict_name, dict_key,
dict_title, dict_desc, dict_content,opt_user_name,opt_user_id,create_time,update_time
)
values (#{dictId,jdbcType=VARCHAR}, #{dictName,jdbcType=VARCHAR}, #{dictKey,jdbcType=VARCHAR},
#{dictTitle,jdbcType=VARCHAR}, #{dictDesc,jdbcType=VARCHAR}, #{dictContent,jdbcType=VARCHAR}
,#{optUserId,jdbcType=VARCHAR}, #{optUserName,jdbcType=VARCHAR},now(),now()
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanDict"
>
...
...
@@ -91,6 +95,13 @@
<if
test=
"dictContent != null"
>
dict_content = #{dictContent,jdbcType=VARCHAR},
</if>
<if
test=
"optUserId != null"
>
opt_user_id = #{optUserId,jdbcType=VARCHAR},
</if>
<if
test=
"optUserName != null"
>
opt_user_name = #{optUserName,jdbcType=VARCHAR},
</if>
update_time = now()
</set>
where dict_id = #{dictId,jdbcType=VARCHAR}
</update>
...
...
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