瀏覽代碼

图片的检测和上传

wutt 5 年之前
父節點
當前提交
97e38c19c5

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ImageProcessingController.java

@@ -40,7 +40,9 @@ public class ImageProcessingController {
     private ScreenshotService screenshotService;
 
     /**
-     *
+     * 参数:uid 用户id
+     * indate 截图时间
+     * file 上传的图片文件
      */
     @RequestMapping("/saveAndProcessImage")
     public HttpRespMsg pictureDetectionTask(ScreenshotVO screenshotvo) {

+ 51 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/PicContentKeywords.java

@@ -0,0 +1,51 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-01-03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class PicContentKeywords extends Model<PicContentKeywords> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 图片内容关键词表主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 关键词内容
+     */
+    @TableField("content")
+    private String content;
+
+    /**
+     * 关键词所属类型:0-编程,1-查资料,2-看文档,3-做设计,4-美工,5-运营,6-看小说,7-打游戏,8-听音乐。
+     */
+    @TableField("type")
+    private Integer type;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Screenshot.java

@@ -58,7 +58,7 @@ public class Screenshot extends Model<Screenshot> {
     private Integer isNormal;
 
     /**
-     * 定时任务是否检测 0-否 1-是
+     * 是否检测 0-否 1-是
      */
     @TableField("is_handle")
     private Integer isHandle;
@@ -70,7 +70,7 @@ public class Screenshot extends Model<Screenshot> {
     private String dateStr;
 
     /**
-     * 图片类型(记录不同的方式)编程,查资料,看文档,做设计,美工,运营,看小说,打游戏,听音乐。
+     * 图片类型(记录不同的方式)0-编程,1-查资料,2-看文档,3-做设计,4-美工,5-运营,6-看小说,7-打游戏,8-听音乐。
      */
     @TableField("pic_type")
     private Integer picType;

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/PicContentKeywordsMapper.java

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.PicContentKeywords;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-01-03
+ */
+public interface PicContentKeywordsMapper extends BaseMapper<PicContentKeywords> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/PicContentKeywordsService.java

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.PicContentKeywords;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-01-03
+ */
+public interface PicContentKeywordsService extends IService<PicContentKeywords> {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/PicContentKeywordsServiceImpl.java

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.PicContentKeywords;
+import com.management.platform.mapper.PicContentKeywordsMapper;
+import com.management.platform.service.PicContentKeywordsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-01-03
+ */
+@Service
+public class PicContentKeywordsServiceImpl extends ServiceImpl<PicContentKeywordsMapper, PicContentKeywords> implements PicContentKeywordsService {
+
+}

+ 17 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/PicContentKeywordsMapper.xml

@@ -0,0 +1,17 @@
+<?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.management.platform.mapper.PicContentKeywordsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.PicContentKeywords">
+        <id column="id" property="id" />
+        <result column="content" property="content" />
+        <result column="type" property="type" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, content, type
+    </sql>
+
+</mapper>