支付
This commit is contained in:
@@ -0,0 +1,240 @@
|
||||
<?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.zhwl.travelagency.account.mapper.ZdyTravelAgencyAccountBalanceChangesMapper">
|
||||
|
||||
<resultMap type="ZdyTravelAgencyAccountBalanceChanges" id="ZdyTravelAgencyAccountBalanceChangesResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="travelAgencyInfoId" column="travel_agency_info_id"/>
|
||||
<result property="operatorType" column="operator_type"/>
|
||||
<result property="beforeAdjustmentAmount" column="before_adjustment_amount"/>
|
||||
<result property="adjustmentAmount" column="adjustment_amount"/>
|
||||
<result property="afterAdjustmentAmount" column="after_adjustment_amount"/>
|
||||
<result property="orderNo" column="order_no"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<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="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZdyTravelAgencyAccountBalanceChangesVO" id="ZdyTravelAgencyAccountBalanceChangesResultVO">
|
||||
<result property="operatorType" column="operator_type"/>
|
||||
<result property="travelAgencyId" column="id"/>
|
||||
<result property="travelAgencyName" column="name"/>
|
||||
<result property="head" column="head"/>
|
||||
<result property="beforeAdjustmentAmount" column="before_adjustment_amount"/>
|
||||
<result property="adjustmentAmount" column="adjustment_amount"/>
|
||||
<result property="afterAdjustmentAmount" column="after_adjustment_amount"/>
|
||||
<result property="applyTime" column="create_time"/>
|
||||
<result property="operatorName" column="create_by"/>
|
||||
<result property="orderNo" column="order_no"/>
|
||||
</resultMap>
|
||||
<sql id="selectZdyTravelAgencyAccountBalanceChangesVo">
|
||||
select id,
|
||||
travel_agency_info_id,
|
||||
operator_type,
|
||||
before_adjustment_amount,
|
||||
adjustment_amount,
|
||||
after_adjustment_amount,
|
||||
order_no,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark
|
||||
from zdy_travel_agency_account_balance_changes
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyTravelAgencyAccountBalanceChangesList" parameterType="ZdyTravelAgencyAccountBalanceChangesDTO"
|
||||
resultMap="ZdyTravelAgencyAccountBalanceChangesResultVO">
|
||||
select a.id,a.name, a.head
|
||||
from zdy_travel_agency_info a
|
||||
inner join
|
||||
(select travel_agency_info_id
|
||||
from zdy_travel_agency_account_balance_changes
|
||||
where 1=1 and del_flag = '0'
|
||||
<if test="orderNo!=null and orderNo!=''">
|
||||
and order_no = #{orderNo}
|
||||
</if>
|
||||
group by travel_agency_info_id) b
|
||||
on a.id = b.travel_agency_info_id
|
||||
inner join sys_user c on a.sys_user_id=c.user_id
|
||||
<where>
|
||||
c.del_flag='0'
|
||||
<if test="travelAgencyId != null">
|
||||
and id = #{travelAgencyId}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyTravelAgencyAccountBalanceChangesById" parameterType="Long"
|
||||
resultMap="ZdyTravelAgencyAccountBalanceChangesResult">
|
||||
<include refid="selectZdyTravelAgencyAccountBalanceChangesVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyTravelAgencyAccountBalanceChanges" parameterType="ZdyTravelAgencyAccountBalanceChanges"
|
||||
useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_travel_agency_account_balance_changes
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="travelAgencyInfoId != null">travel_agency_info_id,
|
||||
</if>
|
||||
<if test="operatorType != null">operator_type,
|
||||
</if>
|
||||
<if test="beforeAdjustmentAmount != null">before_adjustment_amount,
|
||||
</if>
|
||||
<if test="adjustmentAmount != null">adjustment_amount,
|
||||
</if>
|
||||
<if test="afterAdjustmentAmount != null">after_adjustment_amount,
|
||||
</if>
|
||||
<if test="orderNo != null">order_no,
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag,
|
||||
</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="remark != null">remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="travelAgencyInfoId != null">#{travelAgencyInfoId},
|
||||
</if>
|
||||
<if test="operatorType != null">#{operatorType},
|
||||
</if>
|
||||
<if test="beforeAdjustmentAmount != null">#{beforeAdjustmentAmount},
|
||||
</if>
|
||||
<if test="adjustmentAmount != null">#{adjustmentAmount},
|
||||
</if>
|
||||
<if test="afterAdjustmentAmount != null">#{afterAdjustmentAmount},
|
||||
</if>
|
||||
<if test="orderNo != null">#{orderNo},
|
||||
</if>
|
||||
<if test="delFlag != null">#{delFlag},
|
||||
</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="remark != null">#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyTravelAgencyAccountBalanceChanges" parameterType="ZdyTravelAgencyAccountBalanceChanges">
|
||||
update zdy_travel_agency_account_balance_changes
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="travelAgencyInfoId != null">travel_agency_info_id =
|
||||
#{travelAgencyInfoId},
|
||||
</if>
|
||||
<if test="operatorType != null">operator_type =
|
||||
#{operatorType},
|
||||
</if>
|
||||
<if test="beforeAdjustmentAmount != null">before_adjustment_amount =
|
||||
#{beforeAdjustmentAmount},
|
||||
</if>
|
||||
<if test="adjustmentAmount != null">adjustment_amount =
|
||||
#{adjustmentAmount},
|
||||
</if>
|
||||
<if test="afterAdjustmentAmount != null">after_adjustment_amount =
|
||||
#{afterAdjustmentAmount},
|
||||
</if>
|
||||
<if test="orderNo != null">order_no =
|
||||
#{orderNo},
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag =
|
||||
#{delFlag},
|
||||
</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="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyAccountBalanceChangesById" parameterType="Long">
|
||||
delete
|
||||
from zdy_travel_agency_account_balance_changes
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyAccountBalanceChangesByIds" parameterType="String">
|
||||
delete from zdy_travel_agency_account_balance_changes where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectZdyTravelAgencyAccountBalanceChangesByTravelAgencyId" parameterType="long"
|
||||
resultMap="ZdyTravelAgencyAccountBalanceChangesResultVO">
|
||||
select a.id,
|
||||
a.travel_agency_info_id,
|
||||
a.operator_type,
|
||||
a.before_adjustment_amount,
|
||||
a.adjustment_amount,
|
||||
a.after_adjustment_amount,
|
||||
a.order_no,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
b.name,
|
||||
b.head
|
||||
from zdy_travel_agency_account_balance_changes a
|
||||
left join zdy_travel_agency_info b on a.travel_agency_info_id = b.id
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
<if test="travelAgencyId != null">
|
||||
and a.travel_agency_info_id = #{travelAgencyId}
|
||||
</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyTravelAgencyAccountBalanceChanges" parameterType="baseEntity"
|
||||
resultMap="ZdyTravelAgencyAccountBalanceChangesResultVO">
|
||||
select a.id,
|
||||
a.travel_agency_info_id,
|
||||
a.operator_type,
|
||||
a.before_adjustment_amount,
|
||||
a.adjustment_amount,
|
||||
a.after_adjustment_amount,
|
||||
a.order_no,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
b.name,
|
||||
b.head
|
||||
from zdy_travel_agency_account_balance_changes a
|
||||
left join zdy_travel_agency_info b on a.travel_agency_info_id = b.id
|
||||
<where>
|
||||
a.del_flag = '0'
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,243 @@
|
||||
<?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.zhwl.travelagency.account.mapper.ZdyTravelAgencyBalanceCashApplyMapper">
|
||||
|
||||
<resultMap type="ZdyTravelAgencyBalanceCashApply" id="ZdyTravelAgencyBalanceCashApplyResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="travelAgencyId" column="travel_agency_id"/>
|
||||
<result property="cashAmount" column="cash_amount"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="cashOrderNo" column="cash_order_no"/>
|
||||
<result property="operatorType" column="operator_type"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<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="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap type="ZdyTravelAgencyBalanceCashApplyVO" id="ZdyTravelAgencyBalanceCashApplyResultVO">
|
||||
<result property="id" column="id"/>
|
||||
<result property="travelAgencyId" column="travel_agency_id"/>
|
||||
<result property="cashAmount" column="cash_amount"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="cashOrderNo" column="cash_order_no"/>
|
||||
<result property="operatorType" column="operator_type"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<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="remark" column="remark"/>
|
||||
|
||||
|
||||
<result property="travelAgencyName" column="travel_agency_name"/>
|
||||
<result property="head" column="head"/>
|
||||
<result property="bank" column="bank"/>
|
||||
<result property="bankAccount" column="bank_account"/>
|
||||
<result property="bankBranch" column="bank_branch"/>
|
||||
<result property="bankCardNumber" column="bank_card_number"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyTravelAgencyBalanceCashApplyVo">
|
||||
select id,
|
||||
travel_agency_id,
|
||||
cash_amount,
|
||||
status,
|
||||
cash_order_no,
|
||||
operator_type,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark
|
||||
from zdy_travel_agency_balance_cash_apply
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyTravelAgencyBalanceCashApplyList" parameterType="ZdyTravelAgencyBalanceCashApplyDTO"
|
||||
resultMap="ZdyTravelAgencyBalanceCashApplyResultVO">
|
||||
select
|
||||
a.id,
|
||||
a.travel_agency_id,
|
||||
a.cash_amount,
|
||||
a.status,
|
||||
a.cash_order_no,
|
||||
a.operator_type,
|
||||
a.del_flag,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.remark,
|
||||
b.name as travel_agency_name,
|
||||
b.head,
|
||||
b.bank,
|
||||
b.bank_account,
|
||||
b.bank_branch,
|
||||
b.bank_card_number
|
||||
from zdy_travel_agency_balance_cash_apply a left join zdy_travel_agency_info b on a.travel_agency_id=b.id
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="travelAgencyId != null ">
|
||||
and a.travel_agency_id = #{travelAgencyId}
|
||||
</if>
|
||||
<if test="bankAccount != null and bankAccount!=''">
|
||||
and b.bank_account = #{bankAccount}
|
||||
</if>
|
||||
<if test="cashAmount != null ">
|
||||
and a.cash_amount = #{cashAmount}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and a.status = #{status}
|
||||
</if>
|
||||
<if test="cashOrderNo != null and cashOrderNo != ''">
|
||||
and a.cash_order_no = #{cashOrderNo}
|
||||
</if>
|
||||
<if test="operatorType!= null and operatorType != ''">
|
||||
and a.operator_type = #{operatorType}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and a.create_by = #{createBy}
|
||||
</if>
|
||||
<if test="createTime != null ">
|
||||
and a.create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
and a.update_by = #{updateBy}
|
||||
</if>
|
||||
<if test="updateTime != null ">
|
||||
and a.update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(a.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(a.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyTravelAgencyBalanceCashApplyById" parameterType="Long"
|
||||
resultMap="ZdyTravelAgencyBalanceCashApplyResult">
|
||||
<include refid="selectZdyTravelAgencyBalanceCashApplyVo"/>
|
||||
where id = #{id} and del_flag='0'
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyTravelAgencyBalanceCashApply" parameterType="ZdyTravelAgencyBalanceCashApply"
|
||||
useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_travel_agency_balance_cash_apply
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="travelAgencyId != null">travel_agency_id,
|
||||
</if>
|
||||
<if test="cashAmount != null">cash_amount,
|
||||
</if>
|
||||
<if test="status != null">status,
|
||||
</if>
|
||||
<if test="cashOrderNo != null and cashOrderNo != ''">
|
||||
cash_order_no,
|
||||
</if>
|
||||
<if test="operatorType!= null and operatorType != ''">
|
||||
operator_type,
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag,
|
||||
</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="remark != null">remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="travelAgencyId != null">#{travelAgencyId},
|
||||
</if>
|
||||
<if test="cashAmount != null">#{cashAmount},
|
||||
</if>
|
||||
<if test="status != null">#{status},
|
||||
</if>
|
||||
<if test="cashOrderNo != null and cashOrderNo != ''">
|
||||
#{cashOrderNo},
|
||||
</if>
|
||||
<if test="operatorType!= null and operatorType != ''">
|
||||
#{operatorType},
|
||||
</if>
|
||||
<if test="delFlag != null">#{delFlag},
|
||||
</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="remark != null">#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyTravelAgencyBalanceCashApply" parameterType="ZdyTravelAgencyBalanceCashApply">
|
||||
update zdy_travel_agency_balance_cash_apply
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="travelAgencyId != null">travel_agency_id =
|
||||
#{travelAgencyId},
|
||||
</if>
|
||||
<if test="cashAmount != null">cash_amount =
|
||||
#{cashAmount},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="cashOrderNo != null and cashOrderNo != ''">
|
||||
cash_order_no = #{cashOrderNo},
|
||||
</if>
|
||||
<if test="operatorType!= null and operatorType != ''">
|
||||
operator_type = #{operatorType},
|
||||
</if>
|
||||
<if test="delFlag != null">del_flag =
|
||||
#{delFlag},
|
||||
</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="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyBalanceCashApplyById" parameterType="Long">
|
||||
delete
|
||||
from zdy_travel_agency_balance_cash_apply
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyBalanceCashApplyByIds" parameterType="String">
|
||||
update zdy_travel_agency_balance_cash_apply set del_flag = '1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,506 @@
|
||||
<?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.zhwl.travelagency.account.mapper.ZdyTravelAgencyInfoMapper">
|
||||
|
||||
<resultMap type="ZdyTravelAgencyInfoVO" id="ZdyTravelAgencyInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="sysUserId" column="sys_user_id"/>
|
||||
<result property="account" column="account"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="accountStatus" column="account_status"/>
|
||||
<result property="salesQuantity" column="sales_quantity"/>
|
||||
<result property="salesAmount" column="sales_amount"/>
|
||||
<result property="balance" column="balance"/>
|
||||
<result property="payPassword" column="pay_password"/>
|
||||
<result property="head" column="head"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="employeeAccountPrefix" column="employee_account_prefix"/>
|
||||
<result property="bank" column="bank"/>
|
||||
<result property="bankAccount" column="bank_account"/>
|
||||
<result property="bankCardNumber" column="bank_card_number"/>
|
||||
<result property="bankBranch" column="bank_branch"/>
|
||||
<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="remark" column="remark"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyTravelAgencyInfoVo">
|
||||
select id,
|
||||
name,
|
||||
sys_user_id,
|
||||
sales_quantity,
|
||||
sales_amount,
|
||||
balance,
|
||||
pay_password,
|
||||
head,
|
||||
employee_account_prefix,
|
||||
bank,
|
||||
bank_account,
|
||||
bank_card_number,
|
||||
bank_branch,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark,
|
||||
dept_id
|
||||
from zdy_travel_agency_info
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyTravelAgencyInfoList" parameterType="ZdyTravelAgencyInfoDTO"
|
||||
resultMap="ZdyTravelAgencyInfoResult">
|
||||
select a.id,
|
||||
a.name,
|
||||
a.sys_user_id,
|
||||
c.sales_order_quantity sales_quantity,
|
||||
c.sales_order_price sales_amount,
|
||||
a.balance,
|
||||
a.pay_password,
|
||||
a.head,
|
||||
a.employee_account_prefix,
|
||||
a.bank,
|
||||
a.bank_account,
|
||||
a.bank_card_number,
|
||||
a.bank_branch,
|
||||
b.del_flag,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.remark,
|
||||
a.dept_id,
|
||||
b.user_name as account,
|
||||
b.phonenumber as phone,
|
||||
b.status as account_status,
|
||||
b.password as password
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
left join (select sum(sales_order_quantity) sales_order_quantity,
|
||||
sum(sales_order_price) sales_order_price,
|
||||
travel_agency_id
|
||||
from zdy_travel_agency_order_sales_record
|
||||
group by travel_agency_id) c on c.travel_agency_id = a.id
|
||||
<where>
|
||||
<if test="name != null and name != ''">
|
||||
and a.name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="account != null and account != ''">
|
||||
and b.user_name like concat('%', #{account}, '%')
|
||||
</if>
|
||||
<if test="password != null and password != ''">
|
||||
and b.password = #{password}
|
||||
</if>
|
||||
<if test="accountStatus != null ">
|
||||
and b.status = #{accountStatus}
|
||||
</if>
|
||||
<if test="salesQuantity != null">
|
||||
and a.sales_quantity = #{salesQuantity}
|
||||
</if>
|
||||
<if test="salesAmount != null ">
|
||||
and a.sales_amount = #{salesAmount}
|
||||
</if>
|
||||
<if test="balance != null ">
|
||||
and a.balance = #{balance}
|
||||
</if>
|
||||
<if test="head != null and head != ''">
|
||||
and a.head like concat('%', #{head}, '%')
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and b.phonenumber like concat('%', #{phone}, '%')
|
||||
</if>
|
||||
<if test="employeeAccountPrefix != null and employeeAccountPrefix != ''">
|
||||
and a.employee_account_prefix = #{employeeAccountPrefix}
|
||||
</if>
|
||||
<if test="bank != null ">
|
||||
and a.bank = #{bank}
|
||||
</if>
|
||||
<if test="bankAccount != null and bankAccount != ''">
|
||||
and a.bank_account = #{bankAccount}
|
||||
</if>
|
||||
<if test="bankCardNumber != null and bankCardNumber != ''">
|
||||
and a.bank_card_number = #{bankCardNumber}
|
||||
</if>
|
||||
<if test="bankBranch != null and bankBranch != ''">
|
||||
and a.bank_branch = #{bankBranch}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and a.create_by = #{createBy}
|
||||
</if>
|
||||
<if test="createTime != null ">
|
||||
and a.create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
and a.update_by = #{updateBy}
|
||||
</if>
|
||||
<if test="updateTime != null ">
|
||||
and a.update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(a.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(a.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
and b.del_flag = '0'
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
and a.id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="id">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectZdyTravelAgencyInfoById" parameterType="Long"
|
||||
resultMap="ZdyTravelAgencyInfoResult">
|
||||
select a.id,
|
||||
a.name,
|
||||
a.sys_user_id,
|
||||
a.sales_quantity,
|
||||
a.sales_amount,
|
||||
a.balance,
|
||||
a.pay_password,
|
||||
a.head,
|
||||
a.employee_account_prefix,
|
||||
a.bank,
|
||||
a.bank_account,
|
||||
a.bank_card_number,
|
||||
a.bank_branch,
|
||||
b.del_flag,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.remark,
|
||||
b.user_name as account,
|
||||
b.phonenumber as phone,
|
||||
b.status as account_status,
|
||||
b.password as password
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
where a.id = #{id}
|
||||
and b.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectZdyTravelAgencyInfoByUserId" parameterType="Long"
|
||||
resultMap="ZdyTravelAgencyInfoResult">
|
||||
select a.id,
|
||||
a.name,
|
||||
a.sys_user_id,
|
||||
a.sales_quantity,
|
||||
a.sales_amount,
|
||||
a.balance,
|
||||
a.pay_password,
|
||||
a.head,
|
||||
a.employee_account_prefix,
|
||||
a.bank,
|
||||
a.bank_account,
|
||||
a.bank_card_number,
|
||||
a.bank_branch,
|
||||
b.del_flag,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.remark,
|
||||
b.user_name as account,
|
||||
b.phonenumber as phone,
|
||||
b.status as account_status,
|
||||
b.password as password
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
where a.sys_user_id = #{userId}
|
||||
and b.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyTravelAgencyInfo" parameterType="ZdyTravelAgencyInfoDTO" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_travel_agency_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,
|
||||
</if>
|
||||
<if test="sysUserId != null">sys_user_id,
|
||||
</if>
|
||||
<if test="salesQuantity != null">sales_quantity,
|
||||
</if>
|
||||
<if test="salesAmount != null">sales_amount,
|
||||
</if>
|
||||
<if test="balance != null">balance,
|
||||
</if>
|
||||
<if test="payPassword != null and payPassword!=''">pay_password,
|
||||
</if>
|
||||
<if test="head != null and head != ''">head,
|
||||
</if>
|
||||
<if test="employeeAccountPrefix != null and employeeAccountPrefix != ''">employee_account_prefix,
|
||||
</if>
|
||||
<if test="bank != null">bank,
|
||||
</if>
|
||||
<if test="bankAccount != null and bankAccount != ''">bank_account,
|
||||
</if>
|
||||
<if test="bankCardNumber != null and bankCardNumber != ''">bank_card_number,
|
||||
</if>
|
||||
<if test="bankBranch != null and bankBranch != ''">bank_branch,
|
||||
</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="remark != null">remark,
|
||||
</if>
|
||||
<if test="deptId != null">dept_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},
|
||||
</if>
|
||||
<if test="sysUserId != null">#{sysUserId},
|
||||
</if>
|
||||
<if test="salesQuantity != null">#{salesQuantity},
|
||||
</if>
|
||||
<if test="salesAmount != null">#{salesAmount},
|
||||
</if>
|
||||
<if test="balance != null">#{balance},
|
||||
</if>
|
||||
<if test="payPassword != null and payPassword!=''">#{payPassword},
|
||||
</if>
|
||||
<if test="head != null and head != ''">#{head},
|
||||
</if>
|
||||
<if test="employeeAccountPrefix != null and employeeAccountPrefix != ''">#{employeeAccountPrefix},
|
||||
</if>
|
||||
<if test="bank != null">#{bank},
|
||||
</if>
|
||||
<if test="bankAccount != null and bankAccount != ''">#{bankAccount},
|
||||
</if>
|
||||
<if test="bankCardNumber != null and bankCardNumber != ''">#{bankCardNumber},
|
||||
</if>
|
||||
<if test="bankBranch != null and bankBranch != ''">#{bankBranch},
|
||||
</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="remark != null">#{remark},
|
||||
</if>
|
||||
<if test="deptId != null">#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyTravelAgencyInfo" parameterType="ZdyTravelAgencyInfoDTO">
|
||||
update zdy_travel_agency_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name =
|
||||
#{name},
|
||||
</if>
|
||||
<if test="sysUserId != null ">sys_user_id=#{sysUserId},
|
||||
</if>
|
||||
<if test="salesQuantity != null">sales_quantity = #{salesQuantity},
|
||||
</if>
|
||||
<if test="salesAmount != null">sales_amount = #{salesAmount},
|
||||
</if>
|
||||
<if test="balance != null">balance =
|
||||
#{balance},
|
||||
</if>
|
||||
<if test="payPassword != null and payPassword!=''">pay_password =
|
||||
#{payPassword},
|
||||
</if>
|
||||
<if test="head != null and head != ''">head =
|
||||
#{head},
|
||||
</if>
|
||||
<if test="employeeAccountPrefix != null and employeeAccountPrefix != ''">employee_account_prefix =
|
||||
#{employeeAccountPrefix},
|
||||
</if>
|
||||
<if test="bank != null">bank =
|
||||
#{bank},
|
||||
</if>
|
||||
<if test="bankAccount != null and bankAccount != ''">bank_account =
|
||||
#{bankAccount},
|
||||
</if>
|
||||
<if test="bankCardNumber != null and bankCardNumber != ''">bank_card_number =
|
||||
#{bankCardNumber},
|
||||
</if>
|
||||
<if test="bankBranch != null and bankBranch != ''">bank_branch =
|
||||
#{bankBranch},
|
||||
</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="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
<if test="deptId != null">dept_id =
|
||||
#{deptId},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyInfoById" parameterType="Long">
|
||||
delete
|
||||
from zdy_travel_agency_info
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyInfoByIds" parameterType="String">
|
||||
update sys_user set del_flag = 2 where user_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="countByEmployeeAccountPrefix" resultType="int">
|
||||
select count(1)
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
where b.del_flag = '0'
|
||||
and employee_account_prefix = #{prefix}
|
||||
</select>
|
||||
|
||||
<select id="countByBankCardNumber" resultType="int">
|
||||
select count(1)
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
where b.del_flag = '0'
|
||||
and a.bank_card_number = #{bankCardNumber}
|
||||
</select>
|
||||
|
||||
<select id="countByBankCardNumberNotId" resultType="int">
|
||||
select count(1)
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
where b.del_flag = '0'
|
||||
and a.bank_card_number = #{bankCardNumber}
|
||||
and a.id !=#{id}
|
||||
</select>
|
||||
|
||||
<update id="updateBalance">
|
||||
update
|
||||
zdy_travel_agency_info
|
||||
set balance=balance + #{amount}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getNames" resultType="string">
|
||||
select name
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
where b.del_flag = '0'
|
||||
group by name
|
||||
</select>
|
||||
|
||||
<select id="getVOByDeptId" parameterType="long" resultMap="ZdyTravelAgencyInfoResult">
|
||||
select id
|
||||
from zdy_travel_agency_info a
|
||||
where a.dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
<select id="getTravelAgencyInfos" resultMap="ZdyTravelAgencyInfoResult" parameterType="ZdyTravelAgencyInfoDTO">
|
||||
select a.id,
|
||||
a.name
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
<where>
|
||||
b.del_flag = '0'
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updatePayPassword">
|
||||
update zdy_travel_agency_info
|
||||
set pay_password = #{payPassword}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getAccountPrefixByDeptId" parameterType="java.lang.Long" resultType="java.lang.String">
|
||||
select employee_account_prefix
|
||||
from zdy_travel_agency_info
|
||||
where dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
<select id="getByDeptId" parameterType="Long" resultMap="ZdyTravelAgencyInfoResult">
|
||||
select a.id,
|
||||
a.name,
|
||||
a.sys_user_id,
|
||||
a.sales_quantity,
|
||||
a.sales_amount,
|
||||
a.balance,
|
||||
a.pay_password,
|
||||
a.head,
|
||||
a.employee_account_prefix,
|
||||
a.bank,
|
||||
a.bank_account,
|
||||
a.bank_card_number,
|
||||
a.bank_branch,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.remark,
|
||||
b.user_name as account,
|
||||
b.phonenumber as phone,
|
||||
b.status as account_status,
|
||||
b.password as password
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
where a.dept_id = #{deptId}
|
||||
and b.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="countQuantity" resultType="int">
|
||||
select count(1)
|
||||
from zdy_travel_agency_info a
|
||||
inner join sys_user b on a.sys_user_id = b.user_id
|
||||
where b.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="getTravelAgencyInfosFromTicketOrder"
|
||||
resultType="com.zhwl.travelagency.account.domain.vo.ZdyTravelAgencyInfoVO">
|
||||
select a.id, ztai.name
|
||||
from (select zto.travel_agency_id id
|
||||
from zdy_ticket_order_item ztoi
|
||||
left join zdy_ticket_order zto on ztoi.order_id = zto.id
|
||||
where ztoi.del_flag = '0'
|
||||
and zto.travel_agency_id is not null
|
||||
${params.dataScope}
|
||||
group by zto.travel_agency_id) a
|
||||
left join zdy_travel_agency_info ztai on a.id = ztai.id
|
||||
</select>
|
||||
<select id="selectBaseList" resultType="java.util.Map">
|
||||
SELECT
|
||||
a.id,
|
||||
a.name,
|
||||
IFNULL(a.head,'') as head,
|
||||
IFNULL(b.phonenumber,'') as phonenumber
|
||||
FROM
|
||||
zdy_travel_agency_info a
|
||||
INNER JOIN sys_user b ON a.sys_user_id = b.user_id
|
||||
</select>
|
||||
</mapper>
|
@@ -0,0 +1,125 @@
|
||||
<?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.zhwl.travelagency.account.mapper.ZdyTravelAgencyTicketAuthorizationMapper">
|
||||
|
||||
<resultMap type="ZdyTravelAgencyTicketAuthorization" id="ZdyTravelAgencyTicketAuthorizationResult">
|
||||
<result property="travelAgencyId" column="travel_agency_id"/>
|
||||
<result property="ticketId" column="ticket_id"/>
|
||||
<result property="settlementPrice" column="settlement_price"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZdyTravelAgencyTicketAuthorizationVO" id="ZdyTravelAgencyTicketAuthorizationResultVO">
|
||||
<result property="travelAgencyId" column="travel_agency_id"/>
|
||||
<result property="ticketId" column="id"/>
|
||||
<result property="settlementPrice" column="settlement_price"/>
|
||||
|
||||
<result property="ticketName" column="name"/>
|
||||
<result property="marketPrice" column="price"/>
|
||||
<result property="sellingPrice" column="sales_rice"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyTravelAgencyTicketAuthorizationVo">
|
||||
select travel_agency_id, ticket_id, settlement_price
|
||||
from zdy_travel_agency_ticket_authorization
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyTravelAgencyTicketAuthorizationList" parameterType="ZdyTravelAgencyTicketAuthorization"
|
||||
resultMap="ZdyTravelAgencyTicketAuthorizationResult">
|
||||
<include refid="selectZdyTravelAgencyTicketAuthorizationVo"/>
|
||||
<where>
|
||||
<if test="travelAgencyId != null ">
|
||||
and travel_agency_id = #{travelAgencyId}
|
||||
</if>
|
||||
<if test="ticketId != null ">
|
||||
and ticket_id = #{ticketId}
|
||||
</if>
|
||||
<if test="settlementPrice != null ">
|
||||
and settlement_price = #{settlementPrice}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyTravelAgencyTicketAuthorization" parameterType="ZdyTravelAgencyTicketAuthorization">
|
||||
insert into zdy_travel_agency_ticket_authorization
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="travelAgencyId != null">travel_agency_id,
|
||||
</if>
|
||||
<if test="ticketId != null">ticket_id,
|
||||
</if>
|
||||
<if test="settlementPrice != null">settlement_price,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="travelAgencyId != null">#{travelAgencyId},
|
||||
</if>
|
||||
<if test="ticketId != null">#{ticketId},
|
||||
</if>
|
||||
<if test="settlementPrice != null">#{settlementPrice},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyTravelAgencyTicketAuthorization" parameterType="ZdyTravelAgencyTicketAuthorization">
|
||||
update zdy_travel_agency_ticket_authorization
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="ticketId != null">ticket_id =
|
||||
#{ticketId},
|
||||
</if>
|
||||
<if test="settlementPrice != null">settlement_price =
|
||||
#{settlementPrice},
|
||||
</if>
|
||||
</trim>
|
||||
where travel_agency_id = #{travelAgencyId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyTicketAuthorizationByTravelAgencyId" parameterType="Long">
|
||||
delete
|
||||
from zdy_travel_agency_ticket_authorization
|
||||
where travel_agency_id = #{travelAgencyId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyTicketAuthorizationByTravelAgencyIds" parameterType="String">
|
||||
delete from zdy_travel_agency_ticket_authorization where travel_agency_id in
|
||||
<foreach item="travelAgencyId" collection="array" open="(" separator="," close=")">
|
||||
#{travelAgencyId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectZdyTravelAgencyTicketAuthorizationByTravelAgencyId" parameterType="long"
|
||||
resultMap="ZdyTravelAgencyTicketAuthorizationResult">
|
||||
select travel_agency_id,
|
||||
settlement_price,
|
||||
ticket_id
|
||||
from zdy_travel_agency_ticket_authorization
|
||||
where travel_agency_id = #{travelAgencyId}
|
||||
</select>
|
||||
|
||||
<select id="selectZdyTicketList" resultMap="ZdyTravelAgencyTicketAuthorizationResultVO">
|
||||
select id,
|
||||
name,
|
||||
price,
|
||||
sales_rice
|
||||
from zdy_ticket
|
||||
where del_flag = '0'
|
||||
and classify = 6
|
||||
-- 6团体票
|
||||
</select>
|
||||
|
||||
<select id="selectByTravelAgencyIdAndTicketId" resultMap="ZdyTravelAgencyTicketAuthorizationResult">
|
||||
select travel_agency_id,
|
||||
settlement_price,
|
||||
ticket_id
|
||||
from zdy_travel_agency_ticket_authorization
|
||||
where travel_agency_id = #{travelAgencyId}
|
||||
and ticket_id = #{ticketId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByTravelAgencyIdAndTicketId">
|
||||
delete
|
||||
from zdy_travel_agency_ticket_authorization
|
||||
where travel_agency_id = #{travelAgencyId}
|
||||
and ticket_id = #{ticketId}
|
||||
</delete>
|
||||
</mapper>
|
@@ -0,0 +1,192 @@
|
||||
<?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.zhwl.travelagency.account.mapper.ZdyTravelAgencyTicketAuthorizationRecordMapper">
|
||||
|
||||
<resultMap type="ZdyTravelAgencyTicketAuthorizationRecord" id="ZdyTravelAgencyTicketAuthorizationRecordResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="travelAgencyId" column="travel_agency_id"/>
|
||||
<result property="ticketId" column="ticket_id"/>
|
||||
<result property="ticketAuthorizationChangeType" column="ticket_authorization_change_type"/>
|
||||
<result property="beforeSettlementPrice" column="before_settlement_price"/>
|
||||
<result property="afterSettlementPrice" column="after_settlement_price"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<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="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZdyTravelAgencyTicketAuthorizationRecordVO" id="ZdyTravelAgencyTicketAuthorizationRecordResultVO">
|
||||
<result property="id" column="id"/>
|
||||
<result property="travelAgencyName" column="travel_agency_name"/>
|
||||
<result property="ticketName" column="ticket_name"/>
|
||||
<result property="ticketAuthorizationChangeType" column="ticket_authorization_change_type"/>
|
||||
<result property="beforeSettlementPrice" column="before_settlement_price"/>
|
||||
<result property="afterSettlementPrice" column="after_settlement_price"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZdyTravelAgencyTicketAuthorizationRecordVo">
|
||||
select id,
|
||||
travel_agency_id,
|
||||
ticket_id,
|
||||
ticket_authorization_change_type,
|
||||
before_settlement_price,
|
||||
after_settlement_price,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
remark
|
||||
from zdy_travel_agency_ticket_authorization_record
|
||||
</sql>
|
||||
|
||||
<select id="selectZdyTravelAgencyTicketAuthorizationRecordList"
|
||||
parameterType="ZdyTravelAgencyTicketAuthorizationRecord"
|
||||
resultMap="ZdyTravelAgencyTicketAuthorizationRecordResultVO">
|
||||
select a.id,
|
||||
b.name travel_agency_name,
|
||||
c.name ticket_name,
|
||||
ticket_authorization_change_type,
|
||||
before_settlement_price,
|
||||
after_settlement_price
|
||||
from zdy_travel_agency_ticket_authorization_record a
|
||||
left join zdy_travel_agency_info b on a.travel_agency_id = b.id
|
||||
left join zdy_ticket c on a.ticket_id = c.id
|
||||
<where>
|
||||
<if test="travelAgencyId != null ">
|
||||
and travel_agency_id = #{travelAgencyId}
|
||||
</if>
|
||||
<if test="ticketId != null ">
|
||||
and ticket_id = #{ticketId}
|
||||
</if>
|
||||
<if test="ticketAuthorizationChangeType != null ">
|
||||
and ticket_authorization_change_type = #{ticketAuthorizationChangeType}
|
||||
</if>
|
||||
<if test="beforeSettlementPrice != null ">
|
||||
and before_settlement_price = #{beforeSettlementPrice}
|
||||
</if>
|
||||
<if test="afterSettlementPrice != null ">
|
||||
and after_settlement_price = #{afterSettlementPrice}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZdyTravelAgencyTicketAuthorizationRecordById" parameterType="Long"
|
||||
resultMap="ZdyTravelAgencyTicketAuthorizationRecordResult">
|
||||
<include refid="selectZdyTravelAgencyTicketAuthorizationRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZdyTravelAgencyTicketAuthorizationRecord" parameterType="ZdyTravelAgencyTicketAuthorizationRecord"
|
||||
useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zdy_travel_agency_ticket_authorization_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="travelAgencyId != null">travel_agency_id,
|
||||
</if>
|
||||
<if test="ticketId != null">ticket_id,
|
||||
</if>
|
||||
<if test="ticketAuthorizationChangeType != null">ticket_authorization_change_type,
|
||||
</if>
|
||||
<if test="beforeSettlementPrice != null">before_settlement_price,
|
||||
</if>
|
||||
<if test="afterSettlementPrice != null">after_settlement_price,
|
||||
</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">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="remark != null">remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="travelAgencyId != null">#{travelAgencyId},
|
||||
</if>
|
||||
<if test="ticketId != null">#{ticketId},
|
||||
</if>
|
||||
<if test="ticketAuthorizationChangeType != null">#{ticketAuthorizationChangeType},
|
||||
</if>
|
||||
<if test="beforeSettlementPrice != null">#{beforeSettlementPrice},
|
||||
</if>
|
||||
<if test="afterSettlementPrice != null">#{afterSettlementPrice},
|
||||
</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
<if test="remark != null">#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZdyTravelAgencyTicketAuthorizationRecord"
|
||||
parameterType="ZdyTravelAgencyTicketAuthorizationRecord">
|
||||
update zdy_travel_agency_ticket_authorization_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="travelAgencyId != null">travel_agency_id =
|
||||
#{travelAgencyId},
|
||||
</if>
|
||||
<if test="ticketId != null">ticket_id =
|
||||
#{ticketId},
|
||||
</if>
|
||||
<if test="ticketAuthorizationChangeType != null">ticket_authorization_change_type =
|
||||
#{ticketAuthorizationChangeType},
|
||||
</if>
|
||||
<if test="beforeSettlementPrice != null">before_settlement_price =
|
||||
#{beforeSettlementPrice},
|
||||
</if>
|
||||
<if test="afterSettlementPrice != null">after_settlement_price =
|
||||
#{afterSettlementPrice},
|
||||
</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag =
|
||||
#{delFlag},
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">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="remark != null">remark =
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyTicketAuthorizationRecordById" parameterType="Long">
|
||||
delete
|
||||
from zdy_travel_agency_ticket_authorization_record
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZdyTravelAgencyTicketAuthorizationRecordByIds" parameterType="String">
|
||||
delete from zdy_travel_agency_ticket_authorization_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user