|
@@ -20,7 +20,8 @@
|
|
|
FROM replacement_instrument_cooperation
|
|
|
WHERE id_ = #{id}
|
|
|
</select>
|
|
|
- <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.ReplacementInstrumentCooperation">
|
|
|
+ <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.ReplacementInstrumentCooperation"
|
|
|
+ useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
<!--@mbg.generated-->
|
|
|
insert into replacement_instrument_cooperation (id_, organ_id_, cooperation_organ_id_, open_pay_, create_time_,
|
|
|
update_time_
|
|
@@ -59,7 +60,7 @@
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="ReplacementInstrumentCooperation" parameterType="map">
|
|
|
- SELECT ric*,o.name_ organName,co.name_ cooperationName FROM replacement_instrument_cooperation ric
|
|
|
+ SELECT ric.*,o.name_ organName,co.name_ cooperationOrganName FROM replacement_instrument_cooperation ric
|
|
|
LEFT JOIN cooperation_organ co on ric.cooperation_organ_id_ = co.id_
|
|
|
LEFT JOIN organization o on o.id_ = ric.organ_id_
|
|
|
<include refid="queryPageSql"/>
|
|
@@ -69,7 +70,7 @@
|
|
|
<sql id="queryPageSql">
|
|
|
<where>
|
|
|
<if test="organId != null">
|
|
|
- AND ric.organ_id_ = #{organId}
|
|
|
+ AND FIND_IN_SET(ric.organ_id_ , #{organId})
|
|
|
</if>
|
|
|
<if test="openPay != null">
|
|
|
AND ric.open_pay_ = #{openPay,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
@@ -87,7 +88,9 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getByCooperationId" resultMap="ReplacementInstrumentCooperation">
|
|
|
- SELECT * FROM replacement_instrument_cooperation WHERE cooperation_organ_id_ = #{cooperationId}
|
|
|
+ SELECT *
|
|
|
+ FROM replacement_instrument_cooperation
|
|
|
+ WHERE cooperation_organ_id_ = #{cooperationId}
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|