修改了商家入驻的功能模块
This commit is contained in:
parent
ea85ad8c34
commit
5203337650
@ -40,15 +40,14 @@ public class MerchantSettlementController {
|
|||||||
/**
|
/**
|
||||||
* 商家入驻
|
* 商家入驻
|
||||||
* @param
|
* @param
|
||||||
* @param businessPhoto
|
* @param
|
||||||
* @param businessLicense
|
* @param
|
||||||
* @param
|
* @param
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/merchantSettlement")
|
@PostMapping("/merchantSettlement")
|
||||||
public String merchantSettlement(@RequestBody Map map, @RequestParam("businessPhoto") MultipartFile businessPhoto,
|
public String merchantSettlement(@RequestBody Map map) throws IOException {
|
||||||
@RequestParam("businessLicense") MultipartFile businessLicense) throws IOException {
|
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
String businessName = (String) map.get("businessName");
|
String businessName = (String) map.get("businessName");
|
||||||
String businessPro = (String) map.get("businessPro");
|
String businessPro = (String) map.get("businessPro");
|
||||||
@ -56,6 +55,8 @@ public class MerchantSettlementController {
|
|||||||
String businessCountry = (String) map.get("businessCountry");
|
String businessCountry = (String) map.get("businessCountry");
|
||||||
String businessAddress = (String) map.get("businessAddress");
|
String businessAddress = (String) map.get("businessAddress");
|
||||||
String businessPhone = (String) map.get("businessPhone");
|
String businessPhone = (String) map.get("businessPhone");
|
||||||
|
String businessPhoto = (String) map.get("businessPhoto");
|
||||||
|
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<BankCardQo> bankCardQos = (List<BankCardQo>) map.get("bankCardQos");
|
||||||
@ -67,6 +68,8 @@ public class MerchantSettlementController {
|
|||||||
businessQo.setBusinessCountry(businessCountry);
|
businessQo.setBusinessCountry(businessCountry);
|
||||||
businessQo.setBusinessAddress(businessAddress);
|
businessQo.setBusinessAddress(businessAddress);
|
||||||
businessQo.setBusinessPhone(businessPhone);
|
businessQo.setBusinessPhone(businessPhone);
|
||||||
|
businessQo.setBusinessPhoto(businessPhoto);
|
||||||
|
businessQo.setBusinessLicense(businessLicense);
|
||||||
businessQo.setBusinessDiscount(businessDiscount);
|
businessQo.setBusinessDiscount(businessDiscount);
|
||||||
businessQo.setHeadIdentifier(headIdentifier);
|
businessQo.setHeadIdentifier(headIdentifier);
|
||||||
String o = (String) redisUtil.get(businessPhone);
|
String o = (String) redisUtil.get(businessPhone);
|
||||||
@ -76,7 +79,7 @@ public class MerchantSettlementController {
|
|||||||
if(!redisUtil.get(businessPhone).equals(verificationCode)){
|
if(!redisUtil.get(businessPhone).equals(verificationCode)){
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_WRONG,"验证码错误,请重新输入!",locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_WRONG,"验证码错误,请重新输入!",locale);
|
||||||
}
|
}
|
||||||
return merchantSettlementService.merchantSettlement(businessQo,businessPhoto,businessLicense,bankCardQos);
|
return merchantSettlementService.merchantSettlement(businessQo,bankCardQos);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,14 +17,14 @@ public interface MerchantSettlementService {
|
|||||||
/**
|
/**
|
||||||
* 商家入驻
|
* 商家入驻
|
||||||
* @param businessQo
|
* @param businessQo
|
||||||
* @param businessPhoto
|
* @param
|
||||||
* @param businessLicense
|
* @param
|
||||||
* @param bankCardQos
|
* @param bankCardQos
|
||||||
* @param businessId
|
* @param
|
||||||
* @return
|
* @return
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
String merchantSettlement(BusinessQo businessQo, MultipartFile businessPhoto, MultipartFile businessLicense, List<BankCardQo> bankCardQos) throws IOException;
|
String merchantSettlement(BusinessQo businessQo, List<BankCardQo> bankCardQos) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过状态查询商家入驻信息
|
* 通过状态查询商家入驻信息
|
||||||
|
@ -41,14 +41,14 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService
|
|||||||
/**
|
/**
|
||||||
* 商家入驻
|
* 商家入驻
|
||||||
* @param businessQo
|
* @param businessQo
|
||||||
* @param businessPhoto
|
* @param
|
||||||
* @param businessLicense
|
* @param
|
||||||
* @param bankCardQos
|
* @param bankCardQos
|
||||||
* @param
|
* @param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String merchantSettlement(BusinessQo businessQo, MultipartFile businessPhoto, MultipartFile businessLicense, List<BankCardQo> bankCardQos) throws IOException {
|
public String merchantSettlement(BusinessQo businessQo, List<BankCardQo> 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){
|
||||||
@ -58,16 +58,6 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService
|
|||||||
if(byBusinessPhone != null){
|
if(byBusinessPhone != null){
|
||||||
return outputEncapsulationObject(PromptMessageEnum.FILE_EXISTS,"您已入驻,请勿重复入驻或提交!",locale);
|
return outputEncapsulationObject(PromptMessageEnum.FILE_EXISTS,"您已入驻,请勿重复入驻或提交!",locale);
|
||||||
}
|
}
|
||||||
if(businessPhoto == null){
|
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"商家图片不能为空!",locale);
|
|
||||||
}
|
|
||||||
if(businessLicense == null){
|
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"营业执照不能为空!",locale);
|
|
||||||
}
|
|
||||||
// 上传商家图片
|
|
||||||
//String busPhoto = PhotoUtil.memoryPhoto(businessPhoto);
|
|
||||||
// 上传商家营业执照
|
|
||||||
//String photo = PhotoUtil.memoryPhoto(businessLicense);
|
|
||||||
for(BankCardQo bankCardQo : bankCardQos){
|
for(BankCardQo bankCardQo : bankCardQos){
|
||||||
Map<String, Object> stringObjectMap = VerifyBankCardUtil.checkBankCar(bankCardQo.getBankCardNumber());
|
Map<String, Object> stringObjectMap = VerifyBankCardUtil.checkBankCar(bankCardQo.getBankCardNumber());
|
||||||
if(!((Boolean) stringObjectMap.get("card")) || "findNotName".equals(stringObjectMap.get("cardName").toString())){
|
if(!((Boolean) stringObjectMap.get("card")) || "findNotName".equals(stringObjectMap.get("cardName").toString())){
|
||||||
@ -95,7 +85,7 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService
|
|||||||
businessEntity.setBusinessType("0");
|
businessEntity.setBusinessType("0");
|
||||||
businessEntity.setSettleInTime(DateTimeUtil.dateTimeToString(LocalDateTime.now()));
|
businessEntity.setSettleInTime(DateTimeUtil.dateTimeToString(LocalDateTime.now()));
|
||||||
businessDao.save(businessEntity);
|
businessDao.save(businessEntity);
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"入驻成功!",locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"提交成功!等待总部审核!",locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user