fix商户合规

master
yangkai 6 years ago
parent 6255041194
commit 59b80bd0b5

@ -349,4 +349,6 @@ public interface ClientManager {
* @param clientId
*/
boolean postponeClientRate(int clientId, String clientMoniker,String nextYearExipryDate);
JSONObject comListPartnerSelection(JSONObject manager, PartnerQuery query);
}

@ -4047,6 +4047,33 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
@Override
public JSONObject comListPartnerSelection(JSONObject manager, PartnerQuery query) {
JSONObject params = query.toJsonParam();
String tempSubMchId = sysConfigManager.getSysConfig().getString("temp_sub_mch_id");
String tempSubMchSource = sysConfigManager.getSysConfig().getString("temp_sub_mch_id_source");
tempSubMchSource = tempSubMchSource == null ? "" : tempSubMchSource;
if (query.isTempMchId()) {
params.put("temp_mch_id", tempSubMchId);
params.put("temp_mch_id_source", tempSubMchSource);
}
PageList<JSONObject> partners = clientMapper.comListPartners(params,
new PageBounds(query.getPage(), query.getLimit(), Order.formString("is_valid.desc,-approve_time.asc,create_time.desc")));
int authDays = PlatformEnvironment.getEnv().authDays();// 快速自助开通申请有效期
for (JSONObject partner : partners) {
String subMerchantId = partner.getString("sub_merchant_id");
if (subMerchantId != null && tempSubMchId != null && tempSubMchId.contains(subMerchantId)
&& !tempSubMchSource.contains(partner.getString("client_moniker"))) {
partner.put("temp_sub_merchant", true);
}
if (partner.getIntValue("approve_result") == 2) {
partner.put("expiry_time", DateUtils.addDays(partner.getDate("approve_time"), authDays));
partner.put("pass_timeout", DateUtils.addDays(partner.getDate("approve_time"), authDays).compareTo(new Date()) < 0);
}
}
return PageListUtils.buildPageListResult(partners);
}
private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) {
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null);

@ -585,4 +585,10 @@ public class PartnerManageController {
clientManager.subRpayMerchantApplication(clientMoniker, merchantInfo,manager);
}
@RequestMapping(value = "/compliance", method = RequestMethod.GET)
@RequireManager(role = { ManagerRole.OPERATOR})
public JSONObject lisPartnersByCompliance(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) {
return clientManager.comListPartnerSelection(manager, query);
}
}

@ -305,7 +305,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.loadPartners = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/sys/partners', {params: params}).then(function (resp) {
$http.get('/sys/partners/compliance', {params: params}).then(function (resp) {
$scope.partners = resp.data.data;
$scope.pagination = resp.data.pagination;
});

Loading…
Cancel
Save