You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-wms-java/src/main/resources/mybatis/mapper/inv/DeviceProjectSetMapper.xml

48 lines
2.1 KiB
XML

<?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.glxp.api.dao.inv.DeviceProjectSetMapper">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.inv.DeviceProjectSet">
<!--@mbg.generated-->
<!--@Table device_project_set-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="remak" jdbcType="VARCHAR" property="remak" />
<result column="udpateTime" jdbcType="TIMESTAMP" property="udpateTime" />
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, code, content, `type`, remak, udpateTime, updateUser, `createUser`, createTime
</sql>
<select id="filterList" resultType="com.glxp.api.res.inv.DeviceProjectSetResponse">
select device_project_set.*,
(select employeeName from auth_user where device_project_set.updateUser=auth_user.id) as updateUserName,
(select employeeName from auth_user where device_project_set.createUser=auth_user.id) as createUserName
from device_project_set
<where>
<if test="type != null">
AND type = #{type}
</if>
<if test="code != null and code != ''">
AND code like concat('%',#{code},'%')
</if>
<if test="content != null and content != ''">
AND content like concat('%',#{content},'%')
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND date_format(udpateTime, '%Y-%m-%d') between date_format(#{startTime}, '%Y-%m-%d') and
date_format(#{endTime}, '%Y-%m-%d')
</if>
</where>
</select>
</mapper>