select id,
coal_pay_id,
name,
id_card,
phone,
sex,
pay_code,
pay_status,
pay_type,
order_id,
file_data,
gov_pay_status,
update_by,
update_time,
create_by,
create_time,
del_flag,
order_no,
pay_time
from coal_pay_student
insert into coal_pay_student
id,
coal_pay_id,
name,
id_card,
phone,
sex,
pay_code,
pay_status,
pay_type,
order_id,
order_no,
file_data,
gov_pay_status,
train,
create_by,
create_time,
update_by,
update_time,
del_flag,
#{id},
#{coalPayId},
#{name},
#{idCard},
#{phone},
#{sex},
#{payCode},
#{payStatus},
#{payType},
#{orderId},
#{orderNo},
#{fileData},
#{govPayStatus},
#{train},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{delFlag},
update coal_pay_student set del_flag = 2 where id in
#{id}
update coal_pay_student
coal_pay_id = #{coalPayId},
name = #{name},
id_card = #{idCard},
phone = #{phone},
sex = #{sex},
pay_type = #{payType},
pay_code = #{payCode},
pay_time = #{payTime},
pay_status = #{payStatus},
order_id=#{orderId},
file_data=#{fileData},
gov_pay_status=#{govPayStatus},
update_by = #{updateBy},
update_time = #{updateTime},
del_flag = #{delFlag},
where id = #{id}
update coal_pay_student
pay_type = #{payType},
gov_pay_status=#{govPayStatus},
where coal_pay_id = #{coalPayId} and pay_status = 0
update coal_pay_student
pay_code = #{payCode},
order_id=#{orderId},
order_no = #{orderNo},
file_data=#{fileData},
gov_pay_status=#{govPayStatus},
where coal_pay_id = #{coalPayId} and pay_status = 0 and pay_type = 2
update coal_pay_student
pay_code = #{payCode},
order_id=#{orderId},
order_no = #{orderNo},
file_data=#{fileData},
gov_pay_status=#{govPayStatus},
where id = #{id} and pay_status = 0 and pay_type = 1