批量修改:
<!-- 更新用户客户为不默认 -->
<update id="updatePartyCustomerRelationisDefault" parameterType="tf56.customerBase.request.PartyCustomerRelationUpdateIsDefaultRequest">
UPDATE PartyCustomerRelation
<set>
isDefault = 0,
<if test="updateOperatorId != null" >updateOperatorId = #{updateOperatorId,jdbcType=VARCHAR},</if>
<if test="updateManName != null" >updateManName = #{updateManName,jdbcType=VARCHAR},</if>
updateDate = now()
</set>
WHERE partyCustomerRelationId in
<foreach collection="partyCustomerRelationIds" item="partyCustomerRelationId" open="(" close=")" separator="OR">
#{partyCustomerRelationId,jdbcType=INTEGER}
</foreach>
</update>
本文介绍了一种批量修改用户客户关系的方法,通过MyBatis的动态SQL实现对多个客户关系的默认状态进行更新,同时更新操作员ID、操作员名称及更新日期。
1645

被折叠的 条评论
为什么被折叠?



