From df284fb487dc3ad1bc099193b7a9e441c87cc284 Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Thu, 22 Apr 2021 18:04:08 +0800 Subject: [PATCH] 20210422 --- .../filedeal/api/WebsiteController.java | 53 ++ .../com/ccsens/filedeal/bean/dto/FileDto.java | 1 + .../ccsens/filedeal/bean/dto/WebsiteDto.java | 43 ++ .../com/ccsens/filedeal/bean/po/Feedback.java | 106 +++ .../filedeal/bean/po/FeedbackExample.java | 721 ++++++++++++++++++ .../com/ccsens/filedeal/bean/po/League.java | 106 +++ .../filedeal/bean/po/LeagueExample.java | 721 ++++++++++++++++++ .../persist/mapper/FeedbackMapper.java | 30 + .../filedeal/persist/mapper/LeagueMapper.java | 30 + .../filedeal/service/IWebsiteService.java | 20 + .../filedeal/service/WebsiteService.java | 46 ++ src/main/resources/application-prod.yml | 6 +- src/main/resources/application-test.yml | 2 +- src/main/resources/application.yml | 2 +- src/main/resources/mapper_dao/FileDao.xml | 3 +- .../resources/mapper_raw/FeedbackMapper.xml | 258 +++++++ .../resources/mapper_raw/LeagueMapper.xml | 258 +++++++ src/main/resources/mbg.xml | 12 +- 18 files changed, 2407 insertions(+), 11 deletions(-) create mode 100644 src/main/java/com/ccsens/filedeal/api/WebsiteController.java create mode 100644 src/main/java/com/ccsens/filedeal/bean/dto/WebsiteDto.java create mode 100644 src/main/java/com/ccsens/filedeal/bean/po/Feedback.java create mode 100644 src/main/java/com/ccsens/filedeal/bean/po/FeedbackExample.java create mode 100644 src/main/java/com/ccsens/filedeal/bean/po/League.java create mode 100644 src/main/java/com/ccsens/filedeal/bean/po/LeagueExample.java create mode 100644 src/main/java/com/ccsens/filedeal/persist/mapper/FeedbackMapper.java create mode 100644 src/main/java/com/ccsens/filedeal/persist/mapper/LeagueMapper.java create mode 100644 src/main/java/com/ccsens/filedeal/service/IWebsiteService.java create mode 100644 src/main/java/com/ccsens/filedeal/service/WebsiteService.java create mode 100644 src/main/resources/mapper_raw/FeedbackMapper.xml create mode 100644 src/main/resources/mapper_raw/LeagueMapper.xml diff --git a/src/main/java/com/ccsens/filedeal/api/WebsiteController.java b/src/main/java/com/ccsens/filedeal/api/WebsiteController.java new file mode 100644 index 0000000..1596fcc --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/api/WebsiteController.java @@ -0,0 +1,53 @@ +package com.ccsens.filedeal.api; + +import com.ccsens.filedeal.bean.dto.FileDto; +import com.ccsens.filedeal.bean.dto.WebsiteDto; +import com.ccsens.filedeal.bean.vo.FileVo; +import com.ccsens.filedeal.service.IWebsiteService; +import com.ccsens.filedeal.util.JsonResponse; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +/** + * @author 逗 + */ +@Slf4j +@Api(tags = "官网") +@RestController +@RequestMapping("/website") +public class WebsiteController { + @Resource + private IWebsiteService websiteService; + + + @ApiOperation(value = "官网联盟-添加") + @ApiImplicitParams({ + }) + @RequestMapping(value = "save", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveLeague(HttpServletRequest request, WebsiteDto.SaveLeague saveLeague) throws Exception { + log.info("添加联盟:{}", saveLeague); + websiteService.saveLeague(saveLeague); + log.info("添加联盟成功"); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "保存反馈意见") + @ApiImplicitParams({ + }) + @RequestMapping(value = "saveFeedback", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse saveFeedback(HttpServletRequest request, WebsiteDto.SaveFeedback saveFeedback) throws Exception { + log.info("保存反馈意见:{}", saveFeedback); + websiteService.saveFeedback(saveFeedback); + log.info("保存反馈意见成功"); + return JsonResponse.newInstance().ok(); + } +} diff --git a/src/main/java/com/ccsens/filedeal/bean/dto/FileDto.java b/src/main/java/com/ccsens/filedeal/bean/dto/FileDto.java index c207337..fd649d7 100644 --- a/src/main/java/com/ccsens/filedeal/bean/dto/FileDto.java +++ b/src/main/java/com/ccsens/filedeal/bean/dto/FileDto.java @@ -12,6 +12,7 @@ import javax.validation.constraints.NotNull; * @author: whj * @time: 2020/9/14 11:44 */ +@Data public class FileDto { @Data diff --git a/src/main/java/com/ccsens/filedeal/bean/dto/WebsiteDto.java b/src/main/java/com/ccsens/filedeal/bean/dto/WebsiteDto.java new file mode 100644 index 0000000..a713769 --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/bean/dto/WebsiteDto.java @@ -0,0 +1,43 @@ +package com.ccsens.filedeal.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Max; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +/** + * @author 逗 + */ +@Data +public class WebsiteDto { + + @Data + @ApiModel("官网联盟添加") + public static class SaveLeague{ + @ApiModelProperty("公司名") + private String companyName; + @ApiModelProperty("联系人名") + private String linkman; + @ApiModelProperty("联系人电话") + private String linkmanPhone; + @ApiModelProperty("职务") + private String linkmanPost; + } + + @Data + @ApiModel("保存反馈意见") + public static class SaveFeedback { + @ApiModelProperty("姓名") + private String name; + @ApiModelProperty("手机号") + private String phone; + @ApiModelProperty("邮箱") + private String mailbox; + @Size(max = 500,min = 0,message = "字数过长") + @ApiModelProperty("意见") + private String content; + } +} diff --git a/src/main/java/com/ccsens/filedeal/bean/po/Feedback.java b/src/main/java/com/ccsens/filedeal/bean/po/Feedback.java new file mode 100644 index 0000000..1c21f80 --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/bean/po/Feedback.java @@ -0,0 +1,106 @@ +package com.ccsens.filedeal.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class Feedback implements Serializable { + private Long id; + + private String name; + + private String phone; + + private String mailbox; + + private String content; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone == null ? null : phone.trim(); + } + + public String getMailbox() { + return mailbox; + } + + public void setMailbox(String mailbox) { + this.mailbox = mailbox == null ? null : mailbox.trim(); + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content == null ? null : content.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", phone=").append(phone); + sb.append(", mailbox=").append(mailbox); + sb.append(", content=").append(content); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/com/ccsens/filedeal/bean/po/FeedbackExample.java b/src/main/java/com/ccsens/filedeal/bean/po/FeedbackExample.java new file mode 100644 index 0000000..43f186c --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/bean/po/FeedbackExample.java @@ -0,0 +1,721 @@ +package com.ccsens.filedeal.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class FeedbackExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FeedbackExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andMailboxIsNull() { + addCriterion("mailbox is null"); + return (Criteria) this; + } + + public Criteria andMailboxIsNotNull() { + addCriterion("mailbox is not null"); + return (Criteria) this; + } + + public Criteria andMailboxEqualTo(String value) { + addCriterion("mailbox =", value, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxNotEqualTo(String value) { + addCriterion("mailbox <>", value, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxGreaterThan(String value) { + addCriterion("mailbox >", value, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxGreaterThanOrEqualTo(String value) { + addCriterion("mailbox >=", value, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxLessThan(String value) { + addCriterion("mailbox <", value, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxLessThanOrEqualTo(String value) { + addCriterion("mailbox <=", value, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxLike(String value) { + addCriterion("mailbox like", value, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxNotLike(String value) { + addCriterion("mailbox not like", value, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxIn(List values) { + addCriterion("mailbox in", values, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxNotIn(List values) { + addCriterion("mailbox not in", values, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxBetween(String value1, String value2) { + addCriterion("mailbox between", value1, value2, "mailbox"); + return (Criteria) this; + } + + public Criteria andMailboxNotBetween(String value1, String value2) { + addCriterion("mailbox not between", value1, value2, "mailbox"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/ccsens/filedeal/bean/po/League.java b/src/main/java/com/ccsens/filedeal/bean/po/League.java new file mode 100644 index 0000000..539eaf6 --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/bean/po/League.java @@ -0,0 +1,106 @@ +package com.ccsens.filedeal.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class League implements Serializable { + private Long id; + + private String companyName; + + private String linkman; + + private String linkmanPhone; + + private String linkmanPost; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName == null ? null : companyName.trim(); + } + + public String getLinkman() { + return linkman; + } + + public void setLinkman(String linkman) { + this.linkman = linkman == null ? null : linkman.trim(); + } + + public String getLinkmanPhone() { + return linkmanPhone; + } + + public void setLinkmanPhone(String linkmanPhone) { + this.linkmanPhone = linkmanPhone == null ? null : linkmanPhone.trim(); + } + + public String getLinkmanPost() { + return linkmanPost; + } + + public void setLinkmanPost(String linkmanPost) { + this.linkmanPost = linkmanPost == null ? null : linkmanPost.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyName=").append(companyName); + sb.append(", linkman=").append(linkman); + sb.append(", linkmanPhone=").append(linkmanPhone); + sb.append(", linkmanPost=").append(linkmanPost); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/com/ccsens/filedeal/bean/po/LeagueExample.java b/src/main/java/com/ccsens/filedeal/bean/po/LeagueExample.java new file mode 100644 index 0000000..e4d79ba --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/bean/po/LeagueExample.java @@ -0,0 +1,721 @@ +package com.ccsens.filedeal.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class LeagueExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LeagueExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyNameIsNull() { + addCriterion("company_name is null"); + return (Criteria) this; + } + + public Criteria andCompanyNameIsNotNull() { + addCriterion("company_name is not null"); + return (Criteria) this; + } + + public Criteria andCompanyNameEqualTo(String value) { + addCriterion("company_name =", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotEqualTo(String value) { + addCriterion("company_name <>", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThan(String value) { + addCriterion("company_name >", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThanOrEqualTo(String value) { + addCriterion("company_name >=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThan(String value) { + addCriterion("company_name <", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThanOrEqualTo(String value) { + addCriterion("company_name <=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLike(String value) { + addCriterion("company_name like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotLike(String value) { + addCriterion("company_name not like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameIn(List values) { + addCriterion("company_name in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotIn(List values) { + addCriterion("company_name not in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameBetween(String value1, String value2) { + addCriterion("company_name between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotBetween(String value1, String value2) { + addCriterion("company_name not between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andLinkmanIsNull() { + addCriterion("linkman is null"); + return (Criteria) this; + } + + public Criteria andLinkmanIsNotNull() { + addCriterion("linkman is not null"); + return (Criteria) this; + } + + public Criteria andLinkmanEqualTo(String value) { + addCriterion("linkman =", value, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanNotEqualTo(String value) { + addCriterion("linkman <>", value, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanGreaterThan(String value) { + addCriterion("linkman >", value, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanGreaterThanOrEqualTo(String value) { + addCriterion("linkman >=", value, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanLessThan(String value) { + addCriterion("linkman <", value, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanLessThanOrEqualTo(String value) { + addCriterion("linkman <=", value, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanLike(String value) { + addCriterion("linkman like", value, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanNotLike(String value) { + addCriterion("linkman not like", value, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanIn(List values) { + addCriterion("linkman in", values, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanNotIn(List values) { + addCriterion("linkman not in", values, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanBetween(String value1, String value2) { + addCriterion("linkman between", value1, value2, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanNotBetween(String value1, String value2) { + addCriterion("linkman not between", value1, value2, "linkman"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneIsNull() { + addCriterion("linkman_phone is null"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneIsNotNull() { + addCriterion("linkman_phone is not null"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneEqualTo(String value) { + addCriterion("linkman_phone =", value, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneNotEqualTo(String value) { + addCriterion("linkman_phone <>", value, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneGreaterThan(String value) { + addCriterion("linkman_phone >", value, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneGreaterThanOrEqualTo(String value) { + addCriterion("linkman_phone >=", value, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneLessThan(String value) { + addCriterion("linkman_phone <", value, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneLessThanOrEqualTo(String value) { + addCriterion("linkman_phone <=", value, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneLike(String value) { + addCriterion("linkman_phone like", value, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneNotLike(String value) { + addCriterion("linkman_phone not like", value, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneIn(List values) { + addCriterion("linkman_phone in", values, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneNotIn(List values) { + addCriterion("linkman_phone not in", values, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneBetween(String value1, String value2) { + addCriterion("linkman_phone between", value1, value2, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPhoneNotBetween(String value1, String value2) { + addCriterion("linkman_phone not between", value1, value2, "linkmanPhone"); + return (Criteria) this; + } + + public Criteria andLinkmanPostIsNull() { + addCriterion("linkman_post is null"); + return (Criteria) this; + } + + public Criteria andLinkmanPostIsNotNull() { + addCriterion("linkman_post is not null"); + return (Criteria) this; + } + + public Criteria andLinkmanPostEqualTo(String value) { + addCriterion("linkman_post =", value, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostNotEqualTo(String value) { + addCriterion("linkman_post <>", value, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostGreaterThan(String value) { + addCriterion("linkman_post >", value, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostGreaterThanOrEqualTo(String value) { + addCriterion("linkman_post >=", value, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostLessThan(String value) { + addCriterion("linkman_post <", value, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostLessThanOrEqualTo(String value) { + addCriterion("linkman_post <=", value, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostLike(String value) { + addCriterion("linkman_post like", value, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostNotLike(String value) { + addCriterion("linkman_post not like", value, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostIn(List values) { + addCriterion("linkman_post in", values, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostNotIn(List values) { + addCriterion("linkman_post not in", values, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostBetween(String value1, String value2) { + addCriterion("linkman_post between", value1, value2, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andLinkmanPostNotBetween(String value1, String value2) { + addCriterion("linkman_post not between", value1, value2, "linkmanPost"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/ccsens/filedeal/persist/mapper/FeedbackMapper.java b/src/main/java/com/ccsens/filedeal/persist/mapper/FeedbackMapper.java new file mode 100644 index 0000000..7455968 --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/persist/mapper/FeedbackMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.filedeal.persist.mapper; + +import com.ccsens.filedeal.bean.po.Feedback; +import com.ccsens.filedeal.bean.po.FeedbackExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FeedbackMapper { + long countByExample(FeedbackExample example); + + int deleteByExample(FeedbackExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Feedback record); + + int insertSelective(Feedback record); + + List selectByExample(FeedbackExample example); + + Feedback selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Feedback record, @Param("example") FeedbackExample example); + + int updateByExample(@Param("record") Feedback record, @Param("example") FeedbackExample example); + + int updateByPrimaryKeySelective(Feedback record); + + int updateByPrimaryKey(Feedback record); +} \ No newline at end of file diff --git a/src/main/java/com/ccsens/filedeal/persist/mapper/LeagueMapper.java b/src/main/java/com/ccsens/filedeal/persist/mapper/LeagueMapper.java new file mode 100644 index 0000000..17f1ea1 --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/persist/mapper/LeagueMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.filedeal.persist.mapper; + +import com.ccsens.filedeal.bean.po.League; +import com.ccsens.filedeal.bean.po.LeagueExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LeagueMapper { + long countByExample(LeagueExample example); + + int deleteByExample(LeagueExample example); + + int deleteByPrimaryKey(Long id); + + int insert(League record); + + int insertSelective(League record); + + List selectByExample(LeagueExample example); + + League selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") League record, @Param("example") LeagueExample example); + + int updateByExample(@Param("record") League record, @Param("example") LeagueExample example); + + int updateByPrimaryKeySelective(League record); + + int updateByPrimaryKey(League record); +} \ No newline at end of file diff --git a/src/main/java/com/ccsens/filedeal/service/IWebsiteService.java b/src/main/java/com/ccsens/filedeal/service/IWebsiteService.java new file mode 100644 index 0000000..64acbd0 --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/service/IWebsiteService.java @@ -0,0 +1,20 @@ +package com.ccsens.filedeal.service; + +import com.ccsens.filedeal.bean.dto.WebsiteDto; + +/** + * @author 逗 + */ +public interface IWebsiteService { + /** + * 官网添加联盟 + * @param saveLeague 联盟 + */ + void saveLeague(WebsiteDto.SaveLeague saveLeague); + + /** + * 保存反馈意见 + * @param saveFeedback 意见 + */ + void saveFeedback(WebsiteDto.SaveFeedback saveFeedback); +} diff --git a/src/main/java/com/ccsens/filedeal/service/WebsiteService.java b/src/main/java/com/ccsens/filedeal/service/WebsiteService.java new file mode 100644 index 0000000..3bada38 --- /dev/null +++ b/src/main/java/com/ccsens/filedeal/service/WebsiteService.java @@ -0,0 +1,46 @@ +package com.ccsens.filedeal.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.lang.Snowflake; +import com.ccsens.filedeal.bean.dto.WebsiteDto; +import com.ccsens.filedeal.bean.po.Feedback; +import com.ccsens.filedeal.bean.po.League; +import com.ccsens.filedeal.persist.mapper.FeedbackMapper; +import com.ccsens.filedeal.persist.mapper.LeagueMapper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; + +/** + * @author 逗 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class WebsiteService implements IWebsiteService { + @Resource + private Snowflake snowflake; + @Resource + private LeagueMapper leagueMapper; + @Resource + private FeedbackMapper feedbackMapper; + + @Override + public void saveLeague(WebsiteDto.SaveLeague saveLeague) { + League league = new League(); + BeanUtil.copyProperties(saveLeague,league); + league.setId(snowflake.nextId()); + leagueMapper.insertSelective(league); + } + + @Override + public void saveFeedback(WebsiteDto.SaveFeedback saveFeedback) { + Feedback feedback = new Feedback(); + BeanUtil.copyProperties(saveFeedback,feedback); + feedback.setId(snowflake.nextId()); + feedbackMapper.insertSelective(feedback); + } +} diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 1135a34..3d89325 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -1,5 +1,5 @@ server: - port: 8000 + port: 8001 spring: snowflake: datacenterId: 1 @@ -19,9 +19,9 @@ spring: port: 6379 timeout: 1000ms swagger: - enable: false + enable: true file: path: /home/filedeal/uploads/ domain: https://www.tall.wiki/filedeal/ - imgDomain: https://www.tall.wiki/filedeal/uploads \ No newline at end of file + imgDomain: https://www.tall.wiki/filedeal/uploads/ \ No newline at end of file diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index 9b436d5..43682f3 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -25,5 +25,5 @@ swagger: file: path: /home/filedeal/uploads/ domain: https://test.tall.wiki/filedeal/ - imgDomain: https://test.tall.wiki/filedeal/uploads + imgDomain: https://test.tall.wiki/filedeal/uploads/ diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 95706ce..d7b5c1e 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: dev + active: prod include: common diff --git a/src/main/resources/mapper_dao/FileDao.xml b/src/main/resources/mapper_dao/FileDao.xml index 20cf0f4..971c8d2 100644 --- a/src/main/resources/mapper_dao/FileDao.xml +++ b/src/main/resources/mapper_dao/FileDao.xml @@ -32,9 +32,10 @@ t_file_commit c WHERE l.commit_id = c.id - AND l.id = #{linkId} + AND c.id = #{linkId} AND l.rec_status = 0 AND c.rec_status = 0 + limit 1 + select + + distinct + + + from t_feedback + + + + + order by ${orderByClause} + + + + + delete from t_feedback + where id = #{id,jdbcType=BIGINT} + + + delete from t_feedback + + + + + + insert into t_feedback (id, name, phone, + mailbox, content, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, + #{mailbox,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_feedback + + + id, + + + name, + + + phone, + + + mailbox, + + + content, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{mailbox,jdbcType=VARCHAR}, + + + #{content,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_feedback + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + mailbox = #{record.mailbox,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_feedback + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + phone = #{record.phone,jdbcType=VARCHAR}, + mailbox = #{record.mailbox,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_feedback + + + name = #{name,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + mailbox = #{mailbox,jdbcType=VARCHAR}, + + + content = #{content,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_feedback + set name = #{name,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + mailbox = #{mailbox,jdbcType=VARCHAR}, + content = #{content,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper_raw/LeagueMapper.xml b/src/main/resources/mapper_raw/LeagueMapper.xml new file mode 100644 index 0000000..bda272d --- /dev/null +++ b/src/main/resources/mapper_raw/LeagueMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + 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} + + + + + + + + + + + id, company_name, linkman, linkman_phone, linkman_post, created_at, updated_at, rec_status + + + + + delete from t_league + where id = #{id,jdbcType=BIGINT} + + + delete from t_league + + + + + + insert into t_league (id, company_name, linkman, + linkman_phone, linkman_post, created_at, + updated_at, rec_status) + values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{linkman,jdbcType=VARCHAR}, + #{linkmanPhone,jdbcType=VARCHAR}, #{linkmanPost,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) + + + insert into t_league + + + id, + + + company_name, + + + linkman, + + + linkman_phone, + + + linkman_post, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{companyName,jdbcType=VARCHAR}, + + + #{linkman,jdbcType=VARCHAR}, + + + #{linkmanPhone,jdbcType=VARCHAR}, + + + #{linkmanPost,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_league + + + id = #{record.id,jdbcType=BIGINT}, + + + company_name = #{record.companyName,jdbcType=VARCHAR}, + + + linkman = #{record.linkman,jdbcType=VARCHAR}, + + + linkman_phone = #{record.linkmanPhone,jdbcType=VARCHAR}, + + + linkman_post = #{record.linkmanPost,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_league + set id = #{record.id,jdbcType=BIGINT}, + company_name = #{record.companyName,jdbcType=VARCHAR}, + linkman = #{record.linkman,jdbcType=VARCHAR}, + linkman_phone = #{record.linkmanPhone,jdbcType=VARCHAR}, + linkman_post = #{record.linkmanPost,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_league + + + company_name = #{companyName,jdbcType=VARCHAR}, + + + linkman = #{linkman,jdbcType=VARCHAR}, + + + linkman_phone = #{linkmanPhone,jdbcType=VARCHAR}, + + + linkman_post = #{linkmanPost,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_league + set company_name = #{companyName,jdbcType=VARCHAR}, + linkman = #{linkman,jdbcType=VARCHAR}, + linkman_phone = #{linkmanPhone,jdbcType=VARCHAR}, + linkman_post = #{linkmanPost,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mbg.xml b/src/main/resources/mbg.xml index 7565c64..567938a 100644 --- a/src/main/resources/mbg.xml +++ b/src/main/resources/mbg.xml @@ -21,7 +21,7 @@ @@ -56,10 +56,12 @@ - -
-
-
+ + + + +
+