Merge remote-tracking branch 'origin/develop' into develop

master
yangkai 6 years ago
commit dda910806a

@ -336,13 +336,13 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
event.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
}
riskEventMapper.update(event);
if(event.getIntValue("is_send_client") == 1){
sendAppRiskMessage(event);
}
} catch (Exception e) {
throw new EmailException("Email Sending Failed", e);
}
});
if(event.getIntValue("order_type")==3){
sendAppRiskMessage(event);
}
}
private void sendAppRiskMessage(JSONObject event){
@ -501,16 +501,20 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
ctx.setVariable("royalpay_order_type", event.getIntValue("royalpay_order_type"));
ctx.setVariable("warning_order_type", event.getIntValue("warning_order_type"));
ctx.setVariable("description", event.getString("description"));
//String[] orderIds = event.getString("order_ids").split(",");
String[] realOrderIds = event.getString("real_order_ids").split(",");
String realOrderIdsStr = event.getString("real_order_ids");
String[] realOrderIds = {};
if (StringUtils.isNotBlank(realOrderIdsStr)) {
realOrderIds = event.getString("real_order_ids").split(",");
}
List<JSONObject> orders = new ArrayList();
int isSendClient = event.getIntValue("is_send_client");
switch (event.getIntValue("order_type")){
case 1:
case 2:
for(String orderId : realOrderIds){
JSONObject order = orderMapper.findOrderById(orderId,client.getIntValue("client_id"));
if(order==null){
throw new BadRequestException("Order: "+orderId+" not exists");
throw new BadRequestException("Order: " + orderId + " not exists");
}
orders.add(order);
}
@ -543,8 +547,12 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
// ctx.setVariable("files",attachList);
case 4:
ctx.setVariable("title","RoyalPay风控调查 — " + client.getString("short_name"));
ctx.setVariable("emailsCcs", bdEmails);
ctx.setVariable("emailsTos", clientEmails);
ctx.setVariable("emailsTos", bdEmails);
if (isSendClient == 1) {
ctx.setVariable("emailsTos", clientEmails);
ctx.setVariable("emailsCcs", bdEmails);
}
break;
}
return ctx;

@ -40,7 +40,7 @@ public class RiskUploadServiceIpml implements RiskUploadService {
@Override
public void submitMaterial(JSONObject material) {
JSONObject event = riskEventMapper.findById(material.getString("risk_id"));
material.put("update_time", DateFormatUtils.format(new Date(), "yyyy-MM-dd hh:mm:ss"));
material.put("update_time", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
riskMaterialMapper.save(material);
material.put("material_id",riskMaterialMapper.findAllMaterials(material.getString("risk_id")).get(0).getString("material_id"));
for(int i=1;i<=10;i++){

@ -95,6 +95,11 @@ public class RiskBusinessController {
return riskBusinessService.getRiskMaterial(param);
}
@GetMapping(value = "/{risk_id}/all_material_info")
public JSONObject getRiskAlMaterialInfo(@PathVariable("risk_id") String riskId) {
return riskBusinessService.getRiskEventMaterialsRemark(riskId);
}
@PutMapping(value = "/channel/{channel}/permission/{channelFlag}")
public void updateMerchantChannel(@RequestBody JSONObject params,
@PathVariable("channelFlag") Boolean channelFlag,

@ -670,6 +670,20 @@ public class TradeLogServiceImpl implements TradeLogService {
if (transFlow.getJSONArray("data").size() > 0) {
try {
List<JSONObject> dataList = (List<JSONObject>) transFlow.get("data");
String transType;
int status;
for (JSONObject data : dataList) {
transType = data.getString("trans_type");
if (!"refund".equals(transType))
continue;
status = data.getIntValue("status");
if (status == 6)
transType = "Partly " + transType;
else if (status == 7) {
transType = "Fully " + transType;
}
data.put("trans_type", transType);
}
JSONObject parmerters = new JSONObject();
parmerters.put("dateFrom", StringUtils.isNotBlank(query.getDatefrom()) ? query.getDatefrom() : "");
parmerters.put("dateTo", StringUtils.isNotBlank(query.getDateto()) ? query.getDateto() : DateFormatUtils.format(new Date(), "yyyyMMdd"));

@ -51,6 +51,7 @@
<select id="listTransFlow" resultType="com.alibaba.fastjson.JSONObject">
SELECT t.*,
o.status,
ifnull(o.client_order_id,'--') client_order_id,
if(t.channel='Settlement','clearing',
if(t.transaction_type='Credit','payment','refund')) trans_type,

@ -493,7 +493,11 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.loadRiskMaterial = function() {
$http.get('/risk/business/' + $scope.riskEvent.risk_id + '/material').then(function(resp) {
$scope.material = resp.data;
})
});
$http.get('/risk/business/' + $scope.riskEvent.risk_id + '/all_material_info').then(function(resp) {
$scope.allMaterialInfo = resp.data;
});
};
// BD是否可上传
@ -606,13 +610,19 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}
};
var array=new Array();
var validIndex = 0;
$scope.combineMaterials = function() {
for (var i = 0; i < $scope.materials.length; i++) {
var value = $scope.materials[i].value;
if (value == '')
continue;
var cr = {};
cr['question'+(i+1)] = $scope.materials[i].value;
array[i] = cr;
cr['question' + (validIndex + 1)] = $scope.materials[i].value;
array[validIndex] = cr;
validIndex++;
}
console.log(JSON.stringify(array));
if (array.length == 0)
return null;
return JSON.stringify(array);
};

@ -210,9 +210,8 @@
</div>
</div>
<div class="form-group"ng-repeat="material in materials"
ng-if="riskEvent.order_type == 2"
ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}">
<div class="form-group" ng-repeat="material in materials"
ng-if="riskEvent.order_type == 2">
<label class="control-label col-sm-2"
for="material{{$index+1}}">Material{{$index + 1}}
@ -223,9 +222,7 @@
type="text"
name="material{{$index+1}}"
id="material{{$index+1}}"
required
ng-pattern="/^[a-zA-Z0-9]+$/"
>
required>
</div>
<div class="col-sm-2">
<a class="text-success" ng-click="increase($index)"><i class="fa fa-plus-circle" style="width: 30px"></i></a>

Loading…
Cancel
Save