Browse Source

产品种类

Reiskuchen 5 years ago
parent
commit
7926dbb9ee

+ 5 - 7
official_backend/src/main/java/com/hssx/ysofficial/controller/CompanyProductsController.java

@@ -30,28 +30,26 @@ public class CompanyProductsController {
     /**
      * 公司产品的录入
      * 参数:
-     *  添加:title 产品名称 ,introduction 产品简介,address 产品地址,file上传的文件(非必传)
-     *  修改 id:产品id
-     * @return
+     * 添加:title 产品名称 ,introduction 产品简介,address 产品地址, type 产品类型, file上传的文件(非必传)
+     * 修改 id:产品id
      */
     @RequestMapping("/addAndUpdate")
-    public HttpRespMsg addAndUpdate(CompanyProducts CompanyProducts, @RequestParam(required = false)MultipartFile file) {
-        return companyProductsService.addAndUpdate(CompanyProducts,file);
+    public HttpRespMsg addAndUpdate(CompanyProducts CompanyProducts, @RequestParam(required = false) MultipartFile file) {
+        return companyProductsService.addAndUpdate(CompanyProducts, file);
     }
 
     /**
      * 公司产品删除
      * 参数:id:产品id
-     * @return
      */
     @RequestMapping("/del")
     public HttpRespMsg del(CompanyProducts companyProducts) {
         return companyProductsService.del(companyProducts);
     }
+
     /**
      * 公司产品列表
      * 参数:pageNum 当前页码,pageSize 每页条数
-     * @return
      */
     @RequestMapping("/companyProductsList")
     public HttpRespMsg companyProductsList(PageUtil page) {

+ 7 - 1
official_backend/src/main/java/com/hssx/ysofficial/entity/CompanyProducts.java

@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Reiskuchen
- * @since 2019-11-21
+ * @since 2020-02-04
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -62,6 +62,12 @@ public class CompanyProducts extends Model<CompanyProducts> {
     @TableField("sticky")
     private Integer sticky;
 
+    /**
+     * 产品种类 0-塑料产品 1-物联网产品 2-成品 3-3D打印及检测服务 4-模具和加工设备能力 5-专利和政府政策服务 6-融资服务
+     */
+    @TableField("type")
+    private Integer type;
+
 
     @Override
     protected Serializable pkVal() {

+ 1 - 1
official_backend/src/main/java/com/hssx/ysofficial/utility/CodeGenerator.java

@@ -190,7 +190,7 @@ public class CodeGenerator {
         //单独生成逗号隔开
 //        strategy.setInclude("");
         //全生成
-        strategy.setInclude("online_application","company_products");//表名,多个英文逗号分割
+        strategy.setInclude("company_products");//表名,多个英文逗号分割
         //多个英文逗号隔开
 //        strategy.setInclude(scanner("user").split(","));
         strategy.setControllerMappingHyphenStyle(true);

+ 2 - 1
official_backend/src/main/resources/mapper/CompanyProductsMapper.xml

@@ -10,11 +10,12 @@
         <result column="introduction" property="introduction" />
         <result column="address" property="address" />
         <result column="sticky" property="sticky" />
+        <result column="type" property="type" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, title, image_url, introduction, address, sticky
+        id, title, image_url, introduction, address, sticky, type
     </sql>
 
 </mapper>

+ 1 - 1
official_frontend/vue.config.js

@@ -6,7 +6,7 @@ function resolve(dir) {
   return path.join(__dirname, dir)
 }
 
-const name = defaultSettings.title || 'vue Admin Template' // page title
+const name = defaultSettings.title || '云塑网官网后台' // page title
 
 // If your port is set to 80,
 // use administrator privileges to execute the command line.

+ 21 - 0
website/src/main/java/com/hssx/website/controller/CompanyProductsController.java

@@ -0,0 +1,21 @@
+package com.hssx.website.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 第一个数据是公司优势 其他是案例 前端控制器
+ * </p>
+ *
+ * @author 吴涛涛
+ * @since 2020-02-04
+ */
+@RestController
+@RequestMapping("/company-products")
+public class CompanyProductsController {
+
+}
+

+ 7 - 1
website/src/main/java/com/hssx/website/entity/CompanyProducts.java

@@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author 吴涛涛
- * @since 2019-11-21
+ * @since 2020-02-04
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -60,6 +60,12 @@ public class CompanyProducts extends Model<CompanyProducts> {
     @TableField("sticky")
     private Integer sticky;
 
+    /**
+     * 产品种类 0-塑料产品 1-物联网产品 2-成品 3-3D打印及检测服务 4-模具和加工设备能力 5-专利和政府政策服务 6-融资服务
+     */
+    @TableField("type")
+    private Integer type;
+
 
     @Override
     protected Serializable pkVal() {

+ 1 - 1
website/src/main/java/com/hssx/website/until/CodeGenerator.java

@@ -206,7 +206,7 @@ public class CodeGenerator {
         //此处user是表名,多个英文逗号分割
 //        strategy.setInclude("mould_down_packet");
 //        strategy.setExclude();//数据库表全生成
-        strategy.setInclude("online_application","company_products");//表名,多个英文逗号分割
+        strategy.setInclude("company_products");//表名,多个英文逗号分割
         strategy.setControllerMappingHyphenStyle(true);
         //数据库表前缀,不配置这行的话,生成的类会带有T如:TUser,配置后即可将前缀去掉
 //        strategy.setTablePrefix("tb_");

+ 2 - 1
website/src/main/resources/mapper/CompanyProductsMapper.xml

@@ -10,11 +10,12 @@
         <result column="introduction" property="introduction" />
         <result column="address" property="address" />
         <result column="sticky" property="sticky" />
+        <result column="type" property="type" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, title, image_url, introduction, address, sticky
+        id, title, image_url, introduction, address, sticky, type
     </sql>
 
 </mapper>