fix 优化商户新增增值服务,增加新增付费debit

master
luoyang 5 years ago
parent 698ec55577
commit c65b6a257d

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.4.15</version>
<version>1.4.16</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<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.notice.core.MailService;
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.core.ManagerTodoNoticeProvider;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
@ -310,6 +311,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private GatewayMerchantApply gatewayMerchantApply;
@Resource
private RetailRSvcService retailRSvcService;
@Resource
private RServicesApplyService rServicesApplyService;
@Resource
@ -6582,15 +6585,26 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
saveIncrementalService.put("client_id", client.getInteger("client_id"));
saveIncrementalService.put("operator", manager.getString("display_name"));
saveIncrementalService.put("incremental_mode", incrementalService.getInteger("incremental_mode"));
saveIncrementalService.put("incremental_rate_value", incrementalService.getInteger("incremental_mode") == 1 ? incrementalService.getString("incremental_rate_value") : 0);
saveIncrementalService.put("total_incremental_amount", incrementalService.getInteger("incremental_mode") != 1 ? incrementalService.getString("total_incremental_amount") : 0);
//增值模式1:固定手续费;2:固定金额扣款
saveIncrementalService.put("incremental_mode", incrementalService.getIntValue("incremental_rate_value") == 0 ? 2 : 1);
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) {
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 {
clientIncrementalMapper.update(saveIncrementalService);
}
}
@Override

@ -10,4 +10,6 @@ public interface RServicesApplyService {
void passServicesApply(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) {
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();
JSONObject transaction = new JSONObject();
transaction.put("org_id", client.getIntValue("org_id"));
@ -182,8 +188,6 @@ public class RServicesApplyServiceImpl implements RServicesApplyService {
order.put("status", 7);
order.put("channel", "System");
pmtOrderMapper.save(order);
sendNotify(applyInfo, client);
}
private void sendNotify(JSONObject applyInfo, JSONObject client) {

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

@ -18,19 +18,7 @@
</div>
</div>
<div class="form-group has-feedback"
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}">
<div class="form-group has-feedback" 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>
<div class="col-sm-6">
<div class="input-group">
@ -50,7 +38,8 @@
</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>
<div class="col-sm-6">
<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 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>
</div>
</div>
@ -69,4 +77,4 @@
<div class="modal-footer">
<button class="btn btn-success" type="button" ng-click="save(service_form)" ng-disabled="ctrl.sending">Submit</button>
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
</div>
</div>

Loading…
Cancel
Save