diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/AppHelpVersionMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/AppHelpVersionMapper.java
new file mode 100644
index 0000000..296994d
--- /dev/null
+++ b/inventory-dao/src/main/java/com/rzyc/mapper/AppHelpVersionMapper.java
@@ -0,0 +1,18 @@
+package com.rzyc.mapper;
+
+import com.rzyc.model.AppHelpVersion;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ *
+ * Mapper 接口
+ *
+ *
+ * @author
+ * @since 2023-05-22
+ */
+@Repository
+public interface AppHelpVersionMapper extends BaseMapper {
+
+}
diff --git a/inventory-dao/src/main/java/com/rzyc/model/AppHelpVersion.java b/inventory-dao/src/main/java/com/rzyc/model/AppHelpVersion.java
new file mode 100644
index 0000000..53bf3bd
--- /dev/null
+++ b/inventory-dao/src/main/java/com/rzyc/model/AppHelpVersion.java
@@ -0,0 +1,87 @@
+package com.rzyc.model;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ *
+ *
+ *
+ *
+ * @author
+ * @since 2023-05-22
+ */
+@TableName("app_help_version")
+@ApiModel(value="AppHelpVersion对象", description="")
+public class AppHelpVersion implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Integer id;
+
+ @TableField("help_type")
+ private Integer helpType;
+
+ @TableField("help_content")
+ private Integer helpContent;
+
+ @TableField("create_time")
+ private Date createTime;
+
+ @TableField("app_type")
+ private String appType;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+ public Integer getHelpType() {
+ return helpType;
+ }
+
+ public void setHelpType(Integer helpType) {
+ this.helpType = helpType;
+ }
+ public Integer getHelpContent() {
+ return helpContent;
+ }
+
+ public void setHelpContent(Integer helpContent) {
+ this.helpContent = helpContent;
+ }
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+ public String getAppType() {
+ return appType;
+ }
+
+ public void setAppType(String appType) {
+ this.appType = appType;
+ }
+
+ @Override
+ public String toString() {
+ return "AppHelpVersion{" +
+ "id=" + id +
+ ", helpType=" + helpType +
+ ", helpContent=" + helpContent +
+ ", createTime=" + createTime +
+ ", appType=" + appType +
+ "}";
+ }
+}
diff --git a/inventory-dao/src/main/java/com/rzyc/model/dto/AppHelpVersionDto.java b/inventory-dao/src/main/java/com/rzyc/model/dto/AppHelpVersionDto.java
new file mode 100644
index 0000000..0c7bd85
--- /dev/null
+++ b/inventory-dao/src/main/java/com/rzyc/model/dto/AppHelpVersionDto.java
@@ -0,0 +1,71 @@
+package com.rzyc.model.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+
+import java.util.Date;
+
+/**
+ * 企业设备巡检记录
+ * @author Xuwanxin
+ * @date 2023/5/22
+ * */
+public class AppHelpVersionDto {
+
+ private Integer id;
+
+ private Integer helpType;
+
+ private Integer helpContent;
+
+ private String appType;
+
+ private Date createTime;
+
+ public AppHelpVersionDto(Integer id, Integer helpType, Integer helpContent, String appType, Date createTime) {
+ this.id = id;
+ this.helpType = helpType;
+ this.helpContent = helpContent;
+ this.appType = appType;
+ this.createTime = createTime;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getHelpType() {
+ return helpType;
+ }
+
+ public void setHelpType(Integer helpType) {
+ this.helpType = helpType;
+ }
+
+ public Integer getHelpContent() {
+ return helpContent;
+ }
+
+ public void setHelpContent(Integer helpContent) {
+ this.helpContent = helpContent;
+ }
+
+ public String getAppType() {
+ return appType;
+ }
+
+ public void setAppType(String appType) {
+ this.appType = appType;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+}
diff --git a/inventory-dao/src/main/resources/mapper/AppHelpMapper.xml b/inventory-dao/src/main/resources/mapper/AppHelpMapper.xml
index 96ff6d8..9146ecc 100644
--- a/inventory-dao/src/main/resources/mapper/AppHelpMapper.xml
+++ b/inventory-dao/src/main/resources/mapper/AppHelpMapper.xml
@@ -1,309 +1,309 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- and ${criterion.condition}
-
-
- and ${criterion.condition} #{criterion.value}
-
-
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-
-
- and ${criterion.condition}
-
- #{listItem}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- and ${criterion.condition}
-
-
- and ${criterion.condition} #{criterion.value}
-
-
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-
-
- and ${criterion.condition}
-
- #{listItem}
-
-
-
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
-
+
+
+
+ AppHelpId, type, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy
+
+
+ helpContent
+
+
+
+ select
+
+ distinct
+
+
+ from AppHelp
+
+
+
+
+ order by ${orderByClause}
+
+
+
+ limit ${offset}, ${limit}
+
+
+ limit ${limit}
+
+
+
+
+ select
+
+ ,
+
+ from AppHelp
+ where AppHelpId = #{apphelpid,jdbcType=VARCHAR}
+
+
+ delete from AppHelp
+ where AppHelpId = #{apphelpid,jdbcType=VARCHAR}
+
+
+ delete from AppHelp
+
+
+
+
+
+ insert into AppHelp (AppHelpId, type, CreatedOn,
+ CreatedBy, ModifiedOn, ModifiedBy,
+ helpContent)
+ values (#{apphelpid,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{createdon,jdbcType=TIMESTAMP},
+ #{createdby,jdbcType=VARCHAR}, #{modifiedon,jdbcType=TIMESTAMP}, #{modifiedby,jdbcType=VARCHAR},
+ #{helpcontent,jdbcType=LONGVARCHAR})
+
+
+ insert into AppHelp
+
+
+ AppHelpId,
+
+
+ type,
+
+
+ CreatedOn,
+
+
+ CreatedBy,
+
+
+ ModifiedOn,
+
+
+ ModifiedBy,
+
+
+ helpContent,
+
+
+
+
+ #{apphelpid,jdbcType=VARCHAR},
+
+
+ #{type,jdbcType=VARCHAR},
+
+
+ #{createdon,jdbcType=TIMESTAMP},
+
+
+ #{createdby,jdbcType=VARCHAR},
+
+
+ #{modifiedon,jdbcType=TIMESTAMP},
+
+
+ #{modifiedby,jdbcType=VARCHAR},
+
+
+ #{helpcontent,jdbcType=LONGVARCHAR},
+
+
+
+
+ select count(*) from AppHelp
+
+
+
+
+
+ update AppHelp
+
+
+ AppHelpId = #{record.apphelpid,jdbcType=VARCHAR},
+
+
+ type = #{record.type,jdbcType=VARCHAR},
+
+
+ CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
+
+
+ CreatedBy = #{record.createdby,jdbcType=VARCHAR},
+
+
+ ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
+
+
+ ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
+
+
+ helpContent = #{record.helpcontent,jdbcType=LONGVARCHAR},
+
+
+
+
+
+
+
+ update AppHelp
+ set AppHelpId = #{record.apphelpid,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
-
-
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
-
-
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
-
-
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
-
-
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
-
-
- helpContent = #{record.helpcontent,jdbcType=LONGVARCHAR},
-
-
-
-
-
-
-
- update AppHelp
- set AppHelpId = #{record.apphelpid,jdbcType=VARCHAR},
- type = #{record.type,jdbcType=VARCHAR},
- CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
- CreatedBy = #{record.createdby,jdbcType=VARCHAR},
- ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
- ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
- helpContent = #{record.helpcontent,jdbcType=LONGVARCHAR}
-
-
-
-
-
- update AppHelp
- set AppHelpId = #{record.apphelpid,jdbcType=VARCHAR},
- type = #{record.type,jdbcType=VARCHAR},
- CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
- CreatedBy = #{record.createdby,jdbcType=VARCHAR},
- ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
- ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR}
-
-
-
-
-
- update AppHelp
-
-
- type = #{type,jdbcType=VARCHAR},
-
-
+ helpContent = #{record.helpcontent,jdbcType=LONGVARCHAR}
+
+
+
+
+
+ update AppHelp
+ set AppHelpId = #{record.apphelpid,jdbcType=VARCHAR},
+ type = #{record.type,jdbcType=VARCHAR},
+ CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
+ CreatedBy = #{record.createdby,jdbcType=VARCHAR},
+ ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
+ ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR}
+
+
+
+
+
+ update AppHelp
+
+
+ type = #{type,jdbcType=VARCHAR},
+
+
+ CreatedOn = #{createdon,jdbcType=TIMESTAMP},
+
+
+ CreatedBy = #{createdby,jdbcType=VARCHAR},
+
+
+ ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
+
+
+ ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
+
+
+ helpContent = #{helpcontent,jdbcType=LONGVARCHAR},
+
+
+ where AppHelpId = #{apphelpid,jdbcType=VARCHAR}
+
+
+ update AppHelp
+ set type = #{type,jdbcType=VARCHAR},
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
-
-
CreatedBy = #{createdby,jdbcType=VARCHAR},
-
-
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
-
-
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
-
-
- helpContent = #{helpcontent,jdbcType=LONGVARCHAR},
-
-
- where AppHelpId = #{apphelpid,jdbcType=VARCHAR}
-
-
- update AppHelp
- set type = #{type,jdbcType=VARCHAR},
- CreatedOn = #{createdon,jdbcType=TIMESTAMP},
- CreatedBy = #{createdby,jdbcType=VARCHAR},
- ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
- ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
- helpContent = #{helpcontent,jdbcType=LONGVARCHAR}
- where AppHelpId = #{apphelpid,jdbcType=VARCHAR}
-
-
- update AppHelp
- set type = #{type,jdbcType=VARCHAR},
- CreatedOn = #{createdon,jdbcType=TIMESTAMP},
- CreatedBy = #{createdby,jdbcType=VARCHAR},
- ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
- ModifiedBy = #{modifiedby,jdbcType=VARCHAR}
- where AppHelpId = #{apphelpid,jdbcType=VARCHAR}
-
-
-
-
- SELECT * FROM `AppHelp` ah WHERE ah.`type` = #{type}
- ORDER BY ah.`CreatedOn` DESC LIMIT 1
-
-
-
-
- update AppHelp
- set ModifiedOn = NOW(),
helpContent = #{helpcontent,jdbcType=LONGVARCHAR}
- where type = #{type,jdbcType=VARCHAR}
-
-
+ where AppHelpId = #{apphelpid,jdbcType=VARCHAR}
+
+
+ update AppHelp
+ set type = #{type,jdbcType=VARCHAR},
+ CreatedOn = #{createdon,jdbcType=TIMESTAMP},
+ CreatedBy = #{createdby,jdbcType=VARCHAR},
+ ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
+ ModifiedBy = #{modifiedby,jdbcType=VARCHAR}
+ where AppHelpId = #{apphelpid,jdbcType=VARCHAR}
+
+
+
+
+ SELECT * FROM `AppHelp` ah WHERE ah.`type` = #{type}
+ ORDER BY ah.`CreatedOn` DESC LIMIT 1
+
+
+
+
+ update AppHelp
+ set ModifiedOn = NOW(),
+ helpContent = #{helpcontent,jdbcType=LONGVARCHAR}
+ where type = #{type,jdbcType=VARCHAR}
+
+
\ No newline at end of file
diff --git a/inventory-dao/src/main/resources/mapper/AppHelpVersionMapper.xml b/inventory-dao/src/main/resources/mapper/AppHelpVersionMapper.xml
new file mode 100644
index 0000000..1fbf7a3
--- /dev/null
+++ b/inventory-dao/src/main/resources/mapper/AppHelpVersionMapper.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, help_type, help_content, create_time, app_type
+
+
+
diff --git a/inventory-gov/src/main/java/com/rzyc/controller/AppController.java b/inventory-gov/src/main/java/com/rzyc/controller/AppController.java
new file mode 100644
index 0000000..a38eabd
--- /dev/null
+++ b/inventory-gov/src/main/java/com/rzyc/controller/AppController.java
@@ -0,0 +1,93 @@
+package com.rzyc.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.common.utils.model.Code;
+import com.common.utils.model.Message;
+import com.common.utils.model.SingleResult;
+import com.rzyc.mapper.AppHelpVersionMapper;
+import com.rzyc.model.AppHelpVersion;
+import com.rzyc.model.dto.AppHelpVersionDto;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @Author: XWX
+ * @CreateTime: 2023/5/22
+ */
+
+@Api(tags = "app")
+@CrossOrigin("*")
+@RequestMapping("app")
+@RestController
+@Validated
+public class AppController extends BaseController {
+
+ /**
+ * @Description: 版本管理
+ * @Author XWX
+ * @CreateTime 2023/5/22
+ */
+ @PostMapping("addAppVersion")
+ @ResponseBody
+ @ApiOperation(value = "新增app版本", notes = "新增app版本")
+ public SingleResult addAppVersion(@RequestBody AppHelpVersionDto AppHelpVersionDto){
+ SingleResult singleResult = new SingleResult();
+ AppHelpVersion AppHelpVersion = new AppHelpVersion();
+ BeanUtils.copyProperties(AppHelpVersionDto,AppHelpVersion);
+ int result = appHelpVersionMapper.insert(AppHelpVersion);
+ if (result < 1){
+ singleResult.setCode(Code.ERROR.getCode());
+ singleResult.setMessage(Message.ERROR);
+ }
+ return singleResult;
+ }
+
+ /**
+ * @Description: 版本管理
+ * @Author XWX
+ * @CreateTime 2023/5/22
+ */
+ @PostMapping("editAppVersion")
+ @ResponseBody
+ @ApiOperation(value = "修改app版本", notes = "修改app版本")
+ public SingleResult editAppVersion(@RequestBody AppHelpVersionDto AppHelpVersionDto){
+ SingleResult singleResult = new SingleResult();
+ AppHelpVersion AppHelpVersion = new AppHelpVersion();
+ BeanUtils.copyProperties(AppHelpVersionDto,AppHelpVersion);
+ int result = appHelpVersionMapper.updateById(AppHelpVersion);
+ if (result < 1){
+ singleResult.setCode(Code.ERROR.getCode());
+ singleResult.setMessage(Message.ERROR);
+ }
+ return singleResult;
+ }
+
+ /**
+ * @Description: 版本管理
+ * @Author XWX
+ * @CreateTime 2023/5/22
+ */
+ @GetMapping("getAppVersion")
+ @ResponseBody
+ @ApiOperation(value = "app版本", notes = "app版本")
+ public SingleResult getAppVersion(String appType){
+ SingleResult singleResult = new SingleResult();
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq("app_type", appType);
+ List AppHelpVersions = appHelpVersionMapper.selectList(wrapper);
+ if (AppHelpVersions.size() < 1){
+ singleResult.setCode(Code.ERROR.getCode());
+ singleResult.setMessage(Message.ERROR);
+ }
+ singleResult.setData(AppHelpVersions);
+ return singleResult;
+ }
+
+}
diff --git a/inventory-gov/src/main/java/com/rzyc/controller/BaseController.java b/inventory-gov/src/main/java/com/rzyc/controller/BaseController.java
index 7d53db3..5a5e8da 100644
--- a/inventory-gov/src/main/java/com/rzyc/controller/BaseController.java
+++ b/inventory-gov/src/main/java/com/rzyc/controller/BaseController.java
@@ -568,6 +568,9 @@ public class BaseController {
@Autowired
protected EntUserCredentialMapper entUserCredentialMapper;
+ @Autowired
+ protected AppHelpVersionMapper appHelpVersionMapper;
+
/**
* 岗位不需要的字符串
@@ -2037,7 +2040,7 @@ public class BaseController {
/**
* 计算提醒类型 1:正常 2:黄色提醒 3:红色提醒
- * @param listFactors
+ * @param ListFactor
* @throws Exception
*/
protected void handleFactorAlert(ListFactor listFactor)throws Exception{