|
@@ -13,14 +13,18 @@
|
|
|
|
|
|
|
|
|
<sql id="select_sql">
|
|
|
- select *
|
|
|
- from tb_goods
|
|
|
+ select g.*
|
|
|
+ from tb_goods g
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getList" resultMap="model">
|
|
|
<include refid="select_sql"></include>
|
|
|
+
|
|
|
+ <if test=' this.has("tradeAreaId") '>
|
|
|
+ left join re_trade_area_goods ta on g.id = ta.goods_id
|
|
|
+ </if>
|
|
|
<where>
|
|
|
<if test=' this.has("id") '> and id = #{id} </if>
|
|
|
<if test=' this.has("name") '> and name like concat('%', #{name}, '%')</if>
|
|
@@ -34,6 +38,8 @@
|
|
|
<if test=' this.has("unit") '> and unit = #{unit} </if>
|
|
|
<if test=' this.has("singlePrice") '> and single_price = #{singlePrice} </if>
|
|
|
<if test=' this.has("taxNo") '> and tax_no = #{taxNo} </if>
|
|
|
+
|
|
|
+ <if test=' this.has("tradeAreaId") '> and ta.area_id = #{tradeAreaId} </if>
|
|
|
</where>
|
|
|
order by
|
|
|
<choose>
|