Merge branch 'develop'

master
yixian 4 years ago
commit 67c18bddfb

@ -9,20 +9,13 @@ import au.com.royalpay.payment.manage.permission.manager.scanner.PermissionNode;
import au.com.royalpay.payment.manage.permission.manager.scanner.PermissionReader;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.annotation.Resource;
import java.util.*;
/**
* Created by yixian on 2017-02-28.
@ -40,13 +33,13 @@ public class PermissionManagerImpl implements PermissionManager {
List<JSONObject> functions = permissionFunctionMapper.listAll();
Map<String, JSONObject> funcMapFromDB = new HashMap<>();
for (JSONObject func : functions) {
funcMapFromDB.put(func.getString("func_id"), func);
funcMapFromDB.put(func.getString("func_id").toLowerCase(), func);
}
List<PermissionNode> nodes = permissionReader.listFunctions();
for (PermissionNode node : nodes) {
String funcId = node.getFuncId();
if (funcMapFromDB.containsKey(funcId)) {
if (funcMapFromDB.containsKey(funcId.toLowerCase())) {
funcMapFromDB.remove(funcId);
JSONObject func = node.initFuncObject();
func.remove("role");

@ -111,29 +111,29 @@ public class RiskBusinessController {
}
@RequestMapping(value = "/{risk_id}/upload_mail", method = RequestMethod.PUT)
@PutMapping("/{risk_id}/upload_mail")
public void uploadEmail(@PathVariable String risk_id) throws IOException {
riskBusinessService.sendUploadEmail(risk_id);
}
@RequestMapping(value = "/{risk_id}/refuse", method = RequestMethod.PUT)
@PutMapping("/{risk_id}/refuse")
public void refuseEmail(@PathVariable("risk_id") String riskId, @RequestBody JSONObject otherParams) throws IOException {
riskBusinessService.sendRefuseEmail(riskId, otherParams.getString("refuse_description"));
}
@GetMapping(value = "/{risk_id}/material")
@GetMapping("/{risk_id}/material")
public JSONObject getRiskMaterial(@PathVariable("risk_id") String riskId) {
JSONObject param = new JSONObject();
param.put("risk_id", riskId);
return riskBusinessService.getRiskMaterial(param);
}
@GetMapping(value = "/{risk_id}/all_material_info")
@GetMapping("/{risk_id}/all_material_info")
public JSONObject getRiskAlMaterialInfo(@PathVariable("risk_id") String riskId) {
return riskBusinessService.getRiskEventMaterialsRemark(riskId);
}
@PutMapping(value = "/channel/{channel}/permission/{channelFlag}")
@PutMapping("/channel/{channel}/permission/{channelFlag}")
public void updateMerchantChannel(@RequestBody JSONObject params,
@PathVariable("channelFlag") Boolean channelFlag,
@PathVariable("channel") String channel,
@ -149,7 +149,7 @@ public class RiskBusinessController {
riskBusinessService.updateRiskEvent(params, manager);
}
@PutMapping(value = "/partner/{isValid}")
@PutMapping("/partner/{isValid}")
public void updateMerchantValid(@RequestBody JSONObject params,
@PathVariable("isValid") Boolean isValid,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
@ -196,28 +196,28 @@ public class RiskBusinessController {
}
// 更新库中的orderIds
@GetMapping(value = "/complete/real_order_id")
@GetMapping("/complete/real_order_id")
public void completeEventRealOrderIds() {
riskBusinessService.completeEventRealOrderIds();
}
@GetMapping(value = "/delete/event")
@GetMapping("/delete/event")
public void deleteRiskEvent(@RequestParam("risk_id") String riskId) {
riskBusinessService.deleteRiskEvent(riskId);
}
@GetMapping(value = "/update/event/is_send_client")
@GetMapping("/update/event/is_send_client")
public JSONObject updateRiskEventIsSendClient(@RequestParam("risk_id") String riskId) {
return riskBusinessService.updateIsSendClient(riskId);
}
@GetMapping(value = "/complete/event/order_amount")
@GetMapping("/complete/event/order_amount")
public String completeOrderAmount() {
riskBusinessService.completeOrderAmount();
return "SUCCESS";
}
@PutMapping(value = "{risk_id}/remark")
@PutMapping("{risk_id}/remark")
@ResponseBody
public void updateRiskEventRemark(@PathVariable("risk_id") String riskId, @RequestBody JSONObject remark) {
riskBusinessService.updateRiskEventRemark(riskId, remark.getString("remark"));

@ -752,7 +752,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.searchForChargeback = function () {
$scope.riskEvent.order_ids = null;
let channelOrderId = $scope.riskEvent.channel_order_id;
$http.get('/risk/business/chargeback_orders', {channel_order_id: channelOrderId}).then(function (res) {
$http.get('/risk/business/chargeback_orders', {params: {channel_order_id: channelOrderId}}).then(function (res) {
$scope.channel_orders = res.data;
}, function (res) {
commonDialog.alert({type: 'error', title: 'Error', content: res.data.message})

@ -204,6 +204,22 @@
</div>
</div>
</div>
<div class="form-group"
ng-if="riskEvent.order_type == 6 && riskEvent.order_ids">
<label class="control-label col-sm-2"
for="order-ids-input">Platform Transaction ID</label>
<div class="col-sm-8">
<div class="form-control-static" ng-bind="riskEvent.order_ids"></div>
</div>
</div>
<div class="form-group"
ng-if="riskEvent.order_type == 6 && riskEvent.client_moniker">
<label class="control-label col-sm-2"
for="order-ids-input">Client</label>
<div class="col-sm-8">
<div class="form-control-static" ng-bind="riskEvent.client_moniker"></div>
</div>
</div>
<div class="row" ng-if="riskEvent.order_type==6 && channel_orders && !riskEvent.order_ids">
<div class="col-sm-12 table-responsive">
<table class="table table-bordered table-striped">

Loading…
Cancel
Save