|
@@ -1,23 +1,23 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?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" >
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
-<mapper namespace="com.izouma.awesomeadmin.dao.ServiceTypeMapper" >
|
|
|
|
|
- <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ServiceType" >
|
|
|
|
|
- <id column="id" property="id" jdbcType="INTEGER" />
|
|
|
|
|
- <result column="del_flag" property="delFlag" jdbcType="CHAR" />
|
|
|
|
|
- <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
- <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
- <result column="create_user" property="createUser" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="service_type" property="serviceType" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="short_name" property="shortName" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="image" property="image" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="color" property="color" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="rank" property="rank" jdbcType="INTEGER" />
|
|
|
|
|
- <result column="show_flag" property="showFlag" jdbcType="CHAR" />
|
|
|
|
|
- <result column="description" property="description" jdbcType="VARCHAR" />
|
|
|
|
|
- </resultMap>
|
|
|
|
|
- <sql id="Base_Column_List" >
|
|
|
|
|
- <trim suffixOverrides="," >
|
|
|
|
|
|
|
+<mapper namespace="com.izouma.awesomeadmin.dao.ServiceTypeMapper">
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ServiceType">
|
|
|
|
|
+ <id column="id" property="id" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
|
|
|
|
|
+ <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="service_type" property="serviceType" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="short_name" property="shortName" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="image" property="image" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="color" property="color" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="rank" property="rank" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="show_flag" property="showFlag" jdbcType="CHAR"/>
|
|
|
|
|
+ <result column="description" property="description" jdbcType="VARCHAR"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
|
+ <trim suffixOverrides=",">
|
|
|
id,
|
|
id,
|
|
|
|
|
|
|
|
del_flag,
|
|
del_flag,
|
|
@@ -44,202 +44,206 @@
|
|
|
|
|
|
|
|
description,
|
|
description,
|
|
|
|
|
|
|
|
- </trim>
|
|
|
|
|
|
|
+ </trim>
|
|
|
</sql>
|
|
</sql>
|
|
|
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
|
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
select
|
|
select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
from service_type
|
|
from service_type
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
</select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from service_type
|
|
delete from service_type
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
</delete>
|
|
|
- <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ServiceType" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ServiceType" useGeneratedKeys="true"
|
|
|
|
|
+ keyProperty="id">
|
|
|
insert into service_type
|
|
insert into service_type
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
|
|
- <if test="id!= null" >
|
|
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id!= null">
|
|
|
id,
|
|
id,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag!= null" >
|
|
|
|
|
|
|
+ <if test="delFlag!= null">
|
|
|
del_flag,
|
|
del_flag,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime!= null" >
|
|
|
|
|
|
|
+ <if test="updateTime!= null">
|
|
|
update_time,
|
|
update_time,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser!= null" >
|
|
|
|
|
|
|
+ <if test="updateUser!= null">
|
|
|
update_user,
|
|
update_user,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime!= null" >
|
|
|
|
|
|
|
+ <if test="createTime!= null">
|
|
|
create_time,
|
|
create_time,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser!= null" >
|
|
|
|
|
|
|
+ <if test="createUser!= null">
|
|
|
create_user,
|
|
create_user,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="serviceType!= null" >
|
|
|
|
|
|
|
+ <if test="serviceType!= null">
|
|
|
service_type,
|
|
service_type,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="shortName!= null" >
|
|
|
|
|
|
|
+ <if test="shortName!= null">
|
|
|
short_name,
|
|
short_name,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="image!= null" >
|
|
|
|
|
|
|
+ <if test="image!= null">
|
|
|
image,
|
|
image,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="color!= null" >
|
|
|
|
|
|
|
+ <if test="color!= null">
|
|
|
color,
|
|
color,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank!= null" >
|
|
|
|
|
|
|
+ <if test="rank!= null">
|
|
|
rank,
|
|
rank,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="showFlag!= null" >
|
|
|
|
|
|
|
+ <if test="showFlag!= null">
|
|
|
show_flag,
|
|
show_flag,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="description!= null" >
|
|
|
|
|
|
|
+ <if test="description!= null">
|
|
|
description,
|
|
description,
|
|
|
</if>
|
|
</if>
|
|
|
- </trim>
|
|
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
|
- <if test="id != null" >
|
|
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id != null">
|
|
|
#{id,jdbcType=INTEGER},
|
|
#{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag != null" >
|
|
|
|
|
|
|
+ <if test="delFlag != null">
|
|
|
#{delFlag,jdbcType=CHAR},
|
|
#{delFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime != null" >
|
|
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser != null" >
|
|
|
|
|
|
|
+ <if test="updateUser != null">
|
|
|
#{updateUser,jdbcType=VARCHAR},
|
|
#{updateUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime != null" >
|
|
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser != null" >
|
|
|
|
|
|
|
+ <if test="createUser != null">
|
|
|
#{createUser,jdbcType=VARCHAR},
|
|
#{createUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="serviceType != null" >
|
|
|
|
|
|
|
+ <if test="serviceType != null">
|
|
|
#{serviceType,jdbcType=VARCHAR},
|
|
#{serviceType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="shortName != null" >
|
|
|
|
|
|
|
+ <if test="shortName != null">
|
|
|
#{shortName,jdbcType=VARCHAR},
|
|
#{shortName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="image != null" >
|
|
|
|
|
|
|
+ <if test="image != null">
|
|
|
#{image,jdbcType=VARCHAR},
|
|
#{image,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="color != null" >
|
|
|
|
|
|
|
+ <if test="color != null">
|
|
|
#{color,jdbcType=VARCHAR},
|
|
#{color,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank != null" >
|
|
|
|
|
|
|
+ <if test="rank != null">
|
|
|
#{rank,jdbcType=INTEGER},
|
|
#{rank,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="showFlag != null" >
|
|
|
|
|
|
|
+ <if test="showFlag != null">
|
|
|
#{showFlag,jdbcType=CHAR},
|
|
#{showFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="description != null" >
|
|
|
|
|
|
|
+ <if test="description != null">
|
|
|
#{description,jdbcType=VARCHAR},
|
|
#{description,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- </trim>
|
|
|
|
|
|
|
+ </trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ServiceType" >
|
|
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ServiceType">
|
|
|
update service_type
|
|
update service_type
|
|
|
- <set >
|
|
|
|
|
- <if test="id != null" >
|
|
|
|
|
- id= #{id,jdbcType=INTEGER},
|
|
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="id != null">
|
|
|
|
|
+ id= #{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag != null" >
|
|
|
|
|
- del_flag= #{delFlag,jdbcType=CHAR},
|
|
|
|
|
|
|
+ <if test="delFlag != null">
|
|
|
|
|
+ del_flag= #{delFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime != null" >
|
|
|
|
|
- update_time= #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ update_time= #{updateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser != null" >
|
|
|
|
|
- update_user= #{updateUser,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="updateUser != null">
|
|
|
|
|
+ update_user= #{updateUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime != null" >
|
|
|
|
|
- create_time= #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ create_time= #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser != null" >
|
|
|
|
|
- create_user= #{createUser,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="createUser != null">
|
|
|
|
|
+ create_user= #{createUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="serviceType != null" >
|
|
|
|
|
- service_type= #{serviceType,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="serviceType != null">
|
|
|
|
|
+ service_type= #{serviceType,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="shortName != null" >
|
|
|
|
|
- short_name= #{shortName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="shortName != null">
|
|
|
|
|
+ short_name= #{shortName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="image != null" >
|
|
|
|
|
- image= #{image,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="image != null">
|
|
|
|
|
+ image= #{image,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="color != null" >
|
|
|
|
|
- color= #{color,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="color != null">
|
|
|
|
|
+ color= #{color,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank != null" >
|
|
|
|
|
- rank= #{rank,jdbcType=INTEGER},
|
|
|
|
|
|
|
+ <if test="rank != null">
|
|
|
|
|
+ rank= #{rank,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="showFlag != null" >
|
|
|
|
|
- show_flag= #{showFlag,jdbcType=CHAR},
|
|
|
|
|
|
|
+ <if test="showFlag != null">
|
|
|
|
|
+ show_flag= #{showFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="description != null" >
|
|
|
|
|
- description= #{description,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="description != null">
|
|
|
|
|
+ description= #{description,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- </set>
|
|
|
|
|
|
|
+ </set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
</update>
|
|
|
- <select id="queryServiceTypeByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ServiceType">
|
|
|
|
|
- select <include refid="Base_Column_List"/> from service_type
|
|
|
|
|
|
|
+ <select id="queryServiceTypeByPage" parameterType="java.util.Map"
|
|
|
|
|
+ resultType="com.izouma.awesomeadmin.model.ServiceType">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from service_type
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
- <if test="record.id != null and !"".equals(record.id)">
|
|
|
|
|
- and id = #{record.id}
|
|
|
|
|
|
|
+ <if test="record.id != null and !"".equals(record.id)">
|
|
|
|
|
+ and id = #{record.id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
|
|
|
+ and del_flag = #{record.delFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
|
|
|
- and del_flag = #{record.delFlag}
|
|
|
|
|
|
|
+ <if test="record.updateTime != null and !"".equals(record.updateTime)">
|
|
|
|
|
+ and update_time = #{record.updateTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.updateTime != null and !"".equals(record.updateTime)">
|
|
|
|
|
- and update_time = #{record.updateTime}
|
|
|
|
|
|
|
+ <if test="record.updateUser != null and !"".equals(record.updateUser)">
|
|
|
|
|
+ and update_user = #{record.updateUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.updateUser != null and !"".equals(record.updateUser)">
|
|
|
|
|
- and update_user = #{record.updateUser}
|
|
|
|
|
|
|
+ <if test="record.createTime != null and !"".equals(record.createTime)">
|
|
|
|
|
+ and create_time = #{record.createTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.createTime != null and !"".equals(record.createTime)">
|
|
|
|
|
- and create_time = #{record.createTime}
|
|
|
|
|
|
|
+ <if test="record.createUser != null and !"".equals(record.createUser)">
|
|
|
|
|
+ and create_user = #{record.createUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.createUser != null and !"".equals(record.createUser)">
|
|
|
|
|
- and create_user = #{record.createUser}
|
|
|
|
|
|
|
+ <if test="record.serviceType != null and !"".equals(record.serviceType)">
|
|
|
|
|
+ and service_type = #{record.serviceType}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.serviceType != null and !"".equals(record.serviceType)">
|
|
|
|
|
- and service_type = #{record.serviceType}
|
|
|
|
|
|
|
+ <if test="record.shortName != null and !"".equals(record.shortName)">
|
|
|
|
|
+ and short_name = #{record.shortName}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.shortName != null and !"".equals(record.shortName)">
|
|
|
|
|
- and short_name = #{record.shortName}
|
|
|
|
|
|
|
+ <if test="record.image != null and !"".equals(record.image)">
|
|
|
|
|
+ and image = #{record.image}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.image != null and !"".equals(record.image)">
|
|
|
|
|
- and image = #{record.image}
|
|
|
|
|
|
|
+ <if test="record.color != null and !"".equals(record.color)">
|
|
|
|
|
+ and color = #{record.color}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.color != null and !"".equals(record.color)">
|
|
|
|
|
- and color = #{record.color}
|
|
|
|
|
|
|
+ <if test="record.rank != null and !"".equals(record.rank)">
|
|
|
|
|
+ and rank = #{record.rank}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.rank != null and !"".equals(record.rank)">
|
|
|
|
|
- and rank = #{record.rank}
|
|
|
|
|
|
|
+ <if test="record.showFlag != null and !"".equals(record.showFlag)">
|
|
|
|
|
+ and show_flag = #{record.showFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.showFlag != null and !"".equals(record.showFlag)">
|
|
|
|
|
- and show_flag = #{record.showFlag}
|
|
|
|
|
|
|
+ <if test="record.description != null and !"".equals(record.description)">
|
|
|
|
|
+ and description = #{record.description}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.description != null and !"".equals(record.description)">
|
|
|
|
|
- and description = #{record.description}
|
|
|
|
|
|
|
+ <if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
|
|
+ OR service_type LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR short_name LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR image LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR color LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR rank LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR show_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR description LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ </trim>
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
|
|
- <trim prefix="and (" suffix=")" prefixOverrides="OR" >
|
|
|
|
|
- OR service_type LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR short_name LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR image LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR color LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR rank LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR show_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR description LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- </trim>
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
|
|
|
<if test="record.advancedQuery != null and !"".equals(record.advancedQuery)">
|
|
<if test="record.advancedQuery != null and !"".equals(record.advancedQuery)">
|
|
|
<foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
|
|
<foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
|
|
@@ -291,96 +295,99 @@
|
|
|
</trim>
|
|
</trim>
|
|
|
,
|
|
,
|
|
|
</if>
|
|
</if>
|
|
|
- id desc
|
|
|
|
|
|
|
+ rank desc , id desc
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="queryAllServiceType" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ServiceType">
|
|
|
|
|
- select <include refid="Base_Column_List"/> from service_type
|
|
|
|
|
|
|
+ <select id="queryAllServiceType" parameterType="java.util.Map"
|
|
|
|
|
+ resultMap="InfoWithList">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from service_type
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
- <if test="id != null and !"".equals(id)">
|
|
|
|
|
- and id = #{id}
|
|
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ and id = #{id}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
- and del_flag = #{delFlag}
|
|
|
|
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
+ and del_flag = #{delFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
|
|
- and update_time = #{updateTime}
|
|
|
|
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
|
|
+ and update_time = #{updateTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
|
|
- and update_user = #{updateUser}
|
|
|
|
|
|
|
+ <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
|
|
+ and update_user = #{updateUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
- and create_time = #{createTime}
|
|
|
|
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
+ and create_time = #{createTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser != null and !"".equals(createUser)">
|
|
|
|
|
- and create_user = #{createUser}
|
|
|
|
|
|
|
+ <if test="createUser != null and !"".equals(createUser)">
|
|
|
|
|
+ and create_user = #{createUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="serviceType != null and !"".equals(serviceType)">
|
|
|
|
|
- and service_type = #{serviceType}
|
|
|
|
|
|
|
+ <if test="serviceType != null and !"".equals(serviceType)">
|
|
|
|
|
+ and service_type = #{serviceType}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="shortName != null and !"".equals(shortName)">
|
|
|
|
|
- and short_name = #{shortName}
|
|
|
|
|
|
|
+ <if test="shortName != null and !"".equals(shortName)">
|
|
|
|
|
+ and short_name = #{shortName}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="image != null and !"".equals(image)">
|
|
|
|
|
- and image = #{image}
|
|
|
|
|
|
|
+ <if test="image != null and !"".equals(image)">
|
|
|
|
|
+ and image = #{image}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="color != null and !"".equals(color)">
|
|
|
|
|
- and color = #{color}
|
|
|
|
|
|
|
+ <if test="color != null and !"".equals(color)">
|
|
|
|
|
+ and color = #{color}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank != null and !"".equals(rank)">
|
|
|
|
|
- and rank = #{rank}
|
|
|
|
|
|
|
+ <if test="rank != null and !"".equals(rank)">
|
|
|
|
|
+ and rank = #{rank}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="showFlag != null and !"".equals(showFlag)">
|
|
|
|
|
- and show_flag = #{showFlag}
|
|
|
|
|
|
|
+ <if test="showFlag != null and !"".equals(showFlag)">
|
|
|
|
|
+ and show_flag = #{showFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="description != null and !"".equals(description)">
|
|
|
|
|
- and description = #{description}
|
|
|
|
|
|
|
+ <if test="description != null and !"".equals(description)">
|
|
|
|
|
+ and description = #{description}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="searchKey != null and !"".equals(searchKey)">
|
|
|
|
|
- <trim prefix="and (" suffix=")" prefixOverrides="OR" >
|
|
|
|
|
- OR service_type LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR short_name LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR image LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR color LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR rank LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR show_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR description LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- </trim>
|
|
|
|
|
|
|
+ <if test="searchKey != null and !"".equals(searchKey)">
|
|
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
|
|
+ OR service_type LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR short_name LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR image LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR color LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR rank LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR show_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR description LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ </trim>
|
|
|
</if>
|
|
</if>
|
|
|
-<if test="advancedQuery != null and !"".equals(advancedQuery)">
|
|
|
|
|
- <foreach item="item" index="index" collection="advancedQuery.split('_;')">
|
|
|
|
|
- <choose>
|
|
|
|
|
- <when test="item.indexOf('like') != -1">
|
|
|
|
|
- <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
- <if test="detailIndex == 3">
|
|
|
|
|
- concat('%',#{itemDetail},'%')
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+ <if test="advancedQuery != null and !"".equals(advancedQuery)">
|
|
|
|
|
+ <foreach item="item" index="index" collection="advancedQuery.split('_;')">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test="item.indexOf('like') != -1">
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ <if test="detailIndex == 3">
|
|
|
|
|
+ concat('%',#{itemDetail},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
- <if test="detailIndex < 3">
|
|
|
|
|
- ${itemDetail}
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+ <if test="detailIndex < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </when>
|
|
|
|
|
- <otherwise>
|
|
|
|
|
- <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
- <if test="detailIndex == 3">
|
|
|
|
|
- #{itemDetail}
|
|
|
|
|
- </if>
|
|
|
|
|
-
|
|
|
|
|
- <if test="detailIndex < 3">
|
|
|
|
|
- ${itemDetail}
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ <if test="detailIndex == 3">
|
|
|
|
|
+ #{itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </otherwise>
|
|
|
|
|
- </choose>
|
|
|
|
|
|
|
+ <if test="detailIndex < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
|
|
|
|
|
|
|
|
- </foreach>
|
|
|
|
|
|
|
+ </foreach>
|
|
|
|
|
|
|
|
|
|
|
|
|
-</if>
|
|
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
order by
|
|
order by
|
|
|
|
|
|
|
@@ -397,52 +404,54 @@
|
|
|
,
|
|
,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
- id desc
|
|
|
|
|
|
|
+ rank desc , id desc
|
|
|
</select>
|
|
</select>
|
|
|
<select id="queryServiceType" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ServiceType">
|
|
<select id="queryServiceType" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ServiceType">
|
|
|
- select <include refid="Base_Column_List"/> from service_type
|
|
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from service_type
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
- <if test="id != null and !"".equals(id)">
|
|
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
and id = #{id}
|
|
and id = #{id}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
and del_flag = #{delFlag}
|
|
and del_flag = #{delFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
|
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
and update_time = #{updateTime}
|
|
and update_time = #{updateTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
|
|
|
|
+ <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
and update_user = #{updateUser}
|
|
and update_user = #{updateUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
and create_time = #{createTime}
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser != null and !"".equals(createUser)">
|
|
|
|
|
|
|
+ <if test="createUser != null and !"".equals(createUser)">
|
|
|
and create_user = #{createUser}
|
|
and create_user = #{createUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="serviceType != null and !"".equals(serviceType)">
|
|
|
|
|
|
|
+ <if test="serviceType != null and !"".equals(serviceType)">
|
|
|
and service_type = #{serviceType}
|
|
and service_type = #{serviceType}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="shortName != null and !"".equals(shortName)">
|
|
|
|
|
|
|
+ <if test="shortName != null and !"".equals(shortName)">
|
|
|
and short_name = #{shortName}
|
|
and short_name = #{shortName}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="image != null and !"".equals(image)">
|
|
|
|
|
|
|
+ <if test="image != null and !"".equals(image)">
|
|
|
and image = #{image}
|
|
and image = #{image}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="color != null and !"".equals(color)">
|
|
|
|
|
|
|
+ <if test="color != null and !"".equals(color)">
|
|
|
and color = #{color}
|
|
and color = #{color}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank != null and !"".equals(rank)">
|
|
|
|
|
|
|
+ <if test="rank != null and !"".equals(rank)">
|
|
|
and rank = #{rank}
|
|
and rank = #{rank}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="showFlag != null and !"".equals(showFlag)">
|
|
|
|
|
|
|
+ <if test="showFlag != null and !"".equals(showFlag)">
|
|
|
and show_flag = #{showFlag}
|
|
and show_flag = #{showFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="description != null and !"".equals(description)">
|
|
|
|
|
|
|
+ <if test="description != null and !"".equals(description)">
|
|
|
and description = #{description}
|
|
and description = #{description}
|
|
|
</if>
|
|
</if>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</where>
|
|
</where>
|
|
|
LIMIT 1
|
|
LIMIT 1
|
|
|
</select>
|
|
</select>
|
|
@@ -453,11 +462,25 @@
|
|
|
</where>
|
|
</where>
|
|
|
</update>
|
|
</update>
|
|
|
<select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ServiceType">
|
|
<select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ServiceType">
|
|
|
- select <include refid="Base_Column_List"/> from service_type
|
|
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from service_type
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
- </where>
|
|
|
|
|
|
|
+ </where>
|
|
|
order by id desc
|
|
order by id desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="InfoWithList" type="com.izouma.awesomeadmin.model.ServiceType" extends="BaseResultMap">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <collection property="serviceTypeDetailList"
|
|
|
|
|
+ ofType="com.izouma.awesomeadmin.model.ServiceTypeDetail"
|
|
|
|
|
+ select="com.izouma.awesomeadmin.model.ServiceTypeDetailMapper.queryAllServiceTypeDetail"
|
|
|
|
|
+ column="{ parentId = id }"/>
|
|
|
|
|
+
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|
|
|
|
|
|