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
ebf57920
Commit
ebf57920
authored
May 14, 2019
by
qiankunpingtai
Browse files
仓库信息sql$修改为#
parent
7a34d84e
Changes
13
Hide whitespace changes
Inline
Side-by-side
src/main/resources/mapper_xml/DepotMapperEx.xml
View file @
ebf57920
...
...
@@ -9,14 +9,16 @@
select *
FROM jsh_depot
where 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"type != null"
>
and type=
$
{type}
and type=
#
{type}
</if>
<if
test=
"remark != null"
>
and remark like '%${remark}%'
<if
test=
"remark != null and remark != ''"
>
<bind
name=
"remark"
value=
"'%' + _parameter.remark + '%'"
/>
and remark like #{remark}
</if>
and ifnull(delete_Flag,'0') !='1'
order by sort asc
...
...
@@ -29,14 +31,16 @@
COUNT(id)
FROM jsh_depot
WHERE 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"type != null"
>
and type=
$
{type}
and type=
#
{type}
</if>
<if
test=
"remark != null"
>
and remark like '%${remark}%'
<if
test=
"remark != null and remark != ''"
>
<bind
name=
"remark"
value=
"'%' + _parameter.remark + '%'"
/>
and remark like #{remark}
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
...
...
src/main/resources/mapper_xml/FunctionsMapperEx.xml
View file @
ebf57920
...
...
@@ -5,11 +5,12 @@
select *
FROM jsh_functions
where 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"type != null"
>
and type=
'$
{type}
'
and type=
#
{type}
</if>
and ifnull(delete_Flag,'0') !='1'
order by sort asc
...
...
@@ -22,11 +23,12 @@
COUNT(id)
FROM jsh_functions
WHERE 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"type != null"
>
and type=
'$
{type}
'
and type=
#
{type}
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
...
...
src/main/resources/mapper_xml/InOutItemMapperEx.xml
View file @
ebf57920
...
...
@@ -5,14 +5,16 @@
select *
FROM jsh_inoutitem
where 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"type != null"
>
and type=
'$
{type}
'
and type=
#
{type}
</if>
<if
test=
"remark != null"
>
and remark like '%${remark}%'
<if
test=
"remark != null and remark != ''"
>
<bind
name=
"remark"
value=
"'%' + _parameter.remark + '%'"
/>
and remark like #{remark}
</if>
and ifnull(delete_Flag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
...
...
@@ -24,14 +26,16 @@
COUNT(id)
FROM jsh_inoutitem
WHERE 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"type != null"
>
and type=
'$
{type}
'
and type=
#
{type}
</if>
<if
test=
"remark != null"
>
and remark like '%${remark}%'
<if
test=
"remark != null and remark != ''"
>
<bind
name=
"remark"
value=
"'%' + _parameter.remark + '%'"
/>
and remark like #{remark}
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
...
...
src/main/resources/mapper_xml/LogMapperEx.xml
View file @
ebf57920
...
...
@@ -10,26 +10,29 @@
FROM jsh_log l
left join jsh_user u on l.userID = u.id and ifnull(u.status,'0') not in('1','2')
where 1=1
<if
test=
"operation != null"
>
and l.operation like '%${operation}%'
<if
test=
"operation != null and operation != ''"
>
<bind
name=
"operation"
value=
"'%' + _parameter.operation + '%'"
/>
and l.operation like #{operation}
</if>
<if
test=
"usernameID != null"
>
and l.userID=
$
{usernameID}
and l.userID=
#
{usernameID}
</if>
<if
test=
"clientIp != null"
>
and l.clientIp like '%${clientIp}%'
<if
test=
"clientIp != null and clientIp != ''"
>
<bind
name=
"clientIp"
value=
"'%' + _parameter.clientIp + '%'"
/>
and l.clientIp like #{clientIp}
</if>
<if
test=
"status != null"
>
and l.status=
$
{status}
and l.status=
#
{status}
</if>
<if
test=
"beginTime != null"
>
and l.createtime
>
=
'%$
{beginTime}
%'
and l.createtime
>
=
#
{beginTime}
</if>
<if
test=
"endTime != null"
>
and l.createtime
<
=
'%$
{endTime}
%'
and l.createtime
<
=
#
{endTime}
</if>
<if
test=
"contentdetails != null"
>
and l.contentdetails like '%${contentdetails}%'
<if
test=
"contentdetails != null and contentdetails != ''"
>
<bind
name=
"contentdetails"
value=
"'%' + _parameter.contentdetails + '%'"
/>
and l.contentdetails like #{contentdetails}
</if>
order by l.createtime desc
<if
test=
"offset != null and rows != null"
>
...
...
@@ -41,26 +44,29 @@
COUNT(id)
FROM jsh_log
WHERE 1=1
<if
test=
"operation != null"
>
and operation like '%${operation}%'
<if
test=
"operation != null and operation != ''"
>
<bind
name=
"operation"
value=
"'%' + _parameter.operation + '%'"
/>
and operation like #{operation}
</if>
<if
test=
"usernameID != null"
>
and userID=
$
{usernameID}
and userID=
#
{usernameID}
</if>
<if
test=
"clientIp != null"
>
and clientIp like '%${clientIp}%'
<if
test=
"clientIp != null and clientIp != ''"
>
<bind
name=
"clientIp"
value=
"'%' + _parameter.clientIp + '%'"
/>
and clientIp like #{clientIp}
</if>
<if
test=
"status != null"
>
and status =
$
{status}
and status =
#
{status}
</if>
<if
test=
"beginTime != null"
>
<![CDATA[
and createtime >
=
'$
{beginTime}
'
and createtime >
=
#
{beginTime}
]]>
</if>
<if
test=
"endTime != null"
>
<![CDATA[
and createtime <=
'$
{endTime}
'
and createtime <=
#
{endTime}
]]>
</if>
<if
test=
"contentdetails != null"
>
and contentdetails like '%${contentdetails}%'
<if
test=
"contentdetails != null and contentdetails != ''"
>
<bind
name=
"contentdetails"
value=
"'%' + _parameter.contentdetails + '%'"
/>
and contentdetails like #{contentdetails}
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/MaterialCategoryMapperEx.xml
View file @
ebf57920
...
...
@@ -6,11 +6,12 @@
FROM jsh_materialcategory
where 1=1
and ifnull(status,'0') !='2'
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"parentId != null"
>
and parentId =
$
{parentId}
and parentId =
#
{parentId}
</if>
and Id !=1
<if
test=
"offset != null and rows != null"
>
...
...
@@ -23,11 +24,12 @@
FROM jsh_materialcategory
WHERE 1=1
and ifnull(status,'0') !='2'
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"parentId != null"
>
and parentId =
$
{parentId}
and parentId =
#
{parentId}
</if>
and Id !=1
</select>
...
...
src/main/resources/mapper_xml/MaterialMapperEx.xml
View file @
ebf57920
...
...
@@ -16,14 +16,16 @@
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'
where 1=1
<if
test=
"name != null"
>
and m.name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and m.name like #{name}
</if>
<if
test=
"model != null"
>
and m.model like '%${model}%'
<if
test=
"model != null and model != ''"
>
<bind
name=
"model"
value=
"'%' + _parameter.model + '%'"
/>
and m.model like #{model}
</if>
<if
test=
"categoryId != 1"
>
and m.CategoryId in (
$
{categoryIds})
and m.CategoryId in (
#
{categoryIds})
</if>
and ifnull(m.delete_Flag,'0') !='1'
order by m.id asc
...
...
@@ -39,14 +41,16 @@
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'
WHERE 1=1
<if
test=
"name != null"
>
and m.name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and m.name like #{name}
</if>
<if
test=
"model != null"
>
and m.model like '%${model}%'
<if
test=
"model != null and model != ''"
>
<bind
name=
"model"
value=
"'%' + _parameter.model + '%'"
/>
and m.model like #{model}
</if>
<if
test=
"categoryId != 1"
>
and m.CategoryId in (
$
{categoryIds})
and m.CategoryId in (
#
{categoryIds})
</if>
and ifnull(m.delete_Flag,'0') !='1'
</select>
...
...
@@ -54,14 +58,14 @@
<select
id=
"findUnitName"
resultType=
"java.lang.String"
>
select u.UName 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}
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.UName 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}
where m.id =
#
{id}
and ifnull(m.delete_Flag,'0') !='1'
</select>
...
...
@@ -96,14 +100,16 @@
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'
where 1=1
<if
test=
"name != null"
>
and m.name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and m.name like #{name}
</if>
<if
test=
"model != null"
>
and m.model like '%${model}%'
<if
test=
"model != null and model != ''"
>
<bind
name=
"model"
value=
"'%' + _parameter.model + '%'"
/>
and m.model like #{model}
</if>
<if
test=
"categoryId != 1"
>
and m.CategoryId in (
$
{categoryIds})
and m.CategoryId in (
#
{categoryIds})
</if>
and ifnull(m.delete_Flag,'0') !='1'
order by m.id asc
...
...
src/main/resources/mapper_xml/MaterialPropertyMapperEx.xml
View file @
ebf57920
...
...
@@ -5,8 +5,9 @@
select *
FROM jsh_materialproperty
where 1=1
<if
test=
"name != null"
>
and nativeName like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"nativeName"
value=
"'%' + _parameter.name + '%'"
/>
and nativeName like #{nativeName}
</if>
and ifnull(delete_Flag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
...
...
@@ -18,8 +19,9 @@
COUNT(id)
FROM jsh_materialproperty
WHERE 1=1
<if
test=
"name != null"
>
and nativeName like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"nativeName"
value=
"'%' + _parameter.name + '%'"
/>
and nativeName like #{nativeName}
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
...
...
src/main/resources/mapper_xml/PersonMapperEx.xml
View file @
ebf57920
...
...
@@ -5,11 +5,12 @@
select *
FROM jsh_person
where 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"type != null"
>
and type=
'$
{type}
'
and type=
#
{type}
</if>
and ifnull(delete_Flag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
...
...
@@ -21,11 +22,12 @@
COUNT(id)
FROM jsh_person
WHERE 1=1
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"type != null"
>
and type=
'$
{type}
'
and type=
#
{type}
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
...
...
src/main/resources/mapper_xml/RoleMapperEx.xml
View file @
ebf57920
...
...
@@ -6,8 +6,9 @@
FROM jsh_role
WHERE 1=1
and ifnull(delete_Flag,'0') !='1'
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
...
...
@@ -19,8 +20,9 @@
FROM jsh_role
WHERE 1=1
and ifnull(delete_Flag,'0') !='1'
<if
test=
"name != null"
>
and name like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and name like #{name}
</if>
</select>
<update
id=
"batchDeleteRoleByIds"
>
...
...
src/main/resources/mapper_xml/SupplierMapperEx.xml
View file @
ebf57920
...
...
@@ -5,20 +5,24 @@
select *
FROM jsh_supplier
where 1=1
<if
test=
"supplier != null"
>
and supplier like '%${supplier}%'
<if
test=
"supplier != null and supplier != ''"
>
<bind
name=
"supplier"
value=
"'%' + _parameter.supplier + '%'"
/>
and supplier like #{supplier}
</if>
<if
test=
"type != null"
>
and type=
'$
{type}
'
and type=
#
{type}
</if>
<if
test=
"phonenum != null"
>
and phonenum like '%${phonenum}%'
<if
test=
"phonenum != null and phonenum != ''"
>
<bind
name=
"phonenum"
value=
"'%' + _parameter.phonenum + '%'"
/>
and phonenum like #{phonenum}
</if>
<if
test=
"telephone != null"
>
and telephone like '%${telephone}%'
<if
test=
"telephone != null and telephone != ''"
>
<bind
name=
"telephone"
value=
"'%' + _parameter.telephone + '%'"
/>
and telephone like #{telephone}
</if>
<if
test=
"description != null"
>
and description like '%${description}%'
<if
test=
"description != null and description != ''"
>
<bind
name=
"description"
value=
"'%' + _parameter.description + '%'"
/>
and description like #{description}
</if>
and ifnull(delete_Flag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
...
...
@@ -30,20 +34,24 @@
COUNT(id)
FROM jsh_supplier
WHERE 1=1
<if
test=
"supplier != null"
>
and supplier like '%${supplier}%'
<if
test=
"supplier != null and supplier != ''"
>
<bind
name=
"supplier"
value=
"'%' + _parameter.supplier + '%'"
/>
and supplier like #{supplier}
</if>
<if
test=
"type != null"
>
and type=
'$
{type}
'
and type=
#
{type}
</if>
<if
test=
"phonenum != null"
>
and phonenum like '%${phonenum}%'
<if
test=
"phonenum != null and phonenum != ''"
>
<bind
name=
"phonenum"
value=
"'%' + _parameter.phonenum + '%'"
/>
and phonenum like #{phonenum}
</if>
<if
test=
"telephone != null"
>
and telephone like '%${telephone}%'
<if
test=
"telephone != null and telephone != ''"
>
<bind
name=
"telephone"
value=
"'%' + _parameter.telephone + '%'"
/>
and telephone like #{telephone}
</if>
<if
test=
"description != null"
>
and description like '%${description}%'
<if
test=
"description != null and description != ''"
>
<bind
name=
"description"
value=
"'%' + _parameter.description + '%'"
/>
and description like #{description}
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
...
...
@@ -52,20 +60,24 @@
select *
FROM jsh_supplier
where 1=1
<if
test=
"supplier != null"
>
and supplier like '%${supplier}%'
<if
test=
"supplier != null and supplier != ''"
>
<bind
name=
"supplier"
value=
"'%' + _parameter.supplier + '%'"
/>
and supplier like #{supplier}
</if>
<if
test=
"type != null"
>
and type=
'$
{type}
'
and type=
#
{type}
</if>
<if
test=
"phonenum != null"
>
and phonenum like '%${phonenum}%'
<if
test=
"phonenum != null and phonenum != ''"
>
<bind
name=
"phonenum"
value=
"'%' + _parameter.phonenum + '%'"
/>
and phonenum like #{phonenum}
</if>
<if
test=
"telephone != null"
>
and telephone like '%${telephone}%'
<if
test=
"telephone != null and telephone != ''"
>
<bind
name=
"telephone"
value=
"'%' + _parameter.telephone + '%'"
/>
and telephone like #{telephone}
</if>
<if
test=
"description != null"
>
and description like '%${description}%'
<if
test=
"description != null and description != ''"
>
<bind
name=
"description"
value=
"'%' + _parameter.description + '%'"
/>
and description like #{description}
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
...
...
src/main/resources/mapper_xml/SystemConfigMapperEx.xml
View file @
ebf57920
...
...
@@ -5,8 +5,9 @@
select *
FROM jsh_systemconfig
where 1=1
<if
test=
"companyName != null"
>
and company_name like '%${companyName}%'
<if
test=
"companyName != null and companyName != ''"
>
<bind
name=
"companyName"
value=
"'%' + _parameter.companyName + '%'"
/>
and company_name like #{companyName}
</if>
and ifnull(delete_Flag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
...
...
@@ -18,8 +19,9 @@
COUNT(id)
FROM jsh_systemconfig
WHERE 1=1
<if
test=
"companyName != null"
>
and company_name like '%${companyName}%'
<if
test=
"companyName != null and companyName != ''"
>
<bind
name=
"companyName"
value=
"'%' + _parameter.companyName + '%'"
/>
and company_name like #{companyName}
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
...
...
src/main/resources/mapper_xml/UnitMapperEx.xml
View file @
ebf57920
...
...
@@ -5,8 +5,9 @@
select *
FROM jsh_unit
where 1=1
<if
test=
"name != null"
>
and UName like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and UName like #{name}
</if>
and ifnull(delete_Flag,'0') !='1'
<if
test=
"offset != null and rows != null"
>
...
...
@@ -18,8 +19,9 @@
COUNT(id)
FROM jsh_unit
WHERE 1=1
<if
test=
"name != null"
>
and UName like '%${name}%'
<if
test=
"name != null and name != ''"
>
<bind
name=
"name"
value=
"'%' + _parameter.name + '%'"
/>
and UName like #{name}
</if>
and ifnull(delete_Flag,'0') !='1'
</select>
...
...
src/main/resources/mapper_xml/UserMapperEx.xml
View file @
ebf57920
...
...
@@ -14,11 +14,13 @@
FROM jsh_user
where 1=1
and ifnull(status,'0') not in('1','2')
<if
test=
"userName != null"
>
and username like '%${userName}%'
<if
test=
"userName != null and userName != ''"
>
<bind
name=
"userName"
value=
"'%' + _parameter.userName + '%'"
/>
and username like #{userName}
</if>
<if
test=
"loginName != null"
>
and loginame like '%${loginName}%'
<if
test=
"loginName != null and loginName != ''"
>
<bind
name=
"loginName"
value=
"'%' + _parameter.loginName + '%'"
/>
and loginame like #{loginName}
</if>
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
...
...
@@ -30,11 +32,13 @@
FROM jsh_user
WHERE 1=1
and ifnull(status,'0') not in('1','2')
<if
test=
"userName != null"
>
and username like '%${userName}%'
<if
test=
"userName != null and userName != ''"
>
<bind
name=
"userName"
value=
"'%' + _parameter.userName + '%'"
/>
and username like #{userName}
</if>
<if
test=
"loginName != null"
>
and loginame like '%${loginName}%'
<if
test=
"loginName != null and loginName != ''"
>
<bind
name=
"loginName"
value=
"'%' + _parameter.loginName + '%'"
/>
and loginame like #{loginName}
</if>
</select>
<select
id=
"getUserList"
parameterType=
"java.util.Map"
resultMap=
"ResultMapEx"
>
...
...
@@ -206,7 +210,7 @@
</choose>
order by user.id desc
</select>
<select
id=
"addRegisterUserNotInclueUser"
resultType=
"String"
>
<select
id=
"addRegisterUserNotInclueUser"
resultType=
"
java.lang.
String"
>
select registerUserTemplate(#{userId},#{tenantId},#{roleId}) from dual;
</select>
...
...
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