master
kira 6 years ago
parent 70d8160871
commit 46cd2a2bdd

@ -432,7 +432,9 @@ public class RetailAppServiceImp implements RetailAppService {
public JSONObject getRefunds(JSONObject device, AppQueryBean appQueryBean) {
JSONObject appParam = appQueryBean.toParams();
JSONObject param = new JSONObject();
param.put("client_id",device.getIntValue("client_id"));
if(appParam.get("client_ids")==null) {
param.put("client_id", device.getIntValue("client_id"));
}
param.put("start_time",appParam.getDate("begin"));
param.put("end_time",appParam.getDate("end"));
return refundService.listUnionAllApply(param, new PageBounds(appQueryBean.getPage(), appQueryBean.getLimit()));

@ -435,7 +435,7 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish
@Override
public JSONObject listUnionAllApply(JSONObject params, PageBounds pagination) {
if(params.get("cleint_id")==null && params.get("client_ids")==null){
if(params.get("client_id")==null && params.get("client_ids")==null){
return null;
}
return PageListUtils.buildPageListResult(refundMapper.listUnionAllApply(params, pagination));

@ -77,6 +77,7 @@
confirm_time confirm_time,
operator_name operator_name,
`status` `status` ,
amount amount,
1 type
FROM
pmt_refunds
@ -85,10 +86,10 @@
and client_id = #{client_id}
</if>
<if test="start_time!=null">
and create_time &lt;= #{start_time}
and create_time &gt;= #{start_time}
</if>
<if test="start_time!=null">
and create_time &gt;= #{end_time}
and create_time &lt;= #{end_time}
</if>
<if test="client_ids!=null">
client_id in
@ -99,27 +100,28 @@
</where>
UNION ALL
SELECT
order_id order_id,
client_id client_id,
applytime create_time,
audittime confirm_time,
auditorname operator_name,
audit_result `status` ,
ra.order_id order_id,
ra.client_id client_id,
ra.applytime create_time,
ra.audittime confirm_time,
ra.auditorname operator_name,
ra.audit_result `status` ,
r.amount amount,
2 type
FROM
pmt_refund_applies
pmt_refund_applies ra left join pmt_refunds r on ra.refund_id = r.refund_id
<where>
<if test="client_id!=null">
and client_id = #{client_id}
and ra.client_id = #{client_id}
</if>
<if test="start_time!=null">
and applytime &lt;= #{start_time}
and ra.applytime &gt;= #{start_time}
</if>
<if test="start_time!=null">
and applytime &gt;= #{end_time}
and ra.applytime &lt;= #{end_time}
</if>
<if test="client_ids!=null">
client_id in
ra.client_id in
<foreach collection="client_ids" open="(" close=")" separator="," item="item">
#{item}
</foreach>

Loading…
Cancel
Save