Sfoglia il codice sorgente

模型、服务审核

ZhuDeKang 5 mesi fa
parent
commit
f92644fcdf
21 ha cambiato i file con 732 aggiunte e 702 eliminazioni
  1. 8 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdModelInfoController.java
  2. 27 13
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceController.java
  3. 80 115
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceLogController.java
  4. 14 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelInfo.java
  5. 8 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtService.java
  6. 137 51
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtServiceLog.java
  7. 3 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/MdModelInfoMapper.java
  8. 55 42
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/PtServiceLogMapper.java
  9. 3 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/PtServiceMapper.java
  10. 2 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/IMdModelInfoService.java
  11. 63 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/IPtServiceLogService.java
  12. 0 15
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/PtServiceLogService.java
  13. 2 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/PtServiceService.java
  14. 2 4
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/InterfaceAuthServiceImpl.java
  15. 6 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/MdModelInfoServiceImpl.java
  16. 78 13
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceLogServiceImpl.java
  17. 12 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceServiceImpl.java
  18. 2 5
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/StatisticsServiceImpl.java
  19. 143 124
      ruoyi-api-patform/src/main/resources/mapper/interfaces/MdModelInfoMapper.xml
  20. 69 316
      ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceLogMapper.xml
  21. 18 3
      ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceMapper.xml

+ 8 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdModelInfoController.java

@@ -7,6 +7,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.core.page.TableSupport;
 import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.ServletUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -82,6 +83,7 @@ public class MdModelInfoController extends BaseController {
         if (StringUtils.isNull(mdModelInfo.getName()))return error("【模型名称】不可为空");
         if (StringUtils.isNull(mdModelInfo.getEnname()))return error("【模型英文名称】不可为空");
         mdModelInfo.setRegUser(getUsername());
+        mdModelInfo.setAudit("0");
         return AjaxResult.success(mdModelInfoService.insertMdModelInfo(mdModelInfo));
     }
 
@@ -106,4 +108,10 @@ public class MdModelInfoController extends BaseController {
     public AjaxResult remove(@PathVariable String[] mdids) {
         return toAjax(mdModelInfoService.deleteMdModelInfoByMdids(mdids));
     }
+
+    @GetMapping("/audit")
+    public AjaxResult audit(String[] mdids,String audit){
+        return success(mdModelInfoService.audit(mdids,audit));
+    }
+
 }

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

@@ -6,6 +6,8 @@ import com.github.pagehelper.PageInfo;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.JsonUtils;
 import com.ruoyi.interfaces.core.page.Page;
 import com.ruoyi.interfaces.core.page.PageParam;
 import com.ruoyi.interfaces.core.page.PageUtils;
@@ -13,20 +15,14 @@ import com.ruoyi.interfaces.domain.*;
 import com.ruoyi.interfaces.domain.vo.MdModelInfoVo;
 import com.ruoyi.interfaces.mapper.PtServiceMapper;
 import com.ruoyi.interfaces.mapper.PtServiceParamMapper;
-import com.ruoyi.interfaces.service.IPtServiceReturnService;
-import com.ruoyi.interfaces.service.PtServiceFileService;
-import com.ruoyi.interfaces.service.PtServiceService;
-import com.ruoyi.interfaces.service.SysCateService;
+import com.ruoyi.interfaces.service.*;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
+import java.util.*;
 
 @RestController
 @RequestMapping("/pt/service")
@@ -50,6 +46,9 @@ public class PtServiceController extends BaseController {
     @Autowired
     private PtServiceFileService ptServiceFileService;
 
+    @Autowired
+    private IPtServiceLogService ptServiceLogService;
+
     @ApiOperation("添加数据")
     @PostMapping(value = "/save")
     public AjaxResult save(@RequestBody PtService ptService) {
@@ -77,7 +76,7 @@ public class PtServiceController extends BaseController {
         }
         return AjaxResult.success();
     }
-    
+
     @ApiOperation("数据列表")
     @RequestMapping(value = "/cate_list", method = RequestMethod.GET)
     public List<SysCate> list(String tabName) {
@@ -88,11 +87,12 @@ public class PtServiceController extends BaseController {
 
     /**
      * 获取模型关联服务列表
+     *
      * @param par
      * @return
      */
     @GetMapping("/modelService")
-    public AjaxResult modelService(MdModelInfoVo par){
+    public AjaxResult modelService(MdModelInfoVo par) {
         return AjaxResult.success(ptServiceService.modelService(par));
     }
 
@@ -177,17 +177,31 @@ public class PtServiceController extends BaseController {
     }
 
     @PutMapping()
-    public AjaxResult put(@RequestBody PtService ptService){
+    public AjaxResult put(@RequestBody PtService ptService) {
         return AjaxResult.success(ptServiceService.put(ptService));
     }
 
+
+
     @PostMapping("/testRun")
     public AjaxResult testRun(@RequestBody PtService ptService) throws IOException {
 
-        return success(ptServiceService.testRun(ptService));
-    }
+        PtServiceLog ptServiceLog = new PtServiceLog(ptService);
+        Date nowDate = DateUtils.getNowDate();
+        ptServiceLog.setTm(nowDate);
 
+        String s = ptServiceService.testRun(ptService);
 
+        ptServiceLog.setExecTm(
+                DateUtils.getNowDate().getTime() - nowDate.getTime());
+        ptServiceLog.setReturnText(s);
+        ptServiceLogService.insertPtServiceLog(ptServiceLog);
+        return success(s);
+    }
 
+    @GetMapping("/audit")
+    public AjaxResult audit(String[] srvIds,String audit){
+        return success(ptServiceService.audit(srvIds,audit));
+    }
 
 }

+ 80 - 115
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceLogController.java

@@ -1,133 +1,98 @@
 package com.ruoyi.interfaces.controller;
 
-
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
-import com.ruoyi.interfaces.core.page.Page;
-import com.ruoyi.interfaces.core.page.PageParam;
-import com.ruoyi.interfaces.core.page.PageUtils;
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.interfaces.domain.PtServiceLog;
-import com.ruoyi.interfaces.mapper.PtServiceLogMapper;
-import io.swagger.annotations.ApiOperation;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.servlet.ModelAndView;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
+import com.ruoyi.interfaces.service.IPtServiceLogService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 服务调用日志Controller
+ * 
+ * @author 朱得糠
+ * @date 2025-09-01
+ */
 @RestController
-@RequestMapping("/pt/service/log")
-public class PtServiceLogController extends BaseController {
-    private static Logger logger = LoggerFactory.getLogger(PtServiceLogController.class);
-
+@RequestMapping("/interfaces/log")
+public class PtServiceLogController extends BaseController
+{
     @Autowired
-    private PtServiceLogMapper ptServiceLogMapper;
-
-
-    @ApiOperation("数据列表")
-    @RequestMapping(value = "/list", method = RequestMethod.GET)
-    @ResponseBody
-    public Page list(int page, int rows) {
-        PageHelper.startPage(page, rows);
-        List<PtServiceLog> list = ptServiceLogMapper.selectAll();
-        PageInfo<PtServiceLog> pageInfo = new PageInfo<>(list);
-        return PageUtils.convert(pageInfo);
+    private IPtServiceLogService ptServiceLogService;
+
+    /**
+     * 查询服务调用日志列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(PtServiceLog ptServiceLog)
+    {
+        startPage();
+        List<PtServiceLog> list = ptServiceLogService.selectPtServiceLogList(ptServiceLog);
+        return getDataTable(list);
     }
 
-    @ApiOperation("数据列表-条件查询")
-    @PostMapping(value = "/listByFactor")
-    @ResponseBody
-    public Page listByFactor(@RequestBody PageParam<PtServiceLog> ptServiceLog) {
-        PageHelper.startPage(ptServiceLog);
-        List<PtServiceLog> list = ptServiceLogMapper.selectByFactor(ptServiceLog.getData());
-        return PageUtils.convert(list);
-    }
-
-
-    @ApiOperation("根据主键获取数据")
-    @RequestMapping(value = "/get")
-    public ModelAndView get(@RequestParam(required = true) String rid) {
-        ModelAndView mav = new ModelAndView();
-        PtServiceLog ptServiceLog = ptServiceLogMapper.selectByPrimaryKey(rid);
-        if (ptServiceLog == null) {
-            return null;
-        } else {
-            mav.addObject("ptServiceLog", ptServiceLog);
-            mav.setViewName("mng/pt_service_log_view");
-            return mav;
-        }
+    /**
+     * 导出服务调用日志列表
+     */
+    @Log(title = "服务调用日志", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, PtServiceLog ptServiceLog)
+    {
+        List<PtServiceLog> list = ptServiceLogService.selectPtServiceLogList(ptServiceLog);
+        ExcelUtil<PtServiceLog> util = new ExcelUtil<PtServiceLog>(PtServiceLog.class);
+        util.exportExcel(response, list, "服务调用日志数据");
     }
 
-    @RequestMapping(value = "/statAll", method = RequestMethod.GET)
-    @ResponseBody
-    public List<PtServiceLog> statAll(String flag) {
-        List<PtServiceLog> list = new ArrayList<>();
-        if ("StatAppToday".equals(flag)) {
-            list = ptServiceLogMapper.statAllToday();
-        }
-        if ("StatAppThree".equals(flag)) {
-            list = ptServiceLogMapper.statAppThree();
-        }
-        if ("StatAppWeek".equals(flag)) {
-            list = ptServiceLogMapper.statAppWeek();
-        }
-        if ("StatAppCount".equals(flag)) {
-            list = ptServiceLogMapper.statAll();
-        }
-
-        if ("StatSrvToday".equals(flag)) {
-            list = ptServiceLogMapper.statSrvAllToday();
-        }
-        if ("StatSrvThree".equals(flag)) {
-            list = ptServiceLogMapper.statSrvThree();
-        }
-        if ("StatSrvWeek".equals(flag)) {
-            list = ptServiceLogMapper.statSrvWeek();
-        }
-        if ("StatSrvCount".equals(flag)) {
-            list = ptServiceLogMapper.statSrvAll();
-        }
-        return list;
+    /**
+     * 获取服务调用日志详细信息
+     */
+    @GetMapping(value = "/{logId}")
+    public AjaxResult getInfo(@PathVariable("logId") Long logId)
+    {
+        return success(ptServiceLogService.selectPtServiceLogByLogId(logId));
     }
 
-    @RequestMapping(value = "/statDayByAppId")
-    public ModelAndView statDayByAppId(String appId) {
-        ModelAndView mav = new ModelAndView();
-        List<PtServiceLog> list = ptServiceLogMapper.statDayByAppId(appId);
-        mav.addObject("list", list);
-        mav.setViewName("pms/service_log_day");
-        return mav;
+    /**
+     * 新增服务调用日志
+     */
+    @Log(title = "服务调用日志", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody PtServiceLog ptServiceLog)
+    {
+        return toAjax(ptServiceLogService.insertPtServiceLog(ptServiceLog));
     }
 
-    @RequestMapping(value = "/statDayBySrvId")
-    public ModelAndView statDayBySrvId(String srvId) {
-        ModelAndView mav = new ModelAndView();
-        List<PtServiceLog> list = ptServiceLogMapper.statDayBySrvId(srvId);
-        mav.addObject("list", list);
-        mav.setViewName("pms/service_log_day_srv");
-        return mav;
+    /**
+     * 修改服务调用日志
+     */
+    @Log(title = "服务调用日志", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody PtServiceLog ptServiceLog)
+    {
+        return toAjax(ptServiceLogService.updatePtServiceLog(ptServiceLog));
     }
 
-    @RequestMapping(value = "/check/day/data")
-    @ResponseBody
-    public ModelAndView checkDayData(String type, String para) {
-        ModelAndView mav = new ModelAndView();
-
-        if ("server".equals(type)) {
-            List<PtServiceLog> list = ptServiceLogMapper.statDayBySrvId(para);
-            mav.addObject("list", list);
-            mav.addObject("title", "统计-按服务统计访问总数");
-            mav.setViewName("pms/check_day_data");
-        }
-
-        return mav;
+    /**
+     * 删除服务调用日志
+     */
+    @Log(title = "服务调用日志", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{logIds}")
+    public AjaxResult remove(@PathVariable Long[] logIds)
+    {
+        return toAjax(ptServiceLogService.deletePtServiceLogByLogIds(logIds));
     }
-
-
 }

+ 14 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelInfo.java

@@ -367,6 +367,20 @@ public class MdModelInfo extends BaseEntity {
      */
     private Integer sort;
 
+    /**
+     * 审核状态
+     * 审核状态 0=待审核;1=已审核;2 = 驳回
+     */
+    private String audit;
+
+    public String getAudit() {
+        return audit;
+    }
+
+    public void setAudit(String audit) {
+        this.audit = audit;
+    }
+
     public Integer getSort() {
         return sort;
     }

+ 8 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtService.java

@@ -110,6 +110,7 @@ public class PtService implements Serializable {
     @ApiModelProperty("请求参数列表")
     private List<PtServiceParam> params;
 
+
     public PtService(String mdid) {
         this.mdid = mdid;
     }
@@ -118,4 +119,11 @@ public class PtService implements Serializable {
      * 排序
      */
     private Integer sort;
+
+    /**
+     * 审核状态
+     * 审核状态 0=待审核;1=已审核;2 = 驳回
+     */
+    private String audit;
+
 }

+ 137 - 51
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtServiceLog.java

@@ -1,59 +1,145 @@
 package com.ruoyi.interfaces.domain;
 
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
+import com.ruoyi.common.utils.JsonUtils;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
 
-import java.io.Serializable;
-import java.util.Date;
+/**
+ * 服务调用日志对象 pt_service_log
+ * 
+ * @author 朱得糠
+ * @date 2025-09-01
+ */
+public class PtServiceLog extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    @Excel(name = "id")
+    private Long logId;
+
+    /** 服务id */
+    @Excel(name = "服务id")
+    private String serId;
+
+    /** 模型id */
+    @Excel(name = "模型id")
+    private String mdId;
 
-@Data
-public class PtServiceLog implements Serializable {
-
-    @TableId(value = "id", type = IdType.ASSIGN_UUID)
-    @ApiModelProperty("id")
-    private String id;
-    @ApiModelProperty("服务ID")
-    private String srvId;
-    @ApiModelProperty("应用ID")
-    private String appId;
-    @ApiModelProperty("时间戳")
-    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
+    /** 请求时间戳 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "请求时间戳", width = 30, dateFormat = "yyyy-MM-dd")
     private Date tm;
-    @ApiModelProperty("请求地址")
-    private String srvUrl;
-    @ApiModelProperty("请求方法 GET/POST")
-    private String srvMethod;
-    @ApiModelProperty("信息")
-    private String msg;
-    @ApiModelProperty("执行时间(毫秒)")
+
+    /** 请求信息 */
+    @Excel(name = "请求信息")
+    private String senText;
+
+    /** 返回信息 */
+    @Excel(name = "返回信息")
+    private String returnText;
+
+    /** 请求耗时(毫秒) */
+    @Excel(name = "请求耗时", readConverterExp = "毫=秒")
     private Long execTm;
-    private String uuid;
-    @TableField(exist = false)
-    @ApiModelProperty("服务名称")
-    private String name;
-    @TableField(exist = false)
-    @ApiModelProperty("请求用户名称")
-    private String userName;
-    @TableField(exist = false)
-    @ApiModelProperty("请求次数")
-    private String cnt;
-    @TableField(exist = false)
-    private String day;
-    @TableField(exist = false)
-    private String num;
-    @TableField(exist = false)
-    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
-    @ApiModelProperty("开始时间")
-    private Date sttm;
-    @TableField(exist = false)
-    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
-    @ApiModelProperty("结束时间")
-    private Date entm;
-    @TableField(exist = false)
-    @ApiModelProperty("应用名称")
-    private String appName;
+
+    public PtServiceLog(PtService ptService) {
+       this.serId=ptService.getSrvId();
+       this.mdId=ptService.getMdid();
+       this.senText=JsonUtils.objectToJson(ptService);
+    }
+
+    public PtServiceLog(Long logId, String serId, String mdId, Date tm, String senText, String returnText, Long execTm) {
+        this.logId = logId;
+        this.serId = serId;
+        this.mdId = mdId;
+        this.tm = tm;
+        this.senText = senText;
+        this.returnText = returnText;
+        this.execTm = execTm;
+    }
+
+    public PtServiceLog() {
+    }
+
+    public void setLogId(Long logId)
+    {
+        this.logId = logId;
+    }
+
+    public Long getLogId() 
+    {
+        return logId;
+    }
+    public void setSerId(String serId) 
+    {
+        this.serId = serId;
+    }
+
+    public String getSerId() 
+    {
+        return serId;
+    }
+    public void setMdId(String mdId) 
+    {
+        this.mdId = mdId;
+    }
+
+    public String getMdId() 
+    {
+        return mdId;
+    }
+    public void setTm(Date tm) 
+    {
+        this.tm = tm;
+    }
+
+    public Date getTm() 
+    {
+        return tm;
+    }
+    public void setSenText(String senText) 
+    {
+        this.senText = senText;
+    }
+
+    public String getSenText() 
+    {
+        return senText;
+    }
+    public void setReturnText(String returnText) 
+    {
+        this.returnText = returnText;
+    }
+
+    public String getReturnText() 
+    {
+        return returnText;
+    }
+    public void setExecTm(Long execTm) 
+    {
+        this.execTm = execTm;
+    }
+
+    public Long getExecTm() 
+    {
+        return execTm;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("logId", getLogId())
+            .append("serId", getSerId())
+            .append("mdId", getMdId())
+            .append("tm", getTm())
+            .append("senText", getSenText())
+            .append("returnText", getReturnText())
+            .append("execTm", getExecTm())
+            .toString();
+    }
 }

+ 3 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/MdModelInfoMapper.java

@@ -5,6 +5,7 @@ import java.util.List;
 import com.ruoyi.common.annotation.DataSource;
 import com.ruoyi.common.enums.DataSourceType;
 import com.ruoyi.interfaces.domain.MdModelInfo;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 模型信息Mapper接口
@@ -62,4 +63,6 @@ public interface MdModelInfoMapper
      * @return 结果
      */
     public int deleteMdModelInfoByMdids(String[] mdids);
+
+    int updateMdModelInfoAudit(@Param("mdids") String[] mdids,@Param("audit") String audit);
 }

+ 55 - 42
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/PtServiceLogMapper.java

@@ -1,49 +1,62 @@
 package com.ruoyi.interfaces.mapper;
 
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.interfaces.domain.PtServiceLog;
-import org.springframework.stereotype.Repository;
 
 import java.util.List;
 
-@Repository
-public interface PtServiceLogMapper extends BaseMapper<PtServiceLog> {
-
-    List<PtServiceLog> selectAll();
-
-    PtServiceLog selectByPrimaryKey(String rid);
-
-    int deleteByPrimaryKey(String rid);
-
-    int updateByPrimaryKeySelective(PtServiceLog record);
-
-    //int insertSelective(PtServiceLog record);
-
-    //int updateByPrimaryKeyWithBLOBs(PtServiceLog record);
-
-    //int updateByPrimaryKey(PtServiceLog record);
-
-    List<PtServiceLog> statAllToday();
-
-    List<PtServiceLog> statAppThree();
-
-    List<PtServiceLog> statAppWeek();
-
-    List<PtServiceLog> statAll();
-
-    List<PtServiceLog> statDayByAppId(String appId);
-
-
-    List<PtServiceLog> statSrvAllToday();
-
-    List<PtServiceLog> statSrvThree();
-
-    List<PtServiceLog> statSrvWeek();
-
-    List<PtServiceLog> statSrvAll();
-
-    List<PtServiceLog> statDayBySrvId(String srvId);
-
-    List<PtServiceLog> selectByFactor(PtServiceLog ptServiceLog);
-
+/**
+ * 服务调用日志Mapper接口
+ * 
+ * @author 朱得糠
+ * @date 2025-09-01
+ */
+public interface PtServiceLogMapper 
+{
+    /**
+     * 查询服务调用日志
+     * 
+     * @param logId 服务调用日志主键
+     * @return 服务调用日志
+     */
+    public PtServiceLog selectPtServiceLogByLogId(Long logId);
+
+    /**
+     * 查询服务调用日志列表
+     * 
+     * @param ptServiceLog 服务调用日志
+     * @return 服务调用日志集合
+     */
+    public List<PtServiceLog> selectPtServiceLogList(PtServiceLog ptServiceLog);
+
+    /**
+     * 新增服务调用日志
+     * 
+     * @param ptServiceLog 服务调用日志
+     * @return 结果
+     */
+    public int insertPtServiceLog(PtServiceLog ptServiceLog);
+
+    /**
+     * 修改服务调用日志
+     * 
+     * @param ptServiceLog 服务调用日志
+     * @return 结果
+     */
+    public int updatePtServiceLog(PtServiceLog ptServiceLog);
+
+    /**
+     * 删除服务调用日志
+     * 
+     * @param logId 服务调用日志主键
+     * @return 结果
+     */
+    public int deletePtServiceLogByLogId(Long logId);
+
+    /**
+     * 批量删除服务调用日志
+     * 
+     * @param logIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletePtServiceLogByLogIds(Long[] logIds);
 }

+ 3 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/PtServiceMapper.java

@@ -7,6 +7,7 @@ import com.ruoyi.common.enums.DataSourceType;
 import com.ruoyi.interfaces.domain.PtService;
 import com.ruoyi.interfaces.domain.vo.MdModelInfoVo;
 import com.ruoyi.interfaces.domain.vo.PtServiceVo;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -67,6 +68,8 @@ public interface PtServiceMapper extends BaseMapper<PtService> {
 
     List<MdModelInfoVo> selectModelService(MdModelInfoVo par);
 
+    int audit(@Param("srvIds") String[] srvIds, @Param("audit") String audit);
+
  /*   int insertSelective(PtServiceWithBLOBs record);
 
     PtServiceWithBLOBs selectByPrimaryKey(String srvId);

+ 2 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/IMdModelInfoService.java

@@ -59,4 +59,6 @@ public interface IMdModelInfoService
      * @return 结果
      */
     public int deleteMdModelInfoByMdid(String mdid);
+
+    int audit(String[] mdids, String audit);
 }

+ 63 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/IPtServiceLogService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.interfaces.service;
+
+import com.ruoyi.interfaces.domain.PtServiceLog;
+
+import java.util.List;
+
+/**
+ * 服务调用日志Service接口
+ * 
+ * @author 朱得糠
+ * @date 2025-09-01
+ */
+public interface IPtServiceLogService 
+{
+    /**
+     * 查询服务调用日志
+     * 
+     * @param logId 服务调用日志主键
+     * @return 服务调用日志
+     */
+    public PtServiceLog selectPtServiceLogByLogId(Long logId);
+
+    /**
+     * 查询服务调用日志列表
+     * 
+     * @param ptServiceLog 服务调用日志
+     * @return 服务调用日志集合
+     */
+    public List<PtServiceLog> selectPtServiceLogList(PtServiceLog ptServiceLog);
+
+    /**
+     * 新增服务调用日志
+     * 
+     * @param ptServiceLog 服务调用日志
+     * @return 结果
+     */
+    public int insertPtServiceLog(PtServiceLog ptServiceLog);
+
+    /**
+     * 修改服务调用日志
+     * 
+     * @param ptServiceLog 服务调用日志
+     * @return 结果
+     */
+    public int updatePtServiceLog(PtServiceLog ptServiceLog);
+
+    /**
+     * 批量删除服务调用日志
+     * 
+     * @param logIds 需要删除的服务调用日志主键集合
+     * @return 结果
+     */
+    public int deletePtServiceLogByLogIds(Long[] logIds);
+
+    /**
+     * 删除服务调用日志信息
+     * 
+     * @param logId 服务调用日志主键
+     * @return 结果
+     */
+    public int deletePtServiceLogByLogId(Long logId);
+
+}

+ 0 - 15
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/PtServiceLogService.java

@@ -1,15 +0,0 @@
-package com.ruoyi.interfaces.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.ruoyi.interfaces.domain.PtServiceLog;
-import org.springframework.stereotype.Repository;
-
-/**
- * @author LinQiLong
- * @date 2022/1/11 9:34
- */
-@Repository
-public interface PtServiceLogService extends IService<PtServiceLog> {
-
-    int insert(PtServiceLog record);
-}

+ 2 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/PtServiceService.java

@@ -55,4 +55,6 @@ public interface PtServiceService extends IService<PtService> {
     int put(PtService ptService);
 
     String testRun(PtService ptService) throws IOException;
+
+    int audit(String[] srvIds, String audit);
 }

+ 2 - 4
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/InterfaceAuthServiceImpl.java

@@ -30,8 +30,6 @@ public class InterfaceAuthServiceImpl implements InterfaceAuthService {
     @Autowired
     private PtServiceService ptServiceService;
 
-    @Autowired
-    private PtServiceLogService logService;
 
     @Autowired
     private PtAppService appService;
@@ -133,7 +131,7 @@ public class InterfaceAuthServiceImpl implements InterfaceAuthService {
      * @param appId     用户的应用ID
      */
     private void recordLog(PtService ptService, String appId) {
-        PtApp app = appService.get(appId);
+        /*PtApp app = appService.get(appId);
         PtServiceLog serviceLog = new PtServiceLog();
         serviceLog.setSrvMethod(ptService.getRqtype());
         serviceLog.setSrvId(ptService.getSrvId());
@@ -144,7 +142,7 @@ public class InterfaceAuthServiceImpl implements InterfaceAuthService {
         });
         serviceLog.setAppId(appId);
         serviceLog.setSttm(new Date());
-        logService.insert(serviceLog);
+        logService.insert(serviceLog);*/
     }
 
 }

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

@@ -104,4 +104,10 @@ public class MdModelInfoServiceImpl implements IMdModelInfoService
     {
         return mdModelInfoMapper.deleteMdModelInfoByMdid(mdid);
     }
+
+    @Override
+    public int audit(String[] mdids, String audit) {
+
+        return mdModelInfoMapper.updateMdModelInfoAudit(mdids,audit);
+    }
 }

+ 78 - 13
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceLogServiceImpl.java

@@ -1,29 +1,94 @@
 package com.ruoyi.interfaces.service.impl;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ruoyi.common.utils.uuid.IdUtils;
+import java.util.List;
+
 import com.ruoyi.interfaces.domain.PtServiceLog;
 import com.ruoyi.interfaces.mapper.PtServiceLogMapper;
-import com.ruoyi.interfaces.service.PtServiceLogService;
+import com.ruoyi.interfaces.service.IPtServiceLogService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Date;
-
 /**
- * @author LinQiLong
- * @date 2022/1/11 9:34
+ * 服务调用日志Service业务层处理
+ * 
+ * @author 朱得糠
+ * @date 2025-09-01
  */
 @Service
-public class PtServiceLogServiceImpl extends ServiceImpl<PtServiceLogMapper, PtServiceLog> implements PtServiceLogService {
-
+public class PtServiceLogServiceImpl implements IPtServiceLogService
+{
     @Autowired
     private PtServiceLogMapper ptServiceLogMapper;
 
+    /**
+     * 查询服务调用日志
+     * 
+     * @param logId 服务调用日志主键
+     * @return 服务调用日志
+     */
+    @Override
+    public PtServiceLog selectPtServiceLogByLogId(Long logId)
+    {
+        return ptServiceLogMapper.selectPtServiceLogByLogId(logId);
+    }
+
+    /**
+     * 查询服务调用日志列表
+     * 
+     * @param ptServiceLog 服务调用日志
+     * @return 服务调用日志
+     */
+    @Override
+    public List<PtServiceLog> selectPtServiceLogList(PtServiceLog ptServiceLog)
+    {
+        return ptServiceLogMapper.selectPtServiceLogList(ptServiceLog);
+    }
+
+    /**
+     * 新增服务调用日志
+     * 
+     * @param ptServiceLog 服务调用日志
+     * @return 结果
+     */
+    @Override
+    public int insertPtServiceLog(PtServiceLog ptServiceLog)
+    {
+        return ptServiceLogMapper.insertPtServiceLog(ptServiceLog);
+    }
+
+    /**
+     * 修改服务调用日志
+     * 
+     * @param ptServiceLog 服务调用日志
+     * @return 结果
+     */
+    @Override
+    public int updatePtServiceLog(PtServiceLog ptServiceLog)
+    {
+        return ptServiceLogMapper.updatePtServiceLog(ptServiceLog);
+    }
+
+    /**
+     * 批量删除服务调用日志
+     * 
+     * @param logIds 需要删除的服务调用日志主键
+     * @return 结果
+     */
+    @Override
+    public int deletePtServiceLogByLogIds(Long[] logIds)
+    {
+        return ptServiceLogMapper.deletePtServiceLogByLogIds(logIds);
+    }
+
+    /**
+     * 删除服务调用日志信息
+     * 
+     * @param logId 服务调用日志主键
+     * @return 结果
+     */
     @Override
-    public int insert(PtServiceLog record) {
-        record.setId(IdUtils.simpleUUID());
-        record.setTm(new Date());
-        return ptServiceLogMapper.insert(record);
+    public int deletePtServiceLogByLogId(Long logId)
+    {
+        return ptServiceLogMapper.deletePtServiceLogByLogId(logId);
     }
 }

+ 12 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceServiceImpl.java

@@ -10,6 +10,7 @@ import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.http.HttpUtils;
 import com.ruoyi.common.utils.uuid.IdUtils;
 import com.ruoyi.interfaces.domain.PtService;
+import com.ruoyi.interfaces.domain.PtServiceLog;
 import com.ruoyi.interfaces.domain.PtServiceParam;
 import com.ruoyi.interfaces.domain.vo.MdModelInfoVo;
 import com.ruoyi.interfaces.mapper.PtServiceMapper;
@@ -140,10 +141,10 @@ public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService
         return ptServiceMapper.updateByPrimaryKeySelective(ptService);
     }
 
+
     @Override
     public String testRun(PtService ptService) throws IOException {
 
-
     /*    String tokenUrl = "http://localhost:9002/sh-api/login";
         String bodyPar = "{\n" +
                 "  \"username\": \"admin\",\n" +
@@ -176,4 +177,14 @@ public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService
         return null;
     }
 
+    @Override
+    public int audit(String[] srvIds, String audit) {
+
+        return ptServiceMapper.audit(srvIds,audit);
+    }
+
+    public void senServiceLog(){
+
+
+    }
 }

+ 2 - 5
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/StatisticsServiceImpl.java

@@ -8,7 +8,6 @@ import com.ruoyi.interfaces.domain.PtServiceLog;
 import com.ruoyi.interfaces.domain.Statistics;
 import com.ruoyi.interfaces.domain.vo.StatisticsVo;
 import com.ruoyi.interfaces.mapper.StatisticsMapper;
-import com.ruoyi.interfaces.service.PtServiceLogService;
 import com.ruoyi.interfaces.service.PtServiceService;
 import com.ruoyi.interfaces.service.StatisticsService;
 import org.apache.commons.collections4.MapUtils;
@@ -28,8 +27,6 @@ public class StatisticsServiceImpl implements StatisticsService {
     @Autowired
     private PtServiceService serviceService;
 
-    @Autowired
-    private PtServiceLogService logService;
 
     private final StatisticsMapper mapper;
 
@@ -119,7 +116,7 @@ public class StatisticsServiceImpl implements StatisticsService {
     @Override
     public Map<String, Object> lastTwoWeeksCnt() {
         Map<String, Object> ret = new HashMap<>();
-        Map<String, Long> thisWeekMap = new LinkedHashMap<>();
+    /*    Map<String, Long> thisWeekMap = new LinkedHashMap<>();
         Map<String, Long> lastWeekMap = new LinkedHashMap<>();
         List<String> weekList = new ArrayList<>();
 
@@ -152,7 +149,7 @@ public class StatisticsServiceImpl implements StatisticsService {
         }
         ret.put("thisWeekMap", thisWeekMap);
         ret.put("lastWeekMap", lastWeekMap);
-        ret.put("weekList", weekList);
+        ret.put("weekList", weekList);*/
         return ret;
     }
 

+ 143 - 124
ruoyi-api-patform/src/main/resources/mapper/interfaces/MdModelInfoMapper.xml

@@ -5,66 +5,67 @@
 <mapper namespace="com.ruoyi.interfaces.mapper.MdModelInfoMapper">
 
     <resultMap type="com.ruoyi.interfaces.domain.MdModelInfo" id="MdModelInfoResult">
-        <result property="mdid"    column="MDID"    />
-        <result property="name"    column="NAME"    />
-        <result property="enname"    column="ENNAME"    />
-        <result property="cateid"    column="CATEID"    />
-        <result property="devlang"    column="DEVLANG"    />
-        <result property="version"    column="VERSION"    />
-        <result property="intro"    column="INTRO"    />
-        <result property="type"    column="TYPE"    />
-        <result property="tags"    column="TAGS"    />
-        <result property="kind"    column="KIND"    />
-        <result property="purpose"    column="PURPOSE"    />
-        <result property="israte"    column="ISRATE"    />
-        <result property="weight"    column="WEIGHT"    />
-        <result property="devkind"    column="DEVKIND"    />
-        <result property="author"    column="AUTHOR"    />
-        <result property="ispublic"    column="ISPUBLIC"    />
-        <result property="isapproved"    column="ISAPPROVED"    />
-        <result property="status"    column="STATUS"    />
-        <result property="classname"    column="CLASSNAME"    />
-        <result property="mdRunCmd"    column="MD_RUN_CMD"    />
-        <result property="mdUrl"    column="MD_URL"    />
-        <result property="mdAuth"    column="MD_AUTH"    />
-        <result property="mdHeader"    column="MD_HEADER"    />
-        <result property="mdSecret"    column="MD_SECRET"    />
-        <result property="mdUnit"    column="MD_UNIT"    />
-        <result property="mdContact"    column="MD_CONTACT"    />
-        <result property="devUnit"    column="DEV_UNIT"    />
-        <result property="devContact"    column="DEV_CONTACT"    />
-        <result property="whFlag"    column="WH_FLAG"    />
-        <result property="whUrl"    column="WH_URL"    />
-        <result property="whMethod"    column="WH_METHOD"    />
-        <result property="whAuth"    column="WH_AUTH"    />
-        <result property="whHeader"    column="WH_HEADER"    />
-        <result property="whSecret"    column="WH_SECRET"    />
-        <result property="envOs"    column="ENV_OS"    />
-        <result property="evnArmX86"    column="EVN_ARM_X86"    />
-        <result property="envCpu"    column="ENV_CPU"    />
-        <result property="envGpuType"    column="ENV_GPU_TYPE"    />
-        <result property="envGpuNum"    column="ENV_GPU_NUM"    />
-        <result property="envGpuMem"    column="ENV_GPU_MEM"    />
-        <result property="envDisk"    column="ENV_DISK"    />
-        <result property="envMem"    column="ENV_MEM"    />
-        <result property="deployIp"    column="DEPLOY_IP"    />
-        <result property="deployDir"    column="DEPLOY_DIR"    />
-        <result property="deployPort"    column="DEPLOY_PORT"    />
-        <result property="deployNote"    column="DEPLOY_NOTE"    />
-        <result property="mdInName"    column="MD_IN_NAME"    />
-        <result property="mdInFile"    column="MD_IN_FILE"    />
-        <result property="mdInNote"    column="MD_IN_NOTE"    />
-        <result property="mdOutName"    column="MD_OUT_NAME"    />
-        <result property="mdOutFile"    column="MD_OUT_FILE"    />
-        <result property="mdOutNote"    column="MD_OUT_NOTE"    />
-        <result property="mirrorImageName"    column="MIRROR_IMAGE_NAME"    />
-        <result property="mirrorImageUrl"    column="MIRROR_IMAGE_URL"    />
-        <result property="mirrorImageDesc"    column="MIRROR_IMAGE_DESC"    />
-        <result property="mdAuthUrl"    column="MD_AUTH_URL"    />
-        <result property="createby"    column="CREATEBY"    />
-        <result property="modifyby"    column="MODIFYBY"    />
-        <result property="regUser"    column="REG_USER"    />
-        <result property="sort"    column="SORT"    />
+        <result property="mdid" column="MDID"/>
+        <result property="name" column="NAME"/>
+        <result property="enname" column="ENNAME"/>
+        <result property="cateid" column="CATEID"/>
+        <result property="devlang" column="DEVLANG"/>
+        <result property="version" column="VERSION"/>
+        <result property="intro" column="INTRO"/>
+        <result property="type" column="TYPE"/>
+        <result property="tags" column="TAGS"/>
+        <result property="kind" column="KIND"/>
+        <result property="purpose" column="PURPOSE"/>
+        <result property="israte" column="ISRATE"/>
+        <result property="weight" column="WEIGHT"/>
+        <result property="devkind" column="DEVKIND"/>
+        <result property="author" column="AUTHOR"/>
+        <result property="ispublic" column="ISPUBLIC"/>
+        <result property="isapproved" column="ISAPPROVED"/>
+        <result property="status" column="STATUS"/>
+        <result property="classname" column="CLASSNAME"/>
+        <result property="mdRunCmd" column="MD_RUN_CMD"/>
+        <result property="mdUrl" column="MD_URL"/>
+        <result property="mdAuth" column="MD_AUTH"/>
+        <result property="mdHeader" column="MD_HEADER"/>
+        <result property="mdSecret" column="MD_SECRET"/>
+        <result property="mdUnit" column="MD_UNIT"/>
+        <result property="mdContact" column="MD_CONTACT"/>
+        <result property="devUnit" column="DEV_UNIT"/>
+        <result property="devContact" column="DEV_CONTACT"/>
+        <result property="whFlag" column="WH_FLAG"/>
+        <result property="whUrl" column="WH_URL"/>
+        <result property="whMethod" column="WH_METHOD"/>
+        <result property="whAuth" column="WH_AUTH"/>
+        <result property="whHeader" column="WH_HEADER"/>
+        <result property="whSecret" column="WH_SECRET"/>
+        <result property="envOs" column="ENV_OS"/>
+        <result property="evnArmX86" column="EVN_ARM_X86"/>
+        <result property="envCpu" column="ENV_CPU"/>
+        <result property="envGpuType" column="ENV_GPU_TYPE"/>
+        <result property="envGpuNum" column="ENV_GPU_NUM"/>
+        <result property="envGpuMem" column="ENV_GPU_MEM"/>
+        <result property="envDisk" column="ENV_DISK"/>
+        <result property="envMem" column="ENV_MEM"/>
+        <result property="deployIp" column="DEPLOY_IP"/>
+        <result property="deployDir" column="DEPLOY_DIR"/>
+        <result property="deployPort" column="DEPLOY_PORT"/>
+        <result property="deployNote" column="DEPLOY_NOTE"/>
+        <result property="mdInName" column="MD_IN_NAME"/>
+        <result property="mdInFile" column="MD_IN_FILE"/>
+        <result property="mdInNote" column="MD_IN_NOTE"/>
+        <result property="mdOutName" column="MD_OUT_NAME"/>
+        <result property="mdOutFile" column="MD_OUT_FILE"/>
+        <result property="mdOutNote" column="MD_OUT_NOTE"/>
+        <result property="mirrorImageName" column="MIRROR_IMAGE_NAME"/>
+        <result property="mirrorImageUrl" column="MIRROR_IMAGE_URL"/>
+        <result property="mirrorImageDesc" column="MIRROR_IMAGE_DESC"/>
+        <result property="mdAuthUrl" column="MD_AUTH_URL"/>
+        <result property="createby" column="CREATEBY"/>
+        <result property="modifyby" column="MODIFYBY"/>
+        <result property="regUser" column="REG_USER"/>
+        <result property="sort" column="SORT"/>
+        <result property="audit" column="AUDIT"/>
     </resultMap>
 
     <sql id="selectMdModelInfoVo">
@@ -127,74 +128,80 @@
                CREATEBY,
                MODIFYBY,
                REG_USER,
-               SORT
+               SORT,
+               AUDIT
         from md_model_info
     </sql>
 
-    <select id="selectMdModelInfoList" parameterType="com.ruoyi.interfaces.domain.MdModelInfo" resultMap="MdModelInfoResult">
+    <select id="selectMdModelInfoList" parameterType="com.ruoyi.interfaces.domain.MdModelInfo"
+            resultMap="MdModelInfoResult">
         <include refid="selectMdModelInfoVo"/>
         <where>
-            <if test="name != null  and name != ''"> and NAME like concat('%', #{name}, '%')</if>
-            <if test="enname != null  and enname != ''"> and ENNAME like concat('%', #{enname}, '%')</if>
-            <if test="cateid != null  and cateid != ''"> and CATEID = #{cateid}</if>
-            <if test="devlang != null  and devlang != ''"> and DEVLANG = #{devlang}</if>
-            <if test="version != null  and version != ''"> and VERSION = #{version}</if>
-            <if test="intro != null  and intro != ''"> and INTRO = #{intro}</if>
-            <if test="type != null  and type != ''"> and TYPE = #{type}</if>
-            <if test="tags != null  and tags != ''"> and TAGS = #{tags}</if>
-            <if test="kind != null  "> and KIND = #{kind}</if>
-            <if test="purpose != null  "> and PURPOSE = #{purpose}</if>
-            <if test="israte != null  "> and ISRATE = #{israte}</if>
-            <if test="weight != null  "> and WEIGHT = #{weight}</if>
-            <if test="devkind != null  "> and DEVKIND = #{devkind}</if>
-            <if test="tags != null  and tags != ''"> and TAGS = #{tags}</if>
-            <if test="tags != null  and tags != ''"> and TAGS = #{tags}</if>
-            <if test="author != null  and author != ''"> and AUTHOR = #{author}</if>
-            <if test="ispublic != null "> and ISPUBLIC = #{ispublic}</if>
-            <if test="isapproved != null "> and ISAPPROVED = #{isapproved}</if>
-            <if test="status != null "> and STATUS = #{status}</if>
-            <if test="classname != null  and classname != ''"> and CLASSNAME like concat('%', #{classname}, '%')</if>
-            <if test="mdRunCmd != null  and mdRunCmd != ''"> and MD_RUN_CMD = #{mdRunCmd}</if>
-            <if test="mdUrl != null  and mdUrl != ''"> and MD_URL = #{mdUrl}</if>
-            <if test="mdAuth != null  and mdAuth != ''"> and MD_AUTH = #{mdAuth}</if>
-            <if test="mdHeader != null  and mdHeader != ''"> and MD_HEADER = #{mdHeader}</if>
-            <if test="mdSecret != null  and mdSecret != ''"> and MD_SECRET = #{mdSecret}</if>
-            <if test="mdUnit != null  and mdUnit != ''"> and MD_UNIT = #{mdUnit}</if>
-            <if test="mdContact != null  and mdContact != ''"> and MD_CONTACT = #{mdContact}</if>
-            <if test="devUnit != null  and devUnit != ''"> and DEV_UNIT = #{devUnit}</if>
-            <if test="devContact != null  and devContact != ''"> and DEV_CONTACT = #{devContact}</if>
-            <if test="whFlag != null "> and WH_FLAG = #{whFlag}</if>
-            <if test="whUrl != null  and whUrl != ''"> and WH_URL = #{whUrl}</if>
-            <if test="whMethod != null  and whMethod != ''"> and WH_METHOD = #{whMethod}</if>
-            <if test="whAuth != null  and whAuth != ''"> and WH_AUTH = #{whAuth}</if>
-            <if test="whHeader != null  and whHeader != ''"> and WH_HEADER = #{whHeader}</if>
-            <if test="whSecret != null  and whSecret != ''"> and WH_SECRET = #{whSecret}</if>
-            <if test="envOs != null  and envOs != ''"> and ENV_OS = #{envOs}</if>
-            <if test="evnArmX86 != null  and evnArmX86 != ''"> and EVN_ARM_X86 = #{evnArmX86}</if>
-            <if test="envCpu != null "> and ENV_CPU = #{envCpu}</if>
-            <if test="envGpuType != null  and envGpuType != ''"> and ENV_GPU_TYPE = #{envGpuType}</if>
-            <if test="envGpuNum != null "> and ENV_GPU_NUM = #{envGpuNum}</if>
-            <if test="envGpuMem != null "> and ENV_GPU_MEM = #{envGpuMem}</if>
-            <if test="envDisk != null "> and ENV_DISK = #{envDisk}</if>
-            <if test="envMem != null "> and ENV_MEM = #{envMem}</if>
-            <if test="deployIp != null  and deployIp != ''"> and DEPLOY_IP = #{deployIp}</if>
-            <if test="deployDir != null  and deployDir != ''"> and DEPLOY_DIR = #{deployDir}</if>
-            <if test="deployPort != null  and deployPort != ''"> and DEPLOY_PORT = #{deployPort}</if>
-            <if test="deployNote != null  and deployNote != ''"> and DEPLOY_NOTE = #{deployNote}</if>
-            <if test="mdInName != null  and mdInName != ''"> and MD_IN_NAME like concat('%', #{mdInName}, '%')</if>
-            <if test="mdInFile != null  and mdInFile != ''"> and MD_IN_FILE = #{mdInFile}</if>
-            <if test="mdInNote != null  and mdInNote != ''"> and MD_IN_NOTE = #{mdInNote}</if>
-            <if test="mdOutName != null  and mdOutName != ''"> and MD_OUT_NAME like concat('%', #{mdOutName}, '%')</if>
-            <if test="mdOutFile != null  and mdOutFile != ''"> and MD_OUT_FILE = #{mdOutFile}</if>
-            <if test="mdOutNote != null  and mdOutNote != ''"> and MD_OUT_NOTE = #{mdOutNote}</if>
-            <if test="mirrorImageName != null  and mirrorImageName != ''"> and MIRROR_IMAGE_NAME like concat('%', #{mirrorImageName}, '%')</if>
-            <if test="mirrorImageUrl != null  and mirrorImageUrl != ''"> and MIRROR_IMAGE_URL = #{mirrorImageUrl}</if>
-            <if test="mirrorImageDesc != null  and mirrorImageDesc != ''"> and MIRROR_IMAGE_DESC = #{mirrorImageDesc}</if>
-            <if test="mdAuthUrl != null  and mdAuthUrl != ''"> and MD_AUTH_URL = #{mdAuthUrl}</if>
-            <if test="createby != null "> and CREATEBY = #{createby}</if>
-            <if test="modifyby != null "> and MODIFYBY = #{modifyby}</if>
-            <if test="regUser != null  and regUser != ''"> and REG_USER = #{regUser}</if>
-            <if test="sort != null  and sort != ''"> and SORT = #{sort}</if>
+            <if test="name != null  and name != ''">and NAME like concat('%', #{name}, '%')</if>
+            <if test="enname != null  and enname != ''">and ENNAME like concat('%', #{enname}, '%')</if>
+            <if test="cateid != null  and cateid != ''">and CATEID = #{cateid}</if>
+            <if test="devlang != null  and devlang != ''">and DEVLANG = #{devlang}</if>
+            <if test="version != null  and version != ''">and VERSION = #{version}</if>
+            <if test="intro != null  and intro != ''">and INTRO = #{intro}</if>
+            <if test="type != null  and type != ''">and TYPE = #{type}</if>
+            <if test="tags != null  and tags != ''">and TAGS = #{tags}</if>
+            <if test="kind != null  ">and KIND = #{kind}</if>
+            <if test="purpose != null  ">and PURPOSE = #{purpose}</if>
+            <if test="israte != null  ">and ISRATE = #{israte}</if>
+            <if test="weight != null  ">and WEIGHT = #{weight}</if>
+            <if test="devkind != null  ">and DEVKIND = #{devkind}</if>
+            <if test="tags != null  and tags != ''">and TAGS = #{tags}</if>
+            <if test="tags != null  and tags != ''">and TAGS = #{tags}</if>
+            <if test="author != null  and author != ''">and AUTHOR = #{author}</if>
+            <if test="ispublic != null ">and ISPUBLIC = #{ispublic}</if>
+            <if test="isapproved != null ">and ISAPPROVED = #{isapproved}</if>
+            <if test="status != null ">and STATUS = #{status}</if>
+            <if test="classname != null  and classname != ''">and CLASSNAME like concat('%', #{classname}, '%')</if>
+            <if test="mdRunCmd != null  and mdRunCmd != ''">and MD_RUN_CMD = #{mdRunCmd}</if>
+            <if test="mdUrl != null  and mdUrl != ''">and MD_URL = #{mdUrl}</if>
+            <if test="mdAuth != null  and mdAuth != ''">and MD_AUTH = #{mdAuth}</if>
+            <if test="mdHeader != null  and mdHeader != ''">and MD_HEADER = #{mdHeader}</if>
+            <if test="mdSecret != null  and mdSecret != ''">and MD_SECRET = #{mdSecret}</if>
+            <if test="mdUnit != null  and mdUnit != ''">and MD_UNIT = #{mdUnit}</if>
+            <if test="mdContact != null  and mdContact != ''">and MD_CONTACT = #{mdContact}</if>
+            <if test="devUnit != null  and devUnit != ''">and DEV_UNIT = #{devUnit}</if>
+            <if test="devContact != null  and devContact != ''">and DEV_CONTACT = #{devContact}</if>
+            <if test="whFlag != null ">and WH_FLAG = #{whFlag}</if>
+            <if test="whUrl != null  and whUrl != ''">and WH_URL = #{whUrl}</if>
+            <if test="whMethod != null  and whMethod != ''">and WH_METHOD = #{whMethod}</if>
+            <if test="whAuth != null  and whAuth != ''">and WH_AUTH = #{whAuth}</if>
+            <if test="whHeader != null  and whHeader != ''">and WH_HEADER = #{whHeader}</if>
+            <if test="whSecret != null  and whSecret != ''">and WH_SECRET = #{whSecret}</if>
+            <if test="envOs != null  and envOs != ''">and ENV_OS = #{envOs}</if>
+            <if test="evnArmX86 != null  and evnArmX86 != ''">and EVN_ARM_X86 = #{evnArmX86}</if>
+            <if test="envCpu != null ">and ENV_CPU = #{envCpu}</if>
+            <if test="envGpuType != null  and envGpuType != ''">and ENV_GPU_TYPE = #{envGpuType}</if>
+            <if test="envGpuNum != null ">and ENV_GPU_NUM = #{envGpuNum}</if>
+            <if test="envGpuMem != null ">and ENV_GPU_MEM = #{envGpuMem}</if>
+            <if test="envDisk != null ">and ENV_DISK = #{envDisk}</if>
+            <if test="envMem != null ">and ENV_MEM = #{envMem}</if>
+            <if test="deployIp != null  and deployIp != ''">and DEPLOY_IP = #{deployIp}</if>
+            <if test="deployDir != null  and deployDir != ''">and DEPLOY_DIR = #{deployDir}</if>
+            <if test="deployPort != null  and deployPort != ''">and DEPLOY_PORT = #{deployPort}</if>
+            <if test="deployNote != null  and deployNote != ''">and DEPLOY_NOTE = #{deployNote}</if>
+            <if test="mdInName != null  and mdInName != ''">and MD_IN_NAME like concat('%', #{mdInName}, '%')</if>
+            <if test="mdInFile != null  and mdInFile != ''">and MD_IN_FILE = #{mdInFile}</if>
+            <if test="mdInNote != null  and mdInNote != ''">and MD_IN_NOTE = #{mdInNote}</if>
+            <if test="mdOutName != null  and mdOutName != ''">and MD_OUT_NAME like concat('%', #{mdOutName}, '%')</if>
+            <if test="mdOutFile != null  and mdOutFile != ''">and MD_OUT_FILE = #{mdOutFile}</if>
+            <if test="mdOutNote != null  and mdOutNote != ''">and MD_OUT_NOTE = #{mdOutNote}</if>
+            <if test="mirrorImageName != null  and mirrorImageName != ''">and MIRROR_IMAGE_NAME like concat('%',
+                #{mirrorImageName}, '%')
+            </if>
+            <if test="mirrorImageUrl != null  and mirrorImageUrl != ''">and MIRROR_IMAGE_URL = #{mirrorImageUrl}</if>
+            <if test="mirrorImageDesc != null  and mirrorImageDesc != ''">and MIRROR_IMAGE_DESC = #{mirrorImageDesc}
+            </if>
+            <if test="mdAuthUrl != null  and mdAuthUrl != ''">and MD_AUTH_URL = #{mdAuthUrl}</if>
+            <if test="createby != null ">and CREATEBY = #{createby}</if>
+            <if test="modifyby != null ">and MODIFYBY = #{modifyby}</if>
+            <if test="regUser != null  and regUser != ''">and REG_USER = #{regUser}</if>
+            <if test="sort != null  and sort != ''">and SORT = #{sort}</if>
+            <if test="audit != null  and audit != ''">and AUDIT = #{audit}</if>
         </where>
         order by SORT
     </select>
@@ -267,6 +274,7 @@
             <if test="modifyby != null">MODIFYBY,</if>
             <if test="regUser != null">REG_USER,</if>
             <if test="sort != null">SORT,</if>
+            <if test="audit != null">AUDIT,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="mdid != null">#{mdid},</if>
@@ -329,6 +337,7 @@
             <if test="modifyby != null">#{modifyby},</if>
             <if test="regUser != null">#{regUser},</if>
             <if test="sort != null">#{sort},</if>
+            <if test="audit != null">#{audit}</if>
         </trim>
     </insert>
 
@@ -397,9 +406,19 @@
         </trim>
         where MDID = #{mdid}
     </update>
+    <update id="updateMdModelInfoAudit">
+        UPDATE md_model_info SET
+        AUDIT = #{audit}
+        where MDID in
+        <foreach item="mdid" collection="mdids" open="(" separator="," close=")">
+            #{mdid}
+        </foreach>
+    </update>
 
     <delete id="deleteMdModelInfoByMdid" parameterType="String">
-        delete from md_model_info where MDID = #{mdid}
+        delete
+        from md_model_info
+        where MDID = #{mdid}
     </delete>
 
     <delete id="deleteMdModelInfoByMdids" parameterType="String">

+ 69 - 316
ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceLogMapper.xml

@@ -1,329 +1,82 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.interfaces.mapper.PtServiceLogMapper">
-    <resultMap id="BaseResultMap" type="com.ruoyi.interfaces.domain.PtServiceLog">
-        <result property="srvMethod" column="SRV_METHOD" jdbcType="VARCHAR"/>
-        <result property="msg" column="MSG" jdbcType="VARCHAR"/>
-        <result property="id" column="ID" jdbcType="VARCHAR"/>
-        <result property="srvId" column="SRV_ID" jdbcType="VARCHAR"/>
-        <result property="appId" column="APP_ID" jdbcType="VARCHAR"/>
-        <result property="tm" column="TM" jdbcType="TIMESTAMP"/>
-        <result property="srvUrl" column="SRV_URL" jdbcType="VARCHAR"/>
-        <result property="name" column="NAME" jdbcType="VARCHAR"/>
-        <result property="userName" column="USER_NAME" jdbcType="VARCHAR"/>
-        <result property="cnt" column="cnt" jdbcType="VARCHAR"/>
-        <result property="day" column="day" jdbcType="VARCHAR"/>
-        <result property="num" column="num" jdbcType="VARCHAR"/>
-        <result property="appName" column="APP_NAME" jdbcType="VARCHAR"/>
-    </resultMap>
-    <sql id="Base_Column_List">
-        SRV_METHOD
-        ,
-		MSG,
-		ID,
-		SRV_ID,
-		APP_ID,
-		TM,
-		SRV_URL
-    </sql>
-    <sql id="Blob_Column_List">
-        MSG
-    </sql>
-
 
-    <resultMap type="com.ruoyi.interfaces.domain.PtServiceLog" id="ptServiceLogResultMap">
-        <result property="id" column="ID"/>
-        <result property="srvId" column="SRV_ID"/>
-        <result property="appId" column="APP_ID"/>
-        <result property="tm" column="TM"/>
-        <result property="srvUrl" column="SRV_URL"/>
-        <result property="srvMethod" column="SRV_METHOD"/>
-        <result property="msg" column="MSG" jdbcType="CLOB"/>
-        <result property="execTm" column="EXEC_TM"/>
-        <result property="uuid" column="UUID" jdbcType="VARCHAR"/>
+    <resultMap type="com.ruoyi.interfaces.domain.PtServiceLog" id="PtServiceLogResult">
+        <result property="logId"    column="log_id"    />
+        <result property="serId"    column="ser_id"    />
+        <result property="mdId"    column="md_id"    />
+        <result property="tm"    column="tm"    />
+        <result property="senText"    column="sen_text"    />
+        <result property="returnText"    column="return_text"    />
+        <result property="execTm"    column="exec_tm"    />
     </resultMap>
 
-    <sql id="table_columns">
-        ID
-        ,
-            SRV_ID,
-            APP_ID,
-            TM,
-            SRV_URL,
-            SRV_METHOD,
-            MSG,
-            EXEC_TM,
-            UUID
-    </sql>
-    <sql id="entity_properties">
-        #{id}
-        ,
-        #{srvId},
-        #{appId},
-        #{tm},
-        #{srvUrl},
-        #{srvMethod},
-        #{msg,jdbcType=CLOB},
-        #{execTm},
-        #{uuid,jdbcType=VARCHAR}
-    </sql>
-
-    <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
-    <sql id="page_where">
-        <trim prefix="where" prefixOverrides="and | or ">
-            <if test="srvId != null and srvId != ''">and SRV_ID = #{srvId}</if>
-            <if test="appId != null and appId != ''">and APP_ID = #{appId}</if>
-            <if test="tm != null">and TM = #{tm}</if>
-            <if test="srvUrl != null and srvUrl != ''">and SRV_URL = #{srvUrl}</if>
-            <if test="srvMethod != null and srvMethod != ''">and SRV_METHOD = #{srvMethod}</if>
-            <if test="msg != null and msg != ''">and MSG = #{msg}</if>
-            <if test="execTm != null and execTm != ''">and EXEC_TM = #{execTm}</if>
-            <if test="uuid != null and uuid != ''">and UUID = #{uuid}</if>
-        </trim>
+    <sql id="selectPtServiceLogVo">
+        select log_id, ser_id, md_id, tm, sen_text, return_text, exec_tm from pt_service_log
     </sql>
 
-    <select id="get" resultMap="ptServiceLogResultMap" parameterType="String">
-        select
-        <include refid="table_columns"/>
-        from PT_SERVICE_LOG where ID = #{id}
-    </select>
-
-    <select id="getBy" resultMap="ptServiceLogResultMap">
-        select
-        <include refid="table_columns"/>
-        from PT_SERVICE_LOG
-        <include refid="page_where"/>
-    </select>
-
-    <select id="findList" resultMap="ptServiceLogResultMap">
-        select
-        <include refid="table_columns"/>
-        from PT_SERVICE_LOG
-        <include refid="page_where"/>
-    </select>
-
-    <!--数据列表-->
-    <select id="selectAll" parameterType="java.lang.String" resultMap="BaseResultMap">
-        <!--select
-        <include refid="Base_Column_List" />
-        from PT_SERVICE_LOG
-        order by TM desc-->
-
-        select psl.*,ps.NAME,pau.USER_NAME
-        from PT_SERVICE_LOG psl
-        left join PT_SERVICE ps on psl.srv_id = ps.srv_id
-        left join PT_APP_USER pau on psl.APP_ID = pau.USER_ID
-        order by psl.TM desc
-
+    <select id="selectPtServiceLogList" parameterType="com.ruoyi.interfaces.domain.PtServiceLog" resultMap="PtServiceLogResult">
+        <include refid="selectPtServiceLogVo"/>
+        <where>
+            <if test="logId != null "> and log_id = #{logId}</if>
+            <if test="serId != null  and serId != ''"> and ser_id = #{serId}</if>
+            <if test="mdId != null  and mdId != ''"> and md_id = #{mdId}</if>
+            <if test="tm != null "> and tm = #{tm}</if>
+            <if test="senText != null  and senText != ''"> and sen_text = #{senText}</if>
+            <if test="returnText != null  and returnText != ''"> and return_text = #{returnText}</if>
+            <if test="execTm != null "> and exec_tm = #{execTm}</if>
+        </where>
     </select>
 
-    <!--根据主键获取数据-->
-    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-        select
-        <include refid="Base_Column_List"/>
-        ,
-        <include refid="Blob_Column_List"/>
-        from PT_SERVICE_LOG
-        where RID = #{rid,jdbcType=VARCHAR}
+    <select id="selectPtServiceLogByLogId" parameterType="Long" resultMap="PtServiceLogResult">
+        <include refid="selectPtServiceLogVo"/>
+        where log_id = #{logId}
     </select>
 
-    <!--根据主键删除数据-->
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
-        delete
-        from PT_SERVICE_LOG
-        where RID = #{rid,jdbcType=VARCHAR}
-    </delete>
-
-    <!--根据主键更新数据-->
-    <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.interfaces.domain.PtServiceLog">
-        update PT_SERVICE_LOG
-        <set>
-            <if test="srvId != null">
-                SRV_ID = #{srvId,jdbcType=VARCHAR},
-            </if>
-            <if test="userId != null">
-                USER_ID = #{userId,jdbcType=VARCHAR},
-            </if>
-            <if test="stm != null">
-                STM = #{stm,jdbcType=TIMESTAMP},
-            </if>
-            <if test="etm != null">
-                ETM = #{etm,jdbcType=TIMESTAMP},
-            </if>
-            <if test="err != null">
-                ERR = #{err,jdbcType=VARCHAR},
-            </if>
-            <if test="msg != null">
-                MSG = #{msg,jdbcType=CLOB},
-            </if>
-        </set>
-        where RID = #{rid,jdbcType=VARCHAR}
+    <insert id="insertPtServiceLog" parameterType="com.ruoyi.interfaces.domain.PtServiceLog" useGeneratedKeys="true" keyProperty="logId">
+        insert into pt_service_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="serId != null">ser_id,</if>
+            <if test="mdId != null">md_id,</if>
+            <if test="tm != null">tm,</if>
+            <if test="senText != null">sen_text,</if>
+            <if test="returnText != null">return_text,</if>
+            <if test="execTm != null">exec_tm,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="serId != null">#{serId},</if>
+            <if test="mdId != null">#{mdId},</if>
+            <if test="tm != null">#{tm},</if>
+            <if test="senText != null">#{senText},</if>
+            <if test="returnText != null">#{returnText},</if>
+            <if test="execTm != null">#{execTm},</if>
+        </trim>
+    </insert>
+
+    <update id="updatePtServiceLog" parameterType="com.ruoyi.interfaces.domain.PtServiceLog">
+        update pt_service_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="serId != null">ser_id = #{serId},</if>
+            <if test="mdId != null">md_id = #{mdId},</if>
+            <if test="tm != null">tm = #{tm},</if>
+            <if test="senText != null">sen_text = #{senText},</if>
+            <if test="returnText != null">return_text = #{returnText},</if>
+            <if test="execTm != null">exec_tm = #{execTm},</if>
+        </trim>
+        where log_id = #{logId}
     </update>
 
+    <delete id="deletePtServiceLogByLogId" parameterType="Long">
+        delete from pt_service_log where log_id = #{logId}
+    </delete>
 
-    <!-- 一一一一一一一一一一一一按应用统计访问总数一一一一一一一一一一一一 -->
-    <!-- 按应用统计访问总数-今天 -->
-    <select id="statAllToday" parameterType="java.lang.String" resultMap="BaseResultMap">
-        -- select app_id,count(1) cnt from pt_service_log
-        -- where tm &gt;= trunc(sysdate) and tm &lt; trunc(sysdate)+1
-        -- group by app_id
-        -- order by cnt desc
-        select t.*, pau.user_name
-        from (select app_id, count(1) cnt
-              from pt_service_log
-              where tm &gt;= trunc(sysdate)
-                and tm &lt; trunc(sysdate) + 1
-              group by app_id) t
-                 left join PT_APP_USER pau on pau.user_id = t.app_id
-        order by t.cnt desc
-    </select>
-
-    <!-- 最近三天 -->
-    <select id="statAppThree" parameterType="java.lang.String" resultMap="BaseResultMap">
-        --     select app_id,count(1) cnt from pt_service_log
---     where tm &gt;= trunc(sysdate) - 3
---     group by app_id
---     order by cnt desc
---     select t.* , pau.user_name from
-        select t.*, pau.user_name
-        from (select app_id, count(1) cnt
-              from pt_service_log
-              where tm &gt;= trunc(sysdate) - 3
-              group by app_id) t
-                 left join PT_APP_USER pau on pau.user_id = t.app_id
-        order by cnt desc
-    </select>
-
-    <!-- 最近一周 -->
-    <select id="statAppWeek" parameterType="java.lang.String" resultMap="BaseResultMap">
-        --     select app_id,count(1) cnt from pt_service_log
---     where tm &gt;= trunc(sysdate) - 7
---     group by app_id
---     order by cnt desc
-        select t.*, pau.user_name
-        from (select app_id, count(1) cnt
-              from pt_service_log
-              where tm &gt;= trunc(sysdate) - 7
-              group by app_id) t
-                 left join PT_APP_USER pau on pau.user_id = t.app_id
-        order by cnt desc
-    </select>
-
-    <!-- 按应用统计访问总数-累计 -->
-    <select id="statAll" parameterType="java.lang.String" resultMap="BaseResultMap">
-        --     select app_id,count(1) cnt from pt_service_log
---     group by app_id
---     order by cnt desc
-        select t.*, pau.user_name
-        from (select app_id, count(1) cnt
-              from pt_service_log
-              group by app_id) t
-                 left join PT_APP_USER pau on pau.user_id = t.app_id
-        order by cnt desc
-    </select>
-
-    <!-- 根据应用来按天统计 -->
-    <select id="statDayByAppId" parameterType="java.lang.String" resultMap="BaseResultMap">
-        select to_char(t.tm, 'YYYY-MM-DD') as day,sum(1) as cnt
-        from PT_SERVICE_LOG t
-        where app_id = #{appId}
-        group by to_char(t.tm, 'YYYY-MM-DD')
-    </select>
-
-
-    <!-- 一一一一一一一一一一一一按服务统计访问总数一一一一一一一一一一一一 -->
-    <!-- 按服务统计访问总数-今天 -->
-    <select id="statSrvAllToday" parameterType="java.lang.String" resultMap="BaseResultMap">
-        --         select srv_id,count(1) cnt from pt_service_log
---         where tm &gt;= trunc(sysdate) and tm &lt; trunc(sysdate)+1
---         group by srv_id order by cnt desc
-        select t.*, ps.name
-        from (select srv_id, count(1) cnt
-              from pt_service_log
-              where tm &gt;= trunc(sysdate)
-                and tm &lt; trunc(sysdate) + 1
-              group by srv_id) t
-                 left join PT_SERVICE ps on ps.srv_id = t.srv_id
-        order by t.cnt asc
-    </select>
-
-    <!-- 最近三天 -->
-    <select id="statSrvThree" parameterType="java.lang.String" resultMap="BaseResultMap">
-        select t.*, ps.name
-        from (select srv_id, count(1) cnt from pt_service_log where tm &gt;= trunc(sysdate) - 3 group by srv_id) t
-                 left join PT_SERVICE ps on ps.srv_id = t.srv_id
-        order by t.cnt asc
-    </select>
-
-    <!-- 最近一周 -->
-    <select id="statSrvWeek" parameterType="java.lang.String" resultMap="BaseResultMap">
-        select t.*, ps.name
-        from (select srv_id, count(1) cnt from pt_service_log where tm &gt;= trunc(sysdate) - 7 group by srv_id) t
-                 left join PT_SERVICE ps on ps.srv_id = t.srv_id
-        order by t.cnt asc
-    </select>
-
-    <!-- 按服务统计访问总数-累计 -->
-    <select id="statSrvAll" parameterType="java.lang.String" resultMap="BaseResultMap">
-        --         select srv_id,count(1) cnt from pt_service_log
---         group by srv_id order by cnt desc
-        select t.*, ps.name
-        from (select srv_id, count(1) cnt from pt_service_log group by srv_id) t
-                 left join PT_SERVICE ps on ps.srv_id = t.srv_id
-        order by t.cnt asc
-    </select>
-
-    <!--每天的数据=点击事件 -->
-    <select id="statDayBySrvId" parameterType="java.lang.String" resultMap="BaseResultMap">
-        select to_char(t.tm, 'YYYY-MM-DD') as day,sum(1) as num
-        from PT_SERVICE_LOG t
-        where srv_id = #{srvId}
-        group by to_char(t.tm, 'YYYY-MM-DD')
-        order by day asc
-    </select>
-
-
-    <select id="statMonthByAppId" parameterType="java.lang.String" resultMap="BaseResultMap">
-        select to_char(t.tm, 'YYYY-MM') as day,sum(1) as cnt
-        from PT_SERVICE_LOG t
-        where app_id = #{appId}
-        group by to_char(t.tm, 'YYYY-MM')
-    </select>
-
-    <select id="statMonthBySrvId" parameterType="java.lang.String" resultMap="BaseResultMap">
-        select to_char(t.tm, 'YYYY-MM') as day,sum(1) as cnt
-        from PT_SERVICE_LOG t
-        where srv_id = #{srvId}
-        group by to_char(t.tm, 'YYYY-MM')
-    </select>
-
-    <!--根据条件获取数据-->
-    <select id="selectByFactor" parameterType="com.ruoyi.interfaces.domain.PtServiceLog" resultMap="BaseResultMap">
-        SELECT
-        PSL.*, PS.NAME, PAU.USER_NAME, AP.APP_NAME
-        FROM PT_SERVICE_LOG PSL
-        LEFT JOIN PT_SERVICE PS ON PSL.SRV_ID = PS.SRV_ID
-        LEFT JOIN PT_APP AP ON AP.APP_ID = PSL.APP_ID
-        LEFT JOIN PT_APP_USER PAU ON AP.USER_ID = PAU.USER_ID
-        <where>
-            <if test="name != null and name !=''">
-                and ps.NAME like CONCAT(CONCAT('%', #{name}), '%')
-            </if>
-            <if test="userName != null and userName !=''">
-                and pau.USER_NAME like CONCAT(CONCAT('%', #{userName}), '%')
-            </if>
-            <if test="tm != null">
-                and psl.TM &gt;= #{tm}
-            </if>
-            <if test="sttm != null">
-                and psl.TM &gt;= #{sttm}
-            </if>
-            <if test="entm != null">
-                and psl.TM &lt;= #{entm}
-            </if>
-        </where>
-        ORDER BY PSL.TM DESC
-    </select>
-
-
-</mapper>
+    <delete id="deletePtServiceLogByLogIds" parameterType="String">
+        delete from pt_service_log where log_id in
+        <foreach item="logId" collection="array" open="(" separator="," close=")">
+            #{logId}
+        </foreach>
+    </delete>
+</mapper>

+ 18 - 3
ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceMapper.xml

@@ -39,6 +39,7 @@
         <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
         <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
         <result column="SORT" property="sort" jdbcType="INTEGER"/>
+        <result column="AUDIT" property="audit" jdbcType="VARCHAR"/>
     </resultMap>
     <resultMap id="AuthVoResultMap" type="com.ruoyi.interfaces.domain.vo.PtServiceVo">
         <result property="id" jdbcType="VARCHAR" column="ID"/>
@@ -80,6 +81,7 @@
         <result column="DATA_RANGE" property="dataRange" jdbcType="VARCHAR"/>
         <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
         <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
+        <result column="AUDIT" property="audit" jdbcType="VARCHAR"/>
     </resultMap>
 
     <sql id="Base_Column_List">
@@ -90,7 +92,7 @@
     SERVICE_SOURCE,SERVICE_DEPT, MANAGE_NAME,DATA_RANGE, OPEN_CNDTN, DATA_FIELD,
     URL, RQTYPE, RPTYPE, PROXY_ADDRESS,PROXY_PATH,
     TM, RELEASE_TIME, RLSTM, UPTM,
-    VIEW_NUM, CNT, APPLY_NUM, DATA_NUM
+    VIEW_NUM, CNT, APPLY_NUM, DATA_NUM,AUDIT
     </sql>
     <sql id="Blob_Column_List">
         RPCONTENT
@@ -99,7 +101,7 @@
     <sql id="SRV_INFO_List">
         SRV_ID
         , NAME, TYPE, INTRO, URL, RQTYPE, RPTYPE, STATUS, CNT, USER_ID, TM,PROXY_ADDRESS,PROXY_PATH,SERVICE_SOURCE,CATE_CODE,
-    SERVICE_DEPT, MANAGE_NAME,RELEASE_TIME,DEVELOP_UNIT,DEVELOP_CONTACTER,MAINTAIN_UNIT,MAINTAIN_CONTACER,VIEW_NUM
+    SERVICE_DEPT, MANAGE_NAME,RELEASE_TIME,DEVELOP_UNIT,DEVELOP_CONTACTER,MAINTAIN_UNIT,MAINTAIN_CONTACER,VIEW_NUM,AUDIT
     </sql>
     <sql id="table_columns">
         MDID
@@ -138,7 +140,7 @@
             DEVELOP_CONTACTER,
             MAINTAIN_UNIT,
             MAINTAIN_CONTACER,
-            VIEW_NUM,SORT
+            VIEW_NUM,SORT,AUDIT
     </sql>
     <sql id="entity_properties">
         #{mdid,jdbcType=VARCHAR}
@@ -179,6 +181,7 @@
         #{maintainContacer,jdbcType=VARCHAR},
         #{viewNum, jdbcType=INTEGER},
         #{sort, jdbcType=INTEGER}
+        #{audit, jdbcType=VARCHAR}
     </sql>
     <sql id="page_where">
         <trim prefix="where" prefixOverrides="and | or ">
@@ -290,6 +293,9 @@
             <if test="viewNum != null and viewNum != ''">
                 and VIEW_NUM = #{viewNum}
             </if>
+            <if test="audit != null and audit != ''">
+                and AUDIT = #{audit}
+            </if>
         </trim>
     </sql>
 
@@ -401,9 +407,18 @@ order by SORT
             <if test="uptm != null">UPTM = #{uptm},</if>
             <if test="rlstm != null">RLSTM = #{rlstm},</if>
             <if test="sort != null">SORT = #{sort},</if>
+
         </trim>
         where SRV_ID = #{srvId,jdbcType=VARCHAR}
     </update>
+    <update id="audit">
+        update PT_SERVICE set AUDIT = #{audit}
+        where SRV_ID in
+        <foreach item="srvId" collection="srvIds" open="(" separator="," close=")">
+            #{srvId}
+        </foreach>
+
+    </update>
 
     <!--根据主键删除数据-->
     <delete id="deleteByPrimaryKey" parameterType="java.lang.String">