日照智慧社区接口服务
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.
 
 
 
 
 

52 lines
2.1 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.IcExportTemplateDao">
<resultMap type="com.epmet.entity.IcExportTemplateEntity" id="icExportTemplateMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="formCode" column="FORM_CODE"/>
<result property="name" column="NAME"/>
<result property="type" column="TYPE"/>
<result property="url" column="URL"/>
<result property="sort" column="SORT"/>
<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>
<select id="getTemplateConfigForExport" resultType="com.epmet.dto.result.IcExportTemplateForExportResultDTO">
SELECT
c.ID,c.TEMP_ID,c.LABEL,c.PID,c.sort,ifi.ID AS itemId,ifig.TABLE_NAME,concat(ifi.COLUMN_NAME,if(ifi.COLUMN_NUM = 0,'',ifi.COLUMN_NUM)) columnName,
ifi.OPTION_SOURCE_VALUE,ifi.OPTION_SOURCE_TYPE
FROM ic_export_template_config c
LEFT JOIN ic_form_item ifi ON c.ITEM_ID = ifi.ID
LEFT JOIN ic_form_item_group ifig ON ifi.ITEM_GROUP_ID = ifig.ID
WHERE TEMP_ID = #{tempId} and c.CUSTOMER_ID = #{customerId} and c.DEL_FLAG = '0'
ORDER BY c.PID,c.SORT
</select>
<select id="selectByAgencyId" resultType="com.epmet.dto.IcExportTemplateDTO">
SELECT
id,
customer_id,
agency_id,
pids,
form_code,
`name`,
type,
url,
sort
FROM
ic_export_template
WHERE
del_flag = '0'
AND agency_id = #{agencyId}
ORDER BY sort DESC
</select>
</mapper>