Bläddra i källkod

局域网新增用户默认头像

lyhzzz 2 år sedan
förälder
incheckning
c01b6dd7ac

+ 1 - 1
src/main/java/com/fdkankan/manage/common/OssPath.java

@@ -7,7 +7,7 @@ public class OssPath {
     public final static String v4_statusPath = "scene_view_data/%s/data/status.json";
     public final static String localStatusPath = System.getProperty("java.io.tmpdir") +"status.json";   //获取临时文件目录
 
-    public final static String default_head ="/oss/manage/user/newHead.png";
+    public final static String default_head ="manage/user/newHead.png";
 
 
 }

+ 4 - 1
src/main/java/com/fdkankan/manage/service/impl/UserServiceImpl.java

@@ -28,6 +28,7 @@ import com.fdkankan.manage.vo.response.UserVo;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.util.stream.Collectors;
@@ -57,6 +58,8 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
     private LaserService laserService;
     @Autowired
     private ISysUserService sysUserService;
+    @Value("${fyun.host:https://4dkk.4dage.com/}")
+    private String host;
 
     @Override
     public PageInfo pageList(UserParam param) {
@@ -186,7 +189,7 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
         try {
             String passwordMd5 = SecurityUtil.MD5(Base64Converter.decode(Base64Converter.subText(param.getPassword())));
             User user = new User();
-            user.setHead(OssPath.default_head);
+            user.setHead(host + OssPath.default_head);
             user.setPassword(passwordMd5);
             user.setStatus(1);
             user.setIsNotice(1);