Merge branch 'develop'

master
taylor.dang 5 years ago
commit 2859c8bf4c

@ -369,31 +369,35 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (manager != null) { if (manager != null) {
checkClientOrg(manager, client); checkClientOrg(manager, client);
} }
String same_phone = clientMapper.findSamePhone(client.getString("contact_phone")).getString("a"); // 雷同信息检查
if (same_phone != null && client.getString("contact_phone") != null && same_phone.contains(" ")) { try {
same_phone = same_phone.replace(client.getString("client_moniker"), ""); String same_phone = clientMapper.findSamePhone(client.getString("contact_phone")).getString("a");
client.put("same_phone", "(雷同商户:" + same_phone + ")"); if (same_phone != null && client.getString("contact_phone") != null && same_phone.contains(" ")) {
} same_phone = same_phone.replace(client.getString("client_moniker"), "");
client.put("same_phone", "(雷同商户:" + same_phone + ")");
}
String same_company_name = clientMapper.findSameCompanyName(client.getString("company_name")).getString("a"); String same_company_name = clientMapper.findSameCompanyName(client.getString("company_name")).getString("a");
if (same_company_name != null && client.getString("company_name") != null && same_company_name.contains(" ")) { if (same_company_name != null && client.getString("company_name") != null && same_company_name.contains(" ")) {
same_company_name = same_company_name.replace(client.getString("client_moniker"), ""); same_company_name = same_company_name.replace(client.getString("client_moniker"), "");
client.put("same_company_name", "(雷同商户:" + same_company_name + ")"); client.put("same_company_name", "(雷同商户:" + same_company_name + ")");
} }
String same_email = clientMapper.findSameEmail(client.getString("contact_email")).getString("a"); String same_email = clientMapper.findSameEmail(client.getString("contact_email")).getString("a");
if (same_email != null && client.getString("contact_email") != null && same_email.contains(" ")) { if (same_email != null && client.getString("contact_email") != null && same_email.contains(" ")) {
same_email = same_email.replace(client.getString("client_moniker"), ""); same_email = same_email.replace(client.getString("client_moniker"), "");
client.put("same_email", "(雷同商户:" + same_email + ")"); client.put("same_email", "(雷同商户:" + same_email + ")");
} }
String same_address = clientMapper.findSameAddress(client.getString("address")).getString("a"); String same_address = clientMapper.findSameAddress(client.getString("address")).getString("a");
if (same_address != null && client.getString("address") != null && same_address.contains(" ")) { if (same_address != null && client.getString("address") != null && same_address.contains(" ")) {
same_address = same_address.replace(client.getString("client_moniker"), ""); same_address = same_address.replace(client.getString("client_moniker"), "");
client.put("same_address", "(雷同商户:" + same_address + ")"); client.put("same_address", "(雷同商户:" + same_address + ")");
}
} catch (Exception e) {
// donothing
} }
client.putAll(clientConfigService.find(client.getIntValue("client_id"))); client.putAll(clientConfigService.find(client.getIntValue("client_id")));
client.put("unsubscribe", mailUnsubMapper.findOneByClientMoniker(clientMoniker) == null ? false : true); client.put("unsubscribe", mailUnsubMapper.findOneByClientMoniker(clientMoniker) == null ? false : true);
client.put("show_all_permission", true); client.put("show_all_permission", true);

@ -43,7 +43,6 @@ import net.sf.jasperreports.engine.export.ooxml.JRXlsxExporter;
import net.sf.jasperreports.export.*; import net.sf.jasperreports.export.*;
import org.apache.commons.csv.CSVFormat; import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVPrinter; import org.apache.commons.csv.CSVPrinter;
import org.apache.commons.csv.QuoteMode;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -62,7 +61,10 @@ import org.springframework.ui.Model;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.text.DateFormat; import java.text.DateFormat;
@ -545,16 +547,6 @@ public class TradeLogServiceImpl implements TradeLogService {
clientManager.validateClients(clientId, params); clientManager.validateClients(clientId, params);
params.put("client_id", clientId); params.put("client_id", clientId);
List<JSONObject> logs = transactionMapper.listTransFlow(params); List<JSONObject> logs = transactionMapper.listTransFlow(params);
if (clientId != 1563) {
logs.forEach(p -> {
String loginId = p.getString("login_id");
if (StringUtils.isNotEmpty(loginId)) {
p.put("order_detail", (StringUtils.isEmpty(p.getString("order_detail")) ? "" : loginId + ":" + p.getString("order_detail")));
} else {
p.put("order_detail", (StringUtils.isEmpty(p.getString("order_detail")) ? "" : p.getString("order_detail")));
}
});
}
TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy HH:mm:ss", Collections.singletonList("transaction_time")); TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy HH:mm:ss", Collections.singletonList("transaction_time"));
TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy", Collections.singletonList("clearing_time")); TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy", Collections.singletonList("clearing_time"));
@ -1716,12 +1708,7 @@ public class TradeLogServiceImpl implements TradeLogService {
} }
if ("ALL".equals(clientId)) { if ("ALL".equals(clientId)) {
for (JSONObject log : logs) { for (JSONObject log : logs) {
String login_id = log.getString("login_id"); log.put("order_detail", (StringUtils.isEmpty(log.getString("order_detail")) ? "" : log.getString("order_detail")));
if (StringUtils.isNotEmpty(login_id)) {
log.put("order_detail", (StringUtils.isEmpty(log.getString("order_detail")) ? "" : login_id + ":" + log.getString("order_detail")));
} else {
log.put("order_detail", (StringUtils.isEmpty(log.getString("order_detail")) ? "" : log.getString("order_detail")));
}
transType = log.getString("trans_type"); transType = log.getString("trans_type");
if ("refund".equals(transType)) { if ("refund".equals(transType)) {
status = log.getIntValue("status"); status = log.getIntValue("status");

Loading…
Cancel
Save