|
@@ -46,6 +46,8 @@
|
|
|
<result column="course_fee_show_organ_name_" property="courseFeeShowOrganName"/>
|
|
|
<result column="member_fee_show_organ_id_" property="memberFeeShowOrganId"/>
|
|
|
<result column="member_fee_show_organ_name_" property="memberFeeShowOrganName"/>
|
|
|
+ <result column="free_fee_show_organ_id_" property="freeFeeShowOrganId"/>
|
|
|
+ <result column="free_fee_show_organ_name_" property="freeFeeShowOrganName"/>
|
|
|
<result column="tenant_id_" property="tenantId"/>
|
|
|
</resultMap>
|
|
|
|
|
@@ -71,20 +73,20 @@
|
|
|
(goods_category_id_,sn_,name_,brand_,specification_,image_,stock_count_,tax_stock_count_,sell_count_,market_price_,
|
|
|
discount_price_,group_purchase_price_,brief_,desc_,is_new_,is_top_,status_,memo_,publish_time_,
|
|
|
complement_goods_id_list_,update_time_,create_time_,type_,agree_cost_price_,stock_warning_,stock_type_
|
|
|
- ,student_show_organ_id_,education_show_organ_id_,replacement_show_organ_id_,course_fee_show_organ_id_,member_fee_show_organ_id_,tenant_id_)
|
|
|
+ ,student_show_organ_id_,education_show_organ_id_,replacement_show_organ_id_,course_fee_show_organ_id_,member_fee_show_organ_id_,free_fee_show_organ_id_,tenant_id_)
|
|
|
VALUES(#{goodsCategoryId},#{sn},#{name},#{brand},#{specification},#{image},#{stockCount},#{taxStockCount},#{sellCount},#{marketPrice},
|
|
|
#{discountPrice},#{groupPurchasePrice},#{brief},#{desc},
|
|
|
#{isNew,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{isTop,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
#{memo},#{publishTime},#{complementGoodsIdList},now(),now(),#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{agreeCostPrice},
|
|
|
#{stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{stockType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
- #{studentShowOrganId},#{educationShowOrganId},#{replacementShowOrganId},#{courseFeeShowOrganId},#{memberFeeShowOrganId},#{tenantId})
|
|
|
+ #{studentShowOrganId},#{educationShowOrganId},#{replacementShowOrganId},#{courseFeeShowOrganId},#{memberFeeShowOrganId},#{freeFeeShowOrganId},#{tenantId})
|
|
|
</insert>
|
|
|
<insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
|
|
INSERT INTO goods
|
|
|
(goods_category_id_,name_,brand_,specification_,image_,market_price_,
|
|
|
discount_price_,group_purchase_price_,brief_,desc_,update_time_,create_time_,type_,agree_cost_price_,sn_,
|
|
|
stock_count_,tax_stock_count_,stock_warning_,stock_type_
|
|
|
- ,student_show_organ_id_,education_show_organ_id_,replacement_show_organ_id_,course_fee_show_organ_id_,member_fee_show_organ_id_,tenant_id_)
|
|
|
+ ,student_show_organ_id_,education_show_organ_id_,replacement_show_organ_id_,course_fee_show_organ_id_,member_fee_show_organ_id_,free_fee_show_organ_id_,tenant_id_)
|
|
|
VALUES
|
|
|
<foreach collection="list" separator="," item="goods">
|
|
|
(#{goods.goodsCategoryId},#{goods.name},#{goods.brand},#{goods.specification},#{goods.image},#{goods.marketPrice},
|
|
@@ -93,7 +95,7 @@
|
|
|
#{goods.stockCount},#{goods.taxStockCount},
|
|
|
#{goods.stockWarning,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
#{goods.stockType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
- #{goods.studentShowOrganId},#{goods.educationShowOrganId},#{goods.replacementShowOrganId},#{goods.courseFeeShowOrganId},#{goods.memberFeeShowOrganId},#{goods.tenantId}
|
|
|
+ #{goods.studentShowOrganId},#{goods.educationShowOrganId},#{goods.replacementShowOrganId},#{goods.courseFeeShowOrganId},#{goods.memberFeeShowOrganId},,#{goods.freeFeeShowOrganId},#{goods.tenantId}
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
|
@@ -106,6 +108,7 @@
|
|
|
replacement_show_organ_id_ = #{replacementShowOrganId},
|
|
|
course_fee_show_organ_id_ = #{courseFeeShowOrganId},
|
|
|
member_fee_show_organ_id_ = #{memberFeeShowOrganId},
|
|
|
+ free_fee_show_organ_id_ = #{freeFeeShowOrganId},
|
|
|
<if test="agreeCostPrice != null">
|
|
|
agree_cost_price_ = #{agreeCostPrice},
|
|
|
</if>
|
|
@@ -202,6 +205,9 @@
|
|
|
<if test="goods.memberFeeShowOrganId != null">
|
|
|
member_fee_show_organ_id_ = #{goods.memberFeeShowOrganId},
|
|
|
</if>
|
|
|
+ <if test="goods.freeFeeShowOrganId != null">
|
|
|
+ free_fee_show_organ_id_ = #{goods.freeFeeShowOrganId},
|
|
|
+ </if>
|
|
|
<if test="goods.agreeCostPrice != null">
|
|
|
agree_cost_price_ = #{goods.agreeCostPrice},
|
|
|
</if>
|
|
@@ -336,6 +342,9 @@
|
|
|
<if test="memberFeeShowOrganId!=null and memberFeeShowOrganId!=''">
|
|
|
AND INTE_ARRAY(#{memberFeeShowOrganId},g.member_fee_show_organ_id_)
|
|
|
</if>
|
|
|
+ <if test="freeFeeShowOrganId!=null and freeFeeShowOrganId!=''">
|
|
|
+ AND INTE_ARRAY(#{freeFeeShowOrganId},g.free_fee_show_organ_id_)
|
|
|
+ </if>
|
|
|
<if test="replacementShowOrganId!=null and replacementShowOrganId!=''">
|
|
|
AND INTE_ARRAY(#{replacementShowOrganId},g.replacement_show_organ_id_)
|
|
|
</if>
|
|
@@ -344,6 +353,7 @@
|
|
|
AND INTE_ARRAY (#{organId},CONCAT_WS(',',
|
|
|
CASE WHEN member_fee_show_organ_id_ = '' THEN NULL ELSE member_fee_show_organ_id_ END,
|
|
|
CASE WHEN course_fee_show_organ_id_ = '' THEN NULL ELSE course_fee_show_organ_id_ END,
|
|
|
+ CASE WHEN free_fee_show_organ_id_ = '' THEN NULL ELSE free_fee_show_organ_id_ END,
|
|
|
CASE WHEN education_show_organ_id_ = '' THEN NULL ELSE education_show_organ_id_ END,
|
|
|
CASE WHEN student_show_organ_id_ = '' THEN NULL ELSE student_show_organ_id_ END,
|
|
|
CASE WHEN replacement_show_organ_id_ = '' THEN NULL ELSE replacement_show_organ_id_ END))
|
|
@@ -382,6 +392,9 @@
|
|
|
<if test="goodsQuery.memberFeeShowOrganId!=null">
|
|
|
AND FIND_IN_SET(#{goodsQuery.memberFeeShowOrganId},g.member_fee_show_organ_id_)
|
|
|
</if>
|
|
|
+ <if test="goodsQuery.freeFeeShowOrganId!=null">
|
|
|
+ AND FIND_IN_SET(#{goodsQuery.freeFeeShowOrganId},g.free_fee_show_organ_id_)
|
|
|
+ </if>
|
|
|
<if test="goodsQuery.replacementShowOrganId!=null">
|
|
|
AND FIND_IN_SET(#{goodsQuery.replacementShowOrganId},g.replacement_show_organ_id_)
|
|
|
</if>
|
|
@@ -389,6 +402,7 @@
|
|
|
AND FIND_IN_SET (#{goodsQuery.organId},CONCAT_WS(',',
|
|
|
CASE WHEN member_fee_show_organ_id_ = '' THEN NULL ELSE member_fee_show_organ_id_ END,
|
|
|
CASE WHEN course_fee_show_organ_id_ = '' THEN NULL ELSE course_fee_show_organ_id_ END,
|
|
|
+ CASE WHEN free_fee_show_organ_id_ = '' THEN NULL ELSE free_fee_show_organ_id_ END,
|
|
|
CASE WHEN education_show_organ_id_ = '' THEN NULL ELSE education_show_organ_id_ END,
|
|
|
CASE WHEN student_show_organ_id_ = '' THEN NULL ELSE student_show_organ_id_ END,
|
|
|
CASE WHEN replacement_show_organ_id_ = '' THEN NULL ELSE replacement_show_organ_id_ END))
|
|
@@ -470,6 +484,9 @@
|
|
|
<if test="courseViewType == 1 or courseViewType == 0">
|
|
|
AND FIND_IN_SET(#{organId},g.course_fee_show_organ_id_)
|
|
|
</if>
|
|
|
+ <if test="courseViewType == 3">
|
|
|
+ AND FIND_IN_SET(#{organId},g.free_fee_show_organ_id_)
|
|
|
+ </if>
|
|
|
</if>
|
|
|
</if>
|
|
|
<if test="type!=null">
|