|
|
@@ -301,7 +301,8 @@
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="selectByAbbreviation" resultType="com.goafanti.common.model.IdleContractNo">
|
|
|
- select id,abbreviation,used_order_no usedOrderNo,aid,create_time createTime,max(contract_no) contractNo from idle_contract_no
|
|
|
- where abbreviation= #{abbreviation,jdbcType=VARCHAR}
|
|
|
+ select a.id,a.abbreviation,a.used_order_no usedOrderNo,a.aid,a.create_time createTime,a.contract_no contractNo from idle_contract_no a
|
|
|
+ where abbreviation= #{abbreviation,jdbcType=VARCHAR}
|
|
|
+ and a.contract_no=(select max(contract_no)from idle_contract_no where abbreviation= #{abbreviation,jdbcType=VARCHAR})
|
|
|
</select>
|
|
|
</mapper>
|