Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
70f0dae4
Commit
70f0dae4
authored
Jul 21, 2020
by
季圣华
Browse files
优化表结构
parent
13932441
Changes
104
Show whitespace changes
Inline
Side-by-side
src/main/resources/mapper_xml/Function
s
Mapper.xml
→
src/main/resources/mapper_xml/FunctionMapper.xml
View file @
70f0dae4
<?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=
"com.jsh.erp.datasource.mappers.FunctionsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Functions"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"Id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"Number"
jdbcType=
"VARCHAR"
property=
"number"
/>
<result
column=
"Name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"PNumber"
jdbcType=
"VARCHAR"
property=
"pnumber"
/>
<result
column=
"URL"
jdbcType=
"VARCHAR"
property=
"url"
/>
<result
column=
"State"
jdbcType=
"BIT"
property=
"state"
/>
<result
column=
"Sort"
jdbcType=
"VARCHAR"
property=
"sort"
/>
<result
column=
"Enabled"
jdbcType=
"BIT"
property=
"enabled"
/>
<result
column=
"Type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"PushBtn"
jdbcType=
"VARCHAR"
property=
"pushbtn"
/>
<mapper
namespace=
"com.jsh.erp.datasource.mappers.FunctionMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Function"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"number"
jdbcType=
"VARCHAR"
property=
"number"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"parent_number"
jdbcType=
"VARCHAR"
property=
"parentNumber"
/>
<result
column=
"url"
jdbcType=
"VARCHAR"
property=
"url"
/>
<result
column=
"state"
jdbcType=
"BIT"
property=
"state"
/>
<result
column=
"sort"
jdbcType=
"VARCHAR"
property=
"sort"
/>
<result
column=
"enabled"
jdbcType=
"BIT"
property=
"enabled"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"push_btn"
jdbcType=
"VARCHAR"
property=
"pushBtn"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
<result
column=
"delete_
F
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"delete_
f
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -53,10 +45,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -86,23 +74,16 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Number, Name, PNumber, URL, State, Sort, Enabled, Type, PushBtn, icon, delete_Flag
id, number, name, parent_number, url, state, sort, enabled, type, push_btn, icon,
delete_flag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.FunctionsExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.FunctionExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from jsh_function
s
from jsh_function
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
@@ -111,89 +92,69 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_function
s
where
I
d = #{id,jdbcType=BIGINT}
from jsh_function
where
i
d = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_functions
where Id = #{id,jdbcType=BIGINT}
delete from jsh_function
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.FunctionsExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_functions
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.FunctionExample"
>
delete from jsh_function
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.Functions"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_functions (Id, Number, Name,
PNumber, URL, State, Sort,
Enabled, Type, PushBtn,
icon, delete_Flag)
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.Function"
>
insert into jsh_function (id, number, name,
parent_number, url, state,
sort, enabled, type, push_btn,
icon, delete_flag)
values (#{id,jdbcType=BIGINT}, #{number,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{p
n
umber,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{state,jdbcType=BIT},
#{sort,jdbcType=VARCHAR},
#{enabled,jdbcType=BIT}, #{type,jdbcType=VARCHAR}, #{push
b
tn,jdbcType=VARCHAR},
#{p
arentN
umber,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{state,jdbcType=BIT},
#{sort,jdbcType=VARCHAR},
#{enabled,jdbcType=BIT}, #{type,jdbcType=VARCHAR}, #{push
B
tn,jdbcType=VARCHAR},
#{icon,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Functions"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_functions
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Function"
>
insert into jsh_function
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
I
d,
i
d,
</if>
<if
test=
"number != null"
>
N
umber,
n
umber,
</if>
<if
test=
"name != null"
>
N
ame,
n
ame,
</if>
<if
test=
"p
n
umber != null"
>
PN
umber,
<if
test=
"p
arentN
umber != null"
>
parent_n
umber,
</if>
<if
test=
"url != null"
>
URL,
url,
</if>
<if
test=
"state != null"
>
S
tate,
s
tate,
</if>
<if
test=
"sort != null"
>
S
ort,
s
ort,
</if>
<if
test=
"enabled != null"
>
E
nabled,
e
nabled,
</if>
<if
test=
"type != null"
>
T
ype,
t
ype,
</if>
<if
test=
"push
b
tn != null"
>
P
ush
B
tn,
<if
test=
"push
B
tn != null"
>
p
ush
_b
tn,
</if>
<if
test=
"icon != null"
>
icon,
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag,
delete_
f
lag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -206,8 +167,8 @@
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"p
n
umber != null"
>
#{p
n
umber,jdbcType=VARCHAR},
<if
test=
"p
arentN
umber != null"
>
#{p
arentN
umber,jdbcType=VARCHAR},
</if>
<if
test=
"url != null"
>
#{url,jdbcType=VARCHAR},
...
...
@@ -224,8 +185,8 @@
<if
test=
"type != null"
>
#{type,jdbcType=VARCHAR},
</if>
<if
test=
"push
b
tn != null"
>
#{push
b
tn,jdbcType=VARCHAR},
<if
test=
"push
B
tn != null"
>
#{push
B
tn,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
#{icon,jdbcType=VARCHAR},
...
...
@@ -235,58 +196,50 @@
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.FunctionsExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_functions
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.FunctionExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_function
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
update jsh_function
<set>
<if
test=
"record.id != null"
>
I
d = #{record.id,jdbcType=BIGINT},
i
d = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.number != null"
>
N
umber = #{record.number,jdbcType=VARCHAR},
n
umber = #{record.number,jdbcType=VARCHAR},
</if>
<if
test=
"record.name != null"
>
N
ame = #{record.name,jdbcType=VARCHAR},
n
ame = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.p
n
umber != null"
>
PN
umber = #{record.p
n
umber,jdbcType=VARCHAR},
<if
test=
"record.p
arentN
umber != null"
>
parent_n
umber = #{record.p
arentN
umber,jdbcType=VARCHAR},
</if>
<if
test=
"record.url != null"
>
URL
= #{record.url,jdbcType=VARCHAR},
url
= #{record.url,jdbcType=VARCHAR},
</if>
<if
test=
"record.state != null"
>
S
tate = #{record.state,jdbcType=BIT},
s
tate = #{record.state,jdbcType=BIT},
</if>
<if
test=
"record.sort != null"
>
S
ort = #{record.sort,jdbcType=VARCHAR},
s
ort = #{record.sort,jdbcType=VARCHAR},
</if>
<if
test=
"record.enabled != null"
>
E
nabled = #{record.enabled,jdbcType=BIT},
e
nabled = #{record.enabled,jdbcType=BIT},
</if>
<if
test=
"record.type != null"
>
T
ype = #{record.type,jdbcType=VARCHAR},
t
ype = #{record.type,jdbcType=VARCHAR},
</if>
<if
test=
"record.push
b
tn != null"
>
P
ush
B
tn = #{record.push
b
tn,jdbcType=VARCHAR},
<if
test=
"record.push
B
tn != null"
>
p
ush
_b
tn = #{record.push
B
tn,jdbcType=VARCHAR},
</if>
<if
test=
"record.icon != null"
>
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -294,87 +247,75 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
set Id = #{record.id,jdbcType=BIGINT},
Number = #{record.number,jdbcType=VARCHAR},
Name = #{record.name,jdbcType=VARCHAR},
PNumber = #{record.pnumber,jdbcType=VARCHAR},
URL = #{record.url,jdbcType=VARCHAR},
State = #{record.state,jdbcType=BIT},
Sort = #{record.sort,jdbcType=VARCHAR},
Enabled = #{record.enabled,jdbcType=BIT},
Type = #{record.type,jdbcType=VARCHAR},
PushBtn = #{record.pushbtn,jdbcType=VARCHAR},
update jsh_function
set id = #{record.id,jdbcType=BIGINT},
number = #{record.number,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
parent_number = #{record.parentNumber,jdbcType=VARCHAR},
url = #{record.url,jdbcType=VARCHAR},
state = #{record.state,jdbcType=BIT},
sort = #{record.sort,jdbcType=VARCHAR},
enabled = #{record.enabled,jdbcType=BIT},
type = #{record.type,jdbcType=VARCHAR},
push_btn = #{record.pushBtn,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.Functions"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.Function"
>
update jsh_function
<set>
<if
test=
"number != null"
>
N
umber = #{number,jdbcType=VARCHAR},
n
umber = #{number,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
N
ame = #{name,jdbcType=VARCHAR},
n
ame = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"p
n
umber != null"
>
PN
umber = #{p
n
umber,jdbcType=VARCHAR},
<if
test=
"p
arentN
umber != null"
>
parent_n
umber = #{p
arentN
umber,jdbcType=VARCHAR},
</if>
<if
test=
"url != null"
>
URL
= #{url,jdbcType=VARCHAR},
url
= #{url,jdbcType=VARCHAR},
</if>
<if
test=
"state != null"
>
S
tate = #{state,jdbcType=BIT},
s
tate = #{state,jdbcType=BIT},
</if>
<if
test=
"sort != null"
>
S
ort = #{sort,jdbcType=VARCHAR},
s
ort = #{sort,jdbcType=VARCHAR},
</if>
<if
test=
"enabled != null"
>
E
nabled = #{enabled,jdbcType=BIT},
e
nabled = #{enabled,jdbcType=BIT},
</if>
<if
test=
"type != null"
>
T
ype = #{type,jdbcType=VARCHAR},
t
ype = #{type,jdbcType=VARCHAR},
</if>
<if
test=
"push
b
tn != null"
>
P
ush
B
tn = #{push
b
tn,jdbcType=VARCHAR},
<if
test=
"push
B
tn != null"
>
p
ush
_b
tn = #{push
B
tn,jdbcType=VARCHAR},
</if>
<if
test=
"icon != null"
>
icon = #{icon,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.Functions"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
set Number = #{number,jdbcType=VARCHAR},
Name = #{name,jdbcType=VARCHAR},
PNumber = #{pnumber,jdbcType=VARCHAR},
URL = #{url,jdbcType=VARCHAR},
State = #{state,jdbcType=BIT},
Sort = #{sort,jdbcType=VARCHAR},
Enabled = #{enabled,jdbcType=BIT},
Type = #{type,jdbcType=VARCHAR},
PushBtn = #{pushbtn,jdbcType=VARCHAR},
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.Function"
>
update jsh_function
set number = #{number,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
parent_number = #{parentNumber,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
state = #{state,jdbcType=BIT},
sort = #{sort,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
type = #{type,jdbcType=VARCHAR},
push_btn = #{pushBtn,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR}
where
I
d = #{id,jdbcType=BIGINT}
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR}
where
i
d = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/Function
s
MapperEx.xml
→
src/main/resources/mapper_xml/FunctionMapperEx.xml
View file @
70f0dae4
<?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=
"com.jsh.erp.datasource.mappers.Function
s
MapperEx"
>
<select
id=
"selectByConditionFunction
s
"
parameterType=
"com.jsh.erp.datasource.entities.Function
s
Example"
resultMap=
"com.jsh.erp.datasource.mappers.Function
s
Mapper.BaseResultMap"
>
<mapper
namespace=
"com.jsh.erp.datasource.mappers.FunctionMapperEx"
>
<select
id=
"selectByConditionFunction"
parameterType=
"com.jsh.erp.datasource.entities.FunctionExample"
resultMap=
"com.jsh.erp.datasource.mappers.FunctionMapper.BaseResultMap"
>
select *
FROM jsh_function
s
FROM jsh_function
where 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
...
...
@@ -11,16 +11,16 @@
<if
test=
"type != null"
>
and type='${type}'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
order by sort asc
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
</if>
</select>
<select
id=
"countsByFunction
s
"
resultType=
"java.lang.Long"
>
<select
id=
"countsByFunction"
resultType=
"java.lang.Long"
>
SELECT
COUNT(id)
FROM jsh_function
s
FROM jsh_function
WHERE 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
...
...
@@ -28,11 +28,11 @@
<if
test=
"type != null"
>
and type='${type}'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
</select>
<update
id=
"batchDeleteFunction
s
ByIds"
>
update jsh_function
s
set delete_
F
lag='1'
<update
id=
"batchDeleteFunctionByIds"
>
update jsh_function
set delete_
f
lag='1'
where 1=1
and id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
...
...
src/main/resources/mapper_xml/InOutItemMapper.xml
View file @
70f0dae4
...
...
@@ -2,22 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.InOutItemMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.InOutItem"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"Id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"Name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"Type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"Remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_
F
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"delete_
f
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -47,10 +39,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -80,23 +68,15 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, Type, Remark, tenant_id, delete_Flag
id, name, type, remark, tenant_id, delete_flag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.InOutItemExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from jsh_inoutitem
from jsh_in
_
out
_
item
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
@@ -105,69 +85,49 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_inoutitem
where
I
d = #{id,jdbcType=BIGINT}
from jsh_in
_
out
_
item
where
i
d = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_inoutitem
where Id = #{id,jdbcType=BIGINT}
delete from jsh_in_out_item
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.InOutItemExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_inoutitem
delete from jsh_in_out_item
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.InOutItem"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_inoutitem (Id, Name, Type,
Remark, tenant_id, delete_Flag
insert into jsh_in_out_item (id, name, type,
remark, tenant_id, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.InOutItem"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_inoutitem
insert into jsh_in_out_item
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
I
d,
i
d,
</if>
<if
test=
"name != null"
>
N
ame,
n
ame,
</if>
<if
test=
"type != null"
>
T
ype,
t
ype,
</if>
<if
test=
"remark != null"
>
R
emark,
r
emark,
</if>
<if
test=
"tenantId != null"
>
tenant_id,
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag,
delete_
f
lag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -191,40 +151,32 @@
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.InOutItemExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_inoutitem
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.InOutItemExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_in_out_item
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
update jsh_in_out_item
<set>
<if
test=
"record.id != null"
>
I
d = #{record.id,jdbcType=BIGINT},
i
d = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
N
ame = #{record.name,jdbcType=VARCHAR},
n
ame = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.type != null"
>
T
ype = #{record.type,jdbcType=VARCHAR},
t
ype = #{record.type,jdbcType=VARCHAR},
</if>
<if
test=
"record.remark != null"
>
R
emark = #{record.remark,jdbcType=VARCHAR},
r
emark = #{record.remark,jdbcType=VARCHAR},
</if>
<if
test=
"record.tenantId != null"
>
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -232,57 +184,45 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
Type = #{record.type,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
update jsh_in_out_item
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.InOutItem"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
update jsh_in_out_item
<set>
<if
test=
"name != null"
>
N
ame = #{name,jdbcType=VARCHAR},
n
ame = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
T
ype = #{type,jdbcType=VARCHAR},
t
ype = #{type,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
R
emark = #{remark,jdbcType=VARCHAR},
r
emark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"tenantId != null"
>
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.InOutItem"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
set Name = #{name,jdbcType=VARCHAR},
Type = #{type,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
update jsh_in_out_item
set name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR}
where
I
d = #{id,jdbcType=BIGINT}
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR}
where
i
d = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/InOutItemMapperEx.xml
View file @
70f0dae4
...
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.jsh.erp.datasource.mappers.InOutItemMapperEx"
>
<select
id=
"selectByConditionInOutItem"
parameterType=
"com.jsh.erp.datasource.entities.InOutItemExample"
resultMap=
"com.jsh.erp.datasource.mappers.InOutItemMapper.BaseResultMap"
>
select *
FROM jsh_inoutitem
FROM jsh_in
_
out
_
item
where 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
...
...
@@ -14,7 +14,7 @@
<if
test=
"remark != null"
>
and remark like '%${remark}%'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
</if>
...
...
@@ -22,7 +22,7 @@
<select
id=
"countsByInOutItem"
resultType=
"java.lang.Long"
>
SELECT
COUNT(id)
FROM jsh_inoutitem
FROM jsh_in
_
out
_
item
WHERE 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
...
...
@@ -33,11 +33,11 @@
<if
test=
"remark != null"
>
and remark like '%${remark}%'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
</select>
<update
id=
"batchDeleteInOutItemByIds"
>
update jsh_inoutitem
set delete_
F
lag='1'
update jsh_in
_
out
_
item
set delete_
f
lag='1'
where 1=1
and id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
...
...
src/main/resources/mapper_xml/LogMapper.xml
View file @
70f0dae4
...
...
@@ -2,25 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.LogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Log"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"user
ID
"
jdbcType=
"BIGINT"
property=
"user
i
d"
/>
<result
column=
"user
_id
"
jdbcType=
"BIGINT"
property=
"user
I
d"
/>
<result
column=
"operation"
jdbcType=
"VARCHAR"
property=
"operation"
/>
<result
column=
"client
IP
"
jdbcType=
"VARCHAR"
property=
"client
i
p"
/>
<result
column=
"createtime"
jdbcType=
"TIMESTAMP"
property=
"create
t
ime"
/>
<result
column=
"client
_ip
"
jdbcType=
"VARCHAR"
property=
"client
I
p"
/>
<result
column=
"create
_
time"
jdbcType=
"TIMESTAMP"
property=
"create
T
ime"
/>
<result
column=
"status"
jdbcType=
"TINYINT"
property=
"status"
/>
<result
column=
"contentdetails"
jdbcType=
"VARCHAR"
property=
"contentdetails"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"content"
jdbcType=
"VARCHAR"
property=
"content"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -50,10 +41,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -83,17 +70,9 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, userID, operation, clientIP, createtime, status, contentdetails, remark, tenant_id
id, user_id, operation, client_ip, create_time, status, content, tenant_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.LogExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
...
...
@@ -108,77 +87,52 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_log
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.LogExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_log
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.Log"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_log (id, userID, operation,
clientIP, createtime, status,
contentdetails, remark, tenant_id
)
values (#{id,jdbcType=BIGINT}, #{userid,jdbcType=BIGINT}, #{operation,jdbcType=VARCHAR},
#{clientip,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT},
#{contentdetails,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}
)
insert into jsh_log (id, user_id, operation,
client_ip, create_time, status,
content, tenant_id)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{operation,jdbcType=VARCHAR},
#{clientIp,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT},
#{content,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Log"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"user
i
d != null"
>
user
ID,
<if
test=
"user
I
d != null"
>
user
_id,
</if>
<if
test=
"operation != null"
>
operation,
</if>
<if
test=
"client
i
p != null"
>
client
IP,
<if
test=
"client
I
p != null"
>
client
_ip,
</if>
<if
test=
"create
t
ime != null"
>
createtime,
<if
test=
"create
T
ime != null"
>
create
_
time,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"contentdetails != null"
>
contentdetails,
</if>
<if
test=
"remark != null"
>
remark,
<if
test=
"content != null"
>
content,
</if>
<if
test=
"tenantId != null"
>
tenant_id,
...
...
@@ -188,72 +142,58 @@
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"user
i
d != null"
>
#{user
i
d,jdbcType=BIGINT},
<if
test=
"user
I
d != null"
>
#{user
I
d,jdbcType=BIGINT},
</if>
<if
test=
"operation != null"
>
#{operation,jdbcType=VARCHAR},
</if>
<if
test=
"client
i
p != null"
>
#{client
i
p,jdbcType=VARCHAR},
<if
test=
"client
I
p != null"
>
#{client
I
p,jdbcType=VARCHAR},
</if>
<if
test=
"create
t
ime != null"
>
#{create
t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
#{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=TINYINT},
</if>
<if
test=
"contentdetails != null"
>
#{contentdetails,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
<if
test=
"content != null"
>
#{content,jdbcType=VARCHAR},
</if>
<if
test=
"tenantId != null"
>
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.LogExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.LogExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_log
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.user
i
d != null"
>
user
ID
= #{record.user
i
d,jdbcType=BIGINT},
<if
test=
"record.user
I
d != null"
>
user
_id
= #{record.user
I
d,jdbcType=BIGINT},
</if>
<if
test=
"record.operation != null"
>
operation = #{record.operation,jdbcType=VARCHAR},
</if>
<if
test=
"record.client
i
p != null"
>
client
IP
= #{record.client
i
p,jdbcType=VARCHAR},
<if
test=
"record.client
I
p != null"
>
client
_ip
= #{record.client
I
p,jdbcType=VARCHAR},
</if>
<if
test=
"record.create
t
ime != null"
>
createtime = #{record.create
t
ime,jdbcType=TIMESTAMP},
<if
test=
"record.create
T
ime != null"
>
create
_
time = #{record.create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.status != null"
>
status = #{record.status,jdbcType=TINYINT},
</if>
<if
test=
"record.contentdetails != null"
>
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
</if>
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
<if
test=
"record.content != null"
>
content = #{record.content,jdbcType=VARCHAR},
</if>
<if
test=
"record.tenantId != null"
>
tenant_id = #{record.tenantId,jdbcType=BIGINT},
...
...
@@ -264,51 +204,39 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
set id = #{record.id,jdbcType=BIGINT},
user
ID
= #{record.user
i
d,jdbcType=BIGINT},
user
_id
= #{record.user
I
d,jdbcType=BIGINT},
operation = #{record.operation,jdbcType=VARCHAR},
client
IP
= #{record.client
i
p,jdbcType=VARCHAR},
createtime = #{record.create
t
ime,jdbcType=TIMESTAMP},
client
_ip
= #{record.client
I
p,jdbcType=VARCHAR},
create
_
time = #{record.create
T
ime,jdbcType=TIMESTAMP},
status = #{record.status,jdbcType=TINYINT},
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
content = #{record.content,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.Log"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
<set>
<if
test=
"user
i
d != null"
>
user
ID
= #{user
i
d,jdbcType=BIGINT},
<if
test=
"user
I
d != null"
>
user
_id
= #{user
I
d,jdbcType=BIGINT},
</if>
<if
test=
"operation != null"
>
operation = #{operation,jdbcType=VARCHAR},
</if>
<if
test=
"client
i
p != null"
>
client
IP
= #{client
i
p,jdbcType=VARCHAR},
<if
test=
"client
I
p != null"
>
client
_ip
= #{client
I
p,jdbcType=VARCHAR},
</if>
<if
test=
"create
t
ime != null"
>
createtime = #{create
t
ime,jdbcType=TIMESTAMP},
<if
test=
"create
T
ime != null"
>
create
_
time = #{create
T
ime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=TINYINT},
</if>
<if
test=
"contentdetails != null"
>
contentdetails = #{contentdetails,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
<if
test=
"content != null"
>
content = #{content,jdbcType=VARCHAR},
</if>
<if
test=
"tenantId != null"
>
tenant_id = #{tenantId,jdbcType=BIGINT},
...
...
@@ -317,18 +245,13 @@
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.Log"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
set user
ID
= #{user
i
d,jdbcType=BIGINT},
set user
_id
= #{user
I
d,jdbcType=BIGINT},
operation = #{operation,jdbcType=VARCHAR},
client
IP
= #{client
i
p,jdbcType=VARCHAR},
createtime = #{create
t
ime,jdbcType=TIMESTAMP},
client
_ip
= #{client
I
p,jdbcType=VARCHAR},
create
_
time = #{create
T
ime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=TINYINT},
contentdetails = #{contentdetails,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
...
...
src/main/resources/mapper_xml/LogMapperEx.xml
View file @
70f0dae4
...
...
@@ -2,36 +2,36 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.LogMapperEx"
>
<resultMap
extends=
"com.jsh.erp.datasource.mappers.LogMapper.BaseResultMap"
id=
"ResultExMap"
type=
"com.jsh.erp.datasource.vo.LogVo4List"
>
<result
column=
"userName"
jdbcType=
"VARCHAR"
property=
"user
n
ame"
/>
<result
column=
"userName"
jdbcType=
"VARCHAR"
property=
"user
N
ame"
/>
</resultMap>
<select
id=
"selectByConditionLog"
parameterType=
"com.jsh.erp.datasource.entities.LogExample"
resultMap=
"ResultExMap"
>
select l.*,u.username userName
FROM jsh_log l
left join jsh_user u on l.user
ID
= u.id and ifnull(u.status,'0') not in('1','2')
left join jsh_user u on l.user
_id
= u.id and ifnull(u.status,'0') not in('1','2')
where 1=1
<if
test=
"operation != null"
>
and l.operation like '%${operation}%'
</if>
<if
test=
"user
nameID
!= null"
>
and l.user
ID
=${user
nameID
}
<if
test=
"user
Id
!= null"
>
and l.user
_id
=${user
Id
}
</if>
<if
test=
"clientIp != null"
>
and l.client
I
p like '%${clientIp}%'
and l.client
_i
p like '%${clientIp}%'
</if>
<if
test=
"status != null"
>
and l.status=${status}
</if>
<if
test=
"beginTime != null"
>
and l.createtime
>
= '${beginTime}'
and l.create
_
time
>
= '${beginTime}'
</if>
<if
test=
"endTime != null"
>
and l.createtime
<
= '${endTime}'
and l.create
_
time
<
= '${endTime}'
</if>
<if
test=
"content
details
!= null"
>
and l.content
details
like '%${content
details
}%'
<if
test=
"content != null"
>
and l.content like '%${content}%'
</if>
order by l.createtime desc
order by l.create
_
time desc
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
</if>
...
...
@@ -44,23 +44,23 @@
<if
test=
"operation != null"
>
and operation like '%${operation}%'
</if>
<if
test=
"user
nameID
!= null"
>
and user
ID
=${user
nameID
}
<if
test=
"user
Id
!= null"
>
and user
_id
=${user
Id
}
</if>
<if
test=
"clientIp != null"
>
and client
I
p like '%${clientIp}%'
and client
_i
p like '%${clientIp}%'
</if>
<if
test=
"status != null"
>
and status = ${status}
</if>
<if
test=
"beginTime != null"
>
<![CDATA[
and createtime
>
= '${beginTime}'
]]>
</if>
<if
test=
"endTime != null"
>
<![CDATA[
and createtime
<
= '${endTime}'
]]>
</if>
<if
test=
"content
details
!= null"
>
and content
details
like '%${content
details
}%'
<if
test=
"beginTime != null"
>
and
l.
create
_
time
>
= '${beginTime}'
</if>
<if
test=
"endTime != null"
>
and
l.
create
_
time
<
= '${endTime}'
</if>
<if
test=
"content != null"
>
and content like '%${content}%'
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/MaterialCategoryMapper.xml
View file @
70f0dae4
...
...
@@ -2,14 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.MaterialCategoryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.MaterialCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"Id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"Name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"CategoryLevel"
jdbcType=
"SMALLINT"
property=
"categorylevel"
/>
<result
column=
"ParentId"
jdbcType=
"BIGINT"
property=
"parentid"
/>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"category_level"
jdbcType=
"SMALLINT"
property=
"categoryLevel"
/>
<result
column=
"parent_id"
jdbcType=
"BIGINT"
property=
"parentId"
/>
<result
column=
"sort"
jdbcType=
"VARCHAR"
property=
"sort"
/>
<result
column=
"status"
jdbcType=
"VARCHAR"
property=
"status"
/>
<result
column=
"serial_no"
jdbcType=
"VARCHAR"
property=
"serialNo"
/>
...
...
@@ -21,10 +17,6 @@
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -54,10 +46,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -87,24 +75,16 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, CategoryLevel, ParentId, sort, status, serial_no, remark, create_time,
id, name, category_level, parent_id, sort, status, serial_no, remark, create_time,
creator, update_time, updater, tenant_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategoryExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from jsh_materialcategory
from jsh_material
_
category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
@@ -113,67 +93,47 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_materialcategory
where
I
d = #{id,jdbcType=BIGINT}
from jsh_material
_
category
where
i
d = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialcategory
where Id = #{id,jdbcType=BIGINT}
delete from jsh_material_category
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategoryExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialcategory
delete from jsh_material_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialcategory (Id, Name, CategoryLevel,
ParentId, sort, status,
insert into jsh_material_category (id, name, category_level,
parent_id, sort, status,
serial_no, remark, create_time,
creator, update_time, updater,
tenant_id)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{category
l
evel,jdbcType=SMALLINT},
#{parent
i
d,jdbcType=BIGINT}, #{sort,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{category
L
evel,jdbcType=SMALLINT},
#{parent
I
d,jdbcType=BIGINT}, #{sort,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{serialNo,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{updater,jdbcType=BIGINT},
#{tenantId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialcategory
insert into jsh_material_category
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
I
d,
i
d,
</if>
<if
test=
"name != null"
>
N
ame,
n
ame,
</if>
<if
test=
"category
l
evel != null"
>
C
ategory
L
evel,
<if
test=
"category
L
evel != null"
>
c
ategory
_l
evel,
</if>
<if
test=
"parent
i
d != null"
>
P
arent
I
d,
<if
test=
"parent
I
d != null"
>
p
arent
_i
d,
</if>
<if
test=
"sort != null"
>
sort,
...
...
@@ -210,11 +170,11 @@
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"category
l
evel != null"
>
#{category
l
evel,jdbcType=SMALLINT},
<if
test=
"category
L
evel != null"
>
#{category
L
evel,jdbcType=SMALLINT},
</if>
<if
test=
"parent
i
d != null"
>
#{parent
i
d,jdbcType=BIGINT},
<if
test=
"parent
I
d != null"
>
#{parent
I
d,jdbcType=BIGINT},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=VARCHAR},
...
...
@@ -245,34 +205,26 @@
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategoryExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_materialcategory
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategoryExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_material_category
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
update jsh_material_category
<set>
<if
test=
"record.id != null"
>
I
d = #{record.id,jdbcType=BIGINT},
i
d = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
N
ame = #{record.name,jdbcType=VARCHAR},
n
ame = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.category
l
evel != null"
>
C
ategory
L
evel = #{record.category
l
evel,jdbcType=SMALLINT},
<if
test=
"record.category
L
evel != null"
>
c
ategory
_l
evel = #{record.category
L
evel,jdbcType=SMALLINT},
</if>
<if
test=
"record.parent
i
d != null"
>
P
arent
I
d = #{record.parent
i
d,jdbcType=BIGINT},
<if
test=
"record.parent
I
d != null"
>
p
arent
_i
d = #{record.parent
I
d,jdbcType=BIGINT},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=VARCHAR},
...
...
@@ -307,15 +259,11 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
CategoryLevel = #{record.categorylevel,jdbcType=SMALLINT},
ParentId = #{record.parentid,jdbcType=BIGINT},
update jsh_material_category
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
category_level = #{record.categoryLevel,jdbcType=SMALLINT},
parent_id = #{record.parentId,jdbcType=BIGINT},
sort = #{record.sort,jdbcType=VARCHAR},
status = #{record.status,jdbcType=VARCHAR},
serial_no = #{record.serialNo,jdbcType=VARCHAR},
...
...
@@ -330,20 +278,16 @@
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
update jsh_material_category
<set>
<if
test=
"name != null"
>
N
ame = #{name,jdbcType=VARCHAR},
n
ame = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"category
l
evel != null"
>
C
ategory
L
evel = #{category
l
evel,jdbcType=SMALLINT},
<if
test=
"category
L
evel != null"
>
c
ategory
_l
evel = #{category
L
evel,jdbcType=SMALLINT},
</if>
<if
test=
"parent
i
d != null"
>
P
arent
I
d = #{parent
i
d,jdbcType=BIGINT},
<if
test=
"parent
I
d != null"
>
p
arent
_i
d = #{parent
I
d,jdbcType=BIGINT},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=VARCHAR},
...
...
@@ -373,17 +317,13 @@
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategory"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
set Name = #{name,jdbcType=VARCHAR},
CategoryLevel = #{categorylevel,jdbcType=SMALLINT},
ParentId = #{parentid,jdbcType=BIGINT},
update jsh_material_category
set name = #{name,jdbcType=VARCHAR},
category_level = #{categoryLevel,jdbcType=SMALLINT},
parent_id = #{parentId,jdbcType=BIGINT},
sort = #{sort,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
serial_no = #{serialNo,jdbcType=VARCHAR},
...
...
@@ -393,6 +333,6 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
updater = #{updater,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT}
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/MaterialCategoryMapperEx.xml
View file @
70f0dae4
...
...
@@ -3,14 +3,14 @@
<mapper
namespace=
"com.jsh.erp.datasource.mappers.MaterialCategoryMapperEx"
>
<select
id=
"selectByConditionMaterialCategory"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategoryExample"
resultMap=
"com.jsh.erp.datasource.mappers.MaterialCategoryMapper.BaseResultMap"
>
select *
FROM jsh_materialcategory
FROM jsh_material
_
category
where 1=1
and ifnull(status,'0') !='2'
<if
test=
"name != null"
>
and name like '%${name}%'
</if>
<if
test=
"parentId != null"
>
and parent
I
d = ${parentId}
and parent
_i
d = ${parentId}
</if>
and Id !=1
<if
test=
"offset != null and rows != null"
>
...
...
@@ -20,14 +20,14 @@
<select
id=
"countsByMaterialCategory"
resultType=
"java.lang.Long"
>
SELECT
COUNT(id)
FROM jsh_materialcategory
FROM jsh_material
_
category
WHERE 1=1
and ifnull(status,'0') !='2'
<if
test=
"name != null"
>
and name like '%${name}%'
</if>
<if
test=
"parentId != null"
>
and parent
I
d = ${parentId}
and parent
_i
d = ${parentId}
</if>
and Id !=1
</select>
...
...
@@ -53,8 +53,8 @@
<select
id=
"getNextNodeTree"
resultMap=
"NextTreeResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,#{currentId} as currentId
FROM jsh_materialcategory
WHERE
P
arent
I
d = #{id}
FROM jsh_material
_
category
WHERE
p
arent
_i
d = #{id}
<if
test=
"currentId != null"
>
and id !=#{currentId}
</if>
...
...
@@ -65,8 +65,8 @@
<select
id=
"getNodeTree"
resultMap=
"BaseTreeResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
,#{currentId} as currentId
FROM jsh_materialcategory
WHERE
P
arent
I
d = -1
FROM jsh_material
_
category
WHERE
p
arent
_i
d = -1
and ifnull(status,'0') !='2'
<if
test=
"currentId != null"
>
and id !=#{currentId}
...
...
@@ -75,17 +75,17 @@
</select>
<insert
id=
"addMaterialCategory"
parameterType=
"com.jsh.erp.datasource.entities.MaterialCategory"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into jsh_materialcategory
(
N
ame,
C
ategory
L
evel,
P
arent
I
d, sort,status,serial_no,remark,
create_
T
ime, creator,update_
T
ime, updater)
insert into jsh_material
_
category
(
n
ame,
c
ategory
_l
evel,
p
arent
_i
d, sort,status,serial_no,remark,
create_
t
ime, creator,update_
t
ime, updater)
values
(#{name},#{category
l
evel},#{parent
i
d},#{sort},#{status},#{serialNo},#{remark},
(#{name},#{category
L
evel},#{parent
I
d},#{sort},#{status},#{serialNo},#{remark},
#{createTime},#{creator},#{updateTime},#{updater}
)
</insert>
<update
id=
"batchDeleteMaterialCategoryByIds"
>
update jsh_materialcategory
set update_
T
ime=#{updateTime},updater=#{updater},status='2'
update jsh_material
_
category
set update_
t
ime=#{updateTime},updater=#{updater},status='2'
where id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
#{id}
...
...
@@ -93,16 +93,16 @@
)
</update>
<update
id=
"editMaterialCategory"
>
update jsh_materialcategory
set update_
T
ime=#{updateTime},updater=#{updater},
P
arent
I
d=#{parent
i
d},sort=#{sort},serial_no=#{serialNo},
update jsh_material
_
category
set update_
t
ime=#{updateTime},updater=#{updater},
p
arent
_i
d=#{parent
I
d},sort=#{sort},serial_no=#{serialNo},
name=#{name},remark=#{remark}
where id =#{id}
</update>
<select
id=
"getMaterialCategoryBySerialNo"
resultMap=
"com.jsh.erp.datasource.mappers.MaterialCategoryMapper.BaseResultMap"
>
select
<include
refid=
"com.jsh.erp.datasource.mappers.MaterialCategoryMapper.Base_Column_List"
/>
FROM jsh_materialcategory
FROM jsh_material
_
category
where 1=1
and serial_no=#{serialNo}
and ifnull(status,'0') !='2'
...
...
@@ -110,9 +110,9 @@
<select
id=
"getMaterialCategoryListByCategoryIds"
resultMap=
"com.jsh.erp.datasource.mappers.MaterialCategoryMapper.BaseResultMap"
>
select
<include
refid=
"com.jsh.erp.datasource.mappers.MaterialCategoryMapper.Base_Column_List"
/>
from jsh_materialcategory
from jsh_material
_
category
where 1=1
and parent
I
d in (
and parent
_i
d in (
<foreach
collection=
"parentIds"
item=
"parentId"
separator=
","
>
#{parentId}
</foreach>
...
...
src/main/resources/mapper_xml/MaterialMapperEx.xml
View file @
70f0dae4
...
...
@@ -13,16 +13,16 @@
</resultMap>
<resultMap
extends=
"com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap"
id=
"ResultAndUnitMap"
type=
"com.jsh.erp.datasource.entities.MaterialVo4Unit"
>
<result
column=
"
UN
ame"
jdbcType=
"VARCHAR"
property=
"unitName"
/>
<result
column=
"
unit_n
ame"
jdbcType=
"VARCHAR"
property=
"unitName"
/>
</resultMap>
<select
id=
"selectByConditionMaterial"
parameterType=
"com.jsh.erp.datasource.entities.MaterialExample"
resultMap=
"ResultMapList"
>
select m.*,u.
u
name unitName, mc.name categoryName, me.bar_code,
select m.*,u.name unitName, mc.name categoryName, me.bar_code,
me.purchase_decimal, me.commodity_decimal, me.wholesale_decimal,me.low_decimal
FROM jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_material
_
category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
where 1=1
and me.default_flag=1
<if
test=
"barCode != null"
>
...
...
@@ -53,7 +53,7 @@
FROM jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_material
_
category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
WHERE 1=1
and me.default_flag=1
<if
test=
"barCode != null"
>
...
...
@@ -75,21 +75,21 @@
</select>
<select
id=
"findUnitName"
resultType=
"java.lang.String"
>
select u.
UN
ame from jsh_unit u
select u.
n
ame from jsh_unit u
left join jsh_material m on m.UnitId=u.id and ifnull(m.delete_Flag,'0') !='1'
where m.id = ${mId}
and ifnull(u.delete_Flag,'0') !='1'
</select>
<select
id=
"findById"
parameterType=
"com.jsh.erp.datasource.entities.MaterialExample"
resultMap=
"ResultAndUnitMap"
>
select m.*,u.
UN
ame from jsh_material m
select m.*,u.
name unit_n
ame from jsh_material m
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1'
where m.id = ${id}
and ifnull(m.delete_Flag,'0') !='1'
</select>
<select
id=
"findByIdWithBarCode"
parameterType=
"com.jsh.erp.datasource.entities.MaterialExample"
resultMap=
"ResultAndUnitMap"
>
select m.*,u.
UN
ame,me.bar_code m_bar_code, me.commodity_unit, me.purchase_decimal, me.commodity_decimal,
select m.*,u.
name unit_n
ame,me.bar_code m_bar_code, me.commodity_unit, me.purchase_decimal, me.commodity_decimal,
me.wholesale_decimal, me.low_decimal
from jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
...
...
@@ -99,7 +99,7 @@
</select>
<select
id=
"findBySelectWithBarCode"
parameterType=
"com.jsh.erp.datasource.entities.MaterialExample"
resultMap=
"ResultAndUnitMap"
>
select m.*,u.
UN
ame,me.bar_code m_bar_code,me.id meId,me.commodity_unit from jsh_material m
select m.*,u.
name unit_n
ame,me.bar_code m_bar_code,me.id meId,me.commodity_unit from jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1'
where m.enabled=1 and me.id is not null
...
...
@@ -125,12 +125,12 @@
</select>
<select
id=
"findByAll"
parameterType=
"com.jsh.erp.datasource.entities.MaterialExample"
resultMap=
"ResultMapList"
>
select m.*,u.
u
name unitName, mc.name categoryName,me.commodity_unit,me.purchase_decimal, me.commodity_decimal,
select m.*,u.name unitName, mc.name categoryName,me.commodity_unit,me.purchase_decimal, me.commodity_decimal,
me.wholesale_decimal, me.low_decimal
FROM jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_material
_
category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
where 1=1
and me.default_flag=1
<if
test=
"name != null"
>
...
...
@@ -236,11 +236,11 @@
</select>
<select
id=
"getMaterialByMeId"
parameterType=
"com.jsh.erp.datasource.entities.MaterialExample"
resultMap=
"ResultMapList"
>
select m.*,me.bar_code m_bar_code,u.
u
name unitName, mc.name categoryName
select m.*,me.bar_code m_bar_code,u.name unitName, mc.name categoryName
FROM jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_
F
lag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_
f
lag,'0') !='1'
left JOIN jsh_material
_
category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
where 1=1
<if
test=
"meId != null"
>
and me.id = ${meId}
...
...
src/main/resources/mapper_xml/MaterialPropertyMapper.xml
View file @
70f0dae4
...
...
@@ -2,22 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.MaterialPropertyMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.MaterialProperty"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"native
N
ame"
jdbcType=
"VARCHAR"
property=
"native
n
ame"
/>
<result
column=
"native
_n
ame"
jdbcType=
"VARCHAR"
property=
"native
N
ame"
/>
<result
column=
"enabled"
jdbcType=
"BIT"
property=
"enabled"
/>
<result
column=
"sort"
jdbcType=
"VARCHAR"
property=
"sort"
/>
<result
column=
"another
N
ame"
jdbcType=
"VARCHAR"
property=
"another
n
ame"
/>
<result
column=
"delete_
F
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"another
_n
ame"
jdbcType=
"VARCHAR"
property=
"another
N
ame"
/>
<result
column=
"delete_
f
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -47,10 +39,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -80,23 +68,15 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, nativeName, enabled, sort, anotherName, delete_Flag
id, native_name, enabled, sort, another_name, delete_flag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.MaterialPropertyExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from jsh_materialproperty
from jsh_material
_
property
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
@@ -105,57 +85,37 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_materialproperty
from jsh_material
_
property
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialproperty
delete from jsh_material_property
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.MaterialPropertyExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialproperty
delete from jsh_material_property
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.MaterialProperty"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialproperty (id, nativeName, enabled,
sort, anotherName, delete_Flag
insert into jsh_material_property (id, native_name, enabled,
sort, another_name, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{native
n
ame,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
#{sort,jdbcType=VARCHAR}, #{another
n
ame,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
values (#{id,jdbcType=BIGINT}, #{native
N
ame,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
#{sort,jdbcType=VARCHAR}, #{another
N
ame,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.MaterialProperty"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialproperty
insert into jsh_material_property
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"native
n
ame != null"
>
native
N
ame,
<if
test=
"native
N
ame != null"
>
native
_n
ame,
</if>
<if
test=
"enabled != null"
>
enabled,
...
...
@@ -163,19 +123,19 @@
<if
test=
"sort != null"
>
sort,
</if>
<if
test=
"another
n
ame != null"
>
another
N
ame,
<if
test=
"another
N
ame != null"
>
another
_n
ame,
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag,
delete_
f
lag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"native
n
ame != null"
>
#{native
n
ame,jdbcType=VARCHAR},
<if
test=
"native
N
ame != null"
>
#{native
N
ame,jdbcType=VARCHAR},
</if>
<if
test=
"enabled != null"
>
#{enabled,jdbcType=BIT},
...
...
@@ -183,36 +143,28 @@
<if
test=
"sort != null"
>
#{sort,jdbcType=VARCHAR},
</if>
<if
test=
"another
n
ame != null"
>
#{another
n
ame,jdbcType=VARCHAR},
<if
test=
"another
N
ame != null"
>
#{another
N
ame,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.MaterialPropertyExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_materialproperty
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.MaterialPropertyExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_material_property
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
update jsh_material_property
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.native
n
ame != null"
>
native
N
ame = #{record.native
n
ame,jdbcType=VARCHAR},
<if
test=
"record.native
N
ame != null"
>
native
_n
ame = #{record.native
N
ame,jdbcType=VARCHAR},
</if>
<if
test=
"record.enabled != null"
>
enabled = #{record.enabled,jdbcType=BIT},
...
...
@@ -220,11 +172,11 @@
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if
test=
"record.another
n
ame != null"
>
another
N
ame = #{record.another
n
ame,jdbcType=VARCHAR},
<if
test=
"record.another
N
ame != null"
>
another
_n
ame = #{record.another
N
ame,jdbcType=VARCHAR},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -232,30 +184,22 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
update jsh_material_property
set id = #{record.id,jdbcType=BIGINT},
native
N
ame = #{record.native
n
ame,jdbcType=VARCHAR},
native
_n
ame = #{record.native
N
ame,jdbcType=VARCHAR},
enabled = #{record.enabled,jdbcType=BIT},
sort = #{record.sort,jdbcType=VARCHAR},
another
N
ame = #{record.another
n
ame,jdbcType=VARCHAR},
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR}
another
_n
ame = #{record.another
N
ame,jdbcType=VARCHAR},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.MaterialProperty"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
update jsh_material_property
<set>
<if
test=
"native
n
ame != null"
>
native
N
ame = #{native
n
ame,jdbcType=VARCHAR},
<if
test=
"native
N
ame != null"
>
native
_n
ame = #{native
N
ame,jdbcType=VARCHAR},
</if>
<if
test=
"enabled != null"
>
enabled = #{enabled,jdbcType=BIT},
...
...
@@ -263,26 +207,22 @@
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=VARCHAR},
</if>
<if
test=
"another
n
ame != null"
>
another
N
ame = #{another
n
ame,jdbcType=VARCHAR},
<if
test=
"another
N
ame != null"
>
another
_n
ame = #{another
N
ame,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.MaterialProperty"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
set nativeName = #{nativename,jdbcType=VARCHAR},
update jsh_material_property
set native_name = #{nativeName,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
sort = #{sort,jdbcType=VARCHAR},
another
N
ame = #{another
n
ame,jdbcType=VARCHAR},
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR}
another
_n
ame = #{another
N
ame,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/MaterialPropertyMapperEx.xml
View file @
70f0dae4
...
...
@@ -3,12 +3,12 @@
<mapper
namespace=
"com.jsh.erp.datasource.mappers.MaterialPropertyMapperEx"
>
<select
id=
"selectByConditionMaterialProperty"
parameterType=
"com.jsh.erp.datasource.entities.MaterialPropertyExample"
resultMap=
"com.jsh.erp.datasource.mappers.MaterialPropertyMapper.BaseResultMap"
>
select *
FROM jsh_materialproperty
FROM jsh_material
_
property
where 1=1
<if
test=
"name != null"
>
and native
N
ame like '%${name}%'
and native
_n
ame like '%${name}%'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
</if>
...
...
@@ -16,16 +16,16 @@
<select
id=
"countsByMaterialProperty"
resultType=
"java.lang.Long"
>
SELECT
COUNT(id)
FROM jsh_materialproperty
FROM jsh_material
_
property
WHERE 1=1
<if
test=
"name != null"
>
and native
N
ame like '%${name}%'
and native
_n
ame like '%${name}%'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
</select>
<update
id=
"batchDeleteMaterialPropertyByIds"
>
update jsh_materialproperty
set delete_
F
lag='1'
update jsh_material
_
property
set delete_
f
lag='1'
where 1=1
and id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
...
...
src/main/resources/mapper_xml/PersonMapper.xml
View file @
70f0dae4
...
...
@@ -2,21 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.PersonMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Person"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"Id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"Type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"Name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_
F
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"delete_
f
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -46,10 +38,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -79,17 +67,9 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, Name, tenant_id, delete_Flag
id, type, name, tenant_id, delete_flag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.PersonExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
...
...
@@ -104,64 +84,44 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_person
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_person
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.PersonExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_person
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.Person"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_person (Id, Type, Name,
tenant_id, delete_Flag)
insert into jsh_person (id, type, name,
tenant_id, delete_flag)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Person"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_person
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
I
d,
i
d,
</if>
<if
test=
"type != null"
>
T
ype,
t
ype,
</if>
<if
test=
"name != null"
>
N
ame,
n
ame,
</if>
<if
test=
"tenantId != null"
>
tenant_id,
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag,
delete_
f
lag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -182,37 +142,29 @@
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.PersonExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.PersonExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_person
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
<set>
<if
test=
"record.id != null"
>
I
d = #{record.id,jdbcType=BIGINT},
i
d = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.type != null"
>
T
ype = #{record.type,jdbcType=VARCHAR},
t
ype = #{record.type,jdbcType=VARCHAR},
</if>
<if
test=
"record.name != null"
>
N
ame = #{record.name,jdbcType=VARCHAR},
n
ame = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.tenantId != null"
>
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -220,52 +172,40 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
set
I
d = #{record.id,jdbcType=BIGINT},
T
ype = #{record.type,jdbcType=VARCHAR},
N
ame = #{record.name,jdbcType=VARCHAR},
set
i
d = #{record.id,jdbcType=BIGINT},
t
ype = #{record.type,jdbcType=VARCHAR},
n
ame = #{record.name,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.Person"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
<set>
<if
test=
"type != null"
>
T
ype = #{type,jdbcType=VARCHAR},
t
ype = #{type,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
N
ame = #{name,jdbcType=VARCHAR},
n
ame = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"tenantId != null"
>
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.Person"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
set
T
ype = #{type,jdbcType=VARCHAR},
N
ame = #{name,jdbcType=VARCHAR},
set
t
ype = #{type,jdbcType=VARCHAR},
n
ame = #{name,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR}
where
I
d = #{id,jdbcType=BIGINT}
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR}
where
i
d = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/PersonMapperEx.xml
View file @
70f0dae4
...
...
@@ -11,7 +11,7 @@
<if
test=
"type != null"
>
and type='${type}'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
</if>
...
...
@@ -27,11 +27,11 @@
<if
test=
"type != null"
>
and type='${type}'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
</select>
<update
id=
"batchDeletePersonByIds"
>
update jsh_person
set delete_
F
lag='1'
set delete_
f
lag='1'
where 1=1
and id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
...
...
src/main/resources/mapper_xml/RoleMapper.xml
View file @
70f0dae4
...
...
@@ -2,23 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.RoleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Role"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"Id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"Name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"value"
jdbcType=
"VARCHAR"
property=
"value"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_
F
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"delete_
f
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -48,10 +40,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -81,17 +69,9 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, type, value, description, tenant_id, delete_Flag
id, name, type, value, description, tenant_id, delete_flag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.RoleExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
...
...
@@ -106,57 +86,37 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_role
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_role
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.RoleExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_role
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.Role"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_role (Id, Name, type,
insert into jsh_role (id, name, type,
value, description, tenant_id,
delete_
F
lag)
delete_
f
lag)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Role"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_role
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
I
d,
i
d,
</if>
<if
test=
"name != null"
>
N
ame,
n
ame,
</if>
<if
test=
"type != null"
>
type,
...
...
@@ -171,7 +131,7 @@
tenant_id,
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag,
delete_
f
lag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -198,28 +158,20 @@
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.RoleExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.RoleExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_role
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
<set>
<if
test=
"record.id != null"
>
I
d = #{record.id,jdbcType=BIGINT},
i
d = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
N
ame = #{record.name,jdbcType=VARCHAR},
n
ame = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.type != null"
>
type = #{record.type,jdbcType=VARCHAR},
...
...
@@ -234,7 +186,7 @@
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -242,31 +194,23 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
set
I
d = #{record.id,jdbcType=BIGINT},
N
ame = #{record.name,jdbcType=VARCHAR},
set
i
d = #{record.id,jdbcType=BIGINT},
n
ame = #{record.name,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.Role"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
<set>
<if
test=
"name != null"
>
N
ame = #{name,jdbcType=VARCHAR},
n
ame = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
type = #{type,jdbcType=VARCHAR},
...
...
@@ -281,23 +225,19 @@
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where
I
d = #{id,jdbcType=BIGINT}
where
i
d = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.Role"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
set
N
ame = #{name,jdbcType=VARCHAR},
set
n
ame = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR}
where
I
d = #{id,jdbcType=BIGINT}
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR}
where
i
d = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/RoleMapperEx.xml
View file @
70f0dae4
...
...
@@ -5,7 +5,7 @@
SELECT *
FROM jsh_role
WHERE 1=1
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
<if
test=
"name != null"
>
and name like '%${name}%'
</if>
...
...
@@ -18,14 +18,14 @@
COUNT(id)
FROM jsh_role
WHERE 1=1
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
<if
test=
"name != null"
>
and name like '%${name}%'
</if>
</select>
<update
id=
"batchDeleteRoleByIds"
>
update jsh_role
set delete_
F
lag='1'
set delete_
f
lag='1'
where 1=1
and id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
...
...
src/main/resources/mapper_xml/SerialNumberMapper.xml
View file @
70f0dae4
...
...
@@ -2,28 +2,20 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.SerialNumberMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.SerialNumber"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"material_
I
d"
jdbcType=
"BIGINT"
property=
"materialId"
/>
<result
column=
"serial_
N
umber"
jdbcType=
"VARCHAR"
property=
"serialNumber"
/>
<result
column=
"is_
S
ell"
jdbcType=
"VARCHAR"
property=
"isSell"
/>
<result
column=
"material_
i
d"
jdbcType=
"BIGINT"
property=
"materialId"
/>
<result
column=
"serial_
n
umber"
jdbcType=
"VARCHAR"
property=
"serialNumber"
/>
<result
column=
"is_
s
ell"
jdbcType=
"VARCHAR"
property=
"isSell"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"delete_
F
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"create_
T
ime"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"delete_
f
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"create_
t
ime"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"creator"
jdbcType=
"BIGINT"
property=
"creator"
/>
<result
column=
"update_
T
ime"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"update_
t
ime"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"updater"
jdbcType=
"BIGINT"
property=
"updater"
/>
<result
column=
"depothead_
I
d"
jdbcType=
"BIGINT"
property=
"depot
h
eadId"
/>
<result
column=
"depot
_
head_
i
d"
jdbcType=
"BIGINT"
property=
"depot
H
eadId"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -53,10 +45,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -86,18 +74,10 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, material_Id, serial_Number, is_Sell, remark, delete_Flag, create_Time, creator,
update_Time, updater, depothead_Id, tenant_id
id, material_id, serial_number, is_sell, remark, delete_flag, create_time, creator,
update_time, updater, depot_head_id, tenant_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumberExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
...
...
@@ -112,88 +92,68 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_serial_number
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_serial_number
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumberExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_serial_number
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumber"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_serial_number (id, material_Id, serial_Number,
is_Sell, remark, delete_Flag,
create_Time, creator, update_Time,
updater, depothead_Id, tenant_id
insert into jsh_serial_number (id, material_id, serial_number,
is_sell, remark, delete_flag,
create_time, creator, update_time,
updater, depot_head_id, tenant_id
)
values (#{id,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, #{serialNumber,jdbcType=VARCHAR},
#{isSell,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
#{updater,jdbcType=BIGINT}, #{depot
h
eadId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}
#{updater,jdbcType=BIGINT}, #{depot
H
eadId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumber"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_serial_number
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"materialId != null"
>
material_
I
d,
material_
i
d,
</if>
<if
test=
"serialNumber != null"
>
serial_
N
umber,
serial_
n
umber,
</if>
<if
test=
"isSell != null"
>
is_
S
ell,
is_
s
ell,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag,
delete_
f
lag,
</if>
<if
test=
"createTime != null"
>
create_
T
ime,
create_
t
ime,
</if>
<if
test=
"creator != null"
>
creator,
</if>
<if
test=
"updateTime != null"
>
update_
T
ime,
update_
t
ime,
</if>
<if
test=
"updater != null"
>
updater,
</if>
<if
test=
"depot
h
eadId != null"
>
depothead_
I
d,
<if
test=
"depot
H
eadId != null"
>
depot
_
head_
i
d,
</if>
<if
test=
"tenantId != null"
>
tenant_id,
...
...
@@ -230,63 +190,55 @@
<if
test=
"updater != null"
>
#{updater,jdbcType=BIGINT},
</if>
<if
test=
"depot
h
eadId != null"
>
#{depot
h
eadId,jdbcType=BIGINT},
<if
test=
"depot
H
eadId != null"
>
#{depot
H
eadId,jdbcType=BIGINT},
</if>
<if
test=
"tenantId != null"
>
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumberExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumberExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_serial_number
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_serial_number
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.materialId != null"
>
material_
I
d = #{record.materialId,jdbcType=BIGINT},
material_
i
d = #{record.materialId,jdbcType=BIGINT},
</if>
<if
test=
"record.serialNumber != null"
>
serial_
N
umber = #{record.serialNumber,jdbcType=VARCHAR},
serial_
n
umber = #{record.serialNumber,jdbcType=VARCHAR},
</if>
<if
test=
"record.isSell != null"
>
is_
S
ell = #{record.isSell,jdbcType=VARCHAR},
is_
s
ell = #{record.isSell,jdbcType=VARCHAR},
</if>
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_
T
ime = #{record.createTime,jdbcType=TIMESTAMP},
create_
t
ime = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.creator != null"
>
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if
test=
"record.updateTime != null"
>
update_
T
ime = #{record.updateTime,jdbcType=TIMESTAMP},
update_
t
ime = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updater != null"
>
updater = #{record.updater,jdbcType=BIGINT},
</if>
<if
test=
"record.depot
h
eadId != null"
>
depothead_
I
d = #{record.depot
h
eadId,jdbcType=BIGINT},
<if
test=
"record.depot
H
eadId != null"
>
depot
_
head_
i
d = #{record.depot
H
eadId,jdbcType=BIGINT},
</if>
<if
test=
"record.tenantId != null"
>
tenant_id = #{record.tenantId,jdbcType=BIGINT},
...
...
@@ -297,63 +249,55 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_serial_number
set id = #{record.id,jdbcType=BIGINT},
material_
I
d = #{record.materialId,jdbcType=BIGINT},
serial_
N
umber = #{record.serialNumber,jdbcType=VARCHAR},
is_
S
ell = #{record.isSell,jdbcType=VARCHAR},
material_
i
d = #{record.materialId,jdbcType=BIGINT},
serial_
n
umber = #{record.serialNumber,jdbcType=VARCHAR},
is_
s
ell = #{record.isSell,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR},
create_
T
ime = #{record.createTime,jdbcType=TIMESTAMP},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR},
create_
t
ime = #{record.createTime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
update_
T
ime = #{record.updateTime,jdbcType=TIMESTAMP},
update_
t
ime = #{record.updateTime,jdbcType=TIMESTAMP},
updater = #{record.updater,jdbcType=BIGINT},
depothead_
I
d = #{record.depot
h
eadId,jdbcType=BIGINT},
depot
_
head_
i
d = #{record.depot
H
eadId,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumber"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_serial_number
<set>
<if
test=
"materialId != null"
>
material_
I
d = #{materialId,jdbcType=BIGINT},
material_
i
d = #{materialId,jdbcType=BIGINT},
</if>
<if
test=
"serialNumber != null"
>
serial_
N
umber = #{serialNumber,jdbcType=VARCHAR},
serial_
n
umber = #{serialNumber,jdbcType=VARCHAR},
</if>
<if
test=
"isSell != null"
>
is_
S
ell = #{isSell,jdbcType=VARCHAR},
is_
s
ell = #{isSell,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_
T
ime = #{createTime,jdbcType=TIMESTAMP},
create_
t
ime = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"creator != null"
>
creator = #{creator,jdbcType=BIGINT},
</if>
<if
test=
"updateTime != null"
>
update_
T
ime = #{updateTime,jdbcType=TIMESTAMP},
update_
t
ime = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updater != null"
>
updater = #{updater,jdbcType=BIGINT},
</if>
<if
test=
"depot
h
eadId != null"
>
depothead_
I
d = #{depot
h
eadId,jdbcType=BIGINT},
<if
test=
"depot
H
eadId != null"
>
depot
_
head_
i
d = #{depot
H
eadId,jdbcType=BIGINT},
</if>
<if
test=
"tenantId != null"
>
tenant_id = #{tenantId,jdbcType=BIGINT},
...
...
@@ -362,21 +306,17 @@
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumber"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_serial_number
set material_
I
d = #{materialId,jdbcType=BIGINT},
serial_
N
umber = #{serialNumber,jdbcType=VARCHAR},
is_
S
ell = #{isSell,jdbcType=VARCHAR},
set material_
i
d = #{materialId,jdbcType=BIGINT},
serial_
n
umber = #{serialNumber,jdbcType=VARCHAR},
is_
s
ell = #{isSell,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
create_
T
ime = #{createTime,jdbcType=TIMESTAMP},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
create_
t
ime = #{createTime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
update_
T
ime = #{updateTime,jdbcType=TIMESTAMP},
update_
t
ime = #{updateTime,jdbcType=TIMESTAMP},
updater = #{updater,jdbcType=BIGINT},
depothead_
I
d = #{depot
h
eadId,jdbcType=BIGINT},
depot
_
head_
i
d = #{depot
H
eadId,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
...
...
src/main/resources/mapper_xml/SerialNumberMapperEx.xml
View file @
70f0dae4
...
...
@@ -11,22 +11,22 @@
</resultMap>
<select
id=
"selectByConditionSerialNumber"
resultMap=
"SerialNumberExBaseResultMap"
>
select
ser.id, ser.material_
I
d, ser.serial_
N
umber, ser.is_
S
ell, ser.remark, ser.delete_
F
lag, ser.create_
T
ime,
ser.update_
T
ime,mat.name as materialName,null as creator,null as updater,null as creatorName,
null as updaterName,ser.depothead_
I
d, dh.number as depotHeadNumber,concat(dh.SubType,dh.Type) as depotHeadType
ser.id, ser.material_
i
d, ser.serial_
n
umber, ser.is_
s
ell, ser.remark, ser.delete_
f
lag, ser.create_
t
ime,
ser.update_
t
ime,mat.name as materialName,null as creator,null as updater,null as creatorName,
null as updaterName,ser.depot
_
head_
i
d, dh.number as depotHeadNumber,concat(dh.SubType,dh.Type) as depotHeadType
FROM jsh_serial_number ser
left join jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_Flag,'0') !='1'
left join jsh_depothead dh on dh.id= ser.depothead_
I
d and ifnull(dh.delete_Flag,'0') !='1'
left join jsh_depothead dh on dh.id= ser.depot
_
head_
i
d and ifnull(dh.delete_Flag,'0') !='1'
where 1=1
<if
test=
"serialNumber != null"
>
<bind
name=
"serialNumber"
value=
"'%' + _parameter.serialNumber + '%'"
/>
and ser.serial_
N
umber like #{serialNumber}
and ser.serial_
n
umber like #{serialNumber}
</if>
<if
test=
"materialName != null"
>
<bind
name=
"materialName"
value=
"'%' + _parameter.materialName + '%'"
/>
and mat.name like #{materialName}
</if>
and ifnull(ser.delete_
F
lag,'0') !='1'
and ifnull(ser.delete_
f
lag,'0') !='1'
order by ser.id desc
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
...
...
@@ -36,7 +36,7 @@
SELECT
COUNT(ser.id)
FROM jsh_serial_number ser
left JOIN jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_
F
lag,'0') !='1'
left JOIN jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_
f
lag,'0') !='1'
where 1=1
<if
test=
"serialNumber != null"
>
<bind
name=
"serialNumber"
value=
"'%' + _parameter.serialNumber + '%'"
/>
...
...
@@ -46,71 +46,71 @@
<bind
name=
"materialName"
value=
"'%' + _parameter.materialName + '%'"
/>
and mat.name like #{materialName}
</if>
and ifnull(ser.delete_
F
lag,'0') !='1'
and ifnull(ser.delete_
f
lag,'0') !='1'
order by ser.id desc
</select>
<select
id=
"findById"
resultMap=
"SerialNumberExBaseResultMap"
>
SELECT
ser.id, ser.material_
I
d, ser.serial_
N
umber, ser.is_
S
ell, ser.remark, ser.delete_
F
lag, ser.create_
T
ime,
ser.update_
T
ime,ser.creator,ser.updater,mat.name as materialName,cr.username as creatorName,
ur.username as updaterName,ser.depothead_
I
d
ser.id, ser.material_
i
d, ser.serial_
n
umber, ser.is_
s
ell, ser.remark, ser.delete_
f
lag, ser.create_
t
ime,
ser.update_
t
ime,ser.creator,ser.updater,mat.name as materialName,cr.username as creatorName,
ur.username as updaterName,ser.depot
_
head_
i
d
FROM jsh_serial_number ser
left JOIN jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_Flag,'0') !='1'
left join jsh_user cr on ser.creator=cr.id and ifnull(cr.status,'0') not in('1','2')
left join jsh_user ur on ser.updater=ur.id and ifnull(ur.status,'0') not in('1','2')
where 1=1
and ser.id=#{id}
and ifnull(ser.delete_
F
lag,'0') !='1'
and ifnull(ser.delete_
f
lag,'0') !='1'
order by ser.id desc
</select>
<select
id=
"findBySerialNumber"
resultMap=
"SerialNumberExBaseResultMap"
>
SELECT
ser.id, ser.material_
I
d, ser.serial_
N
umber, ser.is_
S
ell, ser.remark, ser.delete_
F
lag, ser.create_
T
ime,
ser.update_
T
ime,ser.creator,ser.updater,ser.depothead_
I
d
ser.id, ser.material_
i
d, ser.serial_
n
umber, ser.is_
s
ell, ser.remark, ser.delete_
f
lag, ser.create_
t
ime,
ser.update_
t
ime,ser.creator,ser.updater,ser.depot
_
head_
i
d
FROM jsh_serial_number ser
where 1=1
<if
test=
"serialNumber != null"
>
and ser.serial_
N
umber=#{serialNumber}
and ser.serial_
n
umber=#{serialNumber}
</if>
and ifnull(ser.delete_
F
lag,'0') !='1'
and ifnull(ser.delete_
f
lag,'0') !='1'
order by ser.id desc
</select>
<insert
id=
"addSerialNumber"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumberEx"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into jsh_serial_number
(material_
I
d, serial_
N
umber, is_
S
ell, remark,delete_
F
lag,
create_
T
ime, creator,update_
T
ime, updater,depothead_
I
d)
(material_
i
d, serial_
n
umber, is_
s
ell, remark,delete_
f
lag,
create_
t
ime, creator,update_
t
ime, updater,depot
_
head_
i
d)
values
(#{materialId},#{serialNumber},#{isSell},#{remark},#{deleteFlag},
#{createTime},#{creator},#{updateTime},#{updater},#{depot
h
eadId}
#{createTime},#{creator},#{updateTime},#{updater},#{depot
H
eadId}
)
</insert>
<update
id=
"updateSerialNumber"
parameterType=
"com.jsh.erp.datasource.entities.SerialNumberEx"
>
update jsh_serial_number
<set>
<if
test=
"materialId != null"
>
material_
I
d = #{materialId,jdbcType=BIGINT},
material_
i
d = #{materialId,jdbcType=BIGINT},
</if>
<if
test=
"serialNumber != null"
>
serial_
N
umber = #{serialNumber,jdbcType=VARCHAR},
serial_
n
umber = #{serialNumber,jdbcType=VARCHAR},
</if>
<if
test=
"isSell != null"
>
is_
S
ell = #{isSell,jdbcType=VARCHAR},
is_
s
ell = #{isSell,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
</if>
<if
test=
"updateTime != null"
>
update_
T
ime = #{updateTime,jdbcType=TIMESTAMP},
update_
t
ime = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updater != null"
>
updater = #{updater,jdbcType=BIGINT},
</if>
<if
test=
"depot
h
eadId != null"
>
depothead_
I
d = #{depot
h
eadId,jdbcType=BIGINT},
<if
test=
"depot
H
eadId != null"
>
depot
_
head_
i
d = #{depot
H
eadId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
...
...
@@ -124,8 +124,8 @@
<if
test=
"materialId != null"
>
and ser.material_Id=#{materialId}
</if>
and ifnull(ser.delete_
F
lag,'0') !='1'
and ser.is_
S
ell !='1'
and ifnull(ser.delete_
f
lag,'0') !='1'
and ser.is_
s
ell !='1'
</select>
<select
id=
"countSerialNumberByMaterialIdAndDepotheadId"
resultType=
"java.lang.Integer"
>
SELECT
...
...
@@ -133,23 +133,23 @@
FROM jsh_serial_number ser
where 1=1
<if
test=
"materialId != null"
>
and ser.material_
I
d=#{materialId}
and ser.material_
i
d=#{materialId}
</if>
<if
test=
"depot
h
eadId != null"
>
and ser.depothead_
I
d=#{depot
h
eadId}
<if
test=
"depot
H
eadId != null"
>
and ser.depot
_
head_
i
d=#{depot
H
eadId}
</if>
and ser.is_
S
ell =#{isSell,jdbcType=VARCHAR}
and ifnull(ser.delete_
F
lag,'0') !='1'
and ser.is_
s
ell =#{isSell,jdbcType=VARCHAR}
and ifnull(ser.delete_
f
lag,'0') !='1'
</select>
<update
id=
"sellSerialNumber"
>
update jsh_serial_number
<set>
is_
S
ell = '1',
<if
test=
"depot
h
eadId !=null "
>
depothead_
I
d = #{depot
h
eadId},
is_
s
ell = '1',
<if
test=
"depot
H
eadId !=null "
>
depot
_
head_
i
d = #{depot
H
eadId},
</if>
<if
test=
"updateTime !=null "
>
update_
T
ime = #{updateTime},
update_
t
ime = #{updateTime},
</if>
<if
test=
"updater != null"
>
updater = #{updater},
...
...
@@ -157,10 +157,10 @@
</set>
where 1=1
<if
test=
"materialId != null"
>
and material_
I
d = #{materialId}
and material_
i
d = #{materialId}
</if>
and is_
S
ell != '1'
and ifnull(delete_
F
lag,'0') !='1'
and is_
s
ell != '1'
and ifnull(delete_
f
lag,'0') !='1'
<if
test=
"count != null"
>
and id in
( select batchSN.id from
...
...
@@ -169,8 +169,8 @@
<if
test=
"materialId != null"
>
and selFrom.material_Id = #{materialId}
</if>
and selFrom.is_
S
ell != '1'
and ifnull(selFrom.delete_
F
lag,'0') !='1'
and selFrom.is_
s
ell != '1'
and ifnull(selFrom.delete_
f
lag,'0') !='1'
limit 0,#{count}
) batchSN
)
...
...
@@ -180,9 +180,9 @@
<update
id=
"cancelSerialNumber"
>
update jsh_serial_number
<set>
is_
S
ell = '0',
is_
s
ell = '0',
<if
test=
"updateTime !=null "
>
update_
T
ime = #{updateTime},
update_
t
ime = #{updateTime},
</if>
<if
test=
"updater != null"
>
updater = #{updater},
...
...
@@ -190,26 +190,26 @@
</set>
where 1=1
<if
test=
"materialId != null"
>
and material_
I
d = #{materialId}
and material_
i
d = #{materialId}
</if>
<if
test=
"depot
h
eadId !=null "
>
and depothead_
I
d = #{depot
h
eadId,jdbcType=BIGINT}
<if
test=
"depot
H
eadId !=null "
>
and depot
_
head_
i
d = #{depot
H
eadId,jdbcType=BIGINT}
</if>
and is_
S
ell != '0'
and ifnull(delete_
F
lag,'0') !='1'
and is_
s
ell != '0'
and ifnull(delete_
f
lag,'0') !='1'
<if
test=
"count != null"
>
and id in
( select batchSN.id from
( select selFrom.id from jsh_serial_number selFrom
where 1=1
<if
test=
"materialId != null"
>
and selFrom.material_
I
d = #{materialId}
and selFrom.material_
i
d = #{materialId}
</if>
<if
test=
"depot
h
eadId !=null "
>
and selFrom.depothead_
I
d = #{depot
h
eadId,jdbcType=BIGINT}
<if
test=
"depot
H
eadId !=null "
>
and selFrom.depot
_
head_
i
d = #{depot
H
eadId,jdbcType=BIGINT}
</if>
and selFrom.is_
S
ell !='0'
and ifnull(selFrom.delete_
F
lag,'0') !='1'
and selFrom.is_
s
ell !='0'
and ifnull(selFrom.delete_
f
lag,'0') !='1'
limit 0,#{count}
) batchSN
)
...
...
@@ -218,8 +218,8 @@
<insert
id=
"batAddSerialNumber"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into jsh_serial_number
(material_
I
d, serial_
N
umber, is_
S
ell, remark,delete_
F
lag,
create_
T
ime, creator,update_
T
ime, updater)
(material_
i
d, serial_
n
umber, is_
s
ell, remark,delete_
f
lag,
create_
t
ime, creator,update_
t
ime, updater)
values
<foreach
collection=
'list'
item=
'each'
separator=
','
>
(#{each.materialId},#{each.serialNumber},'0',#{each.remark},'0',
...
...
@@ -229,7 +229,7 @@
</insert>
<update
id=
"batchDeleteSerialNumberByIds"
>
update jsh_serial_number
set update_
T
ime=#{updateTime},updater=#{updater},delete_
F
lag='1'
set update_
t
ime=#{updateTime},updater=#{updater},delete_
f
lag='1'
where 1=1
and id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
...
...
src/main/resources/mapper_xml/SystemConfigMapper.xml
View file @
70f0dae4
...
...
@@ -13,7 +13,7 @@
<result
column=
"customer_flag"
jdbcType=
"VARCHAR"
property=
"customerFlag"
/>
<result
column=
"minus_stock_flag"
jdbcType=
"VARCHAR"
property=
"minusStockFlag"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_
F
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"delete_
f
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
...
...
@@ -75,7 +75,7 @@
</sql>
<sql
id=
"Base_Column_List"
>
id, company_name, company_contacts, company_address, company_tel, company_fax, company_post_code,
depot_flag, customer_flag, minus_stock_flag, tenant_id, delete_
F
lag
depot_flag, customer_flag, minus_stock_flag, tenant_id, delete_
f
lag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfigExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -83,7 +83,7 @@
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from jsh_systemconfig
from jsh_system
_
config
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
@@ -94,24 +94,24 @@
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from jsh_systemconfig
from jsh_system
_
config
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from jsh_systemconfig
delete from jsh_system
_
config
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfigExample"
>
delete from jsh_systemconfig
delete from jsh_system
_
config
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfig"
>
insert into jsh_systemconfig (id, company_name, company_contacts,
insert into jsh_system
_
config (id, company_name, company_contacts,
company_address, company_tel, company_fax,
company_post_code, depot_flag, customer_flag,
minus_stock_flag, tenant_id, delete_
F
lag
minus_stock_flag, tenant_id, delete_
f
lag
)
values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{companyContacts,jdbcType=VARCHAR},
#{companyAddress,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR},
...
...
@@ -120,7 +120,7 @@
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfig"
>
insert into jsh_systemconfig
insert into jsh_system
_
config
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
...
...
@@ -156,7 +156,7 @@
tenant_id,
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag,
delete_
f
lag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
...
...
@@ -199,13 +199,13 @@
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfigExample"
resultType=
"java.lang.Long"
>
select count(*) from jsh_systemconfig
select count(*) from jsh_system
_
config
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update jsh_systemconfig
update jsh_system
_
config
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
...
...
@@ -241,7 +241,7 @@
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -249,7 +249,7 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update jsh_systemconfig
update jsh_system
_
config
set id = #{record.id,jdbcType=BIGINT},
company_name = #{record.companyName,jdbcType=VARCHAR},
company_contacts = #{record.companyContacts,jdbcType=VARCHAR},
...
...
@@ -261,13 +261,13 @@
customer_flag = #{record.customerFlag,jdbcType=VARCHAR},
minus_stock_flag = #{record.minusStockFlag,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfig"
>
update jsh_systemconfig
update jsh_system
_
config
<set>
<if
test=
"companyName != null"
>
company_name = #{companyName,jdbcType=VARCHAR},
...
...
@@ -300,13 +300,13 @@
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfig"
>
update jsh_systemconfig
update jsh_system
_
config
set company_name = #{companyName,jdbcType=VARCHAR},
company_contacts = #{companyContacts,jdbcType=VARCHAR},
company_address = #{companyAddress,jdbcType=VARCHAR},
...
...
@@ -317,7 +317,7 @@
customer_flag = #{customerFlag,jdbcType=VARCHAR},
minus_stock_flag = #{minusStockFlag,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR}
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/SystemConfigMapperEx.xml
View file @
70f0dae4
...
...
@@ -3,12 +3,12 @@
<mapper
namespace=
"com.jsh.erp.datasource.mappers.SystemConfigMapperEx"
>
<select
id=
"selectByConditionSystemConfig"
parameterType=
"com.jsh.erp.datasource.entities.SystemConfigExample"
resultMap=
"com.jsh.erp.datasource.mappers.SystemConfigMapper.BaseResultMap"
>
select *
FROM jsh_systemconfig
FROM jsh_system
_
config
where 1=1
<if
test=
"companyName != null"
>
and company_name like '%${companyName}%'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
</if>
...
...
@@ -16,16 +16,16 @@
<select
id=
"countsBySystemConfig"
resultType=
"java.lang.Long"
>
SELECT
COUNT(id)
FROM jsh_systemconfig
FROM jsh_system
_
config
WHERE 1=1
<if
test=
"companyName != null"
>
and company_name like '%${companyName}%'
</if>
and ifnull(delete_
F
lag,'0') !='1'
and ifnull(delete_
f
lag,'0') !='1'
</select>
<update
id=
"batchDeleteSystemConfigByIds"
>
update jsh_systemconfig
set delete_
F
lag='1'
update jsh_system
_
config
set delete_
f
lag='1'
where 1=1
and id in (
<foreach
collection=
"ids"
item=
"id"
separator=
","
>
...
...
src/main/resources/mapper_xml/UnitMapper.xml
View file @
70f0dae4
...
...
@@ -3,12 +3,12 @@
<mapper
namespace=
"com.jsh.erp.datasource.mappers.UnitMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Unit"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"
UN
ame"
jdbcType=
"VARCHAR"
property=
"
u
name"
/>
<result
column=
"
n
ame"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"basic_unit"
jdbcType=
"VARCHAR"
property=
"basicUnit"
/>
<result
column=
"other_unit"
jdbcType=
"VARCHAR"
property=
"otherUnit"
/>
<result
column=
"ratio"
jdbcType=
"INTEGER"
property=
"ratio"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_
F
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"delete_
f
lag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
...
...
@@ -69,7 +69,7 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id,
UN
ame, basic_unit, other_unit, ratio, tenant_id, delete_
F
lag
id,
n
ame, basic_unit, other_unit, ratio, tenant_id, delete_
f
lag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.UnitExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -102,10 +102,10 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.Unit"
>
insert into jsh_unit (id,
UN
ame, basic_unit,
insert into jsh_unit (id,
n
ame, basic_unit,
other_unit, ratio, tenant_id,
delete_
F
lag)
values (#{id,jdbcType=BIGINT}, #{
u
name,jdbcType=VARCHAR}, #{basicUnit,jdbcType=VARCHAR},
delete_
f
lag)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{basicUnit,jdbcType=VARCHAR},
#{otherUnit,jdbcType=VARCHAR}, #{ratio,jdbcType=INTEGER}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR})
</insert>
...
...
@@ -115,8 +115,8 @@
<if
test=
"id != null"
>
id,
</if>
<if
test=
"
u
name != null"
>
UN
ame,
<if
test=
"name != null"
>
n
ame,
</if>
<if
test=
"basicUnit != null"
>
basic_unit,
...
...
@@ -131,15 +131,15 @@
tenant_id,
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag,
delete_
f
lag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"
u
name != null"
>
#{
u
name,jdbcType=VARCHAR},
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"basicUnit != null"
>
#{basicUnit,jdbcType=VARCHAR},
...
...
@@ -170,8 +170,8 @@
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.
u
name != null"
>
UN
ame = #{record.
u
name,jdbcType=VARCHAR},
<if
test=
"record.name != null"
>
n
ame = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.basicUnit != null"
>
basic_unit = #{record.basicUnit,jdbcType=VARCHAR},
...
...
@@ -186,7 +186,7 @@
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteFlag != null"
>
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -196,12 +196,12 @@
<update
id=
"updateByExample"
parameterType=
"map"
>
update jsh_unit
set id = #{record.id,jdbcType=BIGINT},
UN
ame = #{record.
u
name,jdbcType=VARCHAR},
n
ame = #{record.name,jdbcType=VARCHAR},
basic_unit = #{record.basicUnit,jdbcType=VARCHAR},
other_unit = #{record.otherUnit,jdbcType=VARCHAR},
ratio = #{record.ratio,jdbcType=INTEGER},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_
F
lag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_
f
lag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -209,8 +209,8 @@
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.Unit"
>
update jsh_unit
<set>
<if
test=
"
u
name != null"
>
UN
ame = #{
u
name,jdbcType=VARCHAR},
<if
test=
"name != null"
>
n
ame = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"basicUnit != null"
>
basic_unit = #{basicUnit,jdbcType=VARCHAR},
...
...
@@ -225,19 +225,19 @@
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR},
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.Unit"
>
update jsh_unit
set
UN
ame = #{
u
name,jdbcType=VARCHAR},
set
n
ame = #{name,jdbcType=VARCHAR},
basic_unit = #{basicUnit,jdbcType=VARCHAR},
other_unit = #{otherUnit,jdbcType=VARCHAR},
ratio = #{ratio,jdbcType=INTEGER},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_
F
lag = #{deleteFlag,jdbcType=VARCHAR}
delete_
f
lag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Prev
1
2
3
4
5
6
Next
Write
Preview
Supports
Markdown
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