lyhzzz 2 months ago
parent
commit
830c1fb557

+ 5 - 1
src/main/java/com/fdkankan/fusion/controller/DictFileController.java

@@ -1,6 +1,7 @@
 package com.fdkankan.fusion.controller;
 
 
+import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.io.FileUtil;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.OssPath;
@@ -72,7 +73,10 @@ public class DictFileController extends BaseController{
                 throw new BusinessException(ResultCode.DICT_NOT_EXITS);
             }
             dictFile.setSysUserId(dict.getSysUserId());
-            dictFile.setUseType(dict.getUseType());
+        }else {
+            if(dictFile.getId() == null){
+                dictFile.setSysUserId((String) StpUtil.getLoginId());
+            }
         }
         dictFileService.addOrUpdate(dictFile);
         return ResultData.ok();

+ 0 - 1
src/main/java/com/fdkankan/fusion/service/impl/CommonUploadServiceImpl.java

@@ -290,7 +290,6 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
                 throw new BusinessException(ResultCode.DICT_NOT_EXITS);
             }
             dictFile.setSysUserId(dict.getSysUserId());
-            dictFile.setUseType(dict.getUseType());
         }else {
             dictFile.setSysUserId((String) StpUtil.getLoginId());
         }

+ 1 - 3
src/main/java/com/fdkankan/fusion/service/impl/DictFileServiceImpl.java

@@ -55,9 +55,7 @@ public class DictFileServiceImpl extends ServiceImpl<IDictFileMapper, DictFile>
                 || dictFile.getDictId() == null ){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
-        if(dictFile.getId() == null){
-            dictFile.setSysUserId((String) StpUtil.getLoginId());
-        }
+
         this.saveOrUpdate(dictFile);
     }
 

+ 2 - 2
src/main/resources/mapper/fusion/DictFileMapper.xml

@@ -8,10 +8,10 @@
         left join tm_user u on df.sys_user_id = u.id
         where df.rec_status = 'A'
         <if test="param.sysUserId != null">
-            and ( df.sys_user_id = #{param.sysUserId} or df.use_type = 'animation')
+            and ( df.sys_user_id = #{param.sysUserId} or d.use_type = 'animation')
         </if>
         <if test="param.deptId != null and param.deptId != ''">
-            and ( u.dept_id = #{param.deptId} or df.use_type = 'animation')
+            and ( u.dept_id = #{param.deptId} or d.use_type = 'animation')
         </if>
         <if test="param.name != null and param.name !=''">
             and df.name like concat('%',#{param.name}, '%')