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

180 lines
6.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.IssueDao">
<resultMap type="com.epmet.entity.IssueEntity" id="issueMap">
<result property="id" column="ID"/>
<result property="issueStatus" column="ISSUE_STATUS"/>
<result property="sourceType" column="SOURCE_TYPE"/>
<result property="sourceId" column="SOURCE_ID"/>
<result property="closeReason" column="CLOSE_REASON"/>
<result property="resolveType" column="RESOLVE_TYPE"/>
<result property="issueTitle" column="ISSUE_TITLE"/>
<result property="suggestion" column="SUGGESTION"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="orgIdPath" column="ORG_ID_PATH"/>
<result property="orgId" column="ORG_ID"/>
<result property="votingDeadline" column="VOTING_DEADLINE"/>
<result property="decidedTime" column="DECIDED_TIME"/>
<result property="shiftedTime" column="SHIFTED_TIME"/>
<result property="closedTime" column="CLOSED_TIME"/>
<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="issueDetail" parameterType="com.epmet.dto.form.IssueDetailFormDTO" resultType="com.epmet.dto.result.IssueResultDTO">
SELECT
source_id AS topicId,
issue_title AS issueTitle,
issue_status AS issueStatus,
suggestion AS issueSuggestion,
grid_id AS gridId,
created_by AS userId
FROM
issue
WHERE
id = #{issueId}
AND del_flag = 0
</select>
<!-- 新增议题 -->
<insert id="insertOne" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.epmet.dto.IssueDTO">
<selectKey keyProperty="id" resultType="java.lang.String" order="BEFORE">
SELECT replace(uuid(),'-','') AS ID
</selectKey>
INSERT INTO issue
<trim prefix="(" suffix=")" suffixOverrides=",">
id,
<if test ='null != issueStatus'>
issue_status,
</if>
<if test ='null != sourceType'>
source_type,
</if>
<if test ='null != sourceId'>
source_id,
</if>
<if test ='null != closeReason'>
close_reason,
</if>
<if test ='null != resolveType'>
resolve_type,
</if>
<if test ='null != issueTitle'>
issue_title,
</if>
<if test ='null != suggestion'>
suggestion,
</if>
<if test ='null != customerId'>
customer_id,
</if>
<if test ='null != gridId'>
grid_id,
</if>
<if test ='null != orgIdPath'>
org_id_path,
</if>
<if test ='null != orgId'>
org_id,
</if>
<if test ='null != votingDeadline'>
voting_deadline,
</if>
<if test ='null != decidedTime'>
decided_time,
</if>
<if test ='null != shiftedTime'>
shifted_time,
</if>
<if test ='null != closedTime'>
closed_time,
</if>
<if test ='null != createdBy'>
created_by,
</if>
<if test ='null != createdTime'>
created_time,
</if>
<if test ='null != createdBy'>
updated_by,
</if>
<if test ='null != createdTime'>
updated_time,
</if>
del_flag,
revision
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{id},
<if test ='null != issueStatus'>
#{issueStatus},
</if>
<if test ='null != sourceType'>
#{sourceType},
</if>
<if test ='null != sourceId'>
#{sourceId},
</if>
<if test ='null != closeReason'>
#{closeReason},
</if>
<if test ='null != resolveType'>
#{resolveType},
</if>
<if test ='null != issueTitle'>
#{issueTitle},
</if>
<if test ='null != suggestion'>
#{suggestion},
</if>
<if test ='null != customerId'>
#{customerId},
</if>
<if test ='null != gridId'>
#{gridId},
</if>
<if test ='null != orgIdPath'>
#{orgIdPath},
</if>
<if test ='null != orgId'>
#{orgId},
</if>
<if test ='null != votingDeadline'>
#{votingDeadline},
</if>
<if test ='null != decidedTime'>
#{decidedTime},
</if>
<if test ='null != shiftedTime'>
#{shiftedTime},
</if>
<if test ='null != closedTime'>
#{closedTime},
</if>
<if test ='null != createdBy'>
#{createdBy},
</if>
<if test ='null != createdTime'>
#{createdTime},
</if>
<if test ='null != createdBy'>
#{createdBy},
</if>
<if test ='null != createdTime'>
#{createdTime},
</if>
'0',
0
</trim>
</insert>
</mapper>