Merge branch 'develop'

# Conflicts:
#	pom.xml
master
luoyang 5 years ago
commit 081b7fcb67

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.4.15</version> <version>1.4.16</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version> <jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -42,6 +42,7 @@ import au.com.royalpay.payment.manage.merchants.core.*;
import au.com.royalpay.payment.manage.merchants.entity.impls.*; import au.com.royalpay.payment.manage.merchants.entity.impls.*;
import au.com.royalpay.payment.manage.notice.core.MailService; import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils; import au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils;
import au.com.royalpay.payment.manage.rservices.core.RServicesApplyService;
import au.com.royalpay.payment.manage.signin.beans.TodoNotice; import au.com.royalpay.payment.manage.signin.beans.TodoNotice;
import au.com.royalpay.payment.manage.signin.core.ManagerTodoNoticeProvider; import au.com.royalpay.payment.manage.signin.core.ManagerTodoNoticeProvider;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService; import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
@ -310,6 +311,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private GatewayMerchantApply gatewayMerchantApply; private GatewayMerchantApply gatewayMerchantApply;
@Resource @Resource
private RetailRSvcService retailRSvcService; private RetailRSvcService retailRSvcService;
@Resource
private RServicesApplyService rServicesApplyService;
@Resource @Resource
@ -6582,15 +6585,26 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
saveIncrementalService.put("client_id", client.getInteger("client_id")); saveIncrementalService.put("client_id", client.getInteger("client_id"));
saveIncrementalService.put("operator", manager.getString("display_name")); saveIncrementalService.put("operator", manager.getString("display_name"));
saveIncrementalService.put("incremental_mode", incrementalService.getInteger("incremental_mode")); //增值模式1:固定手续费;2:固定金额扣款
saveIncrementalService.put("incremental_rate_value", incrementalService.getInteger("incremental_mode") == 1 ? incrementalService.getString("incremental_rate_value") : 0); saveIncrementalService.put("incremental_mode", incrementalService.getIntValue("incremental_rate_value") == 0 ? 2 : 1);
saveIncrementalService.put("total_incremental_amount", incrementalService.getInteger("incremental_mode") != 1 ? incrementalService.getString("total_incremental_amount") : 0); saveIncrementalService.put("incremental_rate_value", incrementalService.getString("incremental_rate_value"));
saveIncrementalService.put("total_incremental_amount", incrementalService.getString("total_incremental_amount"));
saveIncrementalService.put("title", incrementalService.getString("title"));
if (existIncrementalService == null) { if (existIncrementalService == null) {
clientIncrementalMapper.save(saveIncrementalService); clientIncrementalMapper.save(saveIncrementalService);
if (incrementalService.getBigDecimal("total_incremental_amount").compareTo(new BigDecimal(0)) > 0) {
saveIncrementalService.put("amount", incrementalService.getString("total_incremental_amount"));
saveIncrementalService.put("service_code", "RYCBSM");
String title = incrementalService.getString("title");
if (StringUtils.isBlank(title)) {
title = "RP跨境商城开通费用";
}
saveIncrementalService.put("title", title);
rServicesApplyService.saveDebitDetail(saveIncrementalService, client);
}
} else { } else {
clientIncrementalMapper.update(saveIncrementalService); clientIncrementalMapper.update(saveIncrementalService);
} }
} }
@Override @Override

@ -10,4 +10,6 @@ public interface RServicesApplyService {
void passServicesApply(String applyId, JSONObject manager); void passServicesApply(String applyId, JSONObject manager);
void refuseServicesApply(String applyId, JSONObject manager); void refuseServicesApply(String applyId, JSONObject manager);
void saveDebitDetail(JSONObject applyInfo, JSONObject client);
} }

@ -141,6 +141,12 @@ public class RServicesApplyServiceImpl implements RServicesApplyService {
private void afterPassProcessingApply(JSONObject applyInfo) { private void afterPassProcessingApply(JSONObject applyInfo) {
JSONObject client = clientManager.getClientInfo(applyInfo.getIntValue("client_id")); JSONObject client = clientManager.getClientInfo(applyInfo.getIntValue("client_id"));
saveDebitDetail(applyInfo, client);
sendNotify(applyInfo, client);
}
@Override
public void saveDebitDetail(JSONObject applyInfo, JSONObject client) {
String orderId = "R-" + client.getString("client_moniker") + "-" + applyInfo.getString("service_code") + "-" + DateFormatUtils.format(new Date(), "yyyyMMddHHmmssSSS") + "-" + RandomStringUtils.random(3, true, false).toUpperCase(); String orderId = "R-" + client.getString("client_moniker") + "-" + applyInfo.getString("service_code") + "-" + DateFormatUtils.format(new Date(), "yyyyMMddHHmmssSSS") + "-" + RandomStringUtils.random(3, true, false).toUpperCase();
JSONObject transaction = new JSONObject(); JSONObject transaction = new JSONObject();
transaction.put("org_id", client.getIntValue("org_id")); transaction.put("org_id", client.getIntValue("org_id"));
@ -182,8 +188,6 @@ public class RServicesApplyServiceImpl implements RServicesApplyService {
order.put("status", 7); order.put("status", 7);
order.put("channel", "System"); order.put("channel", "System");
pmtOrderMapper.save(order); pmtOrderMapper.save(order);
sendNotify(applyInfo, client);
} }
private void sendNotify(JSONObject applyInfo, JSONObject client) { private void sendNotify(JSONObject applyInfo, JSONObject client) {

@ -5760,12 +5760,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.initData =function(){ $scope.initData =function(){
$scope.isCreate = angular.copy(params.isCreate); $scope.isCreate = angular.copy(params.isCreate);
if($scope.isCreate){ if($scope.isCreate){
$scope.model.incremental_mode = "1"
$scope.model.channel= angular.copy(params.channelOptions[0]) $scope.model.channel= angular.copy(params.channelOptions[0])
$scope.model.channelOptions= angular.copy(params.channelOptions) $scope.model.channelOptions= angular.copy(params.channelOptions)
}else{ }else{
$scope.model = angular.copy(params.serviceChannel); $scope.model = angular.copy(params.serviceChannel);
$scope.model.incremental_mode = $scope.model.incremental_mode.toString()
} }
} }
$scope.initData(); $scope.initData();

@ -18,19 +18,7 @@
</div> </div>
</div> </div>
<div class="form-group has-feedback" <div class="form-group has-feedback" ng-class="{'has-error':service_form.incremental_rate_value.$invalid && service_form.incremental_rate_value.$dirty}">
ng-class="{'has-error':service_form.incremental_mode.$invalid && service_form.incremental_mode.$dirty}">
<label class="control-label col-sm-4">Mode:</label>
<div class="col-sm-6">
<select class="form-control" name="incrementalMode" id="incrementalMode-input" required
ng-model="model.incremental_mode">
<option value="1">固定手续费</option>
<option value="2">固定金额扣款</option>
</select>
<span ng-messages="service_form.incremental_mode.$error" ng-if="service_form.incremental_mode.$dirty" ng-message="required">Required Field</span>
</div>
</div>
<div class="form-group has-feedback" ng-if="model.incremental_mode==1" ng-class="{'has-error':service_form.incremental_rate_value.$invalid && service_form.incremental_rate_value.$dirty}">
<label class="control-label col-sm-4" style="text-align: right">Rate Value:</label> <label class="control-label col-sm-4" style="text-align: right">Rate Value:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
@ -50,7 +38,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group has-feedback" ng-if="model.incremental_mode==2" ng-class="{'has-error':service_form.total_incremental_amount.$invalid && service_form.total_incremental_amount.$dirty}"> <div class="form-group has-feedback" ng-if="isCreate"
ng-class="{'has-error':service_form.total_incremental_amount.$invalid && service_form.total_incremental_amount.$dirty}">
<label class="control-label col-sm-4" style="text-align: right">Amount:</label> <label class="control-label col-sm-4" style="text-align: right">Amount:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="number" name="total_incremental_amount" stringToNumber2 class="form-control" ng-model="model.total_incremental_amount" <input type="number" name="total_incremental_amount" stringToNumber2 class="form-control" ng-model="model.total_incremental_amount"
@ -62,6 +51,25 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group has-feedback" ng-if="!isCreate">
<label class="control-label col-sm-4" style="text-align: right">Amount:</label>
<div class="col-sm-6">
<input type="number" name="total_incremental_amount" stringToNumber2 class="form-control" ng-model="model.total_incremental_amount"
min="0" maxlength="20" id="total_incremental_amount" readonly>
</div>
</div>
<div class="form-group has-feedback" ng-class="{'has-error':service_form.title.$invalid && service_form.title.$dirty}">
<label class="control-label col-sm-4" style="text-align: right">付费内容(eg:RP跨境商城入门版1年开通费):</label>
<div class="col-sm-6">
<textarea name="title" class="form-control" ng-model="model.title"
maxlength="50" id="title" required></textarea>
<div ng-messages="service_form.title.$error" ng-if="service_form.title.$dirty">
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
</form> </form>
</div> </div>
</div> </div>

Loading…
Cancel
Save