仓库添加负责人字段
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
<?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.DepotMapperEx">
|
||||
<resultMap extends="com.jsh.erp.datasource.mappers.DepotMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.DepotEx">
|
||||
<result column="principalName" jdbcType="VARCHAR" property="principalName" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByConditionDepot" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="com.jsh.erp.datasource.mappers.DepotMapper.BaseResultMap">
|
||||
select *
|
||||
FROM jsh_depot
|
||||
@@ -19,7 +23,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByDepot" resultType="java.lang.Integer">
|
||||
<select id="countsByDepot" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_depot
|
||||
@@ -34,4 +38,25 @@
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDepotList" parameterType="java.util.Map" resultMap="ResultMapEx">
|
||||
select dep.*,usr.username as principalName
|
||||
FROM jsh_depot dep
|
||||
left join jsh_user usr on usr.id=dep.principal
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'" />
|
||||
and dep.name like #{name}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and dep.type=#{type}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'" />
|
||||
and dep.remark like #{remark}
|
||||
</if>
|
||||
order by dep.sort asc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user