fix 删除临时方法

master
luoyang 6 years ago
parent 11abda951a
commit 1c0696f412

@ -13,7 +13,5 @@ public interface AliforexcelService {
JSONObject registerAlipayOnlineMerchant();
JSONObject registerAlipayOnlineMerchantTmp();
JSONObject getLessPartnerInfo();
}

@ -140,56 +140,6 @@ public class AliforexcelServiceImpl implements AliforexcelService {
return result;
}
@Override
public JSONObject registerAlipayOnlineMerchantTmp() {
JSONObject result = new JSONObject();
List<String> needRegisterMerchant = new ArrayList<>();
List<String> registerSuccessMerchant = new ArrayList<>();
List<JSONObject> registerFailMerchant = new ArrayList<>();
List<JSONObject> lessInfoMerchant = new ArrayList<>();
List<Integer> useAlipayOnlineMerchant = transactionMapper.useAlipayOnlineClientsTmp();
for (int clientId : useAlipayOnlineMerchant) {
JSONObject client = clientMapper.findClient(clientId);
if (client == null) {
continue;
}
try {
needRegisterMerchant.add(client.getString("client_moniker"));
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);
continue;
}
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant();
Element resultElement = alipayClient.registerOnlineGmsPortal(mch.getPid(), client);
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", resultElement.elementText("error"));
registerFailMerchant.add(exception);
continue;
}
Element responseElement = resultElement.element("response").element("alipay");
if (!StringUtils.equalsIgnoreCase("SUCCESS", responseElement.elementText("result_code"))) {
JSONObject exception = new JSONObject();
exception.put("client_moniker", client.getString("client_moniker"));
exception.put("return_msg", resultElement.elementText("error"));
registerFailMerchant.add(exception);
continue;
}
registerSuccessMerchant.add(client.getString("client_moniker"));
}
result.put("need_register_merchant", needRegisterMerchant);
result.put("success_register_merchant", registerSuccessMerchant);
result.put("fail_register_merchant", registerFailMerchant);
result.put("less_info_merchant", lessInfoMerchant);
return result;
}
@Override
public JSONObject getLessPartnerInfo() {
JSONObject result = new JSONObject();

@ -455,11 +455,6 @@ public class TestController implements ApplicationEventPublisherAware {
return aliforexcelService.registerAlipayOnlineMerchant();
}
@ManagerMapping(value = "/register/alipayOnlineGms/tmp", role = ManagerRole.DEVELOPER, method = RequestMethod.POST)
public JSONObject registerAlipayOnlineMerchantTmp() {
return aliforexcelService.registerAlipayOnlineMerchantTmp();
}
@ManagerMapping(value = "/register/getLessPartnerInfo", role = ManagerRole.DEVELOPER, method = RequestMethod.GET)
public JSONObject getLessPartnerInfo() {
return aliforexcelService.getLessPartnerInfo();

@ -159,6 +159,4 @@ public interface TransactionMapper {
List<JSONObject> getLastDaytransAmount(JSONObject params);
List<Integer> useAlipayOnlineClients();
List<Integer> useAlipayOnlineClientsTmp();
}

@ -1213,9 +1213,4 @@
SELECT DISTINCT client_id FROM pmt_transactions
WHERE order_channel='AlipayOnline'
</select>
<select id="useAlipayOnlineClientsTmp" resultType="java.lang.Integer">
SELECT DISTINCT client_id FROM pmt_transactions
WHERE channel='Alipay' AND order_channel='AlipayOnline'
</select>
</mapper>

@ -425,20 +425,6 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
alert(resp.data.message);
})
};
$scope.registerOnlineGMSTmp = function () {
$scope.totalhide = true;
$scope.selecttotal = false;
$http.post('/dev/register/alipayOnlineGms/tmp').then(function (resp) {
$scope.totalhide = false;
$scope.selecttotal = true;
$scope.need_register_merchant = resp.data.need_register_merchant.toString();
$scope.success_register_merchant = resp.data.success_register_merchant.toString();
$scope.fail_register_merchant = resp.data.fail_register_merchant;
$scope.less_info_merchant = resp.data.less_info_merchant();
}, function (resp) {
alert(resp.data.message);
})
};
$scope.getLessPartnerInfo = function () {
$scope.totalhide = true;
$scope.selecttotal = false;

@ -15,9 +15,6 @@
<div class="box">
<button class="btn btn-primary" ng-click="getLessPartnerInfo()">缺少信息的商户</button>
</div>
<div class="box">
<button class="btn btn-primary" ng-click="registerOnlineGMSTmp()">register temp!</button> <label ng-hide="selecttotal" style="padding-left: 30px">请稍后</label>
</div>
<div class="row" ng-if="need_register_merchant">
<span>需要报备的商户编码</span><p ng-bind="need_register_merchant"></p>
</div>
@ -43,23 +40,4 @@
</tbody>
</table>
</div>
<div class="box-body table-responsive" ng-if="less_info_merchant">
<span>缺少信息的商户编码</span>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>client_moniker</th>
<th>缺少信息</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="client in less_info_merchant">
<td>
{{client.client_moniker}}
</td>
<td ng-bind="client.return_msg"></td>
</tr>
</tbody>
</table>
</div>
</section>
Loading…
Cancel
Save