Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-parent
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 8eb91097
authored
Apr 25, 2021
by
zhoujinghao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
生成文件加入
1 parent
6c1ebe95
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
321 additions
and
0 deletions
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/mapper/CenterRoleMapper.java
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/model/CenterRole.java
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/model/CenterRoleExample.java
nafmii-mbg/src/main/resources/org/nafmii/nafmiimbg/mapper/CenterRoleMapper.xml
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/mapper/CenterRoleMapper.java
0 → 100644
View file @
8eb9109
package
org
.
nafmii
.
nafmiimbg
.
mapper
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.nafmii.nafmiimbg.model.CenterRole
;
import
org.nafmii.nafmiimbg.model.CenterRoleExample
;
public
interface
CenterRoleMapper
{
long
countByExample
(
CenterRoleExample
example
);
int
deleteByExample
(
CenterRoleExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
CenterRole
record
);
int
insertSelective
(
CenterRole
record
);
List
<
CenterRole
>
selectByExample
(
CenterRoleExample
example
);
CenterRole
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
CenterRole
record
,
@Param
(
"example"
)
CenterRoleExample
example
);
int
updateByExample
(
@Param
(
"record"
)
CenterRole
record
,
@Param
(
"example"
)
CenterRoleExample
example
);
int
updateByPrimaryKeySelective
(
CenterRole
record
);
int
updateByPrimaryKey
(
CenterRole
record
);
}
\ No newline at end of file
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/model/CenterRole.java
0 → 100644
View file @
8eb9109
package
org
.
nafmii
.
nafmiimbg
.
model
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
CenterRole
implements
Serializable
{
@ApiModelProperty
(
value
=
"主键"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"角色名称"
)
private
String
rName
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
creatTime
;
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"启用禁用 0 启用 1禁用"
)
private
String
isEnable
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getrName
()
{
return
rName
;
}
public
void
setrName
(
String
rName
)
{
this
.
rName
=
rName
;
}
public
Date
getCreatTime
()
{
return
creatTime
;
}
public
void
setCreatTime
(
Date
creatTime
)
{
this
.
creatTime
=
creatTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getIsEnable
()
{
return
isEnable
;
}
public
void
setIsEnable
(
String
isEnable
)
{
this
.
isEnable
=
isEnable
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", rName="
).
append
(
rName
);
sb
.
append
(
", creatTime="
).
append
(
creatTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", isEnable="
).
append
(
isEnable
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
nafmii-mbg/src/main/java/org/nafmii/nafmiimbg/model/CenterRoleExample.java
0 → 100644
View file @
8eb9109
This diff is collapsed.
Click to expand it.
nafmii-mbg/src/main/resources/org/nafmii/nafmiimbg/mapper/CenterRoleMapper.xml
0 → 100644
View file @
8eb9109
<?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=
"org.nafmii.nafmiimbg.mapper.CenterRoleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"org.nafmii.nafmiimbg.model.CenterRole"
>
<id
column=
"ID"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"R_NAME"
jdbcType=
"VARCHAR"
property=
"rName"
/>
<result
column=
"CREAT_TIME"
jdbcType=
"TIMESTAMP"
property=
"creatTime"
/>
<result
column=
"UPDATE_TIME"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"IS_ENABLE"
jdbcType=
"VARCHAR"
property=
"isEnable"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
ID, R_NAME, CREAT_TIME, UPDATE_TIME, IS_ENABLE
</sql>
<select
id=
"selectByExample"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRoleExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from CENTER_ROLE
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from CENTER_ROLE
where ID = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from CENTER_ROLE
where ID = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRoleExample"
>
delete from CENTER_ROLE
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRole"
>
insert into CENTER_ROLE (ID, R_NAME, CREAT_TIME,
UPDATE_TIME, IS_ENABLE)
values (#{id,jdbcType=BIGINT}, #{rName,jdbcType=VARCHAR}, #{creatTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isEnable,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRole"
>
insert into CENTER_ROLE
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
ID,
</if>
<if
test=
"rName != null"
>
R_NAME,
</if>
<if
test=
"creatTime != null"
>
CREAT_TIME,
</if>
<if
test=
"updateTime != null"
>
UPDATE_TIME,
</if>
<if
test=
"isEnable != null"
>
IS_ENABLE,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"rName != null"
>
#{rName,jdbcType=VARCHAR},
</if>
<if
test=
"creatTime != null"
>
#{creatTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isEnable != null"
>
#{isEnable,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRoleExample"
resultType=
"java.lang.Long"
>
select count(*) from CENTER_ROLE
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update CENTER_ROLE
<set>
<if
test=
"record.id != null"
>
ID = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.rName != null"
>
R_NAME = #{record.rName,jdbcType=VARCHAR},
</if>
<if
test=
"record.creatTime != null"
>
CREAT_TIME = #{record.creatTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateTime != null"
>
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.isEnable != null"
>
IS_ENABLE = #{record.isEnable,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update CENTER_ROLE
set ID = #{record.id,jdbcType=BIGINT},
R_NAME = #{record.rName,jdbcType=VARCHAR},
CREAT_TIME = #{record.creatTime,jdbcType=TIMESTAMP},
UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP},
IS_ENABLE = #{record.isEnable,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRole"
>
update CENTER_ROLE
<set>
<if
test=
"rName != null"
>
R_NAME = #{rName,jdbcType=VARCHAR},
</if>
<if
test=
"creatTime != null"
>
CREAT_TIME = #{creatTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isEnable != null"
>
IS_ENABLE = #{isEnable,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"org.nafmii.nafmiimbg.model.CenterRole"
>
update CENTER_ROLE
set R_NAME = #{rName,jdbcType=VARCHAR},
CREAT_TIME = #{creatTime,jdbcType=TIMESTAMP},
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
IS_ENABLE = #{isEnable,jdbcType=VARCHAR}
where ID = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
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