添加了绝商家入驻的请求(审核不通过)的功能模块
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| package com.xkrs.controller; | ||||
|  | ||||
| import com.aliyuncs.exceptions.ClientException; | ||||
| import com.xkrs.common.config.RedisUtil; | ||||
| import com.xkrs.common.encapsulation.PromptMessageEnum; | ||||
| import com.xkrs.common.tool.TokenUtil; | ||||
| @@ -124,7 +125,7 @@ public class MerchantSettlementController { | ||||
|      * @return | ||||
|      */ | ||||
|     @PostMapping("/updatePassBusiness") | ||||
|     public String updatePassBusiness(@RequestBody Map map){ | ||||
|     public String updatePassBusiness(@RequestBody Map map) throws ClientException { | ||||
|         Integer id = (Integer) map.get("id"); | ||||
|         String username = (String) map.get("username"); | ||||
|         String province = (String) map.get("province"); | ||||
| @@ -132,4 +133,17 @@ public class MerchantSettlementController { | ||||
|         String county = (String) map.get("county"); | ||||
|         return merchantSettlementService.updatePassBusiness(id,username,province,city,county); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 拒绝商家入驻的请求(审核不通过) | ||||
|      * @param map | ||||
|      * @return | ||||
|      * @throws ClientException | ||||
|      */ | ||||
|     @PostMapping("/updateNotPassBusiness") | ||||
|     public String updateNotPassBusiness(@RequestBody Map map) throws ClientException { | ||||
|         Integer id = (Integer) map.get("id"); | ||||
|         String phone = (String) map.get("phone"); | ||||
|         return merchantSettlementService.updateNotPassBusiness(id,phone); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -60,9 +60,22 @@ public interface MerchantSettlementService { | ||||
|  | ||||
|     /** | ||||
|      * 对商家入驻进行审核(1审核通过  2审核不通过) | ||||
|      * @param id | ||||
|      * @param | ||||
|      * @param id        商家入驻的id | ||||
|      * @param username | ||||
|      * @param province | ||||
|      * @param city | ||||
|      * @param county | ||||
|      * @return | ||||
|      * @throws ClientException | ||||
|      */ | ||||
|     String updatePassBusiness(Integer id,String username,String province,String city,String county) throws ClientException; | ||||
|  | ||||
|     /** | ||||
|      * 拒绝商家入驻的请求(审核不通过) | ||||
|      * @param id | ||||
|      * @param phone | ||||
|      * @return | ||||
|      * @throws ClientException | ||||
|      */ | ||||
|     String updateNotPassBusiness(Integer id,String phone) throws ClientException; | ||||
| } | ||||
|   | ||||
| @@ -170,10 +170,10 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService | ||||
|     @Override | ||||
|     public String updatePassBusiness(Integer id,String username,String province,String city,String county) throws ClientException { | ||||
|         Locale locale = LocaleContextHolder.getLocale(); | ||||
|         BusinessEntity businessEntity = businessDao.findById(id); | ||||
|         /*BusinessEntity businessEntity = businessDao.findById(id); | ||||
|         if("1".equals(businessEntity.getBusinessType())){ | ||||
|             return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL,"该商家已被审核并已通过审核!",locale); | ||||
|         } | ||||
|         }*/ | ||||
|         String salt = KeyGenerators.string().generateKey(); | ||||
|         SysUserEntity sysUserEntity = new SysUserEntity(); | ||||
|         sysUserEntity.setUserName(username); | ||||
| @@ -211,4 +211,18 @@ public class MerchantSettlementServiceImpl implements MerchantSettlementService | ||||
|  | ||||
|         return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"操作成功!",locale); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 拒绝商家入驻的请求(审核不通过) | ||||
|      * @param id | ||||
|      * @param phone | ||||
|      * @return | ||||
|      */ | ||||
|     @Override | ||||
|     public String updateNotPassBusiness(Integer id, String phone) throws ClientException { | ||||
|         Locale locale = LocaleContextHolder.getLocale(); | ||||
|         SendSmsResponse sendSmsResponse = AliYunSmsUtils.sendSmsToBusinessNotPass(phone); | ||||
|         businessDao.updateNotPassBusiness(id); | ||||
|         return outputEncapsulationObject(PromptMessageEnum.SUCCESS,"操作成功!",locale); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user