Upd:添加微信子商户进件查询接口

master
dulingling 4 years ago
parent 22c641946d
commit 3aa2ed5275

@ -15,7 +15,7 @@ import java.util.List;
*/
@AutoMapper(tablename = "sys_wx_merchant_apply",pkName = "merchant_app_id")
public interface SysWxMerchantApplyMapper {
` `
@Select("SELECT * FROM sys_wx_merchant_apply WHERE client_id = #{client_id} and is_valid = 1")
List<JSONObject> listWxMerchantApplices(@Param("client_id") int client_id, PageBounds pageBounds);

@ -438,6 +438,8 @@ public interface ClientManager {
void changeApplicationSubMerchantById(String clientMoniker, String merchantAppId, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager);
JSONObject querySubMerchantStatus(String clientMoniker,String subMerchantId);
void registerAlipayGms(String clientMoniker, JSONObject manager);
void registerAlipayOnlineGms(String clientMoniker, JSONObject manager);

@ -5695,7 +5695,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
/**
*
* @param clientMoniker
* @param merchantAppId
* @param subMerchantIdApply
* @param manager
*/
@Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public void changeApplicationSubMerchantById(String clientMoniker, String merchantAppId, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
@ -5719,11 +5727,24 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (StringUtils.isNotEmpty(sub_merchant_id)) {
params.put("sub_merchant_id", sub_merchant_id);
sysWxMerchantApplyMapper.updateSubMerchantInfoByMerchantAppId(params);
clearCacheSubMerchantIdApplices(clientMoniker);
} else {
throw new BadRequestException(elem.elementText("return_msg"));
}
}
@Override
public JSONObject querySubMerchantStatus(String clientMoniker,String subMerchantId){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new BadRequestException("partner code is not exists!");
}
Element elem = wxPayClient.querySubMerchant(client.getString("merchant_id"), subMerchantId);
JSONObject object = new JSONObject();
object.put("apply_status", elem.elementText("result_code"));
return object;
}
@Override
public void registerAlipayGms(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);

@ -854,6 +854,11 @@ public class PartnerManageController {
clientManager.changeApplicationSubMerchantById(clientMoniker, merchantAppId,subMerchantIdApply,manager);
}
@ManagerMapping(value = "/{clientMoniker}/get_merchant_ids/{subMerchantId}/status", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public JSONObject querySubMerchantStatus(@PathVariable("clientMoniker") String clientMoniker,@PathVariable("subMerchantId") String subMerchantId){
return clientManager.querySubMerchantStatus(clientMoniker,subMerchantId);
}
@ManagerMapping(value = "/{clientMoniker}/register/alipay_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void registerAlipayGms(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayGms(clientMoniker, manager);

@ -2536,6 +2536,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope.queryWechatSubMerchantIdStatus = function () {
$scope.paymentInfo.sub_merchant_id
$http.get('/sys/partners/'+$scope.paymentInfo.client_moniker+'/get_merchant_ids/'+$scope.paymentInfo.sub_merchant_id+'/status').then(function (resp) {
commonDialog.alert({
title: 'Wechat Apply Status',
content: resp.data.apply_status,
type: 'info'
})
})
}
}]);
app.controller('clientSubMerchantIdLogCtrl', ['$scope', '$http', 'logs', function ($scope, $http, logs) {
$scope.logs = logs.data;
@ -5511,7 +5522,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
});
return;
}
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/get_merchant_ids/'+$scope.subMerchantInfo.merchant_app_id, $scope.subMerchantInfo).then(function (resp) {
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/sub_apply', $scope.subMerchantInfo).then(function (resp) {
$scope.apply_sub_merchant_id = resp.data;
$scope.$close();
if (subMerchantInfo.sub_merchant_id != null) {

@ -10,9 +10,9 @@
<p ng-if="!ctrl.editSubMerchant" class="form-control-static">
{{paymentInfo.sub_merchant_id||'Not Configure'}}
<a role="button" ng-click="ctrl.editSubMerchant=true" ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<a role="button" ng-click="queryWechatSubMerchantIdStatus()"><i class="fa fa-refresh"></i></a>
<i class="fa fa-clock-o text-danger" title="Using temp Sub Merchant ID" ng-if="paymentInfo.temp_sub_merchant"></i>
&nbsp;&nbsp;<span class="small" ng-if="('10'|withRole) &&paymentInfo.sub_merchant_id&&paymentInfo.merchant_id"><b>Merchant ID</b>:{{paymentInfo.merchant_id | choose_merchant_id}}</span>
&nbsp;&nbsp;
<span class="small"
ng-if="('10'|withRole) &&paymentInfo.sub_merchant_id&&paymentInfo.sub_merchant_id_log">
<a class="text-primary" role="button" title="modify logs"

Loading…
Cancel
Save