修改了商家入驻的功能模块,修改了接收list参数的方法
This commit is contained in:
parent
b8007ec079
commit
24fa8a0c9d
@ -44,6 +44,7 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
// 手机号登录
|
// 手机号登录
|
||||||
.antMatchers(HttpMethod.POST,"/api/user/loginByPhone").permitAll()
|
.antMatchers(HttpMethod.POST,"/api/user/loginByPhone").permitAll()
|
||||||
.antMatchers(HttpMethod.POST,"/qiNiuUploadFile").permitAll()
|
.antMatchers(HttpMethod.POST,"/qiNiuUploadFile").permitAll()
|
||||||
|
.antMatchers(HttpMethod.POST,"/merchantSettlement").permitAll()
|
||||||
// 所有其它请求需要身份认证
|
// 所有其它请求需要身份认证
|
||||||
.anyRequest().authenticated()
|
.anyRequest().authenticated()
|
||||||
.and()
|
.and()
|
||||||
|
@ -60,7 +60,7 @@ public class MerchantSettlementController {
|
|||||||
String businessLicense = (String) map.get("businessLicense");
|
String businessLicense = (String) map.get("businessLicense");
|
||||||
Double businessDiscount = (Double) map.get("businessDiscount");
|
Double businessDiscount = (Double) map.get("businessDiscount");
|
||||||
String headIdentifier = (String) map.get("headIdentifier");
|
String headIdentifier = (String) map.get("headIdentifier");
|
||||||
List<BankCardQo> bankCardQos = (List<BankCardQo>) map.get("bankCardQos");
|
List<Object> bankCardQos = (List<Object>) map.get("bankCardQos");
|
||||||
String verificationCode = (String) map.get("verificationCode");
|
String verificationCode = (String) map.get("verificationCode");
|
||||||
BusinessQo businessQo = new BusinessQo();
|
BusinessQo businessQo = new BusinessQo();
|
||||||
businessQo.setBusinessName(businessName);
|
businessQo.setBusinessName(businessName);
|
||||||
|
@ -25,7 +25,7 @@ public interface MerchantSettlementService {
|
|||||||
* @return
|
* @return
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
String merchantSettlement(BusinessQo businessQo, List<BankCardQo> bankCardQos) throws IOException;
|
String merchantSettlement(BusinessQo businessQo, List<Object> bankCardQos) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过状态查询商家入驻信息
|
* 通过状态查询商家入驻信息
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.xkrs.service.impl;
|
package com.xkrs.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
|
||||||
import com.aliyuncs.exceptions.ClientException;
|
import com.aliyuncs.exceptions.ClientException;
|
||||||
import com.xkrs.common.encapsulation.PromptMessageEnum;
|
import com.xkrs.common.encapsulation.PromptMessageEnum;
|
||||||
@ -63,7 +65,7 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String merchantSettlement(BusinessQo businessQo, List<BankCardQo> bankCardQos) throws IOException {
|
public String merchantSettlement(BusinessQo businessQo, List<Object> bankCardQos) throws IOException {
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
BusinessEntity byBusinessName = businessDao.findByBusinessName(businessQo.getBusinessName());
|
BusinessEntity byBusinessName = businessDao.findByBusinessName(businessQo.getBusinessName());
|
||||||
if(byBusinessName != null){
|
if(byBusinessName != null){
|
||||||
@ -71,16 +73,18 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService
|
|||||||
}
|
}
|
||||||
BusinessEntity byBusinessPhone = businessDao.findByBusinessPhone(businessQo.getBusinessPhone());
|
BusinessEntity byBusinessPhone = businessDao.findByBusinessPhone(businessQo.getBusinessPhone());
|
||||||
if(byBusinessPhone != null){
|
if(byBusinessPhone != null){
|
||||||
return outputEncapsulationObject(PromptMessageEnum.FILE_EXISTS,"您已入驻,请勿重复入驻或提交!",locale);
|
return outputEncapsulationObject(PromptMessageEnum.FILE_EXISTS,"该手机号已用于入驻,请勿重复使用!",locale);
|
||||||
}
|
}
|
||||||
for(BankCardQo bankCardQo : bankCardQos){
|
for(Object bankCardQo : bankCardQos){
|
||||||
Map<String, Object> stringObjectMap = VerifyBankCardUtil.checkBankCar(bankCardQo.getBankCardNumber());
|
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(bankCardQo));
|
||||||
|
BankCardQo bankCardQo1 = jsonObject.toJavaObject(BankCardQo.class);
|
||||||
|
Map<String, Object> stringObjectMap = VerifyBankCardUtil.checkBankCar(bankCardQo1.getBankCardNumber());
|
||||||
if(!((Boolean) stringObjectMap.get("card")) || "findNotName".equals(stringObjectMap.get("cardName").toString())){
|
if(!((Boolean) stringObjectMap.get("card")) || "findNotName".equals(stringObjectMap.get("cardName").toString())){
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_WRONG,"银行卡信息有误,请检查重新填写!",locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_WRONG,"银行卡信息有误,请检查重新填写!",locale);
|
||||||
}
|
}
|
||||||
BankCardEntity bankCardEntity = new BankCardEntity();
|
BankCardEntity bankCardEntity = new BankCardEntity();
|
||||||
bankCardEntity.setBankCardNumber(bankCardQo.getBankCardNumber());
|
bankCardEntity.setBankCardNumber(bankCardQo1.getBankCardNumber());
|
||||||
bankCardEntity.setAccountBank(bankCardQo.getAccountBank());
|
bankCardEntity.setAccountBank(bankCardQo1.getAccountBank());
|
||||||
bankCardEntity.setBankName(stringObjectMap.get("cardName").toString());
|
bankCardEntity.setBankName(stringObjectMap.get("cardName").toString());
|
||||||
// bankCardEntity.setBusinessId(businessId);
|
// bankCardEntity.setBusinessId(businessId);
|
||||||
bankCardEntity.setBusinessPhone(businessQo.getBusinessPhone());
|
bankCardEntity.setBusinessPhone(businessQo.getBusinessPhone());
|
||||||
|
Loading…
Reference in New Issue
Block a user