Browse Source

add(backend) [身体疲惫不堪 想睡觉]

wangxiao 4 years ago
parent
commit
b6b854f4e7

+ 13 - 0
operation-backend/src/main/java/com/idiot/operationbackend/controller/MaterialController.java

@@ -28,4 +28,17 @@ public class MaterialController {
     }
 
 
+    @PostMapping("/{accountId}")
+    @ApiOperation(value = "公众号上传素材(其他素材,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb))")
+    public ResponseEntity<JsonResult<Object>> addMaterial (@RequestHeader String token,
+                                                            @PathVariable String accountId,
+                                                            @RequestParam String type){
+
+        return null;
+    }
+
+
+
+
+
 }

+ 2 - 0
operation-backend/src/main/java/com/idiot/operationbackend/entity/AccountPush.java

@@ -35,6 +35,8 @@ public class AccountPush {
 
     private String materialIds;
 
+    private String ArticlesIds;
+
     private String createTime;
 
     public String getId() {

+ 75 - 0
operation-backend/src/main/java/com/idiot/operationbackend/entity/Articles.java

@@ -0,0 +1,75 @@
+package com.idiot.operationbackend.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+/**
+ *   图文
+ * @author wang xiao
+ * @date Created in 10:42 2020/9/21
+ */
+@TableName("t_articles")
+public class Articles {
+
+    @TableId
+    private  String id;
+
+    private String imageUrl;
+
+    private String title;
+
+    private String content;
+
+    private String contentSourceUrl;
+
+    private String createTime;
+
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getImageUrl() {
+        return imageUrl;
+    }
+
+    public void setImageUrl(String imageUrl) {
+        this.imageUrl = imageUrl;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getContentSourceUrl() {
+        return contentSourceUrl;
+    }
+
+    public void setContentSourceUrl(String contentSourceUrl) {
+        this.contentSourceUrl = contentSourceUrl;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+}

+ 11 - 0
operation-backend/src/main/java/com/idiot/operationbackend/mappers/ArticlesMapper.java

@@ -0,0 +1,11 @@
+package com.idiot.operationbackend.mappers;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.idiot.operationbackend.entity.Articles;
+
+/**
+ * @author wang xiao
+ * @date Created in 11:03 2020/9/21
+ */
+public interface ArticlesMapper extends BaseMapper<Articles> {
+}

+ 11 - 0
operation-backend/src/main/java/com/idiot/operationbackend/service/facade/ArticlesService.java

@@ -0,0 +1,11 @@
+package com.idiot.operationbackend.service.facade;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.idiot.operationbackend.entity.Articles;
+
+/**
+ * @author wang xiao
+ * @date Created in 11:04 2020/9/21
+ */
+public interface ArticlesService extends IService<Articles> {
+}

+ 16 - 0
operation-backend/src/main/java/com/idiot/operationbackend/service/impl/ArticlesServiceImpl.java

@@ -0,0 +1,16 @@
+package com.idiot.operationbackend.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.idiot.operationbackend.entity.Articles;
+import com.idiot.operationbackend.mappers.ArticlesMapper;
+import com.idiot.operationbackend.service.facade.ArticlesService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author wang xiao
+ * @date Created in 11:05 2020/9/21
+ */
+@Service
+public class ArticlesServiceImpl extends ServiceImpl<ArticlesMapper, Articles>
+        implements ArticlesService {
+}

+ 15 - 4
sql/dataBase.sql

@@ -198,9 +198,6 @@ CREATE TABLE `t_fans_msg`  (
 
 
 
--- ----------------------------
--- Table structure for t_account_push  推送消息
--- ----------------------------
 DROP TABLE IF EXISTS `t_account_push`;
 CREATE TABLE `t_account_push`  (
   `id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'id',
@@ -211,7 +208,8 @@ CREATE TABLE `t_account_push`  (
   `trigger` int(0) NULL DEFAULT 111 COMMENT '第一位关注公众号,第二位 发送消息到公众号 第三位 点击菜单',
   `push_limit` int(0) NULL DEFAULT NULL COMMENT '推送限制',
   `enable` int(0) NULL DEFAULT NULL COMMENT '开关',
-  `material_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '推送内容',
+  `material_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '素材id',
+  `articles_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '图文id',
   `nike_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '名称冗余字段',
   `head_image` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'headImage 冗余字段',
   `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
@@ -236,3 +234,16 @@ CREATE TABLE `t_account_material`  (
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '素材' ROW_FORMAT = Dynamic;
 
+-- ----------------------------
+-- Table structure for t_articles 图文
+-- ----------------------------
+DROP TABLE IF EXISTS `t_articles`;
+CREATE TABLE `t_articles`  (
+  `id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
+  `image_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '图片地址',
+  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '标题',
+  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '内容',
+  `content_source_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '链接地址',
+  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '图文' ROW_FORMAT = Dynamic;