123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?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.example.dao.gdc.WzStrategyDao">
- <resultMap type="com.example.pojo.gdc.WzHouseContracEntity" id="wxUserMap">
- <result property="id" column="id"/>
- <result property="city" column="city"/>
- <result property="county" column="county"/>
- </resultMap>
- <update id="update">
- update house_theme.wz_f_strategy
- <set>
- <if test="type!= null"> type =#{type},</if>
- </set>
- <set>
- <if test="value!= null"> value =#{value},</if>
- </set>
- where id = #{id}
- </update>
- <delete id="delById">
- delete
- from house_theme.wz_f_strategy
- where id = #{id}
- </delete>
- <select id="queryList" resultType="com.example.pojo.gdc.WzStrategyEntity">
- select
- id,
- creator,
- create_time as createTime,
- type,
- value
- from house_theme.wz_f_strategy
- WHERE 1=1
- <if test="name != null and name.trim() != ''">
- AND name LIKE concat('%',#{name},'%')
- </if>
- <if test="city != null and city.trim() != ''">
- AND city LIKE concat('%',#{city},'%')
- </if>
- <if test="county != null and county.trim() != ''">
- AND county LIKE concat('%',#{county},'%')
- </if>
- <if test="phone != null and phone.trim() != ''">
- AND phone LIKE concat('%',#{phone},'%')
- </if>
- order by id
- </select>
- <select id="queryTotal" resultType="int">
- select count(*) from house_theme.wz_f_strategy
- WHERE 1=1
- <if test="name != null and name.trim() != ''">
- AND name LIKE concat('%',#{name},'%')
- </if>
- <if test="city != null and city.trim() != ''">
- AND city LIKE concat('%',#{city},'%')
- </if>
- <if test="county != null and county.trim() != ''">
- AND county LIKE concat('%',#{county},'%')
- </if>
- <if test="phone != null and phone.trim() != ''">
- AND phone LIKE concat('%',#{phone},'%')
- </if>
- <if test="statisticalMonth != null ">
- AND statistical_month = #{statisticalMonth}
- </if>
- </select>
- <select id="getObject" resultType="com.example.pojo.gdc.WzStrategyEntity">
- select
- id,
- creator,
- create_time as createTime,
- type,
- value
- from house_theme.wz_f_strategy
- where id = #{id}
- </select>
- <select id="getObjectByType" resultType="com.example.pojo.gdc.WzStrategyEntity">
- select
- id,
- creator,
- create_time as createTime,
- type,
- value
- from house_theme.wz_f_strategy
- where type = 1
- </select>
- <insert id="save" parameterType="com.example.pojo.gdc.WzStrategyEntity" >
- insert into house_theme.wz_f_strategy(
- creator,
- create_time,
- type,
- value
- ) values(
- #{creator},
- #{createTime},
- #{type},
- #{value}
- )
- </insert>
- </mapper>
|