mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-03 17:40:13 +08:00
申请开票管理
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jsowell.pile.mapper.MemberTransactionRecordMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.MemberTransactionRecord">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table member_transaction_record-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
||||
<result column="scenario_type" jdbcType="VARCHAR" property="scenarioType" />
|
||||
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
|
||||
<result column="action_type" jdbcType="VARCHAR" property="actionType" />
|
||||
<result column="pay_mode" jdbcType="VARCHAR" property="payMode" />
|
||||
<result column="amount" jdbcType="VARCHAR" property="amount" />
|
||||
<result column="out_trade_no" jdbcType="VARCHAR" property="outTradeNo" />
|
||||
<result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
|
||||
<result column="out_refund_no" jdbcType="VARCHAR" property="outRefundNo" />
|
||||
<result column="refund_id" jdbcType="VARCHAR" property="refundId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, order_code, scenario_type, member_id, action_type, pay_mode, amount, out_trade_no,
|
||||
transaction_id, out_refund_no, refund_id, create_time
|
||||
</sql>
|
||||
|
||||
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.MemberTransactionRecord">
|
||||
<!--@mbg.generated-->
|
||||
insert into member_transaction_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
order_code,
|
||||
</if>
|
||||
<if test="scenarioType != null and scenarioType != ''">
|
||||
scenario_type,
|
||||
</if>
|
||||
<if test="memberId != null and memberId != ''">
|
||||
member_id,
|
||||
</if>
|
||||
<if test="actionType != null and actionType != ''">
|
||||
action_type,
|
||||
</if>
|
||||
<if test="payMode != null and payMode != ''">
|
||||
pay_mode,
|
||||
</if>
|
||||
<if test="amount != null and amount != ''">
|
||||
amount,
|
||||
</if>
|
||||
<if test="outTradeNo != null and outTradeNo != ''">
|
||||
out_trade_no,
|
||||
</if>
|
||||
<if test="transactionId != null and transactionId != ''">
|
||||
transaction_id,
|
||||
</if>
|
||||
<if test="outRefundNo != null and outRefundNo != ''">
|
||||
out_refund_no,
|
||||
</if>
|
||||
<if test="refundId != null and refundId != ''">
|
||||
refund_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
#{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="scenarioType != null and scenarioType != ''">
|
||||
#{scenarioType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="memberId != null and memberId != ''">
|
||||
#{memberId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="actionType != null and actionType != ''">
|
||||
#{actionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payMode != null and payMode != ''">
|
||||
#{payMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="amount != null and amount != ''">
|
||||
#{amount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="outTradeNo != null and outTradeNo != ''">
|
||||
#{outTradeNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="transactionId != null and transactionId != ''">
|
||||
#{transactionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="outRefundNo != null and outRefundNo != ''">
|
||||
#{outRefundNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refundId != null and refundId != ''">
|
||||
#{refundId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<select id="selectByMemberId" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM `member_transaction_record`
|
||||
where member_id = #{memberId,jdbcType=VARCHAR}
|
||||
order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jsowell.pile.mapper.OrderInvoiceRecordMapper">
|
||||
|
||||
<resultMap type="OrderInvoiceRecord" id="OrderInvoiceRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="memberId" column="member_id" />
|
||||
<result property="orderCodes" column="order_codes" />
|
||||
<result property="status" column="status" />
|
||||
<result property="totalAmount" column="total_amount" />
|
||||
<result property="totalServiceAmount" column="total_service_amount" />
|
||||
<result property="totalElecAmount" column="total_elec_amount" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOrderInvoiceRecordVo">
|
||||
select id, member_id, order_codes, status, total_amount, total_service_amount, total_elec_amount, create_by, create_time, update_by, update_time, del_flag from order_invoice_record
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderInvoiceRecordList" parameterType="OrderInvoiceRecord" resultMap="OrderInvoiceRecordResult">
|
||||
<include refid="selectOrderInvoiceRecordVo"/>
|
||||
<where>
|
||||
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
|
||||
<if test="orderCodes != null and orderCodes != ''"> and order_codes like concat('%', #{orderCodes}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="totalAmount != null "> and total_amount = #{totalAmount}</if>
|
||||
<if test="totalServiceAmount != null "> and total_service_amount = #{totalServiceAmount}</if>
|
||||
<if test="totalElecAmount != null "> and total_elec_amount = #{totalElecAmount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderInvoiceRecordById" parameterType="Integer" resultMap="OrderInvoiceRecordResult">
|
||||
<include refid="selectOrderInvoiceRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertOrderInvoiceRecord" parameterType="OrderInvoiceRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into order_invoice_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="memberId != null">member_id,</if>
|
||||
<if test="orderCodes != null">order_codes,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="totalAmount != null">total_amount,</if>
|
||||
<if test="totalServiceAmount != null">total_service_amount,</if>
|
||||
<if test="totalElecAmount != null">total_elec_amount,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="memberId != null">#{memberId},</if>
|
||||
<if test="orderCodes != null">#{orderCodes},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="totalAmount != null">#{totalAmount},</if>
|
||||
<if test="totalServiceAmount != null">#{totalServiceAmount},</if>
|
||||
<if test="totalElecAmount != null">#{totalElecAmount},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOrderInvoiceRecord" parameterType="OrderInvoiceRecord">
|
||||
update order_invoice_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="memberId != null">member_id = #{memberId},</if>
|
||||
<if test="orderCodes != null">order_codes = #{orderCodes},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="totalAmount != null">total_amount = #{totalAmount},</if>
|
||||
<if test="totalServiceAmount != null">total_service_amount = #{totalServiceAmount},</if>
|
||||
<if test="totalElecAmount != null">total_elec_amount = #{totalElecAmount},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOrderInvoiceRecordById" parameterType="Integer">
|
||||
delete from order_invoice_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderInvoiceRecordByIds" parameterType="String">
|
||||
delete from order_invoice_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user