Merge branch 'develop'

master
Yixian 3 years ago
commit 8b031dbd9d

@ -60,6 +60,8 @@ public interface TransactionMapper {
PageList<JSONObject> listSettlementLog(JSONObject params, PageBounds pagination);
PageList<JSONObject> listSettlementLogForDashbord(JSONObject params, PageBounds pagination);
@CountRef(".countSettlementLogInClients")
PageList<JSONObject> listSettlementLogInClients(JSONObject params, PageBounds pagination);

@ -546,7 +546,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
JSONObject wechatMcc = paymentChannelMccGoodMapper.findWechatPayMccByClientId(client.getIntValue("client_id"));
if (wechatMcc != null) {
client.put("mc_code", wechatMcc.getIntValue("mc_code"));
client.put("mc_code", wechatMcc.getString("mc_code"));
}
client.put("enable_alipayplus", false);
MerchantChannelPermissionResolver resolver = this.paymentApi.channelApi(PayChannel.ALIPAY_PLUS.getChannelCode()).getChannelPermissionResolver();

@ -1423,7 +1423,7 @@ public class TradeLogServiceImpl implements TradeLogService {
params.remove("client_ids");
params.put("merge_settle", true);
}
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params,
PageList<JSONObject> logs = transactionMapper.listSettlementLogForDashbord(params,
new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
logs.forEach(log -> log.put("padding", log.getBooleanValue("editable")));
result.putAll(PageListUtils.buildPageListResult(logs));

@ -600,6 +600,50 @@
order by t.clearing_time desc
</select>
<select id="listSettlementLogForDashbord" resultType="com.alibaba.fastjson.JSONObject">
SELECT cd.client_id,cd.report_date clearing_time,
cd.report_date,
<if test="merge_settle!=null">
SUM(cd.tax_amount) as tax_amount,
SUM(cd.total_charge) as total_charge,
1 as merge_settle,
SUM(cd.gross_amount) total,
SUM(cd.clearing_amount) income,
SUM(cd.gross_amount-cd.clearing_amount) fee,
</if>
<if test="merge_settle==null">
cd.tax_amount,
cd.total_charge,
cd.gross_amount total,
cd.clearing_amount income,
cd.gross_amount-cd.clearing_amount fee,
</if>
(SELECT min(r.rate_value) FROM sys_client_rates r WHERE r.client_id = cd.client_id
AND date(r.expiry_time) >= DATE(cd.report_date)
AND date(r.active_time) &lt;= DATE(cd.report_date)) rate,
cd.clear_detail_id,
lc.balance_group, lc.editable
FROM log_clearing_detail cd
left join log_clearing lc on cd.clearing_id = lc.clearing_id
left join sys_clients sc on cd.client_id = sc.client_id
WHERE
<if test="client_ids!=null">
cd.client_id IN
<foreach collection="client_ids" open="(" close=")" separator="," item="client_id">
#{client_id}
</foreach>
</if>
<if test="client_ids==null and client_id !=null">
(sc.client_id=#{client_id} or sc.parent_client_id =#{client_id})
</if>
<if test="from!=null">and cd.report_date &gt;= #{from}</if>
<if test="to!=null">and cd.report_date &lt; #{to}</if>
<if test="merge_settle!=null">GROUP BY report_date</if>
order by cd.report_date desc
</select>
<select id="listSettlementLogTotal" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT DATE(t.transaction_time) clearing_time,date_format(t.transaction_time, '%Y-%m-%d') clear_time,SUM(t.clearing_amount) total,

File diff suppressed because it is too large Load Diff

@ -513,7 +513,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}
if($scope.partner.mc_code ){
$scope.partner.mc_code=parseInt($scope.partner.mc_code);
$scope.partner.mc_code=$scope.partner.mc_code;
}
if (!$scope.partner.client_type) {
$scope.partner.client_type = 'cross-border';

@ -1185,7 +1185,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.isComplianceOfBusinessStructure = false
$scope.cardPromotionaparams = {}
if ($scope.partner.mc_code) {
$scope.partner.mc_code = parseInt($scope.partner.mc_code)
$scope.partner.mc_code = $scope.partner.mc_code
}
var website = partner.data.company_website
if (website != null) {

Loading…
Cancel
Save