SELECT a.pay_order_id,b.money, b.create_time, b.status, c.withdraw_money FROM xzx_pay_info a
LEFT JOIN xzx_pay_request_info b ON a.pay_order_id = b.pay_order_id
LEFT JOIN xzx_account_info c ON a.account_id=c.account_id
WHERE c.user_id=#userId#
@if(!isEmpty(payType)){
AND a.pay_type=#payType#
@}
@if(!isEmpty(tStatus)){
AND a.status=#tStatus#
@}
@if(!isEmpty(tStatus)){
AND b.status=#tStatus#
@}
limit #page#,#limit#
SELECT count(*) FROM xzx_pay_info a
LEFT JOIN xzx_pay_request_info b ON a.pay_order_id = b.pay_order_id
LEFT JOIN xzx_account_info c ON a.account_id=c.account_id
WHERE c.user_id=#userId#
@if(!isEmpty(payType)){
AND a.pay_type=#payType#
@}
@if(!isEmpty(tStatus)){
AND b.status=#tStatus#
@}
@if(!isEmpty(xStatus)){
AND a.status=#xStatus#
@}
SELECT a.pay_order_id,a.create_time,a.money,a.unpass_reason,a.pay_flag, a.wxpay_flag,a.examine_time,a.update_time,
a.update_user_id,(select k.name from core_user k where k.id=a.update_user_id) as updateUserName,
b.mobile_phone,IFNULL(b.nick_name,f.name) as nickName,b.user_type,c.order_status,c.order_id,a.examine_time,a.`status`,a.pay_type,a.create_user_id ,
IFNULL((select d.role_name from xzx_user_role_info d where d.role_code= f.user_type),'普通用户') as roleName,
IFNULL(f.user_type,b.user_type) as userType
FROM xzx_pay_request_info a
LEFT JOIN xzx_user_info b ON a.create_user_id = b.user_id
LEFT JOIN xzx_order_info c ON a.order_id = c.order_id
LEFT JOIN xzx_user_other_info f ON a.create_user_id = f.user_id
where 1=1
@if(!isEmpty(status)){
and a.status=#status#
@}
@if(!isEmpty(nickName)){
and (b.nick_name=#nickName# or f.nick_name=#nickName#)
@}
@if(!isEmpty(mobilePhone)){
and b.mobile_phone=#mobilePhone#
@}
@if(!isEmpty(payType)){
and a.pay_type=#payType#
@}
@if(!isEmpty(startTime)){
and a.create_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and a.create_time<=#endTime#
@}
@if(!isEmpty(partnerIds)){
and f.partner_id in ( #join(partnerIds)# )
@}
group by a.create_time desc
limit #page#,#limit#
select count(k.pId) from (
SELECT a.pay_order_id as pId
FROM xzx_pay_request_info a
LEFT JOIN xzx_user_info b ON a.create_user_id = b.user_id
LEFT JOIN xzx_order_info c ON a.order_id = c.order_id
LEFT JOIN xzx_user_other_info f ON a.create_user_id = f.user_id
where 1=1
@if(!isEmpty(status)){
and a.status=#status#
@}
@if(!isEmpty(nickName)){
and (b.nick_name=#nickName# or f.nick_name=#nickName#)
@}
@if(!isEmpty(mobilePhone)){
and b.mobile_phone=#mobilePhone#
@}
@if(!isEmpty(payType)){
and a.pay_type=#payType#
@}
@if(!isEmpty(startTime)){
and a.create_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and a.create_time<=#endTime#
@}
@if(!isEmpty(partnerIds)){
and f.partner_id in ( #join(partnerIds)# )
@}
group by a.create_time desc) k
SELECT * FROM xzx_pay_request_info a where 1=1
@if(!isEmpty(payOrderId)){
and a.pay_order_id=#payOrderId#
@}
UPDATE xzx_pay_request_info SET
@if(!isEmpty(status)){
status=#status#
@}
@if(!isEmpty(payFlag)){
,pay_flag=#payFlag#
@}
@if(!isEmpty(unpassReason)){
,unpass_reason=#unpassReason#
@}
WHERE pay_order_id = #payOrderId#
UPDATE xzx_account_info SET
money=#money#
WHERE account_id = #accountId#
UPDATE xzx_partner_account SET
hbb=#money#
WHERE account = #accountId#
UPDATE xzx_account_info SET
money=#money#
WHERE account_id = #accountId#
UPDATE xzx_platform_account_info SET
field_value=#money#
WHERE field_key = 'money'
UPDATE xzx_platform_account_info SET
field_value=#hbb#
WHERE field_key = 'hbb'
insertPlatFormLog
===
INSERT INTO xzx_platform_account_log
(type
, old_money
, money
, new_money
,
old_hbb
, hbb
, new_hbb
, create_user_id
,
create_time
, create_user_type
, create_user_name
,
create_user_mobile
, flow_no
)
VALUES ('1', #oldMoney#, #money#, #newMoney#,
#oldHbb#, #hbb#,#newHbb#, #createUserId#, #createTime#,#createUserType#,
#createUserName#, #createUserMobile#, #flowNo#)
UPDATE xzx_pay_request_info SET pay_flag=#payFlag#,unpass_reason=#unpassReason#
WHERE pay_order_id = #payOrderId#
select a.*,b.nick_name as nickName ,
b.user_type as userType,
b.avatar as avatar,
b.mobile_phone as mobilePhone
from xzx_pay_request_info a,xzx_user_info b
where a.pay_order_id=#payOrderId#
and a.create_user_id = b.user_id
select a.*,b.nick_name as nickName ,
b.user_type as userType,
b.avatar as avatar,
b.mobile_phone as mobilePhone
from xzx_pay_request_info a,xzx_user_other_info b
where a.pay_order_id=#payOrderId# and a.create_user_id = b.user_id
select role_name as roleName from xzx_user_role_info where role_code=#userType#
select a.*,
b.nick_name as nickName,
b.user_type as userType,
b.mobile_phone as mobilePhone,
IFNULL((select d.role_name from xzx_user_role_info d where d.role_code= f.user_type),'普通用户') as roleName,
IFNULL(f.name,b.name) as name
from xzx_pay_info a
LEFT JOIN xzx_user_info b ON a.create_user_id = b.user_id
LEFT JOIN xzx_user_other_info f ON a.create_user_id = f.user_id
where a.pay_order_id=#payOrderId#
and a.create_user_id = b.user_id
select config_value from xzx_sys_config_info where config_type_code='APPROVAL_TYPE'
select a.storage_id,
a.storage_user_id,
a.storage_user_name,
a.storage_user_phone,
a.storage_time,
a.storage_weight,
a.storage_money
from xzx_order_storage_info a
left join xzx_user_other_info b on a.storage_user_id=b.user_id
where a.storage_status=0
@if(!isEmpty(startTime)){
and a.storage_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and a.storage_time<=#endTime#
@}
@if(!isEmpty(storageUserName)){
and (a.storage_user_name like #"%"+storageUserName+"%"# or a.storage_user_phone like #"%"+storageUserName+"%"#)
@}
@if(!isEmpty(storageUserPhone)){
and a.storage_user_phone=#storageUserPhone#
@}
@if(!isEmpty(partnerIds)){
and b.partner_id in ( #join(partnerIds)# )
@}
limit #page#,#limit#
select
sum(a.storage_money) as money
from xzx_order_storage_info a
left join xzx_user_other_info b on a.storage_user_id=b.user_id
where storage_status=0
@if(!isEmpty(startTime)){
and a.storage_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and a.storage_time<=#endTime#
@}
@if(!isEmpty(partnerIds)){
and b.partner_id in ( #join(partnerIds)# )
@}
select count(k.sId) from (
select a.storage_id as sId
from xzx_order_storage_info a
left join xzx_user_other_info b on a.storage_user_id=b.user_id
where a.storage_status=0
@if(!isEmpty(startTime)){
and a.storage_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and a.storage_time<=#endTime#
@}
@if(!isEmpty(storageUserName)){
and (a.storage_user_name like #"%"+storageUserName+"%"# or a.storage_user_phone like #"%"+storageUserName+"%"#)
@}
@if(!isEmpty(storageUserPhone)){
and a.storage_user_phone=#storageUserPhone#
@}
@if(!isEmpty(partnerIds)){
and b.partner_id in ( #join(partnerIds)# )
@}
) k
select IFNULL(sum(money),0) from xzx_pay_request_info where pay_type=4
@if(!isEmpty(startTime)){
and create_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and create_time<=#endTime#
@}
@if(!isEmpty(status)){
and status=#status#
@}
@if(!isEmpty(payOrderIds)){
and pay_order_id in ( #join(payOrderIds)#)
@}
select a.order_id as orderId,c.complete_time as completeTime,
sum(b.money) as money,sum(b.weight) as weight,
a.create_time as createTime,a.rela_phone as phone from xzx_order_info a
left join xzx_order_detail_info c on a.order_id=c.order_id
left join xzx_order_item_info b on a.order_id=b.order_id
where a.del_flag=0
and a.order_status in (4,5)
and a.order_id=c.order_id
@if(!isEmpty(phone)){
and a.rela_phone=#phone#
@}
@if(!isEmpty(receiverPhone)){
and c.receiver_phone=#receiverPhone#
@}
group by a.order_id
limit #page#,#limit#
queryUserOrderCount
===
select count(k.orderId) from (
select a.order_id as orderId from xzx_order_info a
left join xzx_order_detail_info c on a.order_id=c.order_id
left join xzx_order_item_info b on a.order_id=b.order_id
where a.del_flag=0
and a.order_status in (4,5)
and a.order_id=c.order_id
@if(!isEmpty(phone)){
and a.rela_phone=#phone#
@}
@if(!isEmpty(receiverPhone)){
and c.receiver_phone=#receiverPhone#
@}
group by a.order_id )k
select a.pay_order_id, a.create_time, a.money, IFNULL(b.nick_name,c.nick_name) as nickName,
b.user_type,IFNULL(b.mobile_phone,c.mobile_phone) as mobilePhone,a.status, b.name,a.pay_time,
IFNULL((select d.role_name from xzx_user_role_info d where role_code= c.user_type limit 1),'普通用户') as roleName,
e.partner_name as partnerName,e.mobile_phone as partnerPhone,e.partner_type as partnerType,a.pay_img,a.unpass_reason,a.fee
from xzx_pay_info a
left join xzx_user_info b on a.create_user_id=b.user_id
left join xzx_user_other_info c on a.create_user_id=c.user_id
left join xzx_city_partner e on a.create_user_id=e.user_id
where 1=1
@if(!isEmpty(status)){
and a.status=#status#
@}
@if(!isEmpty(payType)){
and a.pay_type=#payType#
@}
@if(!isEmpty(nickName)){
and (b.nick_name=#nickName# or b.mobile_phone like #"%"+mobilePhone+"%"# or c.mobile_phone like #"%"+mobilePhone+"%"# or e.mobile_phone like #"%"+mobilePhone+"%"# )
@}
@if(!isEmpty(name)){
and b.name=#name#
@}
@if(!isEmpty(startTime)){
and a.create_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and a.create_time<=#endTime#
@}
@if(!isEmpty(partnerIds)){
and c.partner_id in ( #join(partnerIds)# )
@}
group by a.create_time desc
limit #page#,#limit#
select count(k.count) from ( select count(*) as count from xzx_pay_info a
left join xzx_user_info b on a.create_user_id=b.user_id
left join xzx_user_other_info c on a.create_user_id=c.user_id
left join xzx_city_partner e on a.create_user_id=e.user_id
where 1=1
@if(!isEmpty(status)){
and a.status=#status#
@}
@if(!isEmpty(payType)){
and a.pay_type=#payType#
@}
@if(!isEmpty(nickName)){
and (b.nick_name=#nickName# or b.mobile_phone like #"%"+mobilePhone+"%"# or c.mobile_phone like #"%"+mobilePhone+"%"# or e.mobile_phone like #"%"+mobilePhone+"%"#)
@}
@if(!isEmpty(name)){
and b.name=#name#
@}
@if(!isEmpty(partnerIds)){
and c.partner_id in ( #join(partnerIds)# )
@}
group by a.create_time desc) k
select
IFNULL(sum(b.money),0) as money,IFNULL(sum(b.weight),0) as weight
from xzx_order_info a
left join xzx_order_detail_info c on a.order_id=c.order_id
left join xzx_order_item_info b on a.order_id=b.order_id
where a.del_flag=0
and a.order_status in (4,5)
and a.order_id=c.order_id
@if(!isEmpty(phone)){
and a.rela_phone=#phone#
@}
@if(!isEmpty(receiverPhone)){
and c.receiver_phone=#receiverPhone#
@}
group by a.order_id
select order_id from xzx_order_storage_info
where storage_status=0
@if(!isEmpty(storageId)){
AND storage_id=#storageId#
@}
select a.order_id as orderId,c.complete_time as completeTime,
sum(b.money) as money,sum(b.weight) as weight,
a.create_time as createTime,a.rela_phone as phone from xzx_order_info a
left join xzx_order_detail_info c on a.order_id=c.order_id
left join xzx_order_item_info b on a.order_id=b.order_id
where a.del_flag=0
and a.order_status in (4,5)
and a.order_id=c.order_id
and a.order_id in (#join(orderIds)#)
group by a.order_id
limit #page#,#limit#
select
IFNULL(sum(b.money),0) as money,IFNULL(sum(b.weight),0) as weight
from xzx_order_info a
left join xzx_order_detail_info c on a.order_id=c.order_id
left join xzx_order_item_info b on a.order_id=b.order_id
where a.del_flag=0
and a.order_status in (4,5)
and a.order_id=c.order_id
and a.order_id in (#join(orderIds)#)
group by a.order_id
select sum(k.money) from ( select IFNULL(sum(a.money),0) as money
from xzx_pay_info a
left join xzx_user_info b on a.create_user_id=b.user_id
left join xzx_user_other_info c on a.create_user_id=c.user_id
where 1=1
@if(!isEmpty(status)){
and a.status in ( #join(status)#)
@}
@if(!isEmpty(payType)){
and a.pay_type=#payType#
@}
@if(!isEmpty(startTime)){
and a.create_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and a.create_time<=#endTime#
@}
@if(!isEmpty(partnerIds)){
and c.partner_id in ( #join(partnerIds)# )
@}
group by a.create_time desc )k
select storage_time as storageTime,
storage_weight as weight,storage_money as money
from xzx_order_storage_info
where storage_status=0
and receiver=#userId#
@if(!isEmpty(startTime)){
and storage_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and storage_time<=#endTime#
@}
limit #page#,#limit#
select count(k.storageId) from (
select storage_id as storageId
from xzx_order_storage_info
where storage_status=0
and receiver=#userId#
@if(!isEmpty(startTime)){
and storage_time>=#startTime#
@}
@if(!isEmpty(endTime)){
and storage_time<=#endTime#
@}
)k
select storage_time
from xzx_order_storage_info
where storage_status=0
order by storage_time asc limit 1
select * from xzx_account_info where user_id=#userId# and del_flag=0
update xzx_account_info set money=#money# where user_id=#userId# and del_flag=0
select * from xzx_partner_account where user_id=#userId# and del_flag=0
select * from xzx_remittance_user where pay_order_id=#payOrderId# limit 1
select config_value_name from xzx_sys_config_info where config_type_code=#type#
update xzx_partner_account_log set money=#money# ,
hbb=#hbb#,approver=#approver# ,approver_time=#approverTime#,
approver_status=#approverStatus#, update_time=#updateTime#
where flow_no=#flowNo#
select * from xzx_account_log where order_id=#orderId#
select * from xzx_rebate_rule_price where rule_id=#ruleId#