Upd:修復RService详情页刷新丢失数据问题

master
duLingLing 5 years ago
parent caeae03bbf
commit e997842879

@ -7,6 +7,7 @@ import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator; import org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List; import java.util.List;

@ -499,4 +499,11 @@ public interface ClientManager {
* @param incrementalService * @param incrementalService
*/ */
void changeSwitchIncrementalService(String clientMoniker, JSONObject incrementalService,JSONObject manager); void changeSwitchIncrementalService(String clientMoniker, JSONObject incrementalService,JSONObject manager);
/**
*
* @param clientMoniker
* @return
*/
JSONObject partnerIncrementalServiceInfo(String clientMoniker, String incrementalId);
} }

@ -17,6 +17,7 @@ import au.com.royalpay.payment.core.PaymentChannelApi;
import au.com.royalpay.payment.core.exceptions.EmailException; import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException; import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.mappers.SysClientMapper; import au.com.royalpay.payment.core.mappers.SysClientMapper;
import au.com.royalpay.payment.tools.defines.IncrementalChannel;
import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver; import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper; import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean; import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
@ -52,7 +53,6 @@ import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage; import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage;
import au.com.royalpay.payment.tools.connections.mpsupport.exceptions.WechatException; import au.com.royalpay.payment.tools.connections.mpsupport.exceptions.WechatException;
import au.com.royalpay.payment.tools.defines.IncrementalChannel;
import au.com.royalpay.payment.tools.env.PlatformEnvironment; import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
@ -5926,6 +5926,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}}; }};
} }
public JSONObject partnerIncrementalServiceInfo(String clientMoniker,String channel){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject incrementalInfo = clientIncrementalMapper.findByClinetIdAndChannel(client.getInteger("client_id"), channel);
if(incrementalInfo==null){
throw new BadRequestException("Merchant service not opened");
}
return incrementalInfo;
}
public void changePartnerIncrementalService(String clientMoniker, JSONObject incrementalService, JSONObject manager) { public void changePartnerIncrementalService(String clientMoniker, JSONObject incrementalService, JSONObject manager) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker); JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) { if (client == null) {
@ -5972,4 +5984,5 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
existIncrementalService.put("operator", manager.getString("display_name")); existIncrementalService.put("operator", manager.getString("display_name"));
clientIncrementalMapper.update(existIncrementalService); clientIncrementalMapper.update(existIncrementalService);
} }
} }

@ -620,4 +620,16 @@ public class PartnerViewController {
return clientManager.partnerIncrementalService(clientMoniker); return clientManager.partnerIncrementalService(clientMoniker);
} }
/**
*
* @param clientMoniker
* @param channel
* @return
*/
@PartnerMapping(value = "/{clientMoniker}/incremental_service/{channel}/info", method = RequestMethod.GET, roles = {PartnerRole.ADMIN, PartnerRole.MANAGER})
@ResponseBody
public JSONObject getClientIncrementalServiceInfo(@PathVariable("clientMoniker") String clientMoniker, @PathVariable("channel") String channel){
return clientManager.partnerIncrementalServiceInfo(clientMoniker,channel);
}
} }

@ -12,12 +12,13 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}] }]
} }
}).state('partnerIncrementalServiceInfo', { }).state('partnerIncrementalServiceInfo', {
url: '/partner_incremental_service_info', url: '/partner_incremental_service_info?:channel',
templateUrl: '/static/incrementalService/templates/partner_incremental_service_info.html', templateUrl: '/static/incrementalService/templates/partner_incremental_service_info.html',
controller: 'partnerIncrementalServiceInfoCtrl', controller: 'partnerIncrementalServiceInfoCtrl',
params:{ resolve:{
service:null, partner:['$http',function($http){
partner:null return $http.get('/client/partner_info');
}]
} }
}); });
}]); }]);
@ -26,7 +27,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.serviceAll = []; $scope.serviceAll = [];
$scope.channelOptions = []; $scope.channelOptions = [];
$scope.windowHeight = document.body.clientWidth; $scope.windowHeight = document.body.clientWidth;
$scope.clientInfo = angular.copy(partner.data); $scope.clientInfo = partner.data
$scope.initDate = function(){ $scope.initDate = function(){
$http.get("/client/partner_info/"+$scope.clientInfo.client_moniker+"/incremental_service").then(function (res) { $http.get("/client/partner_info/"+$scope.clientInfo.client_moniker+"/incremental_service").then(function (res) {
$scope.serviceAll = res.data.all_service; $scope.serviceAll = res.data.all_service;
@ -35,18 +36,18 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}) })
$scope.channelOptions = res.data.incremental_channel; $scope.channelOptions = res.data.incremental_channel;
}) })
} }
$scope.initDate(); $scope.initDate();
$scope.queryServiceInfo = function(service){
$state.go('partnerIncrementalServiceInfo', {service: service,partner:$scope.clientInfo});
}
}]); }]);
app.controller('partnerIncrementalServiceInfoCtrl',['$scope', '$http', '$state','$stateParams','$filter', '$timeout', 'partnerRefunder', 'orderService', 'commonDialog', app.controller('partnerIncrementalServiceInfoCtrl',['$scope', '$http', '$state','$stateParams','$filter', '$timeout', 'partnerRefunder', 'orderService', 'commonDialog','partner',
function($scope,$http,$state,$stateParams,$filter, $timeout, partnerRefunder, orderService, commonDialog){ function($scope,$http,$state,$stateParams,$filter, $timeout, partnerRefunder, orderService, commonDialog,partner){
$scope.serviceInfo = {} $scope.serviceInfo = {}
$scope.initDate = function () { $scope.initDate = function () {
$scope.serviceInfo = angular.copy($stateParams.service) $http.get("/client/partner_info/"+partner.data.client_moniker+"/incremental_service/"+$stateParams.channel+"/info").then(function(res){
$scope.serviceInfo =res.data
})
} }
$scope.initDate(); $scope.initDate();
$scope.params = {source: $scope.serviceInfo.channel,status: 'PAID', channel :'ALL' ,textType: 'all', datefrom: new Date(), dateto: new Date()}; $scope.params = {source: $scope.serviceInfo.channel,status: 'PAID', channel :'ALL' ,textType: 'all', datefrom: new Date(), dateto: new Date()};

@ -115,10 +115,10 @@
</div> </div>
</div> </div>
<div class="row border-show" style="background-color: #F06101;margin: -5px 0px -1px 0px; border-radius: 2px 1px 8px 8px; width: 100%;margin-left: 0px" > <div class="row border-show" style="background-color: #F06101;margin: -5px 0px -1px 0px; border-radius: 2px 1px 8px 8px; width: 100%;margin-left: 0px" >
<div class="col-md-12 col-sm-12 col-xs-12 service-info-button" <a class="col-md-12 col-sm-12 col-xs-12 service-info-button"
title="点击查看交易详情" ng-click="queryServiceInfo(service)"> title="点击查看交易详情" ui-sref="partnerIncrementalServiceInfo({channel:service.channel})">
查看详情 查看详情
</div> </a>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save