Browse Source

代码优化

wangliang 2 years ago
parent
commit
53afa5ac45

+ 1 - 3
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEStudentServiceImpl.java

@@ -142,9 +142,7 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
             try {
             try {
                 student.setBasePhotoPath(filePath);
                 student.setBasePhotoPath(filePath);
                 this.saveOrUpdate(student);
                 this.saveOrUpdate(student);
-                if (Objects.isNull(cacheService.updateStudentAccountCache(student.getId()))) {
-                    cacheService.removeStudentAccountCache(student.getId());
-                }
+                cacheService.updateStudentAccountCache(student.getId());
                 in = file.getInputStream();
                 in = file.getInputStream();
                 ossUtil.upload(true, filePath, in, BinaryUtil.toBase64String(HexUtils.decodeHex(md5)));
                 ossUtil.upload(true, filePath, in, BinaryUtil.toBase64String(HexUtils.decodeHex(md5)));
 //                String url = ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + filePath;
 //                String url = ossUtil.getAliYunOssPublicDomain().getPublicUrl() + File.separator + filePath;