|
@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<resultMap type="WelfareGuide" id="WelfareGuideResult">
|
|
|
<result property="id" column="id" />
|
|
|
+ <result property="photoPath" column="photo_path" />
|
|
|
<result property="welfareTitle" column="welfare_title" />
|
|
|
<result property="welfareProfile" column="welfare_profile" />
|
|
|
<result property="welfareContent" column="welfare_content" />
|
|
@@ -18,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectWelfareGuideVo">
|
|
|
- select id, welfare_title, welfare_profile, welfare_content, status, create_by, create_time, update_by, update_time, remark from welfare_guide
|
|
|
+ select id,photo_path, welfare_title, welfare_profile, welfare_content, status, create_by, create_time, update_by, update_time, remark from welfare_guide
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectWelfareGuideList" parameterType="WelfareGuide" resultMap="WelfareGuideResult">
|
|
@@ -42,32 +43,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<insert id="insertWelfareGuide" parameterType="WelfareGuide" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into welfare_guide
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="photoPath != null">photo_path,</if>
|
|
|
<if test="welfareTitle != null">welfare_title,</if>
|
|
|
<if test="welfareProfile != null">welfare_profile,</if>
|
|
|
<if test="welfareContent != null">welfare_content,</if>
|
|
|
<if test="status != null">status,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
- <if test="updateTime != null">update_time,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
|
+ create_time,update_time
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="photoPath != null">#{photoPath},</if>
|
|
|
<if test="welfareTitle != null">#{welfareTitle},</if>
|
|
|
<if test="welfareProfile != null">#{welfareProfile},</if>
|
|
|
<if test="welfareContent != null">#{welfareContent},</if>
|
|
|
<if test="status != null">#{status},</if>
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
- <if test="createTime != null">#{createTime},</if>
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
- <if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
+ sysdate(),sysdate()
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateWelfareGuide" parameterType="WelfareGuide">
|
|
|
update welfare_guide
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="photoPath != null">photo_path = #{photoPath},</if>
|
|
|
<if test="welfareTitle != null">welfare_title = #{welfareTitle},</if>
|
|
|
<if test="welfareProfile != null">welfare_profile = #{welfareProfile},</if>
|
|
|
<if test="welfareContent != null">welfare_content = #{welfareContent},</if>
|