|
|
@@ -1,24 +1,24 @@
|
|
|
<?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.izouma.awesomeadmin.dao.NavigationPackageMapper" >
|
|
|
- <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.NavigationPackage" >
|
|
|
- <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="land_mark_id" property="landMarkId" jdbcType="INTEGER" />
|
|
|
- <result column="name" property="name" jdbcType="VARCHAR" />
|
|
|
- <result column="remark" property="remark" jdbcType="VARCHAR" />
|
|
|
- <result column="pay_flag" property="payFlag" jdbcType="CHAR" />
|
|
|
- <result column="price" property="price" jdbcType="DECIMAL" />
|
|
|
- <result column="aim_place" property="aimPlace" jdbcType="VARCHAR" />
|
|
|
- <result column="rank" property="rank" jdbcType="INTEGER" />
|
|
|
- <result column="shelf_flag" property="shelfFlag" jdbcType="CHAR" />
|
|
|
- </resultMap>
|
|
|
- <sql id="Base_Column_List" >
|
|
|
- <trim suffixOverrides="," >
|
|
|
+<mapper namespace="com.izouma.awesomeadmin.dao.NavigationPackageMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
+ <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="land_mark_id" property="landMarkId" jdbcType="INTEGER"/>
|
|
|
+ <result column="name" property="name" jdbcType="VARCHAR"/>
|
|
|
+ <result column="remark" property="remark" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pay_flag" property="payFlag" jdbcType="CHAR"/>
|
|
|
+ <result column="price" property="price" jdbcType="DECIMAL"/>
|
|
|
+ <result column="aim_place" property="aimPlace" jdbcType="VARCHAR"/>
|
|
|
+ <result column="rank" property="rank" jdbcType="INTEGER"/>
|
|
|
+ <result column="shelf_flag" property="shelfFlag" jdbcType="CHAR"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <trim suffixOverrides=",">
|
|
|
id,
|
|
|
|
|
|
del_flag,
|
|
|
@@ -47,155 +47,156 @@
|
|
|
|
|
|
shelf_flag,
|
|
|
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</sql>
|
|
|
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
from navigation_package
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from navigation_package
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
- <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.NavigationPackage" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.NavigationPackage" useGeneratedKeys="true"
|
|
|
+ keyProperty="id">
|
|
|
insert into navigation_package
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
- <if test="id!= null" >
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id!= null">
|
|
|
id,
|
|
|
</if>
|
|
|
- <if test="delFlag!= null" >
|
|
|
+ <if test="delFlag!= null">
|
|
|
del_flag,
|
|
|
</if>
|
|
|
- <if test="updateTime!= null" >
|
|
|
+ <if test="updateTime!= null">
|
|
|
update_time,
|
|
|
</if>
|
|
|
- <if test="updateUser!= null" >
|
|
|
+ <if test="updateUser!= null">
|
|
|
update_user,
|
|
|
</if>
|
|
|
- <if test="createTime!= null" >
|
|
|
+ <if test="createTime!= null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
- <if test="createUser!= null" >
|
|
|
+ <if test="createUser!= null">
|
|
|
create_user,
|
|
|
</if>
|
|
|
- <if test="landMarkId!= null" >
|
|
|
+ <if test="landMarkId!= null">
|
|
|
land_mark_id,
|
|
|
</if>
|
|
|
- <if test="name!= null" >
|
|
|
+ <if test="name!= null">
|
|
|
name,
|
|
|
</if>
|
|
|
- <if test="remark!= null" >
|
|
|
+ <if test="remark!= null">
|
|
|
remark,
|
|
|
</if>
|
|
|
- <if test="payFlag!= null" >
|
|
|
+ <if test="payFlag!= null">
|
|
|
pay_flag,
|
|
|
</if>
|
|
|
- <if test="price!= null" >
|
|
|
+ <if test="price!= null">
|
|
|
price,
|
|
|
</if>
|
|
|
- <if test="aimPlace!= null" >
|
|
|
+ <if test="aimPlace!= null">
|
|
|
aim_place,
|
|
|
</if>
|
|
|
- <if test="rank!= null" >
|
|
|
+ <if test="rank!= null">
|
|
|
rank,
|
|
|
</if>
|
|
|
- <if test="shelfFlag!= null" >
|
|
|
+ <if test="shelfFlag!= null">
|
|
|
shelf_flag,
|
|
|
</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
- <if test="id != null" >
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="delFlag != null" >
|
|
|
+ <if test="delFlag != null">
|
|
|
#{delFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- <if test="updateTime != null" >
|
|
|
+ <if test="updateTime != null">
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="updateUser != null" >
|
|
|
+ <if test="updateUser != null">
|
|
|
#{updateUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="createTime != null" >
|
|
|
+ <if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="createUser != null" >
|
|
|
+ <if test="createUser != null">
|
|
|
#{createUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="landMarkId != null" >
|
|
|
+ <if test="landMarkId != null">
|
|
|
#{landMarkId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="name != null" >
|
|
|
+ <if test="name != null">
|
|
|
#{name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="remark != null" >
|
|
|
+ <if test="remark != null">
|
|
|
#{remark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="payFlag != null" >
|
|
|
+ <if test="payFlag != null">
|
|
|
#{payFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- <if test="price != null" >
|
|
|
+ <if test="price != null">
|
|
|
#{price,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="aimPlace != null" >
|
|
|
+ <if test="aimPlace != null">
|
|
|
#{aimPlace,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="rank != null" >
|
|
|
+ <if test="rank != null">
|
|
|
#{rank,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="shelfFlag != null" >
|
|
|
+ <if test="shelfFlag != null">
|
|
|
#{shelfFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.NavigationPackage" >
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
update navigation_package
|
|
|
- <set >
|
|
|
- <if test="id != null" >
|
|
|
- id= #{id,jdbcType=INTEGER},
|
|
|
+ <set>
|
|
|
+ <if test="id != null">
|
|
|
+ id= #{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="delFlag != null" >
|
|
|
- del_flag= #{delFlag,jdbcType=CHAR},
|
|
|
+ <if test="delFlag != null">
|
|
|
+ del_flag= #{delFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- <if test="updateTime != null" >
|
|
|
- update_time= #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time= #{updateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="updateUser != null" >
|
|
|
- update_user= #{updateUser,jdbcType=VARCHAR},
|
|
|
+ <if test="updateUser != null">
|
|
|
+ update_user= #{updateUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="createTime != null" >
|
|
|
- create_time= #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time= #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="createUser != null" >
|
|
|
- create_user= #{createUser,jdbcType=VARCHAR},
|
|
|
+ <if test="createUser != null">
|
|
|
+ create_user= #{createUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="landMarkId != null" >
|
|
|
- land_mark_id= #{landMarkId,jdbcType=INTEGER},
|
|
|
+ <if test="landMarkId != null">
|
|
|
+ land_mark_id= #{landMarkId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="name != null" >
|
|
|
- name= #{name,jdbcType=VARCHAR},
|
|
|
+ <if test="name != null">
|
|
|
+ name= #{name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="remark != null" >
|
|
|
- remark= #{remark,jdbcType=VARCHAR},
|
|
|
+ <if test="remark != null">
|
|
|
+ remark= #{remark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="payFlag != null" >
|
|
|
- pay_flag= #{payFlag,jdbcType=CHAR},
|
|
|
+ <if test="payFlag != null">
|
|
|
+ pay_flag= #{payFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- <if test="price != null" >
|
|
|
- price= #{price,jdbcType=DECIMAL},
|
|
|
+ <if test="price != null">
|
|
|
+ price= #{price,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="aimPlace != null" >
|
|
|
- aim_place= #{aimPlace,jdbcType=VARCHAR},
|
|
|
+ <if test="aimPlace != null">
|
|
|
+ aim_place= #{aimPlace,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="rank != null" >
|
|
|
- rank= #{rank,jdbcType=INTEGER},
|
|
|
+ <if test="rank != null">
|
|
|
+ rank= #{rank,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="shelfFlag != null" >
|
|
|
- shelf_flag= #{shelfFlag,jdbcType=CHAR},
|
|
|
+ <if test="shelfFlag != null">
|
|
|
+ shelf_flag= #{shelfFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
|
- </set>
|
|
|
+ </set>
|
|
|
where
|
|
|
<if test="id != null and !"".equals(id)">
|
|
|
id = #{id,jdbcType=INTEGER}
|
|
|
@@ -206,66 +207,69 @@
|
|
|
</if>
|
|
|
|
|
|
</update>
|
|
|
- <select id="queryNavigationPackageByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
- select <include refid="Base_Column_List"/> from navigation_package
|
|
|
+ <select id="queryNavigationPackageByPage" parameterType="java.util.Map"
|
|
|
+ resultType="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from navigation_package
|
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
|
<if test="record.idStr != null and !"".equals(record.idStr)">
|
|
|
and id in (${record.idStr})
|
|
|
</if>
|
|
|
- <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 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 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 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 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 test="record.createUser != null and !"".equals(record.createUser)">
|
|
|
- and create_user = #{record.createUser}
|
|
|
+ <if test="record.landMarkId != null and !"".equals(record.landMarkId)">
|
|
|
+ and land_mark_id = #{record.landMarkId}
|
|
|
</if>
|
|
|
- <if test="record.landMarkId != null and !"".equals(record.landMarkId)">
|
|
|
- and land_mark_id = #{record.landMarkId}
|
|
|
+ <if test="record.name != null and !"".equals(record.name)">
|
|
|
+ and name = #{record.name}
|
|
|
</if>
|
|
|
- <if test="record.name != null and !"".equals(record.name)">
|
|
|
- and name = #{record.name}
|
|
|
+ <if test="record.remark != null and !"".equals(record.remark)">
|
|
|
+ and remark = #{record.remark}
|
|
|
</if>
|
|
|
- <if test="record.remark != null and !"".equals(record.remark)">
|
|
|
- and remark = #{record.remark}
|
|
|
+ <if test="record.payFlag != null and !"".equals(record.payFlag)">
|
|
|
+ and pay_flag = #{record.payFlag}
|
|
|
</if>
|
|
|
- <if test="record.payFlag != null and !"".equals(record.payFlag)">
|
|
|
- and pay_flag = #{record.payFlag}
|
|
|
+ <if test="record.price != null and !"".equals(record.price)">
|
|
|
+ and price = #{record.price}
|
|
|
</if>
|
|
|
- <if test="record.price != null and !"".equals(record.price)">
|
|
|
- and price = #{record.price}
|
|
|
+ <if test="record.aimPlace != null and !"".equals(record.aimPlace)">
|
|
|
+ and aim_place = #{record.aimPlace}
|
|
|
</if>
|
|
|
- <if test="record.aimPlace != null and !"".equals(record.aimPlace)">
|
|
|
- and aim_place = #{record.aimPlace}
|
|
|
+ <if test="record.rank != null and !"".equals(record.rank)">
|
|
|
+ and rank = #{record.rank}
|
|
|
</if>
|
|
|
- <if test="record.rank != null and !"".equals(record.rank)">
|
|
|
- and rank = #{record.rank}
|
|
|
+ <if test="record.shelfFlag != null and !"".equals(record.shelfFlag)">
|
|
|
+ and shelf_flag = #{record.shelfFlag}
|
|
|
</if>
|
|
|
- <if test="record.shelfFlag != null and !"".equals(record.shelfFlag)">
|
|
|
- and shelf_flag = #{record.shelfFlag}
|
|
|
+ <if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
+ OR land_mark_id LIKE concat('%',#{record.searchKey},'%')
|
|
|
+ OR name LIKE concat('%',#{record.searchKey},'%')
|
|
|
+ OR remark LIKE concat('%',#{record.searchKey},'%')
|
|
|
+ OR pay_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
+ OR price LIKE concat('%',#{record.searchKey},'%')
|
|
|
+ OR rank LIKE concat('%',#{record.searchKey},'%')
|
|
|
+ OR shelf_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
+ </trim>
|
|
|
</if>
|
|
|
- <if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
- <trim prefix="and (" suffix=")" prefixOverrides="OR" >
|
|
|
- OR land_mark_id LIKE concat('%',#{record.searchKey},'%')
|
|
|
- OR name LIKE concat('%',#{record.searchKey},'%')
|
|
|
- OR remark LIKE concat('%',#{record.searchKey},'%')
|
|
|
- OR pay_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
- OR price LIKE concat('%',#{record.searchKey},'%')
|
|
|
- OR rank LIKE concat('%',#{record.searchKey},'%')
|
|
|
- OR shelf_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
- </trim>
|
|
|
- </if>
|
|
|
|
|
|
<if test="record.advancedQuery != null and !"".equals(record.advancedQuery)">
|
|
|
<foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
|
|
|
@@ -319,100 +323,103 @@
|
|
|
</if>
|
|
|
id desc
|
|
|
</select>
|
|
|
- <select id="queryAllNavigationPackage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
- select <include refid="Base_Column_List"/> from navigation_package
|
|
|
+ <select id="queryAllNavigationPackage" parameterType="java.util.Map"
|
|
|
+ resultType="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from navigation_package
|
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
|
<if test="idStr != null and !"".equals(idStr)">
|
|
|
and id in (${idStr})
|
|
|
</if>
|
|
|
- <if test="id != null and !"".equals(id)">
|
|
|
- and id = #{id}
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
+ and id = #{id}
|
|
|
</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 test="updateTime != null and !"".equals(updateTime)">
|
|
|
- and update_time = #{updateTime}
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
+ and update_time = #{updateTime}
|
|
|
</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 test="createTime != null and !"".equals(createTime)">
|
|
|
- and create_time = #{createTime}
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
+ and create_time = #{createTime}
|
|
|
</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 test="landMarkId != null and !"".equals(landMarkId)">
|
|
|
- and land_mark_id = #{landMarkId}
|
|
|
+ <if test="landMarkId != null and !"".equals(landMarkId)">
|
|
|
+ and land_mark_id = #{landMarkId}
|
|
|
</if>
|
|
|
- <if test="name != null and !"".equals(name)">
|
|
|
- and name = #{name}
|
|
|
+ <if test="name != null and !"".equals(name)">
|
|
|
+ and name = #{name}
|
|
|
</if>
|
|
|
- <if test="remark != null and !"".equals(remark)">
|
|
|
- and remark = #{remark}
|
|
|
+ <if test="remark != null and !"".equals(remark)">
|
|
|
+ and remark = #{remark}
|
|
|
</if>
|
|
|
- <if test="payFlag != null and !"".equals(payFlag)">
|
|
|
- and pay_flag = #{payFlag}
|
|
|
+ <if test="payFlag != null and !"".equals(payFlag)">
|
|
|
+ and pay_flag = #{payFlag}
|
|
|
</if>
|
|
|
- <if test="price != null and !"".equals(price)">
|
|
|
- and price = #{price}
|
|
|
+ <if test="price != null and !"".equals(price)">
|
|
|
+ and price = #{price}
|
|
|
</if>
|
|
|
- <if test="aimPlace != null and !"".equals(aimPlace)">
|
|
|
- and aim_place = #{aimPlace}
|
|
|
+ <if test="aimPlace != null and !"".equals(aimPlace)">
|
|
|
+ and aim_place = #{aimPlace}
|
|
|
</if>
|
|
|
- <if test="rank != null and !"".equals(rank)">
|
|
|
- and rank = #{rank}
|
|
|
+ <if test="rank != null and !"".equals(rank)">
|
|
|
+ and rank = #{rank}
|
|
|
</if>
|
|
|
- <if test="shelfFlag != null and !"".equals(shelfFlag)">
|
|
|
- and shelf_flag = #{shelfFlag}
|
|
|
+ <if test="shelfFlag != null and !"".equals(shelfFlag)">
|
|
|
+ and shelf_flag = #{shelfFlag}
|
|
|
</if>
|
|
|
- <if test="searchKey != null and !"".equals(searchKey)">
|
|
|
- <trim prefix="and (" suffix=")" prefixOverrides="OR" >
|
|
|
- OR land_mark_id LIKE concat('%',#{searchKey},'%')
|
|
|
- OR name LIKE concat('%',#{searchKey},'%')
|
|
|
- OR remark LIKE concat('%',#{searchKey},'%')
|
|
|
- OR pay_flag LIKE concat('%',#{searchKey},'%')
|
|
|
- OR price LIKE concat('%',#{searchKey},'%')
|
|
|
- OR rank LIKE concat('%',#{searchKey},'%')
|
|
|
- OR shelf_flag LIKE concat('%',#{searchKey},'%')
|
|
|
- </trim>
|
|
|
+ <if test="searchKey != null and !"".equals(searchKey)">
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
+ OR land_mark_id LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR name LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR remark LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR pay_flag LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR price LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR rank LIKE concat('%',#{searchKey},'%')
|
|
|
+ OR shelf_flag LIKE concat('%',#{searchKey},'%')
|
|
|
+ </trim>
|
|
|
</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>
|
|
|
order by
|
|
|
|
|
|
@@ -431,56 +438,90 @@
|
|
|
|
|
|
id desc
|
|
|
</select>
|
|
|
- <select id="queryNavigationPackage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
- select <include refid="Base_Column_List"/> from navigation_package
|
|
|
+ <select id="queryNavigationPackage" parameterType="java.util.Map"
|
|
|
+ resultType="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from navigation_package
|
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
|
- <if test="id != null and !"".equals(id)">
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
and id = #{id}
|
|
|
</if>
|
|
|
- <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
and del_flag = #{delFlag}
|
|
|
</if>
|
|
|
- <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
and update_time = #{updateTime}
|
|
|
</if>
|
|
|
- <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
+ <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
and update_user = #{updateUser}
|
|
|
</if>
|
|
|
- <if test="createTime != null and !"".equals(createTime)">
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
|
- <if test="createUser != null and !"".equals(createUser)">
|
|
|
+ <if test="createUser != null and !"".equals(createUser)">
|
|
|
and create_user = #{createUser}
|
|
|
</if>
|
|
|
- <if test="landMarkId != null and !"".equals(landMarkId)">
|
|
|
+ <if test="landMarkId != null and !"".equals(landMarkId)">
|
|
|
and land_mark_id = #{landMarkId}
|
|
|
</if>
|
|
|
- <if test="name != null and !"".equals(name)">
|
|
|
+ <if test="name != null and !"".equals(name)">
|
|
|
and name = #{name}
|
|
|
</if>
|
|
|
- <if test="remark != null and !"".equals(remark)">
|
|
|
+ <if test="remark != null and !"".equals(remark)">
|
|
|
and remark = #{remark}
|
|
|
</if>
|
|
|
- <if test="payFlag != null and !"".equals(payFlag)">
|
|
|
+ <if test="payFlag != null and !"".equals(payFlag)">
|
|
|
and pay_flag = #{payFlag}
|
|
|
</if>
|
|
|
- <if test="price != null and !"".equals(price)">
|
|
|
+ <if test="price != null and !"".equals(price)">
|
|
|
and price = #{price}
|
|
|
</if>
|
|
|
- <if test="aimPlace != null and !"".equals(aimPlace)">
|
|
|
+ <if test="aimPlace != null and !"".equals(aimPlace)">
|
|
|
and aim_place = #{aimPlace}
|
|
|
</if>
|
|
|
- <if test="rank != null and !"".equals(rank)">
|
|
|
+ <if test="rank != null and !"".equals(rank)">
|
|
|
and rank = #{rank}
|
|
|
</if>
|
|
|
- <if test="shelfFlag != null and !"".equals(shelfFlag)">
|
|
|
+ <if test="shelfFlag != null and !"".equals(shelfFlag)">
|
|
|
and shelf_flag = #{shelfFlag}
|
|
|
</if>
|
|
|
-
|
|
|
+
|
|
|
</where>
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
+ <select id="queryBoughtNavigationPackage" parameterType="java.util.Map"
|
|
|
+ resultType="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
+ SELECT
|
|
|
+ GROUP_CONCAT(`name`) AS NAME,
|
|
|
+ GROUP_CONCAT(aim_place) AS aim_place
|
|
|
+ FROM
|
|
|
+ navigation_package
|
|
|
+ WHERE
|
|
|
+ del_flag = 'N'
|
|
|
+ AND id IN (
|
|
|
+ SELECT
|
|
|
+ package_id
|
|
|
+ FROM
|
|
|
+ user_order
|
|
|
+ WHERE
|
|
|
+ del_flag = 'N'
|
|
|
+ AND user_id = #{userId}
|
|
|
+ AND status_flag = 1
|
|
|
+ )
|
|
|
+
|
|
|
+ <if test="landMarkId != null and !"".equals(landMarkId)">
|
|
|
+ and land_mark_id = #{landMarkId}
|
|
|
+ </if>
|
|
|
+ <if test="payFlag != null and !"".equals(payFlag)">
|
|
|
+ and pay_flag = #{payFlag}
|
|
|
+ </if>
|
|
|
+ <if test="shelfFlag != null and !"".equals(shelfFlag)">
|
|
|
+ and shelf_flag = #{shelfFlag}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </select>
|
|
|
<update id="delete">
|
|
|
UPDATE navigation_package SET del_flag = 'Y'
|
|
|
where
|
|
|
@@ -493,10 +534,12 @@
|
|
|
</if>
|
|
|
</update>
|
|
|
<select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.NavigationPackage">
|
|
|
- select <include refid="Base_Column_List"/> from navigation_package
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from navigation_package
|
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
|
- </where>
|
|
|
+ </where>
|
|
|
order by id desc
|
|
|
</select>
|
|
|
</mapper>
|