add 获取合规文件新接口 & 优化登陆返还字段

master
luoyang 5 years ago
parent 06ba4946a1
commit 0e35c2759b

@ -235,6 +235,8 @@ public interface ClientManager {
JSONObject getAuthFiles(JSONObject manager, String clientMoniker);
JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker);
void uploadAuthFiles(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo);
JSONObject getClientsAnalysis(JSONObject manager);

@ -3039,6 +3039,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public JSONObject getAuthFiles(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
List<JSONObject> clientFiles = clientFilesMapper.findClientFile(client.getIntValue("client_id"));
JSONObject fileJson = new JSONObject();
for (JSONObject file : clientFiles) {
fileJson.put(file.getString("file_name"), file.getString("file_value"));
}
return fileJson;
}
@Override
public JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
String[] fileKeys = {"client_bank_file", "client_company_file", "client_id_file", "client_agree_file", "client_apply_file"};
if (client == null) {

@ -531,7 +531,7 @@ public class PartnerManageController {
@ManagerMapping(value = "/{clientMoniker}/file", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER, ManagerRole.SERVANT})
public JSONObject getAuthFiles(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.getAuthFiles(manager, clientMoniker);
return clientManager.getAllAuthFiles(manager, clientMoniker);
}
@ManagerMapping(value = "/{clientMoniker}/file", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER})

@ -630,7 +630,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
for (int i = 0; i < fileKeys.length; i++) {
String fileKey = fileKeys[i];
List<String> clientFileUrl = clientFiles.stream()
.filter(fileJson -> (fileKey.equals(fileJson.getString("file_name")) && (fileJson.getIntValue("status")==0 || fileJson.getIntValue("status")==1)))
.filter(fileJson -> (fileKey.equals(fileJson.getString("file_name")) && (fileJson.getIntValue("status")==1 || fileJson.getIntValue("status")==2)))
.sorted((log1, log2) -> log2.getDate("last_update_date").compareTo(log1.getDate("last_update_date")))
.map(groupBd -> groupBd.getString("file_value"))
.collect(Collectors.toList());
@ -642,7 +642,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
resultFile.add(fileJson);
}else {
List<String> clientBackToFileUrl = clientFiles.stream()
.filter(fileJson -> (fileKey.equals(fileJson.getString("file_name")) && (fileJson.getIntValue("status")==2)))
.filter(fileJson -> (fileKey.equals(fileJson.getString("file_name")) && (fileJson.getIntValue("status")==0 || fileJson.getIntValue("status")==2)))
.sorted((log1, log2) -> log2.getDate("last_update_date").compareTo(log1.getDate("last_update_date")))
.map(groupBd -> groupBd.getString("file_value"))
.collect(Collectors.toList());

Loading…
Cancel
Save