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.

49 lines
2.0 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.FunctionCustomizedDao">
<!-- 定制功能详情查询 -->
<select id="getFunctionCustomizedByFunctionId" parameterType="com.epmet.dto.form.CommonFunctionIdFormDTO"
resultType="com.epmet.dto.result.FunctionCustomizedDetailResultDTO">
SELECT
cu.FUNCTION_ID functionId,
f.SHOPPING_STATUS shoppingStatus,
f.FUNCTION_EXPLAIN functionExplain,
cu.ID customizedId,
cu.CUSTOMIZED_NAME customizedName,
cu.ICON_LARGE_IMG iconLargeImg,
cu.ICON_SMALL_IMG iconSmallImg,
cu.TARGET_LINK targetLink,
cu.DOMAIN_NAME domainName,
cu.FROM_APP fromApp
FROM function_customized cu
LEFT JOIN `function` f ON cu.FUNCTION_ID = f.ID
WHERE cu.DEL_FLAG = '0'
AND cu.FUNCTION_ID = #{functionId}
</select>
<update id="delByFunctionId" parameterType="String">
update function_customized set DEL_FLAG = 1 where FUNCTION_ID = #{functionId} and DEL_FLAG = '0'
</update>
<!-- 根据功能id,查询定制功能全部信息(定制功能表+功能表) -->
<select id="selectCustomized" parameterType="String"
resultType="com.epmet.dto.CustomizedDTO">
SELECT
f.ID functionId,
f.SHOPPING_STATUS shoppingStatus,
f.FUNCTION_EXPLAIN functionExplain,
cu.ID customizedId,
cu.CUSTOMIZED_NAME customizedName,
cu.ICON_LARGE_IMG iconLargeImg,
cu.ICON_SMALL_IMG iconSmallImg,
cu.TARGET_LINK targetLink,
cu.DOMAIN_NAME domainName,
cu.FROM_APP fromApp
FROM `function` f
LEFT JOIN function_customized cu ON f.ID = cu.FUNCTION_ID
WHERE f.DEL_FLAG = '0'
AND f.ID = #{functionId}
</select>
</mapper>