关于mybatis的修改语句怎么写的
1个回答
2016-10-31
展开全部
<update id="deletePdWorkExpAttach" parameterType="com.iss.postdoctor.project.domain.PdWorkExpAttach">
UPDATE PD_WORK_EXP_ATTACH
SET IS_DELETE = 1
, UPDATOR = #{pdWorkExp.updator}
, UPDATE_TIME = NOW()
WHERE IS_DELETE = 0
<if test="pdWorkExp.workExpId != null and pdWorkExp.workExpId !=''">
AND WORK_EXP_ID = #{pdWorkExp.workExpId}
</if>
<if test="pdWorkExp.attachId != null and pdWorkExp.attachId !=''">
AND ATTACH_ID != #{pdWorkExp.attachId}
</if>
</update>
UPDATE PD_WORK_EXP_ATTACH
SET IS_DELETE = 1
, UPDATOR = #{pdWorkExp.updator}
, UPDATE_TIME = NOW()
WHERE IS_DELETE = 0
<if test="pdWorkExp.workExpId != null and pdWorkExp.workExpId !=''">
AND WORK_EXP_ID = #{pdWorkExp.workExpId}
</if>
<if test="pdWorkExp.attachId != null and pdWorkExp.attachId !=''">
AND ATTACH_ID != #{pdWorkExp.attachId}
</if>
</update>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询