|
@@ -2,6 +2,86 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.gree.mall.miniapp.commonmapper.MaterialMapper">
|
|
|
|
|
|
+ <resultMap id="newRefundManageAppList" type="com.gree.mall.miniapp.bean.material.parts.NewRefundManageBean">
|
|
|
+ <id column="applyNo" jdbcType="VARCHAR" property="applyNo"/>
|
|
|
+ <result column="sales_Id" jdbcType="VARCHAR" property="salesId"/>
|
|
|
+ <result column="apply_category" jdbcType="VARCHAR" property="applyCategory"/>
|
|
|
+ <result column="apply_category_name" jdbcType="VARCHAR" property="applyCategoryName"/>
|
|
|
+ <result column="apply_type" jdbcType="VARCHAR" property="applyType"/>
|
|
|
+ <result column="apply_type_name" jdbcType="VARCHAR" property="applyTypeName"/>
|
|
|
+ <result column="refund_mode" jdbcType="VARCHAR" property="refundMode"/>
|
|
|
+ <result column="refund_mode_name" jdbcType="VARCHAR" property="refundModeName"/>
|
|
|
+ <result column="express_no" jdbcType="VARCHAR" property="expressNo"/>
|
|
|
+ <result column="receive_address" jdbcType="VARCHAR" property="receiveAddress"/>
|
|
|
+ <result column="receive_websit_id" jdbcType="VARCHAR" property="receiveWebsitId"/>
|
|
|
+ <result column="receive_websit_Name" jdbcType="VARCHAR" property="receiveWebsitName"/>
|
|
|
+ <result column="receive_parts_websit_id" jdbcType="VARCHAR" property="receivePartsWebsitId"/>
|
|
|
+ <result column="websit_Address" jdbcType="VARCHAR" property="websitAddress"/>
|
|
|
+ <result column="identity" jdbcType="VARCHAR" property="identity"/>
|
|
|
+ <result column="worker_id" jdbcType="VARCHAR" property="workerId"/>
|
|
|
+ <result column="worker_name" jdbcType="VARCHAR" property="workerName"/>
|
|
|
+ <result column="refund_amount" jdbcType="DECIMAL" property="refundAmount"/>
|
|
|
+ <result column="refund_amount_mode" jdbcType="VARCHAR" property="refundAmountMode"/>
|
|
|
+ <result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
|
+ <result column="examine_remark" jdbcType="VARCHAR" property="examineRemark"/>
|
|
|
+ <result column="flag" jdbcType="VARCHAR" property="flag"/>
|
|
|
+ <result column="flag_name" jdbcType="VARCHAR" property="flagName"/>
|
|
|
+ <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
|
|
+ <result column="create_time" jdbcType="DATE" property="createTime"/>
|
|
|
+ <result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
|
|
+ <result column="update_time" jdbcType="DATE" property="updateTime"/>
|
|
|
+ <result column="submit_by" jdbcType="VARCHAR" property="submitBy"/>
|
|
|
+ <result column="submit_time" jdbcType="DATE" property="submitTime"/>
|
|
|
+ <result column="examine_by" jdbcType="VARCHAR" property="examineBy"/>
|
|
|
+ <result column="examine_time" jdbcType="DATE" property="examineTime"/>
|
|
|
+ <result column="refunded_by" jdbcType="VARCHAR" property="refundedBy"/>
|
|
|
+ <result column="refunded_time" jdbcType="DATE" property="refundedTime"/>
|
|
|
+ <collection property="newRefundManageItemBeanList" ofType="com.gree.mall.miniapp.bean.material.parts.NewRefundManageItemBean"
|
|
|
+ column="applyNo" javaType="java.util.List"
|
|
|
+ select="selectNewRefundManageItemByApplyNo">
|
|
|
+ </collection>
|
|
|
+ <collection property="partsNewRefundManageRecordList" ofType="com.gree.mall.miniapp.bean.material.parts.NewRefundManageRecordBean"
|
|
|
+ column="applyNo" javaType="java.util.List"
|
|
|
+ select="selectNewRefundManageRecordByApplyNo">
|
|
|
+ </collection>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <resultMap id="newRefundManageItemResultMap" type="com.gree.mall.miniapp.bean.material.parts.NewRefundManageItemBean">
|
|
|
+ <id column="id" jdbcType="VARCHAR" property="id"/>
|
|
|
+ <result column="apply_no" jdbcType="VARCHAR" property="applyNo"/>
|
|
|
+ <result column="sales_Id" jdbcType="VARCHAR" property="salesId"/>
|
|
|
+ <result column="parts_number" jdbcType="VARCHAR" property="partsNumber"/>
|
|
|
+ <result column="parts_nName" jdbcType="VARCHAR" property="partsName"/>
|
|
|
+ <result column="material_group_name" jdbcType="VARCHAR" property="materialGroupName"/>
|
|
|
+ <result column="goods_stock_unit" jdbcType="VARCHAR" property="goodsStockUnit"/>
|
|
|
+ <result column="qty" jdbcType="DECIMAL" property="qty"/>
|
|
|
+ <result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
|
+ <result column="image" jdbcType="VARCHAR" property="image"/>
|
|
|
+ <result column="custom_no" jdbcType="VARCHAR" property="customNo"/>
|
|
|
+ <result column="create_time" jdbcType="DATE" property="createTime"/>
|
|
|
+ </resultMap>
|
|
|
+ <resultMap id="newRefundManageRecordResultMap" type="com.gree.mall.miniapp.bean.material.parts.NewRefundManageRecordBean">
|
|
|
+ <id column="id" jdbcType="VARCHAR" property="id"/>
|
|
|
+ <result column="item_id" jdbcType="VARCHAR" property="itemId"/>
|
|
|
+ <result column="apply_no" jdbcType="VARCHAR" property="applyNo"/>
|
|
|
+ <result column="sales_Id" jdbcType="VARCHAR" property="salesId"/>
|
|
|
+ <result column="parts_number" jdbcType="VARCHAR" property="partsNumber"/>
|
|
|
+ <result column="parts_name" jdbcType="VARCHAR" property="partsName"/>
|
|
|
+ <result column="sales_price" jdbcType="DECIMAL" property="salesPrice"/>
|
|
|
+ <result column="market_price" jdbcType="DECIMAL" property="marketPrice"/>
|
|
|
+ <result column="second_price" jdbcType="DECIMAL" property="secondPrice"/>
|
|
|
+ <result column="qty" jdbcType="DECIMAL" property="qty"/>
|
|
|
+ <result column="total_amount" jdbcType="DECIMAL" property="totalAmount"/>
|
|
|
+ <result column="refund_amount" jdbcType="DECIMAL" property="refundAmount"/>
|
|
|
+ <result column="refund_time" jdbcType="DATE" property="refundTime"/>
|
|
|
+ <result column="refund_state" jdbcType="VARCHAR" property="refundState"/>
|
|
|
+ <result column="refund_state_name" jdbcType="VARCHAR" property="refundStateName"/>
|
|
|
+ <result column="refund_mch_no" jdbcType="VARCHAR" property="refundMchNo"/>
|
|
|
+ <result column="refund_account_no" jdbcType="VARCHAR" property="refundAccountNo"/>
|
|
|
+ <result column="refund_serialnumber" jdbcType="VARCHAR" property="refundSerialnumber"/>
|
|
|
+ <result column="create_time" jdbcType="DATE" property="createTime"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<select id="buyList" resultType="com.gree.mall.miniapp.bean.material.SalesOrderBean">
|
|
|
SELECT
|
|
|
a.*
|
|
@@ -175,7 +255,7 @@
|
|
|
a.norm_id = #{goodsId}
|
|
|
</select>
|
|
|
|
|
|
- <select id="appList" resultType="com.gree.mall.miniapp.bean.material.parts.NewRefundManageBean">
|
|
|
+ <select id="appList" resultMap="newRefundManageAppList">
|
|
|
SELECT
|
|
|
a.company_wechat_id,
|
|
|
a.company_wechat_name,
|
|
@@ -698,5 +778,54 @@
|
|
|
order by distance asc, websit_id
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectNewRefundManageItemByApplyNo" resultMap="newRefundManageItemResultMap">
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ apply_no,
|
|
|
+ sales_id,
|
|
|
+ parts_number,
|
|
|
+ parts_name,
|
|
|
+ material_group_name,
|
|
|
+ goods_stock_unit,
|
|
|
+ qty,
|
|
|
+ remark,
|
|
|
+ image,
|
|
|
+ custom_no,
|
|
|
+ create_time
|
|
|
+ FROM
|
|
|
+ websit_parts_new_refund_manage_item
|
|
|
+ WHERE
|
|
|
+ apply_no = #{applyNo}
|
|
|
+ </select>
|
|
|
|
|
|
+ <select id="selectNewRefundManageRecordByApplyNo" resultMap="newRefundManageRecordResultMap">
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ item_id,
|
|
|
+ apply_no,
|
|
|
+ sales_id,
|
|
|
+ sales_item_id,
|
|
|
+ parts_number,
|
|
|
+ parts_name,
|
|
|
+ sales_price,
|
|
|
+ market_price,
|
|
|
+ second_price,
|
|
|
+ qty,
|
|
|
+ total_amount,
|
|
|
+ refund_amount,
|
|
|
+ refund_time,
|
|
|
+ refund_state,
|
|
|
+ CASE refund_state WHEN 'OK' THEN '成功'
|
|
|
+ WHEN 'FAIL' THEN '失败'
|
|
|
+ WHEN 'WAIT' THEN '等待'
|
|
|
+ ELSE '' END AS refundStateName,
|
|
|
+ refund_mch_no,
|
|
|
+ refund_account_no,
|
|
|
+ refund_serialnumber,
|
|
|
+ create_time
|
|
|
+ FROM
|
|
|
+ websit_parts_new_refund_manage_record
|
|
|
+ WHERE
|
|
|
+ apply_no = #{applyNo}
|
|
|
+ </select>
|
|
|
</mapper>
|