You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
3.8 KiB
108 lines
3.8 KiB
<?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.CustomerHomeTemplateDao">
|
|
|
|
<resultMap type="com.epmet.entity.CustomerHomeTemplateEntity" id="customerHomeTemplateMap">
|
|
<result property="id" column="ID"/>
|
|
<result property="componentId" column="COMPONENT_ID"/>
|
|
<result property="clientType" column="CLIENT_TYPE"/>
|
|
<result property="region" column="REGION"/>
|
|
<result property="configuration" column="CONFIGURATION"/>
|
|
<result property="demoData" column="DEMO_DATA"/>
|
|
<result property="displayOrder" column="DISPLAY_ORDER"/>
|
|
<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>
|
|
|
|
<!-- 通用组件列表查询 -->
|
|
<select id="selectListCommonComponent" parameterType="map"
|
|
resultType="com.epmet.dto.result.CommonComponentResultDTO">
|
|
SELECT
|
|
hc.id AS COMPONENT_ID,
|
|
hc.COMPONENT_NAME,
|
|
hc.COMPONENT_FRONT_ID,
|
|
hc.CONFIGURATION,
|
|
hc.DEMO_DATA,
|
|
hc.CONFIGURATION_DESCRIPTION,
|
|
hc.REGION
|
|
FROM
|
|
home_component hc
|
|
WHERE
|
|
hc.DEL_FLAG = '0'
|
|
AND hc.CONPONENT_TYPE = '0'
|
|
<if test='clientType != "" and clientType != null'>
|
|
AND hc.CLIENT_TYPE = #{clientType}
|
|
</if>
|
|
ORDER BY
|
|
CONVERT ( hc.COMPONENT_NAME USING gbk ) ASC
|
|
</select>
|
|
|
|
<!-- 功能组件列表查询 -->
|
|
<select id="selectListFunction" resultType="com.epmet.dto.result.FunctionComponentResultDTO">
|
|
SELECT
|
|
f.id as FUNCTION_ID,
|
|
f.FUNCTION_NAME
|
|
FROM
|
|
`FUNCTION` f
|
|
where f.DEL_FLAG='0'
|
|
ORDER BY CONVERT ( F.FUNCTION_NAME USING gbk ) ASC
|
|
</select>
|
|
|
|
<!-- 根据功能,所属端,查询功能组件列表 -->
|
|
<select id="selectListFunctionComponent" parameterType="map" resultType="com.epmet.dto.result.CommonComponentResultDTO">
|
|
SELECT
|
|
hc.id AS component_id,
|
|
hc.COMPONENT_NAME,
|
|
hc.COMPONENT_FRONT_ID,
|
|
hc.CONFIGURATION,
|
|
hc.DEMO_DATA,
|
|
hc.CONFIGURATION_DESCRIPTION,
|
|
hc.REGION
|
|
FROM
|
|
home_component hc
|
|
WHERE
|
|
hc.DEL_FLAG = '0'
|
|
AND hc.CONPONENT_TYPE = '1'
|
|
<if test='clientType != "" and clientType != null'>
|
|
AND hc.CLIENT_TYPE = #{clientType}
|
|
</if>
|
|
<if test='functionId != "" and functionId != null'>
|
|
and hc.FUNCTION_ID=#{functionId}
|
|
</if>
|
|
ORDER BY
|
|
CONVERT ( hc.COMPONENT_NAME USING gbk ) ASC
|
|
</select>
|
|
|
|
<!-- 获取小程序首页配置 -->
|
|
<select id="selectCustomerTemplate" parameterType="map" resultType="com.epmet.dto.result.CommonComponentDesignResultDTO">
|
|
SELECT
|
|
cht.COMPONENT_ID,
|
|
hc.COMPONENT_NAME,
|
|
hc.COMPONENT_FRONT_ID,
|
|
hc.CONFIGURATION_DESCRIPTION,
|
|
cht.REGION,
|
|
cht.CONFIGURATION,
|
|
cht.DEMO_DATA,
|
|
cht.DISPLAY_ORDER
|
|
FROM
|
|
customer_home_template cht
|
|
LEFT JOIN home_component hc ON ( cht.COMPONENT_ID = hc.id )
|
|
WHERE
|
|
cht.DEL_FLAG = '0'
|
|
AND cht.CLIENT_TYPE =#{clientType}
|
|
ORDER BY cht.REGION DESC,cht.DISPLAY_ORDER ASC
|
|
</select>
|
|
|
|
<delete id="deleteByClientType" parameterType="map">
|
|
UPDATE customer_home_template
|
|
SET DEL_FLAG = '1',
|
|
UPDATED_BY = #{userId},
|
|
UPDATED_TIME = NOW()
|
|
WHERE
|
|
CLIENT_TYPE = #{clientType}
|
|
</delete>
|
|
</mapper>
|