|
|
|
@@ -0,0 +1,52 @@ |
|
|
|
<?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.simple.mapper.WxGroupMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.simple.domain.po.WxGroup"> |
|
|
|
<id column="id" jdbcType="INTEGER" property="id" /> |
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" /> |
|
|
|
<result column="country" jdbcType="VARCHAR" property="country" /> |
|
|
|
<result column="province" jdbcType="VARCHAR" property="province" /> |
|
|
|
<result column="city" jdbcType="VARCHAR" property="city" /> |
|
|
|
<result column="addr" jdbcType="VARCHAR" property="addr" /> |
|
|
|
<result column="longitude" jdbcType="VARCHAR" property="longitude" /> |
|
|
|
<result column="latitude" jdbcType="VARCHAR" property="latitude" /> |
|
|
|
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" /> |
|
|
|
<result column="logurl" jdbcType="VARCHAR" property="logurl" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`name`,`country`,`province`,`city`,`addr`,`longitude`,`latitude`,`createtime`,`logurl` |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
where 1 = 1 |
|
|
|
<if test=" null != id "> and `id` = #{id} </if> |
|
|
|
<if test=" null != name "> and `name` = #{name} </if> |
|
|
|
<if test=" null != country "> and `country` = #{country} </if> |
|
|
|
<if test=" null != province "> and `province` = #{province} </if> |
|
|
|
<if test=" null != city "> and `city` = #{city} </if> |
|
|
|
<if test=" null != addr "> and `addr` = #{addr} </if> |
|
|
|
<if test=" null != longitude "> and `longitude` = #{longitude} </if> |
|
|
|
<if test=" null != latitude "> and `latitude` = #{latitude} </if> |
|
|
|
<if test=" null != createtime "> and `createtime` = #{createtime} </if> |
|
|
|
<if test=" null != logurl "> and `logurl` = #{logurl} </if> |
|
|
|
<if test=" null != ids "> |
|
|
|
and id in |
|
|
|
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
#{idItem} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test=" null != sortColumns"> order by ${sortColumns} </if> |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="findList" parameterType="com.simple.domain.po.WxGroup" resultMap="BaseResultMap"> |
|
|
|
select <include refid="allColumns" /> from wx_group |
|
|
|
<include refid="dynamicWhereConditions" /> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper> |