商户资料

master
liuxinxin 5 years ago
parent 2367e27ed8
commit 8524367385

@ -1,13 +1,7 @@
package au.com.royalpay.payment.manage.merchants.beans;
package au.com.royalpay.payment.manage.compliance_audit.bean;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
/**

@ -0,0 +1,18 @@
package au.com.royalpay.payment.manage.compliance_audit.core;
import au.com.royalpay.payment.manage.compliance_audit.bean.ClientComplianceQuery;
import com.alibaba.fastjson.JSONObject;
/**
* Created by yishuqian on 18/10/2016.
*/
public interface ClientComplianceApply {
JSONObject listClientComplianceApply(JSONObject manager, ClientComplianceQuery apply);
void passComplianceFiles(JSONObject manager, JSONObject passInfo);
void refuseComplianceFiles(JSONObject manager, JSONObject refuseInfo);
JSONObject complianceAuthFile(JSONObject client);
void passComplianceFile(JSONObject manager,int clientId,JSONObject passInfo);
}

@ -1,50 +1,21 @@
package au.com.royalpay.payment.manage.merchants.core.impls;
package au.com.royalpay.payment.manage.compliance_audit.core.impl;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.manage.mappers.system.*;
import au.com.royalpay.payment.manage.merchants.beans.ClientApplyInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientComplianceQuery;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.core.ClientApply;
import au.com.royalpay.payment.manage.merchants.core.ClientComplianceApply;
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport;
import au.com.royalpay.payment.manage.merchants.entity.impls.SourceModify;
import au.com.royalpay.payment.manage.merchants.events.ClientApplyEvent;
import au.com.royalpay.payment.manage.merchants.events.ClientApplyNotifyBDEvent;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.manage.compliance_audit.bean.ClientComplianceQuery;
import au.com.royalpay.payment.manage.compliance_audit.core.ClientComplianceApply;
import au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.utils.PageListUtils;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.data.redis.core.BoundValueOperations;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
@ -121,4 +92,13 @@ public class ClientComplianceApplyImpl implements ClientComplianceApply
return fileJson;
};
@Override
public void passComplianceFile(JSONObject manager, int clientId, JSONObject passInfo) {
JSONObject pass = new JSONObject();
pass.put("operator_id", manager.getString("manager_id"));
pass.put("client_id",clientId);
clientComplianceCompanyMapper.passComplianceFiles(pass);
clientFilesMapper.passComplianceFiles(passInfo.getIntValue("client_id"));
}
}

@ -0,0 +1,59 @@
package au.com.royalpay.payment.manage.compliance_audit.web;
import au.com.royalpay.payment.manage.compliance_audit.bean.ClientComplianceQuery;
import au.com.royalpay.payment.manage.compliance_audit.core.ClientComplianceApply;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.permission.manager.RequireManager;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* Created by yishuqian on 18/10/2016.
*/
@RestController
@RequestMapping("/compliance/audit")
public class ComplianceAuditController
{
@Resource
private ClientComplianceApply clientComplianceApply;
@Resource
private ClientManager clientManager;
@RequestMapping(value = "/listClientCompliances",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public JSONObject clientComplianceList(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, ClientComplianceQuery apply) {
/*return clientApply.listPartnerApply(manager,apply);*/
return clientComplianceApply.listClientComplianceApply(manager,apply);
}
@RequestMapping(value = "/pass/complianceFiles",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public void passCompliances(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, JSONObject passInfo) {
}
@ManagerMapping(value = "/{clientId}/pass/complianceFile", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void addUploadPaymentLogo(@PathVariable int clientId, @RequestBody JSONObject passInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientComplianceApply.passComplianceFile(manager,clientId,passInfo);
}
@RequestMapping(value = "/refuse/complianceFiles",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public void refuseCompliances(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, JSONObject refuseInfo) {
clientComplianceApply.passComplianceFiles(manager,refuseInfo);
}
@RequestMapping(value = "/compliance/clientViewFiles/{client_id}",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public JSONObject searchCompliances(@PathVariable int client_id) {
JSONObject clientId = new JSONObject();
clientId.put("client_id",client_id);
return clientManager.getComplianceFilesForBD(clientId);
}
}

@ -1,21 +0,0 @@
package au.com.royalpay.payment.manage.merchants.core;
import au.com.royalpay.payment.manage.merchants.beans.ClientApplyInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientComplianceQuery;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Created by yishuqian on 18/10/2016.
*/
public interface ClientComplianceApply {
JSONObject listClientComplianceApply(JSONObject manager, ClientComplianceQuery apply);
void passComplianceFiles(JSONObject manager,JSONObject passInfo);
void refuseComplianceFiles(JSONObject manager,JSONObject refuseInfo);
JSONObject complianceAuthFile(JSONObject client);
}

@ -22,6 +22,7 @@ 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.AppMerchantBean;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.compliance_audit.core.ClientComplianceApply;
import au.com.royalpay.payment.manage.dev.bean.TestMerchantAccountInfo;
import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.management.sysconfig.core.impls.PermissionPartnerManagerImpl;

@ -1,8 +1,5 @@
package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper;
import au.com.royalpay.payment.manage.merchants.beans.ClientComplianceQuery;
import au.com.royalpay.payment.manage.merchants.core.ClientComplianceApply;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import com.google.code.kaptcha.Producer;
@ -45,10 +42,6 @@ public class PartnerApplyController {
@Resource
private Producer captchaProducer;
@Resource
private ClientComplianceCompanyMapper clientComplianceCompanyMapper;
@Resource
private ClientComplianceApply clientComplianceApply;
@Resource
private ClientManager clientManager;
@ -78,33 +71,6 @@ public class PartnerApplyController {
return clientApply.listPartnerApply(manager,apply);
}
@RequestMapping(value = "/listClientCompliances",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public JSONObject clientComplianceList(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, ClientComplianceQuery apply) {
/*return clientApply.listPartnerApply(manager,apply);*/
return clientComplianceApply.listClientComplianceApply(manager,apply);
}
@RequestMapping(value = "/pass/complianceFiles",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public void passCompliances(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, JSONObject passInfo) {
clientComplianceApply.passComplianceFiles(manager,passInfo);
}
@RequestMapping(value = "/refuse/complianceFiles",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public void refuseCompliances(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, JSONObject refuseInfo) {
clientComplianceApply.passComplianceFiles(manager,refuseInfo);
}
@RequestMapping(value = "/compliance/clientViewFiles/{client_id}",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public JSONObject searchCompliances(@PathVariable int client_id) {
JSONObject clientId = new JSONObject();
clientId.put("client_id",client_id);
return clientManager.getComplianceFilesForBD(clientId);
}
@RequestMapping(value = "/{client_id}",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public JSONObject getComplianceCompanyDetail(@PathVariable String client_apply_id) {

@ -29,7 +29,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
controller: 'partnerComplianceCompanyDetail',
resolve: {
file: ['$http','$stateParams',function ($http, $stateParams) {
return $http.get('/partners/application/compliance/clientViewFiles/'+ $stateParams.client_id);
return $http.get('/compliance/audit/compliance/clientViewFiles/'+ $stateParams.client_id);
}]
}
})
@ -42,10 +42,11 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
$scope.states = stateMap.configs();
$scope.countries = countryMap.configs();
$scope.params = {};
debugger;
$scope.loadClientCompliance = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/partners/application/listClientCompliances', {params: params}).then(function (resp) {
$http.get('/compliance/audit/listClientCompliances', {params: params}).then(function (resp) {
debugger;
$scope.compliances = resp.data.data;
$scope.pagination = resp.data.pagination;
@ -199,17 +200,19 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
app.controller('partnerComplianceCompanyDetail', ['$rootScope', '$scope', '$http', '$state', '$uibModal', 'commonDialog', 'file', function ($rootScope, $scope, $http, $state, $uibModal, commonDialog, file) {
debugger;
$scope.file = file.data || {};
$scope.filesrc = $scope.file.client_bank_file;
/*未完成*/
$scope.passPartnerComplianceFiles = function () {
$http.put('partners/application/unregister_accounts/' + $scope.account.account_id, $scope.account).then(function (resp) {
$scope.$close();
$http.put('/compliance/audit/'+ $scope.file.client.client_id +'/pass/complianceFile',{}).then(function (resp) {
$scope.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
}
/*
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/upload_payment_logo', {logo_url: $scope.partner.logo_url})
*/
}]);

@ -0,0 +1,61 @@
define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiSelect'], function (angular) {
'use strict';
var app = angular.module('partnerComplianceApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload', 'ui.select']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('partner_compliance_auth', {
url: '/partners/complianceForClient',
templateUrl: 'static/sys/templates/partner_compliance_for_client.html',
controller: 'compliancePartnerForClientCtrl'
}).state('partner_apply.compliance_detail', {
url: '/{client_id}/compliance_detail',
templateUrl: '/static/payment/partner/templates/client_compliance_to_auth.html',
controller: 'partnerComplianceCompanyDetail',
resolve: {
file: ['$http','$stateParams',function ($http, $stateParams) {
return $http.get('/partners/application/compliance/clientViewFiles/'+ $stateParams.client_id);
}]
}
})
}]);
app.controller('compliancePartnerForClientCtrl', ['$scope', '$sce', '$http', '$filter', '$uibModal', 'businessStructuresMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap',
function ($scope, $sce, $http, $filter, $uibModal, businessStructuresMap, industryMap, stateMap, sectorMap, countryMap) {
$scope.pagination = {};
$scope.industries = industryMap.configs()
$scope.states = stateMap.configs();
$scope.countries = countryMap.configs();
$scope.params = {};
$scope.loadClientCompliance = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/partners/application/listClientCompliances', {params: params}).then(function (resp) {
debugger;
$scope.compliances = resp.data.data;
$scope.pagination = resp.data.pagination;
});
};
$scope.loadClientCompliance(1);
}]);
app.controller('partnerComplianceCompanyDetail', ['$rootScope', '$scope', '$http', '$state', '$uibModal', 'commonDialog', 'file', function ($rootScope, $scope, $http, $state, $uibModal, commonDialog, file) {
debugger;
$scope.file = file.data || {};
/*未完成*/
$scope.passPartnerComplianceFiles = function () {
debugger;
$http.put('/partners/application/pass/complianceFiles' + $scope.account.account_id, $scope.account).then(function (resp) {
$scope.$close();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/upload_payment_logo', {logo_url: $scope.partner.logo_url})
}]);
return app;
});
Loading…
Cancel
Save