feat:优化
This commit is contained in:
@@ -5,6 +5,7 @@ import com.cool.store.dto.wallet.*;
|
||||
import com.cool.store.http.WalletHttpClientRest;
|
||||
import com.cool.store.request.wallet.*;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -21,13 +22,16 @@ public class WalletApiService {
|
||||
@Resource
|
||||
WalletHttpClientRest walletHttpClientRest;
|
||||
|
||||
@Value("${wallet.url}")
|
||||
private String walletBaseUrl;
|
||||
|
||||
/**
|
||||
* 在平安扫呗系统中,创建签约人账户
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public StoreAccountDTO createStoreAndAccount(CreateStoreAndAccountRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/account/v1/createStoreAndAccount", request, StoreAccountDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/v1/createStoreAndAccount", request, StoreAccountDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,7 +40,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public StoreAccountDTO updateStoreAccount(UpdateStoreAccountRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/account/v1/updateStoreAccount", request, StoreAccountDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/v1/updateStoreAccount", request, StoreAccountDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,7 +49,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public AccountNoDTO createStore(CreateStoreRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/v1/createStoreAndAccount", request, AccountNoDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/v1/createStoreAndAccount", request, AccountNoDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,7 +58,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public AccountAuthenticationDTO authentication(OutStoreIdRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/account/v1/authentication", request, AccountAuthenticationDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/v1/authentication", request, AccountAuthenticationDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +67,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public AccountVerifyDTO openAccount(AccountVerifyRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/account/v1/openAccount", request, AccountVerifyDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/v1/openAccount", request, AccountVerifyDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,7 +76,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public AddTagDTO addTag(AccountAddTagRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/account/v1/addTag", request, AddTagDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/v1/addTag", request, AddTagDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,7 +85,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public List<AccountInfoDTO> getAccountInfo(OutStoreIdRequest request){
|
||||
String accountInfoStr = walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/account/v1/queryAccountInfo", request, String.class);
|
||||
String accountInfoStr = walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/v1/queryAccountInfo", request, String.class);
|
||||
if (StringUtil.isNotEmpty(accountInfoStr)){
|
||||
return JSONObject.parseArray(accountInfoStr, AccountInfoDTO.class);
|
||||
}
|
||||
@@ -94,7 +98,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public LargePaymentDTO largePayment(LargePaymentRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/trans/v1/largePayment", request, LargePaymentDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/trans/v1/largePayment", request, LargePaymentDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,7 +107,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public PaymentDTO largePaymentQuery(PaymentDetailRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/trans/v1/largePaymentQuery", request, PaymentDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/trans/v1/largePaymentQuery", request, PaymentDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,7 +116,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public TransferDTO transfer(TransferRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/trans/v1/transfer", request, TransferDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/trans/v1/transfer", request, TransferDTO.class);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +126,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public WithDrawerDTO withdraw(WithDrawerRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/trans/v1/withdrawer", request, WithDrawerDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/trans/v1/withdrawer", request, WithDrawerDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,7 +135,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public BillDetailDTO getBillDetail(BillDetailRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/trans/v1/billDetail", request, BillDetailDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/trans/v1/billDetail", request, BillDetailDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -140,7 +144,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public BillPageDTO getBillPage(BillPageRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/trans/v1/billPage", request, BillPageDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/trans/v1/billPage", request, BillPageDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,7 +153,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public CompanyListDTO getCompanyInfo(FindPageCompanyRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/base/v1/findPageCompany", request, CompanyListDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/base/v1/findPageCompany", request, CompanyListDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,7 +162,7 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public BankListDTO getBankList(GetBankRequest request) {
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/base/v1/findPageBank", request, BankListDTO.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/base/v1/findPageBank", request, BankListDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -167,11 +171,19 @@ public class WalletApiService {
|
||||
* @return
|
||||
*/
|
||||
public String upholdPwd(UpdatePasswordRequest request){
|
||||
return walletHttpClientRest.postWithSign("https://api.dev.wenmatech.com:443/open/crm/account/v1/upholdPwd", request, String.class);
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/v1/upholdPwd", request, String.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取账户列表信息
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
public AccountPageDTO getAccountList(AccountBatchQueryRequest request){
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/v1/findAccountPage", request, AccountPageDTO.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.service.wallet;
|
||||
|
||||
import com.cool.store.dto.wallet.PaymentDTO;
|
||||
import com.cool.store.request.wallet.*;
|
||||
import com.cool.store.vo.wallet.*;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@@ -58,6 +59,20 @@ public interface WalletService {
|
||||
*/
|
||||
Boolean addTagCallback(AddTagCallbackNoticeRequest request);
|
||||
|
||||
/**
|
||||
* 大额充值 回调接口
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Boolean largePaymentCallback(PaymentDTO request);
|
||||
|
||||
/**
|
||||
* 账户交易回调
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Boolean accountTradeCallback(AccountTradeCallbackRequest request);
|
||||
|
||||
/**
|
||||
* 查询账户列表
|
||||
* @param request 门店idRequest
|
||||
|
||||
@@ -191,6 +191,16 @@ public class WalletServiceImpl implements WalletService {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean largePaymentCallback(PaymentDTO request) {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean accountTradeCallback(AccountTradeCallbackRequest request) {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountInfoVO> getAccountList(StoreShopRequest request) {
|
||||
String storeId = getStoreId(request);
|
||||
|
||||
Reference in New Issue
Block a user