fix 增加商户bd信息

master
luoyang 6 years ago
parent d1e5f4c8ed
commit 3ae2c06286

@ -12,4 +12,6 @@ public interface AliforexcelService {
JSONObject listClients(HttpServletResponse httpResponse, JSONObject manager, AliExcel query);
JSONObject registerAlipayOnlineMerchant();
JSONObject getLessPartnerInfo();
}

@ -110,6 +110,7 @@ public class AliforexcelServiceImpl implements AliforexcelService {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", e.getMessage());
exception.put("bd_name", client.getString("bd_user_name"));
lessInfoMerchant.add(exception);
continue;
}
@ -139,6 +140,30 @@ public class AliforexcelServiceImpl implements AliforexcelService {
return result;
}
@Override
public JSONObject getLessPartnerInfo() {
JSONObject result = new JSONObject();
List<JSONObject> lessInfoMerchant = new ArrayList<>();
List<Integer> useAlipayOnlineMerchant = transactionMapper.useAlipayOnlineClients();
for (int clientId : useAlipayOnlineMerchant) {
JSONObject client = clientMapper.findClient(clientId);
if (client == null) {
continue;
}
try {
checkPartnerInfo(client);
} catch (InvalidParameterException e) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", e.getMessage());
exception.put("bd_name", client.getString("bd_user_name"));
lessInfoMerchant.add(exception);
}
}
result.put("less_info_merchant", lessInfoMerchant);
return result;
}
private void checkPartnerInfo(JSONObject client) {
if (client == null) {
throw new InvalidShortIdException();

@ -454,4 +454,9 @@ public class TestController implements ApplicationEventPublisherAware {
public JSONObject registerAlipayOnlineMerchant() {
return aliforexcelService.registerAlipayOnlineMerchant();
}
@ManagerMapping(value = "/register/getLessPartnerInfo", role = ManagerRole.DEVELOPER, method = RequestMethod.GET)
public JSONObject getLessPartnerInfo() {
return aliforexcelService.getLessPartnerInfo();
}
}

@ -424,6 +424,17 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
}, function (resp) {
alert(resp.data.message);
})
};
$scope.getLessPartnerInfo = function () {
$scope.totalhide = true;
$scope.selecttotal = false;
$http.get('/dev/register/getLessPartnerInfo').then(function (resp) {
$scope.totalhide = false;
$scope.selecttotal = true;
}, function (resp) {
alert(resp.data.message);
})
}
}]);

@ -10,7 +10,10 @@
</section>
<section class="content">
<div class="box">
<button class="btn btn-primary" ng-click="registerOnlineGMS()">register</button> <label ng-hide="selecttotal" style="padding-left: 30px">请稍后</label>
<button class="btn btn-primary" ng-click="registerOnlineGMS()">register</button> <label ng-hide="selecttotal" style="padding-left: 30px">请稍后</label>
</div>
<div class="box">
<button class="btn btn-primary" ng-click="getLessPartnerInfo()">缺少信息的商户</button>
</div>
<div class="row" ng-if="need_register_merchant">
<span>需要报备的商户编码</span><p ng-bind="need_register_merchant"></p>

Loading…
Cancel
Save