修改了商家入驻的功能模块
This commit is contained in:
		| @@ -40,15 +40,14 @@ public class MerchantSettlementController { | ||||
|     /** | ||||
|      * 商家入驻 | ||||
|      * @param | ||||
|      * @param businessPhoto | ||||
|      * @param businessLicense | ||||
|      * @param | ||||
|      * @param | ||||
|      * @param | ||||
|      * @param | ||||
|      * @return | ||||
|      */ | ||||
|     @PostMapping("/merchantSettlement") | ||||
|     public String merchantSettlement(@RequestBody Map map, @RequestParam("businessPhoto") MultipartFile businessPhoto, | ||||
|                                      @RequestParam("businessLicense") MultipartFile businessLicense) throws IOException { | ||||
|     public String merchantSettlement(@RequestBody Map map) throws IOException { | ||||
|         Locale locale = LocaleContextHolder.getLocale(); | ||||
|         String businessName = (String) map.get("businessName"); | ||||
|         String businessPro = (String) map.get("businessPro"); | ||||
| @@ -56,6 +55,8 @@ public class MerchantSettlementController { | ||||
|         String businessCountry = (String) map.get("businessCountry"); | ||||
|         String businessAddress = (String) map.get("businessAddress"); | ||||
|         String businessPhone = (String) map.get("businessPhone"); | ||||
|         String businessPhoto = (String) map.get("businessPhoto"); | ||||
|         String businessLicense = (String) map.get("businessLicense"); | ||||
|         Double businessDiscount = (Double) map.get("businessDiscount"); | ||||
|         String headIdentifier = (String) map.get("headIdentifier"); | ||||
|         List<BankCardQo> bankCardQos = (List<BankCardQo>) map.get("bankCardQos"); | ||||
| @@ -67,6 +68,8 @@ public class MerchantSettlementController { | ||||
|         businessQo.setBusinessCountry(businessCountry); | ||||
|         businessQo.setBusinessAddress(businessAddress); | ||||
|         businessQo.setBusinessPhone(businessPhone); | ||||
|         businessQo.setBusinessPhoto(businessPhoto); | ||||
|         businessQo.setBusinessLicense(businessLicense); | ||||
|         businessQo.setBusinessDiscount(businessDiscount); | ||||
|         businessQo.setHeadIdentifier(headIdentifier); | ||||
|         String o = (String) redisUtil.get(businessPhone); | ||||
| @@ -76,7 +79,7 @@ public class MerchantSettlementController { | ||||
|         if(!redisUtil.get(businessPhone).equals(verificationCode)){ | ||||
|             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 businessPhoto | ||||
|      * @param businessLicense | ||||
|      * @param | ||||
|      * @param | ||||
|      * @param bankCardQos | ||||
|      * @param businessId | ||||
|      * @param | ||||
|      * @return | ||||
|      * @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 businessPhoto | ||||
|      * @param businessLicense | ||||
|      * @param | ||||
|      * @param | ||||
|      * @param bankCardQos | ||||
|      * @param | ||||
|      * @return | ||||
|      */ | ||||
|     @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(); | ||||
|         BusinessEntity byBusinessName = businessDao.findByBusinessName(businessQo.getBusinessName()); | ||||
|         if(byBusinessName != null){ | ||||
| @@ -58,16 +58,6 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService | ||||
|         if(byBusinessPhone != null){ | ||||
|             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){ | ||||
|             Map<String, Object> stringObjectMap = VerifyBankCardUtil.checkBankCar(bankCardQo.getBankCardNumber()); | ||||
|             if(!((Boolean) stringObjectMap.get("card")) || "findNotName".equals(stringObjectMap.get("cardName").toString())){ | ||||
| @@ -95,7 +85,7 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService | ||||
|         businessEntity.setBusinessType("0"); | ||||
|         businessEntity.setSettleInTime(DateTimeUtil.dateTimeToString(LocalDateTime.now())); | ||||
|         businessDao.save(businessEntity); | ||||
|         return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"入驻成功!",locale); | ||||
|         return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"提交成功!等待总部审核!",locale); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user