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.
95 lines
4.7 KiB
XML
95 lines
4.7 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.basic.BasicSkSickerMapper">
|
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicSkSickerEntity">
|
|
<!--@mbg.generated-->
|
|
<!--@Table basic_sk_sicker-->
|
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
<result column="code" jdbcType="VARCHAR" property="code"/>
|
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
|
<result column="adNum" jdbcType="VARCHAR" property="adNum"/>
|
|
<result column="idNum" jdbcType="VARCHAR" property="idNum"/>
|
|
<result column="phone" jdbcType="VARCHAR" property="phone"/>
|
|
<result column="gender" jdbcType="VARCHAR" property="gender"/>
|
|
<result column="job" jdbcType="VARCHAR" property="job"/>
|
|
<result column="bornDate" jdbcType="VARCHAR" property="bornDate"/>
|
|
<result column="nationality" jdbcType="VARCHAR" property="nationality"/>
|
|
<result column="education" jdbcType="VARCHAR" property="education"/>
|
|
<result column="guardianName" jdbcType="VARCHAR" property="guardianName"/>
|
|
<result column="guardianRel" jdbcType="VARCHAR" property="guardianRel"/>
|
|
<result column="curAddr" jdbcType="VARCHAR" property="curAddr"/>
|
|
<result column="kosekiAddr" jdbcType="VARCHAR" property="kosekiAddr"/>
|
|
<result column="medicalIns" jdbcType="VARCHAR" property="medicalIns"/>
|
|
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
|
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
|
|
<result column="updateUser" jdbcType="VARCHAR" property="updateUser"/>
|
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
<!--@mbg.generated-->
|
|
id, code, `name`, adNum, idNum, phone, gender, job, bornDate, nationality, education,
|
|
guardianName, guardianRel, curAddr, kosekiAddr, medicalIns, `createUser`, createTime,
|
|
updateUser, updateTime, remark
|
|
</sql>
|
|
|
|
|
|
<select id="filterList" parameterType="com.glxp.api.req.basic.BasicSkSickerRequest"
|
|
resultType="com.glxp.api.res.basic.BasicSkSickerResponse">
|
|
SELECT *, cb.userName as createByName
|
|
FROM basic_sk_sicker
|
|
LEFT JOIN auth_user cb ON basic_sk_sicker.createUser = cb.id
|
|
<where>
|
|
<if test="key != '' and key != null">
|
|
AND (basic_sk_sicker.name LIKE concat('%', #{key}, '%') or
|
|
basic_sk_sicker.adNum LIKE concat('%', #{key}, '%'))
|
|
</if>
|
|
<if test="name != '' and name != null">
|
|
AND basic_sk_sicker.name LIKE concat('%', #{name}, '%')
|
|
</if>
|
|
<if test="adNum != '' and adNum != null">
|
|
AND basic_sk_sicker.adNum LIKE concat('%', #{adNum}, '%')
|
|
</if>
|
|
<if test="code != '' and code != null">
|
|
AND basic_sk_sicker.code LIKE concat('%', #{code}, '%')
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="filterNoList" parameterType="com.glxp.api.req.basic.BasicSkSickerRequest"
|
|
resultType="com.glxp.api.res.basic.BasicSkSickerResponse">
|
|
SELECT *, cb.userName as createByName
|
|
FROM basic_sk_sicker
|
|
LEFT JOIN auth_user cb ON basic_sk_sicker.createUser = cb.id
|
|
<where>
|
|
<if test="key != '' and key != null">
|
|
AND (basic_sk_sicker.name LIKE concat('%', #{key}, '%') or
|
|
basic_sk_sicker.adNum LIKE concat('%', #{key}, '%'))
|
|
</if>
|
|
<if test="name != '' and name != null">
|
|
AND basic_sk_sicker.name LIKE concat('%', #{name}, '%')
|
|
</if>
|
|
<if test="adNum != '' and adNum != null">
|
|
AND basic_sk_sicker.adNum LIKE concat('%', #{adNum}, '%')
|
|
</if>
|
|
<if test="code != '' and code != null">
|
|
AND basic_sk_sicker.code LIKE concat('%', #{code}, '%')
|
|
</if>
|
|
</where>
|
|
limit 0,10
|
|
</select>
|
|
|
|
<select id="getSkSickerList" parameterType="com.glxp.api.req.inout.FilterSkSiackerListRequest"
|
|
resultType="com.glxp.api.entity.basic.BasicSkSickerEntity">
|
|
SELECT *
|
|
FROM basic_sk_sicker
|
|
<where>
|
|
<if test="name != '' and name != null">
|
|
basic_sk_sicker.name LIKE concat('%', #{name}, '%')
|
|
OR basic_sk_sicker.adNum LIKE concat('%', #{name}, '%')
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
</mapper>
|