diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Apply.java b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Apply.java similarity index 59% rename from backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Apply.java rename to backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Apply.java index 0854efc..eb637f0 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Apply.java +++ b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Apply.java @@ -1,9 +1,15 @@ -package com.cxyxiaomo.epp.index.pojo; +package com.cxyxiaomo.epp.pojo; import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import java.io.Serializable; @Data -public class Apply { +@NoArgsConstructor +@Accessors(chain = true) // 链式写法 +public class Apply implements Serializable { private Integer id; diff --git a/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Feedback.java b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Feedback.java new file mode 100644 index 0000000..91f909e --- /dev/null +++ b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Feedback.java @@ -0,0 +1,23 @@ +package com.cxyxiaomo.epp.pojo; + +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +@Data +@NoArgsConstructor +@Accessors(chain = true) // 链式写法 +public class Feedback implements Serializable { + + private Integer id; + + private String title; + + private String content; + + private String time; + + private String reply; +} diff --git a/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Notice.java b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Notice.java new file mode 100644 index 0000000..3513243 --- /dev/null +++ b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Notice.java @@ -0,0 +1,26 @@ +package com.cxyxiaomo.epp.pojo; + +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; +// import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; + +@Data +@NoArgsConstructor +@Accessors(chain = true) // 链式写法 +public class Notice implements Serializable { + + private Integer id; + + private String title; + + private String content; + + // @DateTimeFormat(pattern = "yyyy-MM-dd") + // TODO + private String time; + +} + diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Report.java b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Report.java similarity index 58% rename from backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Report.java rename to backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Report.java index 767f440..24b0253 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Report.java +++ b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Report.java @@ -1,9 +1,15 @@ -package com.cxyxiaomo.epp.index.pojo; +package com.cxyxiaomo.epp.pojo; import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import java.io.Serializable; @Data -public class Report { +@NoArgsConstructor +@Accessors(chain = true) // 链式写法 +public class Report implements Serializable { private Integer id; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Res.java b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Res.java similarity index 93% rename from backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Res.java rename to backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Res.java index 49e92c5..c0f0b44 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Res.java +++ b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Res.java @@ -1,4 +1,4 @@ -package com.cxyxiaomo.epp.index.pojo; +package com.cxyxiaomo.epp.pojo; import lombok.Data; diff --git a/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/User.java b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/User.java index e7e6046..e38012b 100644 --- a/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/User.java +++ b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/User.java @@ -1,9 +1,7 @@ package com.cxyxiaomo.epp.pojo; import lombok.Data; -import lombok.Getter; import lombok.NoArgsConstructor; -import lombok.Setter; import lombok.experimental.Accessors; import java.io.Serializable; @@ -11,12 +9,16 @@ import java.io.Serializable; // 数据库关系映射 @Data -@Getter -@Setter @NoArgsConstructor @Accessors(chain = true) // 链式写法 -public class User implements Serializable { // 微服务必须要实现Serializable - private Long id; +// 微服务必须要实现Serializable +public class User implements Serializable { + private Integer id; private String username; + private String name; private String password; + private String img; + private String stu_id; + private Integer role; + private String state; } diff --git a/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Visitor.java b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Visitor.java new file mode 100644 index 0000000..6376b79 --- /dev/null +++ b/backend/microservice-pojo/src/main/java/com/cxyxiaomo/epp/pojo/Visitor.java @@ -0,0 +1,28 @@ +package com.cxyxiaomo.epp.pojo; + +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +@Data +@NoArgsConstructor +@Accessors(chain = true) // 链式写法 +public class Visitor implements Serializable { + + private Integer id; + + private String time; + + private String phone; + + private String issue; + + private String meet_name; + + private String create_time; + + private Integer state; + +} diff --git a/backend/microservice-provider-miniprogram-8080/pom.xml b/backend/microservice-provider-miniprogram-8080/pom.xml index 89202a0..3c3fe65 100644 --- a/backend/microservice-provider-miniprogram-8080/pom.xml +++ b/backend/microservice-provider-miniprogram-8080/pom.xml @@ -18,6 +18,12 @@ + + + com.cxyxiaomo + microservice-pojo + 0.0.1-SNAPSHOT + org.projectlombok lombok @@ -59,5 +65,10 @@ org.slf4j slf4j-simple + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/Application.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/Application.java index fc7abcf..6aa73fb 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/Application.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/Application.java @@ -2,8 +2,10 @@ package com.cxyxiaomo.epp; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @SpringBootApplication +@EnableDiscoveryClient public class Application { public static void main(String[] args) { diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/ApplyController.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/ApplyController.java index 1935dbf..49a2fea 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/ApplyController.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/ApplyController.java @@ -1,7 +1,7 @@ package com.cxyxiaomo.epp.index.controller; -import com.cxyxiaomo.epp.index.pojo.Apply; -import com.cxyxiaomo.epp.index.pojo.Res; +import com.cxyxiaomo.epp.pojo.Apply; +import com.cxyxiaomo.epp.pojo.Res; import com.cxyxiaomo.epp.index.service.ApplyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/NoticeController.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/NoticeController.java index 3d2bc8e..7b5e6b6 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/NoticeController.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/NoticeController.java @@ -1,7 +1,7 @@ package com.cxyxiaomo.epp.index.controller; -import com.cxyxiaomo.epp.index.pojo.Notice; -import com.cxyxiaomo.epp.index.pojo.Res; +import com.cxyxiaomo.epp.pojo.Notice; +import com.cxyxiaomo.epp.pojo.Res; import com.cxyxiaomo.epp.index.service.NoticeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/OtherController.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/OtherController.java index 6050655..3973dc7 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/OtherController.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/OtherController.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.controller; -import com.cxyxiaomo.epp.index.pojo.Res; +import com.cxyxiaomo.epp.pojo.Res; import com.cxyxiaomo.epp.index.service.OtherService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/ReportController.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/ReportController.java index 6243f57..c20c550 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/ReportController.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/ReportController.java @@ -1,7 +1,7 @@ package com.cxyxiaomo.epp.index.controller; -import com.cxyxiaomo.epp.index.pojo.Report; -import com.cxyxiaomo.epp.index.pojo.Res; +import com.cxyxiaomo.epp.pojo.Report; +import com.cxyxiaomo.epp.pojo.Res; import com.cxyxiaomo.epp.index.service.ReportService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/UserController.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/UserController.java index 4cac836..32d2c88 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/UserController.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/controller/UserController.java @@ -1,7 +1,7 @@ package com.cxyxiaomo.epp.index.controller; -import com.cxyxiaomo.epp.index.pojo.Res; -import com.cxyxiaomo.epp.index.pojo.User; +import com.cxyxiaomo.epp.pojo.Res; +import com.cxyxiaomo.epp.pojo.User; import com.cxyxiaomo.epp.index.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/ApplyDao.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/ApplyDao.java index e476e9d..8103c2c 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/ApplyDao.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/ApplyDao.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.dao; -import com.cxyxiaomo.epp.index.pojo.Apply; +import com.cxyxiaomo.epp.pojo.Apply; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/NoticeDao.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/NoticeDao.java index a8988c4..3eeb37b 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/NoticeDao.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/NoticeDao.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.dao; -import com.cxyxiaomo.epp.index.pojo.Notice; +import com.cxyxiaomo.epp.pojo.Notice; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/OtherDao.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/OtherDao.java index cad8c2e..b9dd0ca 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/OtherDao.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/OtherDao.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.dao; -import com.cxyxiaomo.epp.index.pojo.Feedback; +import com.cxyxiaomo.epp.pojo.Feedback; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/ReportDao.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/ReportDao.java index 72eb4d1..c02f4b7 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/ReportDao.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/ReportDao.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.dao; -import com.cxyxiaomo.epp.index.pojo.Report; +import com.cxyxiaomo.epp.pojo.Report; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/UserDao.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/UserDao.java index 0fb4f76..cc14d3b 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/UserDao.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/dao/UserDao.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.dao; -import com.cxyxiaomo.epp.index.pojo.User; +import com.cxyxiaomo.epp.pojo.User; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Feedback.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Feedback.java deleted file mode 100644 index 9e22780..0000000 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Feedback.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.cxyxiaomo.epp.index.pojo; - -import lombok.Data; - -@Data -public class Feedback { - - private Integer id; - - private String title; - - private String content; - - private String time; - - private String reply; -} diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Notice.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Notice.java deleted file mode 100644 index 49b0219..0000000 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/Notice.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.cxyxiaomo.epp.index.pojo; - -import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; - -@Data -public class Notice { - - private Integer id; - - private String title; - - private String content; - - @DateTimeFormat(pattern = "yyyy-MM-dd") - private String time; - -} - diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/User.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/User.java deleted file mode 100644 index db1e045..0000000 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/pojo/User.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.cxyxiaomo.epp.index.pojo; - -import lombok.Data; - -@Data -public class User { - private Integer id; - private String username; - private String name; - private String password; - private String img; - private String stu_id; - private Integer role; - private String state; -} diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ApplyService.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ApplyService.java index dcd273e..d71c48d 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ApplyService.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ApplyService.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.service; -import com.cxyxiaomo.epp.index.pojo.Apply; +import com.cxyxiaomo.epp.pojo.Apply; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ApplyServiceImpl.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ApplyServiceImpl.java index f561f99..1b60051 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ApplyServiceImpl.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ApplyServiceImpl.java @@ -1,7 +1,7 @@ package com.cxyxiaomo.epp.index.service; import com.cxyxiaomo.epp.index.dao.ApplyDao; -import com.cxyxiaomo.epp.index.pojo.Apply; +import com.cxyxiaomo.epp.pojo.Apply; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/NoticeService.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/NoticeService.java index b2794db..498580d 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/NoticeService.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/NoticeService.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.service; -import com.cxyxiaomo.epp.index.pojo.Notice; +import com.cxyxiaomo.epp.pojo.Notice; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/NoticeServiceImpl.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/NoticeServiceImpl.java index 3ce79b7..5cdaa5f 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/NoticeServiceImpl.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/NoticeServiceImpl.java @@ -1,7 +1,7 @@ package com.cxyxiaomo.epp.index.service; import com.cxyxiaomo.epp.index.dao.NoticeDao; -import com.cxyxiaomo.epp.index.pojo.Notice; +import com.cxyxiaomo.epp.pojo.Notice; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/OtherService.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/OtherService.java index 43a491c..3ad2106 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/OtherService.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/OtherService.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.service; -import com.cxyxiaomo.epp.index.pojo.Feedback; +import com.cxyxiaomo.epp.pojo.Feedback; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/OtherServiceImpl.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/OtherServiceImpl.java index 4a90eda..b31e69c 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/OtherServiceImpl.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/OtherServiceImpl.java @@ -1,7 +1,7 @@ package com.cxyxiaomo.epp.index.service; import com.cxyxiaomo.epp.index.dao.OtherDao; -import com.cxyxiaomo.epp.index.pojo.Feedback; +import com.cxyxiaomo.epp.pojo.Feedback; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ReportService.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ReportService.java index 9483cae..dc33ea2 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ReportService.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ReportService.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.service; -import com.cxyxiaomo.epp.index.pojo.Report; +import com.cxyxiaomo.epp.pojo.Report; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ReportServiceImpl.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ReportServiceImpl.java index 898405e..f62b42a 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ReportServiceImpl.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/ReportServiceImpl.java @@ -2,7 +2,7 @@ package com.cxyxiaomo.epp.index.service; import com.cxyxiaomo.epp.index.dao.ReportDao; import com.cxyxiaomo.epp.index.dao.UserDao; -import com.cxyxiaomo.epp.index.pojo.Report; +import com.cxyxiaomo.epp.pojo.Report; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/UserService.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/UserService.java index edd216d..ae1d815 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/UserService.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/UserService.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.index.service; -import com.cxyxiaomo.epp.index.pojo.User; +import com.cxyxiaomo.epp.pojo.User; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/UserServiceImpl.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/UserServiceImpl.java index 5e1dc10..f03ab73 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/UserServiceImpl.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/index/service/UserServiceImpl.java @@ -1,7 +1,7 @@ package com.cxyxiaomo.epp.index.service; import com.cxyxiaomo.epp.index.dao.UserDao; -import com.cxyxiaomo.epp.index.pojo.User; +import com.cxyxiaomo.epp.pojo.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/controller/VisitorController.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/controller/VisitorController.java index ab35018..56722fa 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/controller/VisitorController.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/controller/VisitorController.java @@ -1,8 +1,8 @@ package com.cxyxiaomo.epp.visitor.controller; -import com.cxyxiaomo.epp.index.pojo.Res; +import com.cxyxiaomo.epp.pojo.Res; import com.cxyxiaomo.epp.visitor.service.VisitorService; -import com.cxyxiaomo.epp.visitor.pojo.Visitor; +import com.cxyxiaomo.epp.pojo.Visitor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/dao/VisitorDao.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/dao/VisitorDao.java index 23b1428..1520429 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/dao/VisitorDao.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/dao/VisitorDao.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.visitor.dao; -import com.cxyxiaomo.epp.visitor.pojo.Visitor; +import com.cxyxiaomo.epp.pojo.Visitor; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/pojo/Visitor.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/pojo/Visitor.java deleted file mode 100644 index ced1440..0000000 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/pojo/Visitor.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.cxyxiaomo.epp.visitor.pojo; - -import lombok.Data; - -@Data -public class Visitor { - - private Integer id; - - private String time; - - private String phone; - - private String issue; - - private String meet_name; - - private String create_time; - - private Integer state; - -} diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/service/VisitorService.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/service/VisitorService.java index 5729d3b..9405f58 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/service/VisitorService.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/service/VisitorService.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.visitor.service; -import com.cxyxiaomo.epp.visitor.pojo.Visitor; +import com.cxyxiaomo.epp.pojo.Visitor; import java.util.List; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/service/impl/VisitorServiceImpl.java b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/service/impl/VisitorServiceImpl.java index 3e941b2..8ebc056 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/service/impl/VisitorServiceImpl.java +++ b/backend/microservice-provider-miniprogram-8080/src/main/java/com/cxyxiaomo/epp/visitor/service/impl/VisitorServiceImpl.java @@ -1,6 +1,6 @@ package com.cxyxiaomo.epp.visitor.service.impl; -import com.cxyxiaomo.epp.visitor.pojo.Visitor; +import com.cxyxiaomo.epp.pojo.Visitor; import com.cxyxiaomo.epp.visitor.service.VisitorService; import com.cxyxiaomo.epp.visitor.dao.VisitorDao; import org.springframework.beans.factory.annotation.Autowired; diff --git a/backend/microservice-provider-miniprogram-8080/src/main/resources/application.yml b/backend/microservice-provider-miniprogram-8080/src/main/resources/application.yml index 921eeb2..41077a0 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/resources/application.yml +++ b/backend/microservice-provider-miniprogram-8080/src/main/resources/application.yml @@ -5,6 +5,10 @@ server: spring: application: name: microservice-provider-miniprogram + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/epp?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC diff --git a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/ApplyMapper.xml b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/ApplyMapper.xml index 42961db..726ebe2 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/ApplyMapper.xml +++ b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/ApplyMapper.xml @@ -15,12 +15,12 @@ - select a.*,u.name,u.stu_id as stuId from apply a left join user u on a.stu_id = u.id where a.state = 0 - select a.*,u.name,u.stu_id as stuId from apply a left join user u on a.stu_id = u.id where a.stu_id = #{id} diff --git a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/NoticeMapper.xml b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/NoticeMapper.xml index 9ff66f0..2cc3bb2 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/NoticeMapper.xml +++ b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/NoticeMapper.xml @@ -10,7 +10,7 @@ delete from notice where id = #{id} - select * from notice order by time desc limit ${limit} diff --git a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/OtherMapper.xml b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/OtherMapper.xml index a4951e0..ad00892 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/OtherMapper.xml +++ b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/OtherMapper.xml @@ -11,7 +11,7 @@ update feedback set reply = #{replay} where id = #{id} - select * from feedback @@ -19,7 +19,7 @@ - select * from feedback where reply is null diff --git a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/ReportMapper.xml b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/ReportMapper.xml index c09fe58..2853f06 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/ReportMapper.xml +++ b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/ReportMapper.xml @@ -11,7 +11,7 @@ (#{user_id},#{name},#{address},#{time},#{normal},#{yes_noon_temp}, #{yes_night_temp},#{today_morning_temp},#{isolation}) - select name,time,normal,address from report where user_id = #{id} order by time desc diff --git a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/UserMapper.xml b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/UserMapper.xml index bcc5ba0..4040250 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/UserMapper.xml +++ b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/UserMapper.xml @@ -19,20 +19,20 @@ update user set state = #{date} where id = #{id} - select * from `user` - select * from user where username = #{username} - select * from user where username = #{username} and role_id = #{role} - select name,stu_id from user where TO_DAYS(NOW( )) != TO_DAYS(state) and role = 2 - select name,stu_id from user where state = "1999-01-01" diff --git a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/VisitorMapper.xml b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/VisitorMapper.xml index 49bbf61..5873882 100644 --- a/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/VisitorMapper.xml +++ b/backend/microservice-provider-miniprogram-8080/src/main/resources/mapper/VisitorMapper.xml @@ -19,7 +19,7 @@ - select * from visitor where state = 0 diff --git a/backend/microservice-provider-user-8001/pom.xml b/backend/microservice-provider-user-8001/pom.xml index 4df4773..75bc618 100644 --- a/backend/microservice-provider-user-8001/pom.xml +++ b/backend/microservice-provider-user-8001/pom.xml @@ -76,6 +76,12 @@ spring-boot-starter-web + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + diff --git a/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/UserProvider.java b/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/UserProvider.java index 639a9d3..0cc15a0 100644 --- a/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/UserProvider.java +++ b/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/UserProvider.java @@ -2,10 +2,12 @@ package com.cxyxiaomo.epp; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; // 启动类 @SpringBootApplication +@EnableDiscoveryClient public class UserProvider { public static void main(String[] args) { SpringApplication.run(UserProvider.class, args); diff --git a/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/controller/UserController.java b/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/controller/UserController.java index db70a1d..f338ec2 100644 --- a/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/controller/UserController.java +++ b/backend/microservice-provider-user-8001/src/main/java/com/cxyxiaomo/epp/controller/UserController.java @@ -1,7 +1,7 @@ package com.cxyxiaomo.epp.controller; -import com.cxyxiaomo.epp.service.UserServiceImpl; import com.cxyxiaomo.epp.pojo.User; +import com.cxyxiaomo.epp.service.UserServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; diff --git a/backend/microservice-provider-user-8001/src/main/resources/application.yml b/backend/microservice-provider-user-8001/src/main/resources/application.yml index 73f48e2..371ef53 100644 --- a/backend/microservice-provider-user-8001/src/main/resources/application.yml +++ b/backend/microservice-provider-user-8001/src/main/resources/application.yml @@ -11,6 +11,10 @@ mybatis: spring: application: name: microservice-provider-user + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/backend/pom.xml b/backend/pom.xml index fb8fd68..0d68348 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -75,7 +75,7 @@ org.springframework.boot spring-boot-starter-web - 2.6.4 + 2.6.3