Merge branch 'hotfix_send_editable_logs_only' into develop

# Conflicts:
#	src/main/java/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.java
master
yixian 6 years ago
commit 1c82e7397b

@ -5,7 +5,7 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>0.2.0-dev</version>
<version>0.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -114,8 +114,8 @@ public class CustomerRewardLogServiceImpl implements CustomerRewardLogService {
}
}
if(channel.equals("Alipay")){
if(cusRewardLogsMapper.takeRewardNotWechat(now,openid,DateFormatUtils.format(now,"yyyy-MM-dd")) > 0){
JSONObject reward = cusRewardLogsMapper.findRewardByFakeOpenId(redpack_openid);
if(cusRewardLogsMapper.takeRewardNotWechat(now,fakeOpenId,DateFormatUtils.format(now,"yyyy-MM-dd")) > 0){
JSONObject reward = cusRewardLogsMapper.findRewardByFakeOpenId(fakeOpenId);
Assert.notNull(reward, "reward is null");
reward.put("openid",openid);
reward.put("status",1);

@ -68,9 +68,9 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
params.put("from", fromStr);
params.put("to", toStr);
List<JSONObject> recentOrders = orderMapper.listOrdersNoPage(params);
int minOrders = config.getIntValue("cheat_monitor.min_orders");
int minOrders = config.getIntValue("cheat_monitor.mch_close_warning_min_orders");
if (recentOrders.size() < minOrders) {
logger.debug("order count:" + recentOrders.size() + " is less than min orders, skip");
logger.debug("order count:{} is less than min orders, skip", recentOrders.size());
return;
}
List<JSONObject> closed = new ArrayList<>();
@ -88,13 +88,13 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
if (lastWarning != null) {
long noDisturbingMinutes = config.getLongValue("cheat_monitor.no_disturbing");
if (System.currentTimeMillis() - lastWarning.getTime() < noDisturbingMinutes * 60_000) {
logger.debug("close order warning: no disturbing " + order.getString("order_id"));
logger.debug("close order warning: no disturbing {}", order.getString("order_id"));
return;
}
}
warningList.put(moniker, new Date());
List<JSONObject> developers = managerMapper.listDetailsByRole(null, ManagerRole.DEVELOPER.getMask());
if(!StringUtils.isEmpty(client.getString("bd_user"))){
if (!StringUtils.isEmpty(client.getString("bd_user"))) {
String[] bds = client.getString("bd_user").split(",");
if (bds.length > 0) {
List<Integer> ids = new LinkedList<>();
@ -107,7 +107,6 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
}
MpWechatApi api = mpWechatApiProvider.getNewPaymentApi();
// List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(clientId);
// for (JSONObject account : accounts) {
@ -131,7 +130,7 @@ public class CloseOrderWarningSender implements ApplicationListener<OrderCloseEv
// }
for (JSONObject developer : developers) {
if(developer.getString("manager_id").equals("141")){
if (developer.getString("manager_id").equals("141")) {
continue;
}
try {

@ -403,6 +403,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
@Override
public List<JSONObject> getXlsx(Date dt, String bank) throws IOException {
List<JSONObject> logs = clearingLogMapper.findByDate(dt);
logs = logs.stream().filter(log -> log.getBooleanValue("editable")).collect(Collectors.toList());
if (logs.isEmpty()) {
throw new NotFoundException();
}
@ -433,6 +434,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
@Override
public List<ABAFile> getAba(Date dt, String bank) {
List<JSONObject> logs = clearingLogMapper.findByDate(dt);
logs = logs.stream().filter(log -> log.getBooleanValue("editable")).collect(Collectors.toList());
if (logs.isEmpty()) {
throw new NotFoundException();
}

@ -176,5 +176,4 @@ public interface TransactionMapper {
List<JSONObject> getClientOrderByTransactionTime(JSONObject params);
List<JSONObject> getLastDaytransAmount(JSONObject params);
}

@ -384,4 +384,5 @@ public interface ClientManager {
void switchPaymentConfigPC(String clientMoniker, HttpServletResponse response) throws IOException;
void partnerCBChannelConfig(String clientMoniker, String channelKey, String channel_id);
}

@ -306,6 +306,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private SysChannelConfigMapper sysChannelConfigMapper;
@Resource
private SmsSender smsSender;
private static final String SOURCE_AGREE_FILE = "source_agree_file";

@ -70,6 +70,13 @@ public class RiskBusinessController {
return riskEvent;
}
@GetMapping(value = "events/{risk_id}/detail")
public JSONObject getRiskEventDetailWithoutTradelogs(@PathVariable("risk_id") String riskId,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject riskEvent = riskBusinessService.getRiskEventDetail(riskId);
return riskEvent;
}
@PostMapping(value = "events")
public void RegisterRiskEvent(@RequestBody JSONObject params,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {

@ -239,6 +239,7 @@ public class SignInController {
String statusKey = signInStatusManager.addVerifyCode(capText);
HttpUtils.setCookie(response, CommonConsts.CODE_KEY, statusKey);
HttpUtils.setCookie(response, "code_expire_time", (System.currentTimeMillis() + 150_000) + "", false);
BufferedImage bi = captchaProducer.createImage(capText);
ServletOutputStream out = response.getOutputStream();
@ -352,20 +353,20 @@ public class SignInController {
return signInStatusManager.customerQRCode();
}
@WechatMapping(value = "/customer_wechat_qrcode/{codeId}", method = RequestMethod.GET,oauthType = WxOauthType.USERINFO)
@WechatMapping(value = "/customer_wechat_qrcode/{codeId}", method = RequestMethod.GET, oauthType = WxOauthType.USERINFO)
public ModelAndView scanCustomerQrcode(@PathVariable String codeId, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject wechatUser) {
signInStatusManager.scanCustomerQrcode(codeId, wechatUser.getString("openid"));
return new ModelAndView("manager_bind_success");
}
@RequestMapping(value = "/customer_wechat_qrcode/{codeId}/check", method = RequestMethod.GET)
public JSONObject getCustomerID(@PathVariable String codeId, HttpServletResponse response,@RequestParam(value = "pay_info",defaultValue = "false") boolean pay_info) {
public JSONObject getCustomerID(@PathVariable String codeId, HttpServletResponse response, @RequestParam(value = "pay_info", defaultValue = "false") boolean pay_info) {
JSONObject result = new JSONObject();
String statusKey = signInStatusManager.getWechatCustomerId(codeId);
if(pay_info){
result = customerPaymentInfoService.selectPaymentInfoByOpenId(statusKey);
if (pay_info) {
result = customerPaymentInfoService.selectPaymentInfoByOpenId(statusKey);
}
HttpUtils.setCookie(response, "CustomerID", statusKey,false);
HttpUtils.setCookie(response, "CustomerID", statusKey, false);
return result;
}
}

@ -74,7 +74,7 @@ public class TradeSecureServiceHanyinImpl implements TradeSecureService {
logger.debug("mk dir:{}", dir);
command.mkdir(dir);
}
String dest = dir + "/"+ file.filename();
String dest = dir + "/" + file.filename();
logger.debug("find dir, start uploading file:{}", dest);
command.put(new ByteArrayInputStream(file.content()), dest);
} catch (IOException | JSchException | SftpException e) {

@ -304,9 +304,9 @@
<div class="panel-heading">商户关单率预警 <span class="small text-red">检测当日订单触发预警将发送告警消息于开发者商户所属BD</span></span></div>
<div class="panel-body">
<div class="form-group col-sm-6">
<label class="control-label col-sm-5">订单数:</label>
<label class="control-label col-sm-5">订单数:</label>
<div class="col-sm-6">
<input class="form-control" ng-model="paymentconfig['cheat_monitor.min_orders']">
<input class="form-control" ng-model="paymentconfig['cheat_monitor.mch_close_warning_min_orders']">
</div>
</div>
<div class="form-group col-sm-6">

@ -33,23 +33,31 @@ define(['angular', 'uiRouter', 'static/commons/angular-ueditor'], function (angu
"style_key":"my_select",
"style_value":""
},
{
"style_key":"my_gray",
"style_value":""
},
{
"style_key":"transaction",
"style_value":""
},
{
//customers report
"style_key":"statistics",
"style_value":""
},
{
//Account
"style_key":"marketing_account",
"style_value":""
},
{
//Customer outline
"style_key":"usergroup",
"style_value":""
},
{
//Compliance check
"style_key":"coupon",
"style_value":""
},

Loading…
Cancel
Save