master
taylor.dang 5 years ago
parent 94073272f1
commit 0af4bac9ee

@ -23,6 +23,7 @@ import au.com.royalpay.payment.tools.defines.TradeType;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.permission.enums.PartnerRole;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
@ -127,6 +128,8 @@ public class TradeLogServiceImpl implements TradeLogService {
@Resource
private ClientDeviceMapper clientDeviceMapper;
@Resource
private MerchantInfoProvider merchantInfoProvider;
// @Value("classpath:/jasper/trans_flow.jasper")
// @Value("classpath:/jasper/trans_flow_new.jasper")
@ -522,7 +525,8 @@ public class TradeLogServiceImpl implements TradeLogService {
JSONObject params = query.toParams(timezone);
clientManager.validateClients(client_id, params);
params.put("client_id", client_id);
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(partner.getIntValue("client_id"));
params.put("hide_sub_mch", mchConfig.getBooleanValue("hide_sub_mch"));
List<JSONObject> logs = transactionMapper.listTransFlow(params);
TimeZoneUtils.switchTimeZone(logs, timezone, "create_time", "confirm_time", "transaction_time");
Paginator paginator = new Paginator(query.getPage(), query.getLimit(), logs.size());

@ -156,13 +156,16 @@
left join sys_customer_relation_alipay ra on ra.alipay_uid = o.customer_id
LEFT JOIN sys_clients c on c.client_id = t.client_id
<where>
<if test="client_ids!=null">
<if test="!hide_sub_mch and client_ids!=null">
AND t.client_id IN
<foreach collection="client_ids" open="(" close=")" separator="," item="client_id">
#{client_id}
</foreach>
</if>
<if test="client_ids==null">
<if test="!hide_sub_mch and client_ids==null">
and c.client_id=#{client_id}
</if>
<if test="hide_sub_mch">
and (c.client_id=#{client_id} or c.parent_client_id=#{client_id})
</if>
<if test="from!=null">and t.transaction_time &gt;= #{from}</if>

Loading…
Cancel
Save