[fix]修复前端按钮显示,一键下载

master
hellolujian 6 years ago
parent c29d18b0a4
commit c2587d1fa4

@ -9,6 +9,7 @@ import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService;
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskOrderTypeEnum;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
@ -113,13 +114,10 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
if (StringUtils.isNotBlank(orderIds)) {
String[] orderIdArray = orderIds.trim().split(",");
JSONObject query = new JSONObject();
// 获取每笔订单信息
// 获取订单信息
for (int i = 0; i < orderIdArray.length; i++) {
query.put("order_id", orderIdArray[i]);
PageList<JSONObject> logs = orderMapper.listOrders(query, new PageBounds());
if (logs != null && logs.size() != 0) {
tradeLogs.add(logs.get(0));
}
JSONObject orderInfo = orderMapper.findOrderById(orderIdArray[i]);
tradeLogs.add(orderInfo);
}
}
return tradeLogs;
@ -162,7 +160,8 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
for (int i = 1; i <= 10; i++) {
filePath = riskMaterial.getString("file" + i + "_url");
if (filePath != null) {
zos.putNextEntry(new ZipEntry(filePath.substring(filePath.lastIndexOf("/"))));
// 文件名前添加'file' + i是为了防止文件名一样
zos.putNextEntry(new ZipEntry("file" + i + filePath.substring(filePath.lastIndexOf("/"))));
InputStream inputStream = new URL(filePath).openConnection().getInputStream();
byte[] buffer = new byte[1024];
int result = 0;
@ -192,7 +191,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
String emailId = mailService.sendRiskEmail(title, emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","),
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), content, event.getIntValue("order_type")==3?(List<JSONObject>)ctx.getVariable("files"):null,event.getIntValue("order_type"));
event.put("email_status",1);
event.put("result_type",1);
event.put("result_type", RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType());
Integer orderType = event.getInteger("order_type");
if (orderType == RiskOrderTypeEnum.WARNING_ORDER.getOrderType()) {
event.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
}
riskEventMapper.update(event);
} catch (Exception e) {
throw new EmailException("Email Sending Failed", e);
@ -213,7 +216,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
String emailId = mailService.sendRiskEmail("You need to resubmit risk materials", emailsTos.isEmpty() ? "" : StringUtils.join(emailsTos, ","),
emailsCcs.isEmpty() ? "" : StringUtils.join(emailsCcs, ","), content, event.getIntValue("order_type")==3?(List<JSONObject>)ctx.getVariable("files"):null,event.getIntValue("order_type"));
event.put("email_status",2);
event.put("result_type",4);
event.put("result_type",RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType());
riskEventMapper.update(event);
} catch (Exception e) {
throw new EmailException("Email Sending Failed", e);

@ -0,0 +1,27 @@
package au.com.royalpay.payment.manage.riskbusiness.enums;
/**
* @Author lvjian
* @Date 2018/10/16 22:22
*/
public enum RiskEmailStatusEnum {
NOT_SEND(0),
ALREADY_SEND(1),
BACK_AND_SEND(2),
SEND_EMAIL_AGAIN(3),
;
private Integer emailStatus;
RiskEmailStatusEnum(Integer emailStatus) {
this.emailStatus = emailStatus;
}
public Integer getEmailStatus() {
return emailStatus;
}
public void setEmailStatus(Integer emailStatus) {
this.emailStatus = emailStatus;
}
}

@ -5,11 +5,13 @@ package au.com.royalpay.payment.manage.riskbusiness.enums;
* @Date 2018/10/16 20:18
*/
public enum RiskOrderTypeEnum {
WECHAT_ORDER(1),
ALIPAY_ORDER(2),
ROYALPAY_ORDER(3),
WARNING_ORDER(4),
GENERAL_ORDER(5);
GENERAL_ORDER(5)
;
private Integer orderType;

@ -13,17 +13,17 @@ public enum RiskResultTypeEnum {
MATERIAL_NOT_PASS(4),
ALREADY_HANDLED(5);
private Integer orderType;
private Integer resultType;
public Integer getOrderType() {
return orderType;
RiskResultTypeEnum(Integer resultType) {
this.resultType = resultType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
public Integer getResultType() {
return resultType;
}
RiskResultTypeEnum(Integer orderType) {
this.orderType = orderType;
public void setResultType(Integer resultType) {
this.resultType = resultType;
}
}

@ -214,7 +214,10 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
title: 'Warning',
content: 'Please confirm sending mail.'
}).then(function () {
$http.put('/risk/business/' + $scope.riskEvent.risk_id + '/upload_mail').then(function () {
var url = '/risk/business/' + $scope.riskEvent.risk_id + '/upload_mail';
if ($scope.riskEvent.result_type == 1)
url = '/risk/business/' + $scope.riskEvent.risk_id + '/urge';
$http.put(url).then(function () {
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});

@ -6,11 +6,11 @@
<i class="fa fa-cloud-download">一键下载</i>
</a>
<a class="btn-group btn btn-success pull-right"
ng-if="riskEvent.result_type == 2 || riskEvent.result_type == 4"
ng-if="riskEvent.result_type == 2"
ng-click="auditMaterial(3)">通过
</a>
<a class="btn-group btn btn-warning pull-right"
ng-if="riskEvent.result_type == 2 || riskEvent.result_type == 4"
ng-if="riskEvent.result_type == 2"
ng-click="auditMaterial(4)" style="margin: 0 10px">打回
</a>
</div>

@ -51,7 +51,7 @@
<label class="control-label col-sm-2">Sub Merchant ID</label>
<div class="col-sm-10">
<p class="form-control-static"
ng-bind="riskEvent.sub_merchant_id"></p>
ng-bind="clientInfo.sub_merchant_id"></p>
</div>
</div>
@ -117,44 +117,19 @@
</div>
</div>
<!--
<div class="form-group">
<label class="control-label col-sm-2">临时关闭渠道</label>
<div class="col-xs-6">
<input type="checkbox"
ng-if="riskEvent.order_type == '1'"
ng-model="clientInfo.enable_wechat"
bs-switch ng-change="updateChannel(riskEvent.order_type, true)">
<input type="checkbox"
ng-if="riskEvent.order_type == '2'"
ng-model="clientInfo.enable_alipay"
bs-switch ng-change="updateChannel(riskEvent.order_type, true)">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">临时关闭商户</label>
<div class="col-xs-6">
<input type="checkbox"
ng-model="clientInfo.is_valid"
bs-switch ng-change="updateClient(clientInfo.is_valid)">
</div>
</div>
-->
<div ng-if="clientInfo != null">
<div class="form-group" ng-if="riskEvent.result_type <= 2">
<label class="control-label col-sm-2">Operaction</label>
<div class="col-xs-2">
<div class="col-xs-2" ng-if="enableChannel == 1">
<button class="btn btn-info"
type="button"
ng-click="updateChannel(riskEvent.order_type, false, true)">临时关闭渠道
</button>
</div>
<div class="col-xs-2">
<div class="col-xs-2" ng-if="clientInfo.is_valid == 1">
<button class="btn btn-info"
type="button"
ng-click="updateClient(false)">临时关闭商户
ng-click="updateClient(true, true)">临时关闭商户
</button>
</div>
</div>
@ -163,7 +138,9 @@
<div class="form-group">
<label class="control-label col-sm-2">加入商户黑名单</label>
<div class="col-xs-6">
<input type="checkbox" bs-switch ng-model="clientInfo.is_valid" ng-change="updateClient(clientInfo.is_valid)">
<input type="checkbox"
bs-switch
ng-model="clientInfo.is_valid">
</div>
</div>
@ -172,8 +149,7 @@
<div class="col-xs-6">
<input type="checkbox"
ng-model="clientInfo.is_valid"
bs-switch
ng-change="updateClient(clientInfo.is_valid)">
bs-switch>
</div>
</div>
</div>
@ -183,13 +159,13 @@
<div class="col-xs-2" ng-if="riskEvent.temporary_close_channel != 1 && enableChannel == 1">
<button class="btn btn-info"
type="button"
ng-click="updateChannel(riskEvent.order_type, false, true)">关停渠道
ng-click="updateChannel(riskEvent.order_type, false, false)">关停渠道
</button>
</div>
<div class="col-xs-2" ng-if="riskEvent.temporary_close_merchant != 1 && clientInfo.is_valid == 1">
<button class="btn btn-info"
type="button"
ng-click="updateClient(true)">关停商户
ng-click="updateClient(true, false)">关停商户
</button>
</div>
@ -257,7 +233,7 @@
</div>
<a role="button"
ng-if="riskEvent.order_type == 1 || riskEvent.order_type == 2"
ng-if="riskEvent.order_type <= 1"
class="btn btn-info"
ng-click="resendUploadEmail()">Send Email {{riskEvent.result_type == 1 ? 'again' : ''}}
</a>

@ -223,19 +223,7 @@
<td ng-bind="riskEvent.client_moniker"></td>
<td ng-bind="riskEvent.order_type | orderType"></td>
<td>
<span ng-if="riskEvent.result_type != 5">
{{riskEvent.result_type | resultType}}(
<span ng-if="riskEvent.temporary_close_merchant == 1">临时关停商户 </span>
<span ng-if="riskEvent.temporary_close_channel == 1">临时关停渠道 </span>
)
</span>
<span ng-if="riskEvent.result_type == 5">
{{riskEvent.result_type | resultType}}(
<span ng-if="riskEvent.in_merchant_blacklist == 1">加入商户黑名单 </span>
<span ng-if="riskEvent.in_user_blacklist == 1">加入用户黑名单 </span>
)
</span>
{{riskEvent.result_type | resultType}}
</td>
<td ng-bind="riskEvent.sub_merchant_id"></td>
<td ng-bind="riskEvent.email_status | emailStatus"></td>

Loading…
Cancel
Save