diff --git a/share_project/pom.xml b/share_project/pom.xml index 732f81f2118324f62ff43032ffb3ade2693a47da..ffd97c5c34f4d371350c4b0abfcd9a0b07106fb6 100644 --- a/share_project/pom.xml +++ b/share_project/pom.xml @@ -73,12 +73,6 @@ 1.1.20 - - - org.projectlombok - lombok - 1.18.12 - diff --git a/share_project/src/main/java/com/share/controller/DemandProjectController.java b/share_project/src/main/java/com/share/controller/DemandProjectController.java new file mode 100644 index 0000000000000000000000000000000000000000..b8c537f709a3c1fec7723b8c6777c80956e811b7 --- /dev/null +++ b/share_project/src/main/java/com/share/controller/DemandProjectController.java @@ -0,0 +1,35 @@ +package com.share.controller; + +import com.share.domain.DemandProject; +import com.share.domain.ResultInfo; +import com.share.service.DemandProjectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * @author 谢佳豪 + * @data 2020/11/24 - 20:12 + * @description 需求项目模块controller层 + */ +@Controller +@ResponseBody +@RequestMapping("/demand") +public class DemandProjectController { + + @Autowired + private DemandProjectService demandProjectService; + + + /** + * post请求 提交需求表单 添加数据 + * @param demandProject 表单数据对象 + * @return + */ + @PostMapping + public ResultInfo addDemandProject(DemandProject demandProject){ + return demandProjectService.addDemandProject(demandProject); + } +} diff --git a/share_project/src/main/java/com/share/controller/SkillProjectController.java b/share_project/src/main/java/com/share/controller/SkillProjectController.java new file mode 100644 index 0000000000000000000000000000000000000000..a5bff3084d50709985e725920f2a00e0822cae90 --- /dev/null +++ b/share_project/src/main/java/com/share/controller/SkillProjectController.java @@ -0,0 +1,17 @@ +package com.share.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * @author 谢佳豪 + * @data 2020/11/24 - 20:38 + * @description 技能项目模块controller层 + */ +@Controller +@ResponseBody +@RequestMapping("/skill") +public class SkillProjectController { + +} diff --git a/share_project/src/main/java/com/share/domain/DemandProject.java b/share_project/src/main/java/com/share/domain/DemandProject.java index cde1c82789484c5e8a5ba5f2145efc3ddbad03db..3e86123be734a2b44e9ff8245a9813fb161f82a9 100644 --- a/share_project/src/main/java/com/share/domain/DemandProject.java +++ b/share_project/src/main/java/com/share/domain/DemandProject.java @@ -1,9 +1,5 @@ package com.share.domain; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.ToString; import java.io.Serializable; import java.util.Date; @@ -13,11 +9,8 @@ import java.util.Date; * @data 2020/11/23 - 22:45 * @description demand_project 需求项目实体类 */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@ToString public class DemandProject implements Serializable { + /** * 项目编号 */ @@ -66,4 +59,118 @@ public class DemandProject implements Serializable { * 截止时间 */ private Date endTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public String getProjectDesc() { + return projectDesc; + } + + public void setProjectDesc(String projectDesc) { + this.projectDesc = projectDesc; + } + + public String getSubsidy() { + return subsidy; + } + + public void setSubsidy(String subsidy) { + this.subsidy = subsidy; + } + + public Float getPrice() { + return price; + } + + public void setPrice(Float price) { + this.price = price; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getSkill() { + return skill; + } + + public void setSkill(String skill) { + this.skill = skill; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + public String getPublisher() { + return publisher; + } + + public void setPublisher(String publisher) { + this.publisher = publisher; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + @Override + public String toString() { + return "DemandProject{" + + "id=" + id + + ", projectName='" + projectName + '\'' + + ", projectDesc='" + projectDesc + '\'' + + ", subsidy='" + subsidy + '\'' + + ", price=" + price + + ", address='" + address + '\'' + + ", skill='" + skill + '\'' + + ", type='" + type + '\'' + + ", method='" + method + '\'' + + ", publisher='" + publisher + '\'' + + ", startTime=" + startTime + + ", endTime=" + endTime + + '}'; + } } diff --git a/share_project/src/main/java/com/share/domain/ResultInfo.java b/share_project/src/main/java/com/share/domain/ResultInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..c2de8601fb624c2cfa99c4bb8cf464704d0a9e40 --- /dev/null +++ b/share_project/src/main/java/com/share/domain/ResultInfo.java @@ -0,0 +1,88 @@ +package com.share.domain; + + + +/** + * Demo Class + * + * @author 古市 + * @date 2020-04-04 22:28 + **/ +public class ResultInfo { + + /** + * 操作的状态码: + * 成功为1,失败为0,成功但警告为3 + */ + private Integer status; + + /** + * 返回的结果集 + */ + private Object data; + + /** + * 返回的相关信息 + */ + private String message; + + + public static ResultInfo successInfo(){ + return successInfo(null, null); + } + + public static ResultInfo successInfo(String message){ + return successInfo(message, null); + } + + public static ResultInfo successInfo(String message, Object data){ + return new ResultInfo(1, data, message); + } + + public static ResultInfo failInfo(){ + return failInfo(null, null); + } + + public static ResultInfo failInfo(String message){ + return failInfo(message, null); + } + + public static ResultInfo failInfo(String message, Object data){ + return new ResultInfo(0, data, message); + } + + public static ResultInfo warnInfo(String message){ + return new ResultInfo(2, null, message); + } + + + public ResultInfo(Integer status, Object data, String message) { + this.status = status; + this.data = data; + this.message = message; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public Object getData() { + return data; + } + + public void setData(Object data) { + this.data = data; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/share_project/src/main/java/com/share/domain/SkillProject.java b/share_project/src/main/java/com/share/domain/SkillProject.java index 39d7fbbb365499192630c8723d65e8384d2f6506..966d8786550739dd9ab4d61163a0f8d7af964c0a 100644 --- a/share_project/src/main/java/com/share/domain/SkillProject.java +++ b/share_project/src/main/java/com/share/domain/SkillProject.java @@ -1,9 +1,5 @@ package com.share.domain; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.ToString; import java.util.Date; @@ -12,11 +8,8 @@ import java.util.Date; * @data 2020/11/24 - 15:20 * @description skill_project 技能项目表实体类 */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@ToString public class SkillProject { + /** * 项目编号 */ @@ -61,4 +54,109 @@ public class SkillProject { * 截止时间 */ private Date endTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public String getProjectDesc() { + return projectDesc; + } + + public void setProjectDesc(String projectDesc) { + this.projectDesc = projectDesc; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getSkill() { + return skill; + } + + public void setSkill(String skill) { + this.skill = skill; + } + + public Float getPrice() { + return price; + } + + public void setPrice(Float price) { + this.price = price; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + public String getPublisher() { + return publisher; + } + + public void setPublisher(String publisher) { + this.publisher = publisher; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + @Override + public String toString() { + return "SkillProject{" + + "id=" + id + + ", projectName='" + projectName + '\'' + + ", projectDesc='" + projectDesc + '\'' + + ", address='" + address + '\'' + + ", skill='" + skill + '\'' + + ", price=" + price + + ", type='" + type + '\'' + + ", method='" + method + '\'' + + ", publisher='" + publisher + '\'' + + ", startTime=" + startTime + + ", endTime=" + endTime + + '}'; + } } diff --git a/share_project/src/main/java/com/share/domain/UserDemandProject.java b/share_project/src/main/java/com/share/domain/UserDemandProject.java index 06d158880696a32ce720a8c0ac3cd780a5569580..f1edce58222a2867dfcf0b9d5419fedda97d8cc9 100644 --- a/share_project/src/main/java/com/share/domain/UserDemandProject.java +++ b/share_project/src/main/java/com/share/domain/UserDemandProject.java @@ -1,9 +1,5 @@ package com.share.domain; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.ToString; import java.io.Serializable; @@ -12,11 +8,8 @@ import java.io.Serializable; * @data 2020/11/24 - 15:08 * @description user_demand_project 用户需求项目关联表的实体类 */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@ToString public class UserDemandProject implements Serializable { + /** * 需求项目id */ @@ -33,4 +26,46 @@ public class UserDemandProject implements Serializable { * 项目状态 TODO(待发布状态--0;待审核状态--1) */ private Integer status; + + public Integer getProjectId() { + return projectId; + } + + public void setProjectId(Integer projectId) { + this.projectId = projectId; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + @Override + public String toString() { + return "UserDemandProject{" + + "projectId=" + projectId + + ", username='" + username + '\'' + + ", telephone='" + telephone + '\'' + + ", status=" + status + + '}'; + } } diff --git a/share_project/src/main/java/com/share/domain/UserSkillProject.java b/share_project/src/main/java/com/share/domain/UserSkillProject.java index 918ffd2e7ee3889a451ea2b8afd8935c53b270e4..804f90133b1529f9a324dad5d510ec64bde6f9a3 100644 --- a/share_project/src/main/java/com/share/domain/UserSkillProject.java +++ b/share_project/src/main/java/com/share/domain/UserSkillProject.java @@ -1,20 +1,15 @@ package com.share.domain; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.ToString; + + +import java.io.Serializable; /** * @author 谢佳豪 * @data 2020/11/24 - 15:25 * @description user_skill_project 用户技能项目关联表的实体类 */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@ToString -public class UserSkillProject { +public class UserSkillProject implements Serializable { /** * 需求项目id */ @@ -31,4 +26,46 @@ public class UserSkillProject { * 项目状态 TODO(待发布状态--0;待审核状态--1) */ private Integer status; + + public Integer getProjectId() { + return projectId; + } + + public void setProjectId(Integer projectId) { + this.projectId = projectId; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getTelephone() { + return telephone; + } + + public void setTelephone(String telephone) { + this.telephone = telephone; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + @Override + public String toString() { + return "UserSkillProject{" + + "projectId=" + projectId + + ", username='" + username + '\'' + + ", telephone='" + telephone + '\'' + + ", status=" + status + + '}'; + } } diff --git a/share_project/src/main/java/com/share/mapper/UserSkillProjectMapper.java b/share_project/src/main/java/com/share/mapper/UserSkillProjectMapper.java index 048cd7a55dedd8a3143b3e9714872a75542a6d35..d97dcf5c53810c9f00eb81601e437029fef4d320 100644 --- a/share_project/src/main/java/com/share/mapper/UserSkillProjectMapper.java +++ b/share_project/src/main/java/com/share/mapper/UserSkillProjectMapper.java @@ -1,6 +1,5 @@ package com.share.mapper; -import com.share.domain.UserDemandProject; import com.share.domain.UserSkillProject; import org.springframework.stereotype.Repository; diff --git a/share_project/src/main/java/com/share/service/DemandProjectService.java b/share_project/src/main/java/com/share/service/DemandProjectService.java new file mode 100644 index 0000000000000000000000000000000000000000..e4deb859b6e30112d58afd29b86d3b4d5254b69c --- /dev/null +++ b/share_project/src/main/java/com/share/service/DemandProjectService.java @@ -0,0 +1,21 @@ +package com.share.service; + + +import com.share.domain.DemandProject; +import com.share.domain.ResultInfo; + +/** + * @author 谢佳豪 + * @data 2020/11/24 - 20:42 + * @description 需求项目模块service接口 + */ +public interface DemandProjectService { + + /** + * 添加需求项目数据 + * @param demandProject 需求项目表单数据 TODO 用户名如何填写到项目表单中! + * @return + */ + ResultInfo addDemandProject(DemandProject demandProject); + +} diff --git a/share_project/src/main/java/com/share/service/impl/DemandProjectServiceImpl.java b/share_project/src/main/java/com/share/service/impl/DemandProjectServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..2deafdd5e9437033f21c2421ca796d85a6f8687f --- /dev/null +++ b/share_project/src/main/java/com/share/service/impl/DemandProjectServiceImpl.java @@ -0,0 +1,21 @@ +package com.share.service.impl; + +import com.share.domain.DemandProject; +import com.share.domain.ResultInfo; +import com.share.service.DemandProjectService; +import org.springframework.stereotype.Service; + +/** + * @author 谢佳豪 + * @data 2020/11/24 - 20:47 + * @description + */ +@Service +public class DemandProjectServiceImpl implements DemandProjectService { + + @Override + public ResultInfo addDemandProject(DemandProject demandProject) { + + return null; + } +}