master
luoyang 6 years ago
parent 8c5e51982d
commit 48247667ef

@ -99,4 +99,7 @@ public interface ClientMapper {
List<JSONObject> findByhfPayUrlNotNull();
@AutoSql(type = SqlType.UPDATE)
void updateRpayEnterpriseId(@Param("client_id") int clientId, @Param("rpay_enterprise_id") String rpayEnterpriseId);
}

@ -336,6 +336,6 @@ public interface ClientManager {
void updateAllPartnerPassword(String clientMoniker, List<String> emails);
String subRpayMerchantApplication(String clientMoniker, JSONObject manager);
void subRpayMerchantApplication(String clientMoniker, JSONObject manager);
}

@ -3575,7 +3575,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
public String subRpayMerchantApplication(String clientMoniker, JSONObject manager) {
public void subRpayMerchantApplication(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
@ -3602,11 +3602,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
merchantApply.put("business_category", client.getString("royalpayindustry"));
merchantApply.put("merchant_shortname", client.getString("short_name"));
sysRpayMerchantApplyMapper.insertRpayMerchantApply(merchantApply);
clientMapper.updateRpayEnterpriseId(client.getIntValue("client_id"), rpayMerchantInfo.getString("merchantId"));
}else {
throw new BadRequestException("请求失败");
}
return null;
}
@Override

@ -3193,13 +3193,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}]);
app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'businessStructuresMap','$filter', 'commonDialog','timezone', function ($scope, $http, $uibModal, $state, subMerchantInfo, businessStructuresMap,$filter, commonDialog,timezone) {
$scope.wxIndustries = angular.copy(wxMerchantIndustries);
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
$scope.subMerchantInfo.industry = $filter('wxindustries')($scope.subMerchantInfo.industry);
$scope.business_structures = businessStructuresMap.configs();
$scope.timezone = timezone.configs();
$scope.saveRpayAppliy = function (form) {
$scope.errmsg = null;
$scope.merchantInfo = angular.copy(form);
$scope.errmsg = null;
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
@ -3208,20 +3209,31 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
});
return;
}
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', $scope.subMerchantInfo).then(function (resp) {
$scope.apply_sub_merchant_id = resp.data;
$scope.$close();
if (subMerchantInfo.sub_merchant_id != null) {
commonDialog.alert({
title: 'Success',
content: 'Modify Rpay+ Sub Merchant ID successfully',
type: 'success'
});
$state.reload();
}
}, function (resp) {
$scope.errmsg = resp.data.message;
})
angular.forEach(form, function (item, key) {
if(item !=null) {
console.log("++++" + key + item.$name)
}
});
// var str = angular.toJson(form, true);
// console.log("----------" + str);
// $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', $scope.merchantInfo).then(function (resp) {
// $scope.apply_sub_merchant_id = resp.data;
// $scope.$close();
// if (subMerchantInfo.sub_merchant_id != null) {
// commonDialog.alert({
// title: 'Success',
// content: 'Modify Rpay+ Sub Merchant ID successfully',
// type: 'success'
// });
// $state.reload();
// }
// }, function (resp) {
// $scope.errmsg = resp.data.message;
// })
}
}]);

@ -8,6 +8,7 @@
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':subForm.merchant_name.$invalid && subForm.merchant_name.$dirty}">
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
<label class="control-label col-sm-3" for="merchant_name_input">* Company Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.company_name"
@ -45,34 +46,13 @@
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.business_category.$invalid && subForm.business_category.$dirty}">
<label class="control-label col-sm-3" for="business_category_input">* Business Category</label>
<div class="col-sm-8">
<select class="form-control" name="business_category"
ng-model="subMerchantInfo.industry"
id="business_category_input" required
ng-options="industry.value as industry.label for industry in wxIndustries">
<option value="">Please Choose</option>
</select>
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
<div ng-messages="subForm.business_category.$error" ng-if="subForm.business_category.$dirty">
<p class="small text-danger" ng-message="maxLength">More than 50</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="website_input">Website</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.company_website"
type="url" name="website" id="website_input">
type="text" name="website" id="website_input">
</div>
</div>
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
<div class="form-group"
ng-class="{'has-error':subForm.description.$invalid && subForm.description.$dirty}">
<label class="control-label col-sm-3" for="description_input">* Company description</label>
@ -113,7 +93,7 @@
<div class="form-group"
ng-class="{'has-error':subForm.business_structure.$invalid && subForm.business_structure.$dirty}">
<label class="control-label col-sm-2" for="business-structure-input">Business Structure</label>
<label class="control-label col-sm-3" for="business-structure-input">Business Structure</label>
<div class="col-sm-8">
<select class="form-control" name="business_structure" ng-model="subMerchantInfo.business_structure"
id="business-structure-input"
@ -229,6 +209,17 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3" for="timezone-input">TimeZone</label>
<div class="col-sm-8">
<select class="form-control" name="timezone" ng-model="subMerchantInfo.timezone"
id="timezone-input"
ng-options="structure.value as structure.label for structure in timezone">
<option value="">Please Choose</option>
</select>
</div>
</div>

Loading…
Cancel
Save