|
|
|
<?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.epmet.dao.CustomerFootBarDao">
|
|
|
|
|
|
|
|
<resultMap type="com.epmet.entity.CustomerFootBarEntity" id="customerFootBarMap">
|
|
|
|
<result property="id" column="ID"/>
|
|
|
|
<result property="barName" column="BAR_NAME"/>
|
|
|
|
<result property="barKey" column="BAR_KEY"/>
|
|
|
|
<result property="appType" column="APP_TYPE"/>
|
|
|
|
<result property="pageTitle" column="PAGE_TITLE"/>
|
|
|
|
<result property="iconPath" column="ICON_PATH"/>
|
|
|
|
<result property="selectedIconPath" column="SELECTED_ICON_PATH"/>
|
|
|
|
<result property="orderIndex" column="ORDER_INDEX"/>
|
|
|
|
<result property="display" column="DISPLAY"/>
|
|
|
|
<result property="delFlag" column="DEL_FLAG"/>
|
|
|
|
<result property="revision" column="REVISION"/>
|
|
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<!--更新顺序号-->
|
|
|
|
<update id="updateOrder">
|
|
|
|
update customer_foot_bar
|
|
|
|
set ORDER_INDEX = #{orderIndex}
|
|
|
|
where ID = #{id}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<update id="updateDisplayStatus">
|
|
|
|
update customer_foot_bar
|
|
|
|
set DISPLAY=#{display}
|
|
|
|
where ID = #{id}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<!--查询客户的footbar列表-->
|
|
|
|
<select id="listCustomerFootBars" resultType="com.epmet.entity.CustomerFootBarEntity">
|
|
|
|
SELECT
|
|
|
|
id,
|
|
|
|
customer_id,
|
|
|
|
app_type,
|
|
|
|
bar_key,
|
|
|
|
bar_name,
|
|
|
|
app_type,
|
|
|
|
page_title,
|
|
|
|
icon_path,
|
|
|
|
selected_icon_path,
|
|
|
|
`order_index`,
|
|
|
|
del_flag,
|
|
|
|
revision,
|
|
|
|
created_by,
|
|
|
|
created_time,
|
|
|
|
updated_by,
|
|
|
|
updated_time,
|
|
|
|
ORDER_INDEX
|
|
|
|
FROM
|
|
|
|
customer_foot_bar
|
|
|
|
<where>
|
|
|
|
DEL_FLAG = '0'
|
|
|
|
AND CUSTOMER_ID = #{customerId}
|
|
|
|
AND APP_TYPE = #{appType}
|
|
|
|
</where>
|
|
|
|
ORDER BY `ORDER_INDEX` ASC
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="count4Unique" resultType="java.lang.Integer">
|
|
|
|
select count(1)
|
|
|
|
from customer_foot_bar
|
|
|
|
<where>
|
|
|
|
<if test="appType != null and appType != ''">
|
|
|
|
app_type = #{appType}
|
|
|
|
</if>
|
|
|
|
<if test="barKey != null and barKey != ''">
|
|
|
|
and BAR_KEY = #{barKey}
|
|
|
|
</if>
|
|
|
|
<if test="customerId != null and customerId != ''">
|
|
|
|
and CUSTOMER_ID = #{customerId}
|
|
|
|
</if>
|
|
|
|
<if test="barName != null and barName != ''">
|
|
|
|
and BAR_NAME= #{barName}
|
|
|
|
</if>
|
|
|
|
and DEL_FLAG=0
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="fetchNextOrder" resultType="java.lang.Integer">
|
|
|
|
select ifnull(max(`ORDER_INDEX`),-1) + 1
|
|
|
|
from customer_foot_bar
|
|
|
|
<where>
|
|
|
|
app_type = #{appType}
|
|
|
|
and CUSTOMER_ID = #{customerId}
|
|
|
|
and DEL_FLAG=0
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getByAppTypeAndBarKeyOfCustomer" resultType="com.epmet.entity.CustomerFootBarEntity">
|
|
|
|
select *
|
|
|
|
from customer_foot_bar
|
|
|
|
where CUSTOMER_ID = #{customerId}
|
|
|
|
and APP_TYPE = #{appType}
|
|
|
|
and BAR_KEY = #{barKey}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="listByAppTypeAndCustomerId" resultType="com.epmet.entity.CustomerFootBarEntity">
|
|
|
|
select id,
|
|
|
|
customer_id,
|
|
|
|
app_type,
|
|
|
|
bar_key,
|
|
|
|
bar_name,
|
|
|
|
page_title,
|
|
|
|
icon_path,
|
|
|
|
selected_icon_path,
|
|
|
|
display,
|
|
|
|
order_index,
|
|
|
|
del_flag,
|
|
|
|
revision,
|
|
|
|
created_by,
|
|
|
|
created_time,
|
|
|
|
updated_by,
|
|
|
|
updated_time
|
|
|
|
from customer_foot_bar
|
|
|
|
where CUSTOMER_ID = #{customerId}
|
|
|
|
and app_type = #{appType}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|