|
|
|
@ -16,9 +16,7 @@ import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientDeviceTokenMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientSettleDelayConfMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientsContractMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.CustomerMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.CustomerRelationAlipayMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
|
|
|
|
@ -30,6 +28,7 @@ import au.com.royalpay.payment.manage.pushMessage.bean.AppManagerMessageBuilder;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.impls.SignInAccountServiceImpl;
|
|
|
|
|
import au.com.royalpay.payment.manage.system.core.ClientContractService;
|
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
|
|
|
|
|
import au.com.royalpay.payment.tools.cms.RoyalPayCMSSupport;
|
|
|
|
|
import au.com.royalpay.payment.tools.device.DeviceSupport;
|
|
|
|
@ -37,9 +36,9 @@ 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.SysConfigManager;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
|
|
import au.com.royalpay.payment.tools.locale.LocaleSupport;
|
|
|
|
|
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
|
|
|
@ -64,7 +63,6 @@ import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.text.DateFormat;
|
|
|
|
@ -138,9 +136,9 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientDeviceTokenMapper clientDeviceTokenMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientRateMapper clientRateMapper;
|
|
|
|
|
private ClientContractService clientContractService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientsContractMapper clientsContractMapper;
|
|
|
|
|
private SysConfigManager sysConfigManager;
|
|
|
|
|
|
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
@ -1338,6 +1336,20 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getCheckClientInfo(JSONObject device) {
|
|
|
|
|
JSONObject result = clientContractService.getClientContractExpire(device.getIntValue("client_id"));
|
|
|
|
|
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
|
|
|
|
|
if(PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER){
|
|
|
|
|
result.put("is_ordinary",true);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
JSONObject file = clientContractService.getOrGenerateSourceAgreement(device.getIntValue("client_id"));
|
|
|
|
|
result.put("file_url", file.getString("file_value"));
|
|
|
|
|
result.put("contract_info",sysConfigManager.getSysConfig().getString("sys_contract_info"));
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static boolean mathchLetterorNum(String str) {
|
|
|
|
|
String regex = "[A-Za-z0-9]{8}";
|
|
|
|
|
return str.matches(regex);
|
|
|
|
|