修复:商户清算查询查不到当天清算记录

master
yixian 4 years ago
parent 4607536ed1
commit 062852a3cf

@ -4011,18 +4011,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
int client_id = client.getIntValue("client_id");
String timezone = client.getString("timezone");
int clientId = client.getIntValue("client_id");
if (query.getDatefrom() == null) {
JSONObject earlistOrder = transactionAnalysisMapper.getEarliestOrder(client_id);
JSONObject earlistOrder = transactionAnalysisMapper.getEarliestOrder(clientId);
if (earlistOrder != null) {
query.setDatefrom(DateFormatUtils.format(earlistOrder.getDate("transaction_time"), "yyyyMMdd"));
query.setDateto(DateFormatUtils.format(new Date(), "yyyyMMdd"));
}
}
JSONObject params = query.toParams(timezone);
params.put("client_id", client_id);
queryModifyClientIds(client_id, params);
JSONObject params = query.toParams(TimeZone.getDefault().getID());
params.put("client_id", clientId);
queryModifyClientIds(clientId, params);
boolean mergeSettle = getMergeSettleStatus(client);
if (mergeSettle && query.getClient_ids() == null) {

@ -99,7 +99,7 @@ public class TradeLogQuery {
if (getDev_id() != null) {
params.put("dev_id", getDev_id());
}
if (org_id != null && org_id != "ALL") {
if (org_id != null && !org_id.equals("ALL")) {
params.put("org_id", org_id);
}

@ -593,8 +593,8 @@
<if test="client_ids==null and client_id !=null">
and (sc.client_id=#{client_id} or sc.parent_client_id =#{client_id})
</if>
<if test="from!=null">and cd.report_date &gt;= DATE_FORMAT(#{from},'%Y-%m-%d')</if>
<if test="to!=null">and cd.report_date &lt; DATE_FORMAT(#{to},'%Y-%m-%d')</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>
<if test="merge_settle==null">GROUP BY t.order_id</if>
order by t.clearing_time desc

Loading…
Cancel
Save