add 商户签名增加ip、id、时间、设备信息字段,正式上线

master
luoyang 5 years ago
parent 4eb2ec656d
commit 13b7e81472

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.1.34</version>
<version>1.1.35</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

@ -202,7 +202,7 @@ public interface RetailAppService {
JSONObject getSourceAggregateFile(JSONObject device);
JSONObject getClientAggregateFile(JSONObject device, MultipartFile file) throws IOException;
JSONObject getClientAggregateFile(JSONObject device, MultipartFile file, String ua) throws IOException;
List<JSONObject> uploadGreenChannelAuthFiles(JSONObject device, ClientAuthFilesInfo filesInfo);

@ -48,6 +48,7 @@ import au.com.royalpay.payment.tools.device.message.AppMessage;
import au.com.royalpay.payment.tools.device.message.AppMsgSender;
import au.com.royalpay.payment.tools.device.support.DeviceRegister;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.RequestEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
@ -2315,7 +2316,7 @@ public class RetailAppServiceImp implements RetailAppService {
}
@Override
public JSONObject getClientAggregateFile(JSONObject device,MultipartFile file) throws IOException{
public JSONObject getClientAggregateFile(JSONObject device,MultipartFile file, String userAgent) throws IOException{
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
@ -2323,6 +2324,8 @@ public class RetailAppServiceImp implements RetailAppService {
throw new BadRequestException("Please Enter Full Name");
}
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
account.put("signature_ip", RequestEnvironment.getClientIp());
account.put("user_agent", userAgent);
return clientManager.getClientAggregateFile(account, file);
}

@ -750,8 +750,8 @@ public class RetailAppController {
* @param file url
*/
@RequestMapping(value = "/client/aggregate_file", method = RequestMethod.POST)
public JSONObject getClientAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestParam MultipartFile file) throws IOException {
return retailAppService.getClientAggregateFile(device, file);
public JSONObject getClientAggregateFile(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestParam MultipartFile file, @RequestHeader("User-Agent") String ua) throws IOException {
return retailAppService.getClientAggregateFile(device, file, ua);
}
/**

@ -3500,16 +3500,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (aggregateFiles != null && aggregateFiles.size() > 0) {
clientFilesMapper.deleteAggreeByClientId(clientId);
}
String signatureAccountId = StringUtils.isNotBlank("account_id")?manager.getString("account_id"):manager.getString("manager_id");
JSONObject fileJson = new JSONObject();
fileJson.put("client_id", clientId);
fileJson.put("last_update_date", new Date());
fileJson.put("last_update_by", manager.getString("display_name"));
fileJson.put("file_name", fileType);
fileJson.put("file_value", fileValue);
fileJson.put("signature_time", new Date());
fileJson.put("signature_ip", manager.getString("signature_ip"));
fileJson.put("user_agent", manager.getString("user_agent"));
fileJson.put("signature_account_id", signatureAccountId);
fileJson.put("status", 0);
fileJson.put("is_valid", 1);
clientFilesMapper.save(fileJson);
logger.info(clientId + "的合同文件上传成功" + fileJson.getString("file_id"));
logger.info("{}合同文件上传成功IP:{},us-agent:{},signature_id:{}",clientId,manager.getString("signature_ip"),manager.getString("user_agent"),signatureAccountId);
JSONObject file = new JSONObject();
file.put("file_id", fileJson.getString("file_id"));
file.put("file_value", fileJson.getString("file_value"));

@ -20,6 +20,7 @@ import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.WxOauthType;
import au.com.royalpay.payment.tools.env.RequestEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.http.HttpUtils;
@ -38,6 +39,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
@ -587,7 +589,9 @@ public class PartnerViewController {
@PartnerMapping(value = "/clientCompliance/{clientMoniker}/commit_aggregate_file", method = RequestMethod.POST)
@ResponseBody
public JSONObject getClientArregateFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestParam MultipartFile file) throws IOException {
public JSONObject getClientArregateFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestParam MultipartFile file, @RequestHeader("User-Agent") String userAgent, HttpServletRequest request) throws IOException {
account.put("signature_ip", RequestEnvironment.getClientIp());
account.put("user_agent", userAgent);
return clientManager.getClientAggregateFile(account, file);
}

@ -166,7 +166,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
client.putAll(clientConfigService.find(client_id));
client = clientInfoWithNoSecretInfo(client);
client.put("client_less_file", false);
if (client.getIntValue("client_id") == 9 &&(client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10 || client.getIntValue("approve_result") ==1 || client.getIntValue("open_status") == 5) && client.getIntValue("source")!=4) {
if ((client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10 || client.getIntValue("approve_result") ==1 || client.getIntValue("open_status") == 5) && client.getIntValue("source")!=4) {
List<JSONObject> clientFiles = clientFilesMapper.findAllClientFile(client.getIntValue("client_id"));
if (clientFiles != null && clientFiles.size() > 0) {
clientFiles = clientFiles.stream().filter(fileJson -> ((fileJson.getIntValue("status") == 1 || fileJson.getIntValue("status") == 2))).collect(Collectors.toList());
@ -644,7 +644,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
JSONObject result = new JSONObject();
result.put("client_less_file", false);
result.put("put_fail_pdf", "https://file.royalpay.com.au/open/2019/08/28/1566959635986_P1GuvCkuWINPhUJUqUQnz8E0u6Lgpx.pdf");
if (client.getIntValue("client_id") == 9 &&(client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10 || client.getIntValue("approve_result") == 1 || client.getIntValue("open_status") == 5) && client.getIntValue("source")!=4) {
if ((client.getIntValue("approve_result") == 2 || client.getIntValue("open_status") == 10 || client.getIntValue("approve_result") == 1 || client.getIntValue("open_status") == 5) && client.getIntValue("source")!=4) {
List<JSONObject> clientFiles = clientFilesMapper.findAllClientFile(client.getIntValue("client_id"));
boolean clientFilesIsLess = false;
for (int i = 0; i < FILE_KEYS.length; i++) {

@ -157,11 +157,11 @@
<div class="form-control-static">
<a role="button" class="btn btn-primary"
ng-if="file.client_agree_file.file_value && file.file_company.status != 0 && file.file_company.status!=1 && file.client_less_file"
ui-sref="compliance_contract">Resign The Contract
ui-sref="compliance_contract">Resign The Agreement
</a>
<a role="button" class="btn btn-primary"
ng-if="!file.client_agree_file.file_value && file.file_company.status != 0 && file.file_company.status!=1 && file.client_less_file"
ui-sref="compliance_contract">Sign The Contract</a>
ui-sref="compliance_contract">Sign The Agreement</a>
<a ng-if="file.client_agree_file.file_value" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{file.client_agree_file.file_value[0].file_value}}"
target="_blank"><i class="fa fa-download"></i></a>

@ -111,7 +111,7 @@
<div class="polaroid">
<div class="rotate_left" style="display: none" id="loading_logo">
<img class="dh" src="static/images/r_logo.svg" alt="RoyalPay" style="width:150px;height:150px;margin-top: 10%;margin-bottom: 10%;"/>
<p style="color: black;font-size: 15px;">The Contract Is In The Process Of Being Made</p>
<p style="color: black;font-size: 15px;">The Agreement Is In The Process Of Being Made</p>
</div>
</div>

Loading…
Cancel
Save