<?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="org.springblade.modules.healthcode.mapper.healthcodeMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="healthcodeResultMap" type="org.springblade.modules.healthcode.entity.healthcode">
|
<id column="id" property="id"/>
|
<result column="type" property="type"/>
|
<result column="jname" property="jname"/>
|
<result column="province" property="province"/>
|
<result column="city" property="city"/>
|
<result column="district" property="district"/>
|
<result column="dtime" property="dtime"/>
|
</resultMap>
|
|
<sql id="key">
|
<trim suffixOverrides=",">
|
<if test="type!=null and type!=''">
|
type,
|
</if>
|
<if test="jname!=null and jname!=''">
|
jname,
|
</if>
|
<if test="province!=null and province!=''">
|
province,
|
</if>
|
<if test="city!=null and city!=''">
|
city,
|
</if>
|
<if test="district!=null and district!=''">
|
district,
|
</if>
|
<if test="dtime!=null and dtime!=''">
|
dtime,
|
</if>
|
</trim>
|
</sql>
|
<sql id="value">
|
<trim suffixOverrides=",">
|
<if test="type!=null and type!=''">
|
#{type},
|
</if>
|
<if test="jname!=null and jname!=''">
|
#{jname},
|
</if>
|
<if test="province!=null and province!=''">
|
#{province},
|
</if>
|
<if test="city!=null and city!=''">
|
#{city},
|
</if>
|
<if test="district!=null and district!=''">
|
#{district},
|
</if>
|
<if test="dtime!=null and dtime!=''">
|
#{dtime},
|
</if>
|
</trim>
|
</sql>
|
<insert id="insert">
|
insert into healthcode(<include refid="key"/>) values(<include refid="value"/>)
|
</insert>
|
|
</mapper>
|