瀏覽代碼

线上bug修复

ZhuDeKang 2 月之前
父節點
當前提交
98ce9b78f9

+ 7 - 13
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceController.java

@@ -56,7 +56,7 @@ public class PtServiceController extends BaseController {
     private IPtServiceRunLogService serviceRunLogService;
 
     @Autowired
-    private IMdModelInfoService  mdModelInfoService;
+    private IMdModelInfoService mdModelInfoService;
 
     private static final Logger log = LoggerFactory.getLogger(PtServiceController.class);
 
@@ -80,11 +80,11 @@ public class PtServiceController extends BaseController {
         boolean save = ptServiceService.save(ptService);
 
         MdModelInfo mdModelInfo = mdModelInfoService.selectMdModelInfoByMdid(ptService.getMdid());
-        if ("1".equals(mdModelInfo.getAudit())){ //模型以审核通过
+        if ("1".equals(mdModelInfo.getAudit())) { //模型以审核通过
             mdModelInfo.setAudit("3");
             mdModelInfoService.audit(mdModelInfo);
         }
-        if ("1".equals(mdModelInfo.getPublish())){ //模型以更新通过
+        if ("1".equals(mdModelInfo.getPublish())) { //模型以更新通过
             mdModelInfo.setPublish("3");
             mdModelInfoService.publish(mdModelInfo);
         }
@@ -197,7 +197,7 @@ public class PtServiceController extends BaseController {
     }
 
     @GetMapping("/state")
-    public AjaxResult state(PtService service){
+    public AjaxResult state(PtService service) {
         return success(ptServiceService.state(service));
     }
 
@@ -208,7 +208,7 @@ public class PtServiceController extends BaseController {
         PtService service = Optional.ofNullable(ptServicePage.getData()).orElse(new PtService());
         service.setStatus("1");
         List<PtService> list = ptServiceMapper.selectAllPublic(ptServicePage.getData());
-        list.forEach(p->{
+        list.forEach(p -> {
             p.setDevelopContacter(sm4Util.decrypt(p.getDevelopContacter()));
             p.setMaintainContacer(sm4Util.decrypt(p.getMaintainContacer()));
             p.setAdName(sm4Util.decrypt(p.getAdName()));
@@ -238,15 +238,14 @@ public class PtServiceController extends BaseController {
         ptService.setAdName(sm4Util.encrypt(ptService.getAdName()));
 
 
-
         MdModelInfo mdModelInfo = mdModelInfoService.selectMdModelInfoByMdid(ptService.getMdid());
 
 
-        if ("1".equals(mdModelInfo.getAudit())){ //模型以审核通过
+        if ("1".equals(mdModelInfo.getAudit())) { //模型以审核通过
             mdModelInfo.setAudit("3");
             mdModelInfoService.audit(mdModelInfo);
         }
-        if ("1".equals(mdModelInfo.getPublish())){ //模型以审核通过
+        if ("1".equals(mdModelInfo.getPublish())) { //模型以审核通过
             mdModelInfo.setPublish("3");
             mdModelInfoService.publish(mdModelInfo);
         }
@@ -281,11 +280,6 @@ public class PtServiceController extends BaseController {
         ptServiceLog.setExecTm(
                 DateUtils.getNowDate().getTime() - nowDate.getTime());
         ptServiceLog.setReturnData(map.get("result"));
-        if (null == map.get("status") || !map.get("status").equals("200")) {
-            ptServiceLog.setSenState("0");
-            serviceRunLogService.insertPtServiceRunLog(ptServiceLog);
-            return new AjaxResult(HttpStatus.HTTP_ERROR, "测试出错,请检查参数与路由");
-        }
         ptServiceLog.setSenState("1");
         serviceRunLogService.insertPtServiceRunLog(ptServiceLog);
         return success(map.get("result"));

+ 2 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtTreeCateController.java

@@ -162,11 +162,13 @@ public class PtTreeCateController extends BaseController {
         ptTreeCate.setTreeType("APP");
         String level = StringUtils.isNull(ptTreeCate.getParams().get("level")) ? "3" : ptTreeCate.getParams().get("level").toString();
         String devkind = StringUtils.isNull(ptTreeCate.getParams().get("devkind")) ? null : ptTreeCate.getParams().get("devkind").toString();
+        String mdAudit = StringUtils.isNull(ptTreeCate.getParams().get("mdAudit")) ? null : ptTreeCate.getParams().get("mdAudit").toString();
 
         List<PtTreeCate> ptTreeCates = ptTreeCateService.selectPtTreeCateList(ptTreeCate).stream().peek(item -> item.setNodeType("TREE")).collect(Collectors.toList());
         if (level.equals("2") || level.equals("3")) {
             MdModelInfo modelPar = new MdModelInfo();
             modelPar.setDevkind(devkind);
+            modelPar.setAudit(mdAudit);
             List<MdModelInfo> mdModelInfos = mdModelInfoService.selectMdModelInfoList(modelPar);
             for (MdModelInfo mdModelInfo : mdModelInfos) {
                 if (StringUtils.isNotNull(mdModelInfo.getMdid()) && StringUtils.isNotNull(mdModelInfo.getCateid())

+ 6 - 5
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdModelInfoServiceImpl.java

@@ -42,11 +42,12 @@ public class MdModelInfoServiceImpl implements IMdModelInfoService {
     @Override
     public MdModelInfo selectMdModelInfoByMdid(String mdid) {
         MdModelInfo mdModelInfo = mdModelInfoMapper.selectMdModelInfoByMdid(mdid);
-        mdModelInfo.setEnname(sm4Util.decrypt(mdModelInfo.getEnname()));
-        mdModelInfo.setMdContact(sm4Util.decrypt(mdModelInfo.getMdContact()));
-        mdModelInfo.setDevUnit(sm4Util.decrypt(mdModelInfo.getDevUnit()));
-        mdModelInfo.setDevContact(sm4Util.decrypt(mdModelInfo.getDevContact()));
-
+        if (StringUtils.isNotNull(mdModelInfo)) {
+            mdModelInfo.setEnname(sm4Util.decrypt(mdModelInfo.getEnname()));
+            mdModelInfo.setMdContact(sm4Util.decrypt(mdModelInfo.getMdContact()));
+            mdModelInfo.setDevUnit(sm4Util.decrypt(mdModelInfo.getDevUnit()));
+            mdModelInfo.setDevContact(sm4Util.decrypt(mdModelInfo.getDevContact()));
+        }
         return mdModelInfo;
     }
 

+ 1 - 2
ruoyi-api-patform/src/main/resources/mapper/interfaces/MdDataSetFileMapper.xml

@@ -38,7 +38,7 @@
         DC_CODE,
         FILE_PATH,
         ORIGINAL_FILENAME,
-        FILE_TYPE
+        FILE_TYPE,
         create_by,
         create_time
         from md_data_set_file_log
@@ -78,7 +78,6 @@
             <if test="fileType != null">FILE_TYPE,</if>
             <if test="createBy != null">create_by,</if>
             create_time,
-
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="dcCode != null">#{dcCode},</if>

+ 1 - 0
ruoyi-api-patform/src/main/resources/mapper/interfaces/MdModelPargroupMapper.xml

@@ -22,6 +22,7 @@
     <select id="selectMdModelPargroupList" parameterType="com.ruoyi.interfaces.domain.MdModelPargroup" resultMap="MdModelPargroupResult">
         <include refid="selectMdModelPargroupVo"/>
         <where>
+            <if test="mdid != null  and mdid != ''"> and mdid = #{mdid}</if>
             <if test="parGroupCode != null  and parGroupCode != ''"> and PAR_GROUP_CODE = #{parGroupCode}</if>
             <if test="parGroupNote != null  and parGroupNote != ''"> and PAR_GROUP_NOTE = #{parGroupNote}</if>
             <if test="createby != null "> and CREATEBY = #{createby}</if>

+ 1 - 1
ruoyi-api-patform/src/main/resources/mapper/interfaces/SnailJobMapper.xml

@@ -61,7 +61,7 @@
                description,
                ext_attrs,
                deleted
-        from SNAIL_JOB.sj_job
+        from SNAIL_JOB.SJ_JOB
     </sql>
     <select id="selectJobList" resultType="com.ruoyi.interfaces.domain.Job">
         <include refid="selectJobVo"></include>