Aslee пре 4 година
родитељ
комит
24e1e67b19

+ 2 - 2
src/main/java/com/caimei/config/ApiConfig.java

@@ -12,7 +12,7 @@ import javax.annotation.Resource;
  * @author : Aslee
  * @date : 2021/5/18
  */
-//@Configuration
+@Configuration
 public class ApiConfig implements WebMvcConfigurer {
     @Resource
     private ApiInterceptor apiInterceptor;
@@ -25,7 +25,7 @@ public class ApiConfig implements WebMvcConfigurer {
                 .addPathPatterns("/auth/**")
                 .addPathPatterns("/shop/**")
                 .addPathPatterns("/upload/**")
-                .addPathPatterns("/update/password");
+                .addPathPatterns("/user/update/password");
 //                .excludePathPatterns("/order/shareCode");
     }
 }

+ 3 - 1
src/main/java/com/caimei/service/impl/ShopServiceImpl.java

@@ -85,7 +85,7 @@ public class ShopServiceImpl implements ShopService {
             // 短信发送失败重试一次
             AliyunSmsUtil.sendSms(mobile, 14, "{password:\"" + newPassword + "\"}");
         }
-        log.info("正品联盟后台供应商重置密码,用户id:" + authUserId + ",新密码:" + newPassword);
+        log.info("供应商重置密码,用户id:" + authUserId + ",新密码:" + newPassword);
         return ResponseJson.success("密码重置成功");
     }
 
@@ -202,10 +202,12 @@ public class ShopServiceImpl implements ShopService {
             }
             // 插入供应商用户
             shopMapper.insertShop(shop);
+            log.info("添加供应商,供应商用户id:" + shop.getAuthUserId() + ",密码:" + password);
         } else {
             shop.setAuthUserId(shopSaveDto.getAuthUserId());
             // 更新供应商用户
             shopMapper.updateShopByUserId(shop);
+            log.info("更新供应商,供应商用户id:" + shop.getAuthUserId());
         }
         /*
             组装供应商信息数据

+ 2 - 3
src/main/java/com/caimei/service/impl/UserServiceImpl.java

@@ -90,7 +90,7 @@ public class UserServiceImpl implements UserService {
             return ResponseJson.error("修改失败,只能修改自己账户的密码!");
         }
         // 参数校验
-        if (authUserId == null) {
+        if (null == authUserId) {
             return ResponseJson.error("用户id不能为空");
         }
         if (StringUtils.isBlank(oldPassword)) {
@@ -114,8 +114,7 @@ public class UserServiceImpl implements UserService {
         // 更新密码
         newPassword = Md5Util.md5(newPassword);
         userMapper.updatePasswordByUserId(authUserId, newPassword);
-        // 清除token
-        // redisService.remove();
+        log.info("用户修改密码,用户id:" + authUserId + ",新密码:" + newPassword);
         return ResponseJson.success("密码修改成功");
     }