|
@@ -5,8 +5,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<mapper namespace="com.emato.biz.mapper.mall.SalesDetailMapper">
|
|
|
|
|
|
|
|
|
+ <!-- 查询销售数据 -->
|
|
|
+ <select id="selectSalesDetailData" resultType="com.emato.biz.domain.mall.NewSystemFormatEntiy" parameterType="com.emato.biz.domain.mall.SalesDataReqVO">
|
|
|
+ SELECT
|
|
|
+ merch_sn,
|
|
|
+ merch_sn_name,
|
|
|
+ third_merch_sn,
|
|
|
+ third_merch_sn_name,
|
|
|
+ receipt_no,
|
|
|
+ store_name,
|
|
|
+ store_name_sn,
|
|
|
+ cash_register_no,
|
|
|
+ time_stamp,
|
|
|
+ staff_id,
|
|
|
+ staff_name,
|
|
|
+ pay_flag,
|
|
|
+ order_status,
|
|
|
+ order_sn_wx,
|
|
|
+ order_sn_ali,
|
|
|
+ hs_code,
|
|
|
+ hs_code_name,
|
|
|
+ ematou_code,
|
|
|
+ plu,
|
|
|
+ mychem_id,
|
|
|
+ product_name_en,
|
|
|
+ product_name_cn,
|
|
|
+ barcode,
|
|
|
+ pack_size,
|
|
|
+ product_spec,
|
|
|
+ brand,
|
|
|
+ edlp,
|
|
|
+ current_price,
|
|
|
+ cost_price,
|
|
|
+ tax_rate,
|
|
|
+ product_category,
|
|
|
+ supplier_name,
|
|
|
+ transaction_type,
|
|
|
+ sale_return_type,
|
|
|
+ remark
|
|
|
+ FROM
|
|
|
+ mall_sales_detail_data
|
|
|
+ <where>
|
|
|
+ <if test="orderSn != null and orderSn != '' ">
|
|
|
+ AND receipt_no = #{orderSn}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <if test="pageIndex != null and pageSize != null">
|
|
|
+ limit #{pageIndex}, #{pageSize}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
<!-- 接收kmall数据-->
|
|
|
- <insert id="pushSalesDetaiDate" parameterType="NewSystemFormatEntiy">
|
|
|
+ <insert id="insertSalesDetaiDate" parameterType="com.emato.biz.domain.mall.NewSystemFormatEntiy">
|
|
|
insert into mall_sales_detail_data(
|
|
|
<if test="merchSn != null">merch_sn,</if>
|
|
|
<if test="merchSnName != null">merch_sn_name,</if>
|
|
@@ -15,15 +65,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="receiptNo != null">receipt_no,</if>
|
|
|
<if test="storeName != null">store_name,</if>
|
|
|
<if test="storeNameSn != null">store_name_sn,</if>
|
|
|
- <if test="cashRegisterNo != null">ash_register_no,</if>
|
|
|
- /*销售时间*/
|
|
|
+ <if test="cashRegisterNo != null">cash_register_no,</if>
|
|
|
<if test="timeStampDetails != null">time_stamp,</if>
|
|
|
<if test="staffID != null">staff_id,</if>
|
|
|
<if test="staffName != null">staff_name,</if>
|
|
|
<if test="payFlag != null">pay_flag,</if>
|
|
|
<if test="orderStatus != null">order_status,</if>
|
|
|
<if test="orderSnWx != null">order_sn_wx,</if>
|
|
|
-
|
|
|
<if test="orderSnAli != null">order_sn_ali,</if>
|
|
|
<if test="hsCode != null">hs_code,</if>
|
|
|
<if test="hsCodeName != null">hs_code_name,</if>
|
|
@@ -44,7 +92,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="supplierName != null">supplier_name,</if>
|
|
|
<if test="transactionType != null">transaction_type,</if>
|
|
|
<if test="saleReturnType != null">sale_return_type,</if>
|
|
|
- <if test="remark != null">remark</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="createSn != null">creater_sn,</if>
|
|
|
+ <if test="createTime != null">create_time</if>
|
|
|
)values(
|
|
|
<if test="merchSn != null">#{merchSn},</if>
|
|
|
<if test="merchSnName != null">#{merchSnName},</if>
|
|
@@ -54,14 +104,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="storeName != null">#{storeName},</if>
|
|
|
<if test="storeNameSn != null">#{storeNameSn},</if>
|
|
|
<if test="cashRegisterNo != null">#{cashRegisterNo},</if>
|
|
|
- /*销售时间*/
|
|
|
<if test="timeStampDetails != null">#{timeStampDetails},</if>
|
|
|
<if test="staffID != null">#{staffID},</if>
|
|
|
<if test="staffName != null">#{staffName},</if>
|
|
|
<if test="payFlag != null">#{payFlag},</if>
|
|
|
<if test="orderStatus != null">#{orderStatus},</if>
|
|
|
<if test="orderSnWx != null">#{orderSnWx},</if>
|
|
|
-
|
|
|
<if test="orderSnAli != null">#{orderSnAli},</if>
|
|
|
<if test="hsCode != null">#{hsCode},</if>
|
|
|
<if test="hsCodeName != null">#{hsCodeName},</if>
|
|
@@ -82,7 +130,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="supplierName != null">#{supplierName},</if>
|
|
|
<if test="transactionType != null">#{transactionType},</if>
|
|
|
<if test="saleReturnType != null">#{saleReturnType},</if>
|
|
|
- <if test="remark != null">#{remark}</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="createSn != null">#{createSn},</if>
|
|
|
+ <if test="createTime != null">#{createTime}</if>
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
@@ -97,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
receipt_no,
|
|
|
store_name,
|
|
|
store_name_sn,
|
|
|
- ash_register_no,
|
|
|
+ cash_register_no,
|
|
|
time_stamp,
|
|
|
staff_id,
|
|
|
staff_name,
|
|
@@ -158,6 +208,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-</mapper>
|
|
|
+ <update id="updateSalesDetailData" parameterType="com.emato.biz.domain.mall.NewSystemFormatEntiy">
|
|
|
+ update mall_sales_detail_data
|
|
|
+ <set>
|
|
|
+ <if test="merchSn != null">`merch_sn` = #{merchSn},</if>
|
|
|
+ <if test="merchSnName != null">`merch_sn_name` = #{merchSnName},</if>
|
|
|
+ <if test="thirdMerchSn != null">`third_merch_sn` = #{thirdMerchSn},</if>
|
|
|
+ <if test="thirdMerchSnName != null">`third_merch_sn_name` = #{thirdMerchSnName},</if>
|
|
|
+ <if test="storeName != null">`store_name` = #{storeName},</if>
|
|
|
+ <if test="storeNameSn != null">`store_name_sn` = #{storeNameSn},</if>
|
|
|
+ <if test="cashRegisterNo != null">`cash_register_no` = #{cashRegisterNo},</if>
|
|
|
+ <if test="timeStampDetails != null">`time_stamp` = #{timeStampDetails},</if>
|
|
|
+ <if test="staffID != null">`staff_id` = #{staffID},</if>
|
|
|
+ <if test="staffName != null">`staff_name` = #{staffName},</if>
|
|
|
+ <if test="payFlag != null">`pay_flag` = #{payFlag},</if>
|
|
|
+ <if test="orderStatus != null">`order_status` = #{orderStatus},</if>
|
|
|
+ <if test="orderSnWx != null">`order_sn_wx` = #{orderSnWx},</if>
|
|
|
+ <if test="orderSnAli != null">`order_sn_ali` = #{orderSnAli},</if>
|
|
|
+ <if test="hsCode != null">`hs_code` = #{hsCode},</if>
|
|
|
+ <if test="hsCodeName != null">`hs_code_name` = #{hsCodeName},</if>
|
|
|
+ <if test="ematouCode != null">`ematou_code` = #{ematouCode},</if>
|
|
|
+ <if test="plu != null">`plu` = #{plu},</if>
|
|
|
+ <if test="mychemID != null">`mychem_id` = #{mychemID},</if>
|
|
|
+ <if test="productNameEN != null">`product_name_en` = #{productNameEN},</if>
|
|
|
+ <if test="productNameCN != null">`product_name_cn` = #{productNameCN},</if>
|
|
|
+ <if test="barcode != null">`barcode` = #{barcode},</if>
|
|
|
+ <if test="packSize != null">`pack_size` = #{packSize},</if>
|
|
|
+ <if test="productSpecification != null">`product_spec` = #{productSpecification},</if>
|
|
|
+ <if test="brand != null">`brand` = #{brand},</if>
|
|
|
+ <if test="edlp != null">`edlp` = #{edlp},</if>
|
|
|
+ <if test="currentPrice != null">`current_price` = #{currentPrice},</if>
|
|
|
+ <if test="costPrice != null">`cost_price` = #{costPrice},</if>
|
|
|
+ <if test="taxPrice != null">`tax_price` = #{taxPrice},</if>
|
|
|
+ <if test="taxRate != null">`tax_rate` = #{taxRate},</if>
|
|
|
+ <if test="productCategory != null">`product_category` = #{productCategory},</if>
|
|
|
+ <if test="supplierName != null">`supplier_name` = #{supplierName},</if>
|
|
|
+ <if test="transactionType != null">`transaction_type` = #{transactionType},</if>
|
|
|
+ <if test="saleReturnType != null">`sale_return_type` = #{saleReturnType},</if>
|
|
|
+ <if test="remark != null">`remark` = #{remark},</if>
|
|
|
+ <if test="moderSn != null">`moder_sn` = #{moderSn},</if>
|
|
|
+ <if test="modTime != null">`mod_time` = #{modTime},</if>
|
|
|
+ </set>
|
|
|
+ where receipt_no = #{receiptNo}
|
|
|
+ </update>
|
|
|
+</mapper>
|