|
@@ -55,6 +55,7 @@
|
|
|
<result column="child_sn_" property="childSn"/>
|
|
|
<result column="child_organ_cost_price_" property="childOrganCostPrice"/>
|
|
|
<result column="group_goods_" property="groupGoods"/>
|
|
|
+ <result column="del_flag_" property="delFlag"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -69,7 +70,7 @@
|
|
|
|
|
|
<!-- 全查询 -->
|
|
|
<select id="findAll" resultMap="Goods">
|
|
|
- SELECT * FROM goods where tenant_id_ = #{tenantId} ORDER BY id_
|
|
|
+ SELECT * FROM goods where tenant_id_ = #{tenantId} and del_flag_ = 0 ORDER BY id_
|
|
|
</select>
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
@@ -324,7 +325,7 @@
|
|
|
|
|
|
<sql id="queryGoodsPageSql">
|
|
|
<where>
|
|
|
- g.tenant_id_ = #{tenantId}
|
|
|
+ g.tenant_id_ = #{tenantId} and g.del_flag_ = 0
|
|
|
<if test="goodsCategoryId != null">
|
|
|
AND g.goods_category_id_ = #{goodsCategoryId}
|
|
|
</if>
|
|
@@ -398,7 +399,7 @@
|
|
|
|
|
|
<sql id="queryOrganIdSql">
|
|
|
<where>
|
|
|
- AND g.status_ != 0 and g.tenant_id_ = #{goodsQuery.tenantId}
|
|
|
+ AND g.status_ != 0 and g.tenant_id_ = #{goodsQuery.tenantId} and g.del_flag_ = 0
|
|
|
<if test="goodsQuery.subjectId != null">
|
|
|
AND sgm.subject_id_ = #{goodsQuery.subjectId}
|
|
|
</if>
|
|
@@ -437,13 +438,13 @@
|
|
|
|
|
|
<!-- 根据 -->
|
|
|
<select id="findGoodsNumByCategoryId" resultType="int">
|
|
|
- SELECT COUNT(*) FROM goods WHERE goods_category_id_ = #{goodsCategoryId} and tenant_id_ = #{tenantId}
|
|
|
+ SELECT COUNT(*) FROM goods WHERE goods_category_id_ = #{goodsCategoryId} and tenant_id_ = #{tenantId} and del_flag_ = 0
|
|
|
</select>
|
|
|
<select id="findGoodsByIds" resultMap="Goods">
|
|
|
SELECT * FROM goods WHERE FIND_IN_SET(id_,#{ids})
|
|
|
</select>
|
|
|
<select id="findTypeGoods" resultMap="Goods">
|
|
|
- SELECT * FROM goods WHERE type_ = #{type} AND status_ != 0 and tenant_id_ = #{tenantId}
|
|
|
+ SELECT * FROM goods WHERE type_ = #{type} AND status_ != 0 and tenant_id_ = #{tenantId} and del_flag_ = 0
|
|
|
</select>
|
|
|
<select id="getGoodies" resultMap="Goods">
|
|
|
SELECT * FROM goods WHERE id_ IN
|