绑定sql优化
This commit is contained in:
parent
a9eb35b238
commit
f2d8557588
|
|
@ -311,7 +311,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where m.rfid_code = #{rfidCode}
|
where m.rfid_code = #{rfidCode}
|
||||||
</select>
|
</select>
|
||||||
<select id="getMaMachineByMaIdAndMaCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
<select id="getMaMachineByMaIdAndMaCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
||||||
select * from ma_machine where ma_id = #{maId} and ma_code = #{maCode}
|
select *
|
||||||
|
from ma_machine
|
||||||
|
where 1=1
|
||||||
|
<if test="maId != null "> and ma_id = #{maId}</if>
|
||||||
|
<if test="maCode != null and maCode != ''"> and ma_code = #{maCode}</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="getMachineByQrCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
<select id="getMachineByQrCode" resultType="com.bonus.sgzb.base.api.domain.MaMachine">
|
||||||
select m.ma_id, m.type_id, m.ma_code, m.pre_code, m.ma_status, dic.name maStatusName, m.qr_code, m.buy_price, msi.supplier as maVender, m.out_fac_time, m.out_fac_code,
|
select m.ma_id, m.type_id, m.ma_code, m.pre_code, m.ma_status, dic.name maStatusName, m.qr_code, m.buy_price, msi.supplier as maVender, m.out_fac_time, m.out_fac_code,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue