|
|
@@ -2,9 +2,10 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.goldenwater.slaj.hidd.mapper.BisHiddConsultMapper">
|
|
|
|
|
|
- <resultMap type="BisHiddConsult" id="BisHiddConsultResult">
|
|
|
+ <resultMap type="BisHiddConsultVo" id="BisHiddConsultResult">
|
|
|
<id property="guid" column="guid"/>
|
|
|
<result property="hiddGuid" column="hidd_guid"/>
|
|
|
+ <result property="hiddName" column="hidd_name"/>
|
|
|
<result property="consTheme" column="cons_theme"/>
|
|
|
<result property="consTime" column="cons_time"/>
|
|
|
<result property="consPlace" column="cons_place"/>
|
|
|
@@ -17,23 +18,25 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectBisHiddConsultVo">
|
|
|
- select guid, hidd_guid, cons_theme, cons_time, cons_place, cons_host, cons_members, cons_content, cons_result, create_time, update_time
|
|
|
- from bis_hidd_consult
|
|
|
+ select c.guid, c.hidd_guid, h.hidd_name, c.cons_theme, c.cons_time, c.cons_place,
|
|
|
+ c.cons_host, c.cons_members, c.cons_content, c.cons_result, c.create_time, c.update_time
|
|
|
+ from bis_hidd_consult c
|
|
|
+ left join obj_hidd h on c.hidd_guid = h.guid
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectBisHiddConsultList" parameterType="BisHiddConsult" resultMap="BisHiddConsultResult">
|
|
|
<include refid="selectBisHiddConsultVo"/>
|
|
|
<where>
|
|
|
- <if test="hiddGuid != null and hiddGuid != ''">and hidd_guid = #{hiddGuid}</if>
|
|
|
- <if test="consTheme != null and consTheme != ''">and cons_theme like '%' || #{consTheme} || '%'</if>
|
|
|
- <if test="consTime != null and consTime != ''">and cons_time = #{consTime}</if>
|
|
|
+ <if test="hiddGuid != null and hiddGuid != ''">and c.hidd_guid = #{hiddGuid}</if>
|
|
|
+ <if test="consTheme != null and consTheme != ''">and c.cons_theme like '%' || #{consTheme} || '%'</if>
|
|
|
+ <if test="consTime != null and consTime != ''">and c.cons_time = #{consTime}</if>
|
|
|
</where>
|
|
|
- order by create_time desc
|
|
|
+ order by c.create_time desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectBisHiddConsultByGuid" parameterType="String" resultMap="BisHiddConsultResult">
|
|
|
<include refid="selectBisHiddConsultVo"/>
|
|
|
- where guid = #{guid}
|
|
|
+ where c.guid = #{guid}
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertBisHiddConsult" parameterType="BisHiddConsult" useGeneratedKeys="true" keyProperty="guid">
|