Browse Source

重新生成lombok实体 去除公司产品中无用的地址 新增VIP产品

Reiskuchen 5 years ago
parent
commit
c7f96a45a7

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

@@ -1,21 +0,0 @@
-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 - 78
website/src/main/java/com/hssx/website/entity/Article.java

@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
 import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -12,8 +15,11 @@ import java.io.Serializable;
  * </p>
  * </p>
  *
  *
  * @author 吴涛涛
  * @author 吴涛涛
- * @since 2019-10-24
+ * @since 2020-02-05
  */
  */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
 public class Article extends Model<Article> {
 public class Article extends Model<Article> {
 
 
     private static final long serialVersionUID=1L;
     private static final long serialVersionUID=1L;
@@ -67,86 +73,9 @@ public class Article extends Model<Article> {
     private String introduction;
     private String introduction;
 
 
 
 
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    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 getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public Integer getSticky() {
-        return sticky;
-    }
-
-    public void setSticky(Integer sticky) {
-        this.sticky = sticky;
-    }
-
-    public Integer getPosition() {
-        return position;
-    }
-
-    public void setPosition(Integer position) {
-        this.position = position;
-    }
-
-    public String getImageUrl() {
-        return imageUrl;
-    }
-
-    public void setImageUrl(String imageUrl) {
-        this.imageUrl = imageUrl;
-    }
-
-    public String getIntroduction() {
-        return introduction;
-    }
-
-    public void setIntroduction(String introduction) {
-        this.introduction = introduction;
-    }
-
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {
         return this.id;
         return this.id;
     }
     }
 
 
-    @Override
-    public String toString() {
-        return "Article{" +
-        "id=" + id +
-        ", title=" + title +
-        ", content=" + content +
-        ", type=" + type +
-        ", sticky=" + sticky +
-        ", position=" + position +
-        ", imageUrl=" + imageUrl +
-        ", introduction=" + introduction +
-        "}";
-    }
 }
 }

+ 7 - 60
website/src/main/java/com/hssx/website/entity/BannerPictures.java

@@ -6,6 +6,9 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
 import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -13,8 +16,11 @@ import java.io.Serializable;
  * </p>
  * </p>
  *
  *
  * @author 吴涛涛
  * @author 吴涛涛
- * @since 2019-10-24
+ * @since 2020-02-05
  */
  */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
 public class BannerPictures extends Model<BannerPictures> {
 public class BannerPictures extends Model<BannerPictures> {
 
 
     private static final long serialVersionUID=1L;
     private static final long serialVersionUID=1L;
@@ -56,68 +62,9 @@ public class BannerPictures extends Model<BannerPictures> {
     private LocalDateTime uploadIndate;
     private LocalDateTime uploadIndate;
 
 
 
 
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public String getFileName() {
-        return fileName;
-    }
-
-    public void setFileName(String fileName) {
-        this.fileName = fileName;
-    }
-
-    public String getFileSize() {
-        return fileSize;
-    }
-
-    public void setFileSize(String fileSize) {
-        this.fileSize = fileSize;
-    }
-
-    public String getFileType() {
-        return fileType;
-    }
-
-    public void setFileType(String fileType) {
-        this.fileType = fileType;
-    }
-
-    public LocalDateTime getUploadIndate() {
-        return uploadIndate;
-    }
-
-    public void setUploadIndate(LocalDateTime uploadIndate) {
-        this.uploadIndate = uploadIndate;
-    }
-
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {
         return this.id;
         return this.id;
     }
     }
 
 
-    @Override
-    public String toString() {
-        return "BannerPictures{" +
-        "id=" + id +
-        ", url=" + url +
-        ", fileName=" + fileName +
-        ", fileSize=" + fileSize +
-        ", fileType=" + fileType +
-        ", uploadIndate=" + uploadIndate +
-        "}";
-    }
 }
 }

+ 7 - 51
website/src/main/java/com/hssx/website/entity/Comment.java

@@ -6,6 +6,9 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
 import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -13,8 +16,11 @@ import java.io.Serializable;
  * </p>
  * </p>
  *
  *
  * @author 吴涛涛
  * @author 吴涛涛
- * @since 2019-10-24
+ * @since 2020-02-05
  */
  */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
 public class Comment extends Model<Comment> {
 public class Comment extends Model<Comment> {
 
 
     private static final long serialVersionUID=1L;
     private static final long serialVersionUID=1L;
@@ -50,59 +56,9 @@ public class Comment extends Model<Comment> {
     private LocalDateTime indate;
     private LocalDateTime indate;
 
 
 
 
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getPhone() {
-        return phone;
-    }
-
-    public void setPhone(String phone) {
-        this.phone = phone;
-    }
-
-    public String getComment() {
-        return comment;
-    }
-
-    public void setComment(String comment) {
-        this.comment = comment;
-    }
-
-    public LocalDateTime getIndate() {
-        return indate;
-    }
-
-    public void setIndate(LocalDateTime indate) {
-        this.indate = indate;
-    }
-
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {
         return this.id;
         return this.id;
     }
     }
 
 
-    @Override
-    public String toString() {
-        return "Comment{" +
-        "id=" + id +
-        ", name=" + name +
-        ", phone=" + phone +
-        ", comment=" + comment +
-        ", indate=" + indate +
-        "}";
-    }
 }
 }

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

@@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
  * </p>
  * </p>
  *
  *
  * @author 吴涛涛
  * @author 吴涛涛
- * @since 2020-02-04
+ * @since 2020-02-05
  */
  */
 @Data
 @Data
 @EqualsAndHashCode(callSuper = false)
 @EqualsAndHashCode(callSuper = false)
@@ -48,12 +48,6 @@ public class CompanyProducts extends Model<CompanyProducts> {
     @TableField("introduction")
     @TableField("introduction")
     private String introduction;
     private String introduction;
 
 
-    /**
-     * 地址
-     */
-    @TableField("address")
-    private String address;
-
     /**
     /**
      * 是否显示在首页 0不显示 1显示
      * 是否显示在首页 0不显示 1显示
      */
      */

+ 8 - 61
website/src/main/java/com/hssx/website/entity/Cooperations.java

@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
 import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -12,8 +15,11 @@ import java.io.Serializable;
  * </p>
  * </p>
  *
  *
  * @author 吴涛涛
  * @author 吴涛涛
- * @since 2019-10-24
+ * @since 2020-02-05
  */
  */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
 public class Cooperations extends Model<Cooperations> {
 public class Cooperations extends Model<Cooperations> {
 
 
     private static final long serialVersionUID=1L;
     private static final long serialVersionUID=1L;
@@ -40,7 +46,7 @@ public class Cooperations extends Model<Cooperations> {
     private String imageUrl;
     private String imageUrl;
 
 
     /**
     /**
-     * 合作者种类 0-研发机构类、1-材料供应商、2-设备合作商、3-系统授权商、4-孵化中心、5-平台合作单位
+     * 合作者种类 0-联合开发 1-材料供应商 2-芯片及PCB版合作伙伴 3-软件合作伙伴 4-投融资服务机构
      */
      */
     @TableField("type")
     @TableField("type")
     private Integer type;
     private Integer type;
@@ -52,68 +58,9 @@ public class Cooperations extends Model<Cooperations> {
     private Integer sticky;
     private Integer sticky;
 
 
 
 
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getImageUrl() {
-        return imageUrl;
-    }
-
-    public void setImageUrl(String imageUrl) {
-        this.imageUrl = imageUrl;
-    }
-
-    public Integer getType() {
-        return type;
-    }
-
-    public void setType(Integer type) {
-        this.type = type;
-    }
-
-    public Integer getSticky() {
-        return sticky;
-    }
-
-    public void setSticky(Integer sticky) {
-        this.sticky = sticky;
-    }
-
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {
         return this.id;
         return this.id;
     }
     }
 
 
-    @Override
-    public String toString() {
-        return "Cooperations{" +
-        "id=" + id +
-        ", name=" + name +
-        ", description=" + description +
-        ", imageUrl=" + imageUrl +
-        ", type=" + type +
-        ", sticky=" + sticky +
-        "}";
-    }
 }
 }

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

@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
  * </p>
  * </p>
  *
  *
  * @author 吴涛涛
  * @author 吴涛涛
- * @since 2019-11-21
+ * @since 2020-02-05
  */
  */
 @Data
 @Data
 @EqualsAndHashCode(callSuper = false)
 @EqualsAndHashCode(callSuper = false)

+ 7 - 33
website/src/main/java/com/hssx/website/entity/User.java

@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
 import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -12,8 +15,11 @@ import java.io.Serializable;
  * </p>
  * </p>
  *
  *
  * @author 吴涛涛
  * @author 吴涛涛
- * @since 2019-10-24
+ * @since 2020-02-05
  */
  */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
 public class User extends Model<User> {
 public class User extends Model<User> {
 
 
     private static final long serialVersionUID=1L;
     private static final long serialVersionUID=1L;
@@ -37,41 +43,9 @@ public class User extends Model<User> {
     private String password;
     private String password;
 
 
 
 
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public void setUsername(String username) {
-        this.username = username;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {
         return this.id;
         return this.id;
     }
     }
 
 
-    @Override
-    public String toString() {
-        return "User{" +
-        "id=" + id +
-        ", username=" + username +
-        ", password=" + password +
-        "}";
-    }
 }
 }

+ 5 - 11
website/src/main/java/com/hssx/website/service/impl/UserServiceImpl.java

@@ -2,15 +2,9 @@ package com.hssx.website.service.impl;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.hssx.website.entity.Article;
-import com.hssx.website.entity.CompanyProducts;
-import com.hssx.website.entity.Cooperations;
-import com.hssx.website.entity.User;
+import com.hssx.website.entity.*;
 import com.hssx.website.entity.vo.CooperationsVO;
 import com.hssx.website.entity.vo.CooperationsVO;
-import com.hssx.website.mapper.ArticleMapper;
-import com.hssx.website.mapper.CompanyProductsMapper;
-import com.hssx.website.mapper.CooperationsMapper;
-import com.hssx.website.mapper.UserMapper;
+import com.hssx.website.mapper.*;
 import com.hssx.website.service.UserService;
 import com.hssx.website.service.UserService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -35,7 +29,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
     @Resource
     @Resource
     private CooperationsMapper cooperationsMapper;
     private CooperationsMapper cooperationsMapper;
     @Resource
     @Resource
-    private CompanyProductsMapper companyProductsMapper;
+    private VipProductsMapper vipProductsMapper;
 
 
     @Override
     @Override
     public Model getAdvantage(Model model) {
     public Model getAdvantage(Model model) {
@@ -104,8 +98,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 
 
     @Override
     @Override
     public Model getVip(Model model) {
     public Model getVip(Model model) {
-        model.addAttribute("companyProducts", companyProductsMapper.selectList(
-                new QueryWrapper<CompanyProducts>().orderByDesc("id")));
+        model.addAttribute("companyProducts", vipProductsMapper.selectList(
+                new QueryWrapper<VipProducts>().orderByDesc("id")));
         return model;
         return model;
     }
     }
 }
 }

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

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

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

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