|
|
|
@ -20,6 +20,7 @@ import au.com.royalpay.payment.manage.mappers.system.CustomerMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.CustomerRelationAlipayMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
|
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
|
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.PreRefundQueryBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
|
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
|
|
|
|
@ -121,7 +122,7 @@ public class TradeLogServiceImpl implements TradeLogService {
|
|
|
|
|
private ClientCustomersMapper clientCustomersMapper;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private OrgMapper orgMapper;
|
|
|
|
|
private OrgManager orgManager;
|
|
|
|
|
|
|
|
|
|
// @Value("classpath:/jasper/trans_flow.jasper")
|
|
|
|
|
// @Value("classpath:/jasper/trans_flow_new.jasper")
|
|
|
|
@ -179,28 +180,7 @@ public class TradeLogServiceImpl implements TradeLogService {
|
|
|
|
|
params.put("bd_group_bd", query.getGroup_bd());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (manager.getInteger("org_id") != null) {
|
|
|
|
|
if(params.getString("org_id") == null) {
|
|
|
|
|
JSONObject org = orgMapper.findOne(manager.getInteger("org_id"));
|
|
|
|
|
if(org.getString("parent_org_id") != null){
|
|
|
|
|
params.put("org_id",manager.getInteger("org_id"));
|
|
|
|
|
}else {
|
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
|
|
param.put("parent_org_id", manager.getIntValue("org_id"));
|
|
|
|
|
param.put("type", 0);
|
|
|
|
|
List<Integer> orgIds = new ArrayList<>();
|
|
|
|
|
List<JSONObject> childOrgs = orgMapper.listOrgsWithChid(param);
|
|
|
|
|
if(childOrgs.size()>0){
|
|
|
|
|
for (JSONObject object : childOrgs) {
|
|
|
|
|
orgIds.add(object.getIntValue("org_id"));
|
|
|
|
|
}
|
|
|
|
|
orgIds.add(manager.getIntValue("org_id"));
|
|
|
|
|
params.put("org_ids", orgIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
|
PageList<JSONObject> logs = orderMapper.listOrders(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("create_time.desc")));
|
|
|
|
|
JSONObject result = PageListUtils.buildPageListResult(logs);
|
|
|
|
|
JSONObject analysis = orderMapper.analysisOrders(params);
|
|
|
|
@ -208,6 +188,8 @@ public class TradeLogServiceImpl implements TradeLogService {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> listOrderRefunds(String orderId, String timezone) {
|
|
|
|
|
List<JSONObject> refunds = refundMapper.listOrderRefunds(orderId, new PageBounds(Order.formString("create_time.desc")));
|
|
|
|
|