|
|
@ -21,6 +21,7 @@ import au.com.royalpay.payment.manage.mappers.system.ClientApplyMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientAuditProcessMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientAuditProcessMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientDeviceMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientDeviceMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
@ -147,6 +148,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ClientMapper clientMapper;
|
|
|
|
private ClientMapper clientMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private ClientConfigMapper clientConfigMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
private ClientDeviceMapper clientDeviceMapper;
|
|
|
|
private ClientDeviceMapper clientDeviceMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ClientAccountMapper clientAccountMapper;
|
|
|
|
private ClientAccountMapper clientAccountMapper;
|
|
|
@ -2246,26 +2249,29 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
String pwdHash = PasswordUtils.hashPwd(pwd, salt);
|
|
|
|
String pwdHash = PasswordUtils.hashPwd(pwd, salt);
|
|
|
|
client.put("refund_pwd", pwdHash);
|
|
|
|
client.put("refund_pwd", pwdHash);
|
|
|
|
client.put("refund_pwd_salt", salt);
|
|
|
|
client.put("refund_pwd_salt", salt);
|
|
|
|
clientMapper.update(client);
|
|
|
|
JSONObject record = new JSONObject();
|
|
|
|
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
|
|
|
|
record.put("client_id",client.getIntValue("client_id"));
|
|
|
|
|
|
|
|
record.put("refund_pwd", pwdHash);
|
|
|
|
|
|
|
|
record.put("refund_pwd_salt", salt);
|
|
|
|
|
|
|
|
clientConfigMapper.update(record);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void validRefundPwd(JSONObject account, String pwd) {
|
|
|
|
public void validRefundPwd(JSONObject account, String pwd) {
|
|
|
|
JSONObject client = getClientInfo(account.getIntValue("client_id"));
|
|
|
|
JSONObject clientConfig = clientConfigMapper.find(account.getIntValue("client_id"));
|
|
|
|
String salt = client.getString("refund_pwd_salt");
|
|
|
|
String salt = clientConfig.getString("refund_pwd_salt");
|
|
|
|
String pwdHash = PasswordUtils.hashPwd(pwd, salt);
|
|
|
|
String pwdHash = PasswordUtils.hashPwd(pwd, salt);
|
|
|
|
if (!client.getString("refund_pwd").equals(pwdHash)) {
|
|
|
|
if (!clientConfig.getString("refund_pwd").equals(pwdHash)) {
|
|
|
|
throw new ForbiddenException("Invalid Pwd");
|
|
|
|
throw new ForbiddenException("Invalid Pwd");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void setWeekendDelay(int clientId, boolean delay) {
|
|
|
|
public void setWeekendDelay(int clientId, boolean delay) {
|
|
|
|
JSONObject clientUpdate = new JSONObject();
|
|
|
|
JSONObject record = new JSONObject();
|
|
|
|
clientUpdate.put("client_id", clientId);
|
|
|
|
record.put("client_id", clientId);
|
|
|
|
clientUpdate.put("weekend_delay", delay);
|
|
|
|
record.put("weekend_delay", delay);
|
|
|
|
clientMapper.update(clientUpdate);
|
|
|
|
clientConfigMapper.update(record);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -2658,8 +2664,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
JSONObject updateObj = new JSONObject();
|
|
|
|
JSONObject updateObj = new JSONObject();
|
|
|
|
updateObj.put("client_id", client.getIntValue("client_id"));
|
|
|
|
updateObj.put("client_id", client.getIntValue("client_id"));
|
|
|
|
updateObj.put("paypad_version", paypad_version);
|
|
|
|
updateObj.put("paypad_version", paypad_version);
|
|
|
|
clientMapper.update(updateObj);
|
|
|
|
clientConfigMapper.update(updateObj);
|
|
|
|
clientInfoCacheSupport.clearClientCache(clientId);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -2672,7 +2677,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
JSONObject record = new JSONObject();
|
|
|
|
JSONObject record = new JSONObject();
|
|
|
|
record.put("client_id", client_id);
|
|
|
|
record.put("client_id", client_id);
|
|
|
|
record.put("manual_settle", manual_settle);
|
|
|
|
record.put("manual_settle", manual_settle);
|
|
|
|
clientMapper.update(record);
|
|
|
|
clientConfigMapper.update(record);
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject actClientLog = new JSONObject();
|
|
|
|
JSONObject actClientLog = new JSONObject();
|
|
|
|
actClientLog.put("client_id", client_id);
|
|
|
|
actClientLog.put("client_id", client_id);
|
|
|
@ -2682,8 +2687,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
actClientLog.put("operator_type", type);
|
|
|
|
actClientLog.put("operator_type", type);
|
|
|
|
clientsOperationLogMapper.save(actClientLog);
|
|
|
|
clientsOperationLogMapper.save(actClientLog);
|
|
|
|
|
|
|
|
|
|
|
|
clientInfoCacheSupport.clearClientCache(client_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -2696,8 +2699,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
JSONObject updateObj = new JSONObject();
|
|
|
|
JSONObject updateObj = new JSONObject();
|
|
|
|
updateObj.put("client_id", client.getIntValue("client_id"));
|
|
|
|
updateObj.put("client_id", client.getIntValue("client_id"));
|
|
|
|
updateObj.put("qrcode_surcharge", paySurcharge);
|
|
|
|
updateObj.put("qrcode_surcharge", paySurcharge);
|
|
|
|
clientMapper.update(updateObj);
|
|
|
|
clientConfigMapper.update(updateObj);
|
|
|
|
clientInfoCacheSupport.clearClientCache(clientId);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -2710,8 +2712,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
JSONObject updateObj = new JSONObject();
|
|
|
|
JSONObject updateObj = new JSONObject();
|
|
|
|
updateObj.put("client_id", client.getIntValue("client_id"));
|
|
|
|
updateObj.put("client_id", client.getIntValue("client_id"));
|
|
|
|
updateObj.put("api_surcharge", enableApiSurcharge);
|
|
|
|
updateObj.put("api_surcharge", enableApiSurcharge);
|
|
|
|
clientMapper.update(updateObj);
|
|
|
|
clientConfigMapper.update(updateObj);
|
|
|
|
clientInfoCacheSupport.clearClientCache(clientId);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -2728,8 +2729,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
JSONObject updateObj = new JSONObject();
|
|
|
|
JSONObject updateObj = new JSONObject();
|
|
|
|
updateObj.put("client_id", client.getIntValue("client_id"));
|
|
|
|
updateObj.put("client_id", client.getIntValue("client_id"));
|
|
|
|
updateObj.put("retail_surcharge", paySurcharge);
|
|
|
|
updateObj.put("retail_surcharge", paySurcharge);
|
|
|
|
clientMapper.update(updateObj);
|
|
|
|
clientConfigMapper.update(updateObj);
|
|
|
|
clientInfoCacheSupport.clearClientCache(clientId);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|