lyhzzz преди 1 седмица
родител
ревизия
b0b46b6522

+ 18 - 0
src/main/java/com/fdkankan/manage/controller/inner/InnerAPIController.java

@@ -517,4 +517,22 @@ public class InnerAPIController extends BaseController {
 
         return ResultData.ok();
     }
+
+    @Autowired
+    IDictService dictService;
+    @Autowired
+    IDictFileService dictFileService;
+
+    @GetMapping("/traceEvidenceList")
+    public ResultData traceEvidenceList(){
+        List<Dict> dictList = dictService.getByUseType("trace_evidence");
+        return ResultData.ok(dictList);
+    }
+
+    @PostMapping("/traceEvidenceInfoList")
+    public ResultData traceEvidenceInfoList(@RequestBody DictFileParam dictParam){
+        dictParam.setTypeKey("media-library");
+        dictParam.setUseType("trace_evidence");
+        return ResultData.ok(dictFileService.pageList(dictParam));
+    }
 }

+ 2 - 0
src/main/java/com/fdkankan/manage/service/IDictService.java

@@ -23,4 +23,6 @@ public interface IDictService extends IService<Dict> {
     void del(Dict dict);
 
     Object pageList(DictParam param);
+
+    List<Dict> getByUseType(String traceEvidence);
 }

+ 4 - 2
src/main/java/com/fdkankan/manage/service/impl/DictFileServiceImpl.java

@@ -50,7 +50,9 @@ public class DictFileServiceImpl extends ServiceImpl<IDictFileMapper, DictFile>
         if(StringUtils.isBlank(param.getTypeKey())){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
-        param.setSysUserId( Long.valueOf( StpUtil.getLoginId().toString()));
+        if(StpUtil.isLogin()){
+            param.setSysUserId( Long.valueOf( StpUtil.getLoginId().toString()));
+        }
         Page<DictFileVo> pageVo = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
         return PageInfo.PageInfo(pageVo);
     }
@@ -70,7 +72,7 @@ public class DictFileServiceImpl extends ServiceImpl<IDictFileMapper, DictFile>
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
         DictFile byId = this.getById(dictFile.getId());
-        if(byId != null && StringUtils.isNotBlank(byId.getUseType()) && "animation".equals(byId.getUseType())){
+        if(byId != null && StringUtils.isNotBlank(byId.getUseType()) && !"ordinary".equals(byId.getUseType())){
             throw new BusinessException(ResultCode.DEL_ERROR);
         }
 

+ 8 - 1
src/main/java/com/fdkankan/manage/service/impl/DictServiceImpl.java

@@ -79,11 +79,18 @@ public class DictServiceImpl extends ServiceImpl<IDictMapper, Dict> implements I
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
         Dict byId = this.getById(dict.getId());
-        if(byId != null && StringUtils.isNotBlank(byId.getUseType()) && "animation".equals(byId.getUseType())){
+        if(byId != null && StringUtils.isNotBlank(byId.getUseType()) && !"ordinary".equals(byId.getUseType())){
             throw new BusinessException(ResultCode.DEL_ERROR);
         }
         dictFileService.updateDictId(dict.getId(),null);
         this.removeById(dict.getId());
 
     }
+
+    @Override
+    public List<Dict> getByUseType(String traceEvidence) {
+        LambdaQueryWrapper<Dict> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(Dict::getUseType,traceEvidence);
+        return this.list(wrapper);
+    }
 }

+ 14 - 8
src/main/java/com/fdkankan/manage/service/impl/UserServiceImpl.java

@@ -25,6 +25,7 @@ import com.fdkankan.manage.vo.request.UserParam;
 import com.fdkankan.manage.vo.response.ManageLoginResponse;
 import com.fdkankan.manage.vo.response.UserVo;
 import com.fdkankan.redis.util.RedisUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,6 +45,7 @@ import java.util.stream.Collectors;
  * @since 2022-06-16
  */
 @Service
+@Slf4j
 public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements IUserService {
 
     @Autowired
@@ -168,17 +170,21 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
     @Override
     @Transactional(rollbackFor = Exception.class)
     public synchronized void addUcenterUser(UserParam param) {
-        if(  StringUtils.isBlank(param.getPassword())
-            || StringUtils.isBlank(param.getRyId()) || StringUtils.isBlank(param.getRyNo())){
+        if( StringUtils.isBlank(param.getRyId()) || StringUtils.isBlank(param.getRyNo())){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
-        if("jm".equals(manageConfig.getEnvironment())){
-            String  password = AesUtil.desEncrypt(param.getPassword());
-            if(StringUtils.isBlank(password)){
-                throw new BusinessException(ResultCode.PASSWORD_ERROR_G);
+        if(StringUtils.isNotBlank(param.getPassword())){
+            try {
+                String  password = AesUtil.desEncrypt(param.getPassword());
+                if(StringUtils.isBlank(password)){
+                    throw new BusinessException(ResultCode.PASSWORD_ERROR_G);
+                }
+                String passwordMd52 = SecurityUtil.MD52(password);
+                param.setPassword(passwordMd52);
+            }catch (Exception e){
+                log.info("解密失败:{}",param.getPassword());
             }
-            String passwordMd52 = SecurityUtil.MD52(password);
-            param.setPassword(passwordMd52);
+
         }
 
         JyUser jyUser = jyUserService.getByRyId(param.getRyId());

+ 1 - 0
src/main/java/com/fdkankan/manage/vo/request/DictFileParam.java

@@ -15,4 +15,5 @@ public class DictFileParam extends RequestBase{
     private List<Integer> dictIds;
     private Long sysUserId;
     private String useType;
+    private String kno;
 }

+ 7 - 0
src/main/resources/mapper/manage/DictFileMapper.xml

@@ -22,6 +22,13 @@
         <if test="param.typeKey != null and param.typeKey !=''">
             and df.type_key = #{param.typeKey}
         </if>
+        <if test="param.useType != null and param.useType !=''">
+            and df.use_type = #{param.useType}
+        </if>
+        <if test="param.kno != null and param.kno !=''">
+            and df.k_no = #{param.kno}
+        </if>
+
         <if test="param.fileType != null">
             and cu.file_type = #{param.fileType}
         </if>