Commit 661b107dd0a96f798d90d14b3dbce9614b14bfa4
Merge branch 'dev' of http://101.95.0.106:8888/youxiw20000/trash into dev
Showing
5 changed files
with
7 additions
and
4 deletions
trash-admin/src/main/resources/application-dev.yml
| ... | ... | @@ -9,6 +9,7 @@ trash: |
| 9 | 9 | # 实例演示开关 |
| 10 | 10 | demoEnabled: true |
| 11 | 11 | # 文件路径 示例( Windows配置D:/trash/uploadPath,Linux配置 /home/trash/uploadPath,存储桶 trash/uploadPath,nginx配置 /trash/upload) |
| 12 | +# profile: D:/trash/uploadPath | |
| 12 | 13 | # profile: E:/trash/uploadPath |
| 13 | 14 | profile: F:/work/project/Documents/uploadPath/trash |
| 14 | 15 | # 获取ip地址开关 | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/controller/GarbageUserController.java
| ... | ... | @@ -50,8 +50,8 @@ public class GarbageUserController { |
| 50 | 50 | @GetMapping("/send/verify") |
| 51 | 51 | public Result<?> sendVerify(@RequestParam("tel") String tel) { |
| 52 | 52 | try { |
| 53 | - garUserService.sendVerify(tel); | |
| 54 | - return Result.OK(); | |
| 53 | + String code = garUserService.sendVerify(tel); | |
| 54 | + return Result.OK(code); | |
| 55 | 55 | } catch (Exception e) { |
| 56 | 56 | e.printStackTrace(); |
| 57 | 57 | return Result.ERROR(); | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/vo/OrderDetailVo.java
trash-garbage/src/main/java/com/trash/garbage/service/GarUserService.java
| ... | ... | @@ -20,7 +20,7 @@ public interface GarUserService extends IService<GarUser> { |
| 20 | 20 | |
| 21 | 21 | String login(LoginDto user); |
| 22 | 22 | |
| 23 | - void sendVerify(String tel) throws ClientException; | |
| 23 | + String sendVerify(String tel) throws ClientException; | |
| 24 | 24 | |
| 25 | 25 | List<GarAddress> queryAddress(String type); |
| 26 | 26 | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserServiceImpl.java
| ... | ... | @@ -122,7 +122,7 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser> |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | @Override |
| 125 | - public void sendVerify(String tel) throws ClientException { | |
| 125 | + public String sendVerify(String tel) throws ClientException { | |
| 126 | 126 | //随机生成6位数字验证码 |
| 127 | 127 | String validateCode = ValidateCodeUtil.generatorCode(4); |
| 128 | 128 | //给用户发送验证码 |
| ... | ... | @@ -130,6 +130,7 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser> |
| 130 | 130 | // 保存redis |
| 131 | 131 | System.out.println("code:" + validateCode); |
| 132 | 132 | redisCache.setCacheObject(GlobalRedisProperties.REDIS_USER_CODE.getValue() + tel, validateCode, 60, TimeUnit.SECONDS); |
| 133 | + return validateCode; | |
| 133 | 134 | } |
| 134 | 135 | |
| 135 | 136 | @Override | ... | ... |