1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

[后端] 删除miniprogram微服务;maven依赖调整

This commit is contained in:
程序员小墨 2022-11-28 21:26:35 +08:00
parent a3a3c8b3cc
commit a85d7bcfba
30 changed files with 18 additions and 899 deletions

View File

@ -1,74 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>epp</artifactId>
<groupId>com.cxyxiaomo</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>microservice-provider-miniprogram</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<!-- 实体类 -->
<dependency>
<groupId>com.cxyxiaomo</groupId>
<artifactId>microservice-pojo</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- logback -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<!-- Nacos -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,15 +0,0 @@
package com.cxyxiaomo.epp.miniprogram;
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) {
SpringApplication.run(Application.class, args);
}
}

View File

@ -1,55 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.controller;
import com.cxyxiaomo.epp.common.response.Res;
import com.cxyxiaomo.epp.common.pojo.Apply;
import com.cxyxiaomo.epp.miniprogram.index.service.ApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
@Controller
@RequestMapping("apply")
public class ApplyController {
@Autowired
private ApplyService applyService;
@RequestMapping("/applySub")
@ResponseBody
public String applySub(Apply apply) {
apply.setCreate_time(new Date().toString());
return applyService.applySub(apply);
}
@RequestMapping("/applyListNoReplay")
@ResponseBody
public Res applyListNoReplay() {
return Res.success(applyService.applyListNoReplay());
}
@RequestMapping("/myApply")
@ResponseBody
public Res myApply(Integer id) {
return Res.success(applyService.myApply(id));
}
@RequestMapping("/applyReplay")
@ResponseBody
public Res applyReplay(Integer id,String replay,Integer reasonId) {
String reason = null;
if (reasonId == 0){
reason = "格式错误";
}else if(reasonId == 1){
reason = "出行地点不允许";
}else if(reasonId == 2){
reason = "时间填写错误";
}else if(reasonId == 99){
reason = "";
}
return Res.success(applyService.applyReplay(id, replay,reason));
}
}

View File

@ -1,37 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.controller;
import com.cxyxiaomo.epp.common.response.Res;
import com.cxyxiaomo.epp.common.pojo.Notice;
import com.cxyxiaomo.epp.miniprogram.index.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("notice")
public class NoticeController {
@Autowired
private NoticeService noticeService;
@RequestMapping("/noticeList")
@ResponseBody
public Res noticeList(Integer limit){
return Res.success(noticeService.noticeList(limit));
}
@RequestMapping("/addNotice")
@ResponseBody
public String addNotice(Notice notice){
noticeService.addNotice(notice);
return "发布成功";
}
@RequestMapping("/delNotice")
@ResponseBody
public String delNotice(Integer id){
noticeService.delNotice(id);
return "删除成功";
}
}

View File

@ -1,45 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.controller;
import com.cxyxiaomo.epp.common.response.Res;
import com.cxyxiaomo.epp.miniprogram.index.service.OtherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("other")
public class OtherController {
@Autowired
private OtherService otherService;
@RequestMapping("/subFeedback")
@ResponseBody
public String subFeedback(String title, String content,String time, Integer id){
if (otherService.subFeedback(title, content,time,id) != 0){
return "提交成功";
}else{
return "提交失败";
}
}
@RequestMapping("/feedbackList")
@ResponseBody
public Res feedbackList(Integer id){
return Res.success(otherService.feedbackList(id));
}
@RequestMapping("/feedbackListNoReplay")
@ResponseBody
public Res feedbackListNoReplay(){
return Res.success(otherService.feedbackListNoReplay());
}
@RequestMapping("/feedbackReplay")
@ResponseBody
public Res feedbackReplay(Integer id,String replay){
return Res.success(otherService.feedbackReplay(id,replay));
}
}

View File

@ -1,34 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.controller;
import com.cxyxiaomo.epp.common.response.Res;
import com.cxyxiaomo.epp.common.pojo.Report;
import com.cxyxiaomo.epp.miniprogram.index.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("report")
public class ReportController {
@Autowired
private ReportService reportService;
@RequestMapping("/doReport")
@ResponseBody
public String doReport(Report report){
if (reportService.doReport(report)!=0){
return "填报成功";
}else {
return "填报失败";
}
}
@RequestMapping("/myReport")
@ResponseBody
public Res myReport(Integer id){
return Res.success(reportService.myReport(id));
}
}

View File

@ -1,97 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.controller;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import javax.imageio.ImageIO;
import java.util.Hashtable;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.MultiFormatWriter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* 二维码的生成需要借助MatrixToImageWriter类该类是由Google提供的可以将该类直接拷贝到源码中使用
*/
@Controller
@RequestMapping("code")
public class toCodeController {
private static final int WHITE = 0xFFFFFFFF;
private static final int RED = 0xDC143C;
private static final int GREEN = 0x008001;
@Value("${qrcode.save-path}")
private String savePath;
private toCodeController() {
}
public static BufferedImage toBufferedImage(BitMatrix matrix, Integer isHealth) {
int width = matrix.getWidth();
int height = matrix.getHeight();
int color;
if (isHealth == 0) {
color = RED;
} else {
color = GREEN;
}
BufferedImage image = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
image.setRGB(x, y, matrix.get(x, y) ? color : WHITE);
}
}
return image;
}
public static void writeToFile(BitMatrix matrix, String format, File file, Integer isHealth)
throws IOException {
BufferedImage image = toBufferedImage(matrix, isHealth);
if (!ImageIO.write(image, format, file)) {
throw new IOException("Could not write an image of format "
+ format + " to " + file);
}
}
public static void writeToStream(BitMatrix matrix, String format,
OutputStream stream, Integer isHealth) throws IOException {
BufferedImage image = toBufferedImage(matrix, isHealth);
if (!ImageIO.write(image, format, stream)) {
throw new IOException("Could not write an image of format " + format);
}
}
@RequestMapping("/showCode")
@ResponseBody
public void showCode(String stuId, String name, Integer isHealth) throws Exception {
String health;
if (isHealth == 1) {
health = "健康";
} else {
health = "不健康";
}
String text = stuId + " " + name + " " + health; // 二维码内容
int width = 400; // 二维码图片宽度
int height = 400; // 二维码图片高度
String format = "jpg";// 二维码的图片格式
Hashtable<EncodeHintType, String> hints = new Hashtable<EncodeHintType, String>();
hints.put(EncodeHintType.CHARACTER_SET, "utf-8"); // 内容所使用字符集编码
BitMatrix bitMatrix = new MultiFormatWriter().encode(text,
BarcodeFormat.QR_CODE, width, height, hints);
// 生成二维码
File outputFile = new File(savePath + File.separator + "code.jpg");
toCodeController.writeToFile(bitMatrix, format, outputFile, isHealth);
}
}

View File

@ -1,19 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.dao;
import com.cxyxiaomo.epp.common.pojo.Apply;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface ApplyDao {
int applySub(Apply apply);
int lastApply(Integer id);
List<Apply> applyListNoReplay();
List<Apply> myApply(Integer id);
int applyReplay(Integer id, String replay, String reason);
}

View File

@ -1,16 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.dao;
import com.cxyxiaomo.epp.common.pojo.Notice;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface NoticeDao {
void addNotice(Notice notice);
void delNotice(Integer id);
List<Notice> noticeList(Integer limit);
}

View File

@ -1,19 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.dao;
import com.cxyxiaomo.epp.common.pojo.Feedback;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface OtherDao {
int subFeedback(String title, String content,String time, Integer id);
List<Feedback> feedbackList(Integer id);
List<Feedback> feedbackListNoReplay();
int feedbackReplay(Integer id,String replay);
}

View File

@ -1,15 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.dao;
import com.cxyxiaomo.epp.common.pojo.Report;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface ReportDao {
int doReport(Report report);
List<Report> myReport(Integer id);
}

View File

@ -1,15 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.service;
import com.cxyxiaomo.epp.common.pojo.Apply;
import java.util.List;
public interface ApplyService {
String applySub(Apply apply);
List<Apply> applyListNoReplay();
List<Apply> myApply(Integer id);
String applyReplay(Integer id, String replay,String reason);
}

View File

@ -1,43 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.service;
import com.cxyxiaomo.epp.common.pojo.Apply;
import com.cxyxiaomo.epp.miniprogram.index.dao.ApplyDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ApplyServiceImpl implements ApplyService {
@Autowired
private ApplyDao applyDao;
@Override
public String applySub(Apply apply) {
try {
applyDao.lastApply(apply.getStu_id());
return "您已提交该日的申请,请等待审批";
}catch (Exception e){
applyDao.applySub(apply);
return "申请成功";
}
}
@Override
public List<Apply> applyListNoReplay() {
return applyDao.applyListNoReplay();
}
@Override
public List<Apply> myApply(Integer id) {
return applyDao.myApply(id);
}
@Override
public String applyReplay(Integer id, String replay,String reason) {
applyDao.applyReplay(id,replay,reason);
return null;
}
}

View File

@ -1,14 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.service;
import com.cxyxiaomo.epp.common.pojo.Notice;
import java.util.List;
public interface NoticeService {
void addNotice(Notice notice);
void delNotice(Integer id);
List<Notice> noticeList(Integer limit);
}

View File

@ -1,30 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.service;
import com.cxyxiaomo.epp.common.pojo.Notice;
import com.cxyxiaomo.epp.miniprogram.index.dao.NoticeDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class NoticeServiceImpl implements NoticeService {
@Autowired
private NoticeDao noticeDao;
@Override
public void addNotice(Notice notice) {
noticeDao.addNotice(notice);
}
@Override
public void delNotice(Integer id) {
noticeDao.delNotice(id);
}
@Override
public List<Notice> noticeList(Integer limit) {
return noticeDao.noticeList(limit);
}
}

View File

@ -1,16 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.service;
import com.cxyxiaomo.epp.common.pojo.Feedback;
import java.util.List;
public interface OtherService {
int subFeedback(String title, String content,String time, Integer id);
List<Feedback> feedbackList(Integer id);
List<Feedback> feedbackListNoReplay();
int feedbackReplay(Integer id,String replay);
}

View File

@ -1,35 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.service;
import com.cxyxiaomo.epp.common.pojo.Feedback;
import com.cxyxiaomo.epp.miniprogram.index.dao.OtherDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class OtherServiceImpl implements OtherService {
@Autowired
private OtherDao otherDao;
@Override
public int subFeedback(String title, String content,String time, Integer id) {
return otherDao.subFeedback(title, content,time,id);
}
@Override
public List<Feedback> feedbackList(Integer id) {
return otherDao.feedbackList(id);
}
@Override
public List<Feedback> feedbackListNoReplay() {
return otherDao.feedbackListNoReplay();
}
@Override
public int feedbackReplay(Integer id, String replay) {
return otherDao.feedbackReplay(id,replay);
}
}

View File

@ -1,12 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.service;
import com.cxyxiaomo.epp.common.pojo.Report;
import java.util.List;
public interface ReportService {
int doReport(Report report);
List<Report> myReport(Integer id);
}

View File

@ -1,39 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.index.service;
import com.cxyxiaomo.epp.common.pojo.Report;
import com.cxyxiaomo.epp.miniprogram.index.dao.ReportDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ReportServiceImpl implements ReportService {
@Autowired
private ReportDao reportDao;
// TODO
// @Autowired
// private UserDao userDao;
@Override
public int doReport(Report report) {
// TODO
// if(!report.getNormal().equals("发热") || !report.getIsolation().equals("无需隔离")){
// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
// String date = formatter.format(new Date()) ;
// // 修改用户状态
// userDao.updState(report.getUser_id(),date);
// }else{
// userDao.updState(report.getUser_id(),"1999-01-01");
// }
// return reportDao.doReport(report);
return 0;
}
@Override
public List<Report> myReport(Integer id) {
return reportDao.myReport(id);
}
}

View File

@ -1,42 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.visitor.controller;
import com.cxyxiaomo.epp.common.response.Res;
import com.cxyxiaomo.epp.miniprogram.visitor.service.VisitorService;
import com.cxyxiaomo.epp.common.pojo.Visitor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("visitor")
public class VisitorController {
@Autowired
private VisitorService visitorService;
@ResponseBody
@RequestMapping("/visitorApply")
public String visitorApply(Visitor visitor) {
// visitor.setCreate_time(new Date().toString());
return visitorService.visitorApply(visitor);
}
@ResponseBody
@RequestMapping("/visitorChangeState")
public String visitorChangeState(Integer id, Integer state) {
return visitorService.visitorChangeState(id, state);
}
@ResponseBody
@RequestMapping("/showMyVisitor")
public String showMyVisitor(String phone) {
return visitorService.showMyVisitor(phone);
}
@ResponseBody
@RequestMapping("/showVisitorList")
public Res showVisitorList() {
return Res.success(visitorService.showVisitorList());
}
}

View File

@ -1,20 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.visitor.dao;
import com.cxyxiaomo.epp.common.pojo.Visitor;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface VisitorDao {
int getApplyByPhone(String phone);
int visitorApply(Visitor visitor);
int visitorChangeState(Integer id, Integer state);
int showMyVisitor(String phone);
List<Visitor> showVisitorList();
}

View File

@ -1,16 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.visitor.service;
import com.cxyxiaomo.epp.common.pojo.Visitor;
import java.util.List;
public interface VisitorService {
String visitorApply(Visitor visitor);
String visitorChangeState(Integer id, Integer state);
String showMyVisitor(String phone);
List<Visitor> showVisitorList();
}

View File

@ -1,53 +0,0 @@
package com.cxyxiaomo.epp.miniprogram.visitor.service.impl;
import com.cxyxiaomo.epp.common.pojo.Visitor;
import com.cxyxiaomo.epp.miniprogram.visitor.service.VisitorService;
import com.cxyxiaomo.epp.miniprogram.visitor.dao.VisitorDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class VisitorServiceImpl implements VisitorService {
@Autowired
private VisitorDao visitorDao;
@Override
public String visitorApply(Visitor visitor) {
if (visitorDao.getApplyByPhone(visitor.getPhone())==0){
visitorDao.visitorApply(visitor);
return "申请成功";
}else {
return "不能重复申请";
}
}
@Override
public String visitorChangeState(Integer id, Integer state) {
visitorDao.visitorChangeState(id, state);
if (state == 1)
{ return "审批成功";
}else{
return "已驳回";
}
}
@Override
public String showMyVisitor(String phone) {
int i = visitorDao.showMyVisitor(phone);
if (i == 0){
return "您的审批正在申请";
}else if(i==1){
return "审批通过";
}else{
return "申请已被驳回,请重新申请";
}
}
@Override
public List<Visitor> showVisitorList() {
return visitorDao.showVisitorList();
}
}

View File

@ -1,22 +0,0 @@
server:
port: 8080
max-http-header-size: 102400
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
username: root
password: root
mybatis:
mapper-locations: classpath:mapper/*.xml
qrcode:
save-path: D:\qr_code

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cxyxiaomo.epp.index.dao.ApplyDao">
<insert id="applySub">
insert into apply
(stu_id,issue,transport,place,start_time,end_time,state) values
(#{stu_id},#{issue},#{transport},#{place},#{start_time},#{end_time},0)
</insert>
<update id="applyReplay">
update apply set state = #{replay}, reason =#{reason}
where id = #{id}
</update>
<select id="lastApply" resultType="java.lang.Integer">
select * from apply where stu_id = #{id} and state = 0 limit 1
</select>
<select id="applyListNoReplay" resultType="com.cxyxiaomo.epp.common.pojo.Apply">
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>
<select id="myApply" resultType="com.cxyxiaomo.epp.common.pojo.Apply">
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}
</select>
</mapper>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cxyxiaomo.epp.index.dao.NoticeDao">
<insert id="addNotice">
insert into notice (title, content , time) values
(#{title},#{content},#{time})
</insert>
<delete id="delNotice">
delete from notice where id = #{id}
</delete>
<select id="noticeList" resultType="com.cxyxiaomo.epp.common.pojo.Notice">
select * from notice order by time desc
<if test="limit!= ''">
limit ${limit}
</if>
</select>
</mapper>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cxyxiaomo.epp.index.dao.OtherDao">
<insert id="subFeedback">
insert into feedback (title, content, time, user_id) values
(#{title},#{content},#{time},#{id})
</insert>
<update id="feedbackReplay">
update feedback set reply = #{replay}
where id = #{id}
</update>
<select id="feedbackList" resultType="com.cxyxiaomo.epp.common.pojo.Feedback">
select * from feedback
<where>
<if test="id != null">
and user_id = #{id}
</if>
</where>
</select>
<select id="feedbackListNoReplay" resultType="com.cxyxiaomo.epp.common.pojo.Feedback">
select * from feedback where reply is null
</select>
</mapper>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cxyxiaomo.epp.index.dao.ReportDao">
<insert id="doReport">
insert into report
(user_id,name,address,time,normal,yes_noon_temp,yes_night_temp,
today_morning_temp,isolation)
values
(#{user_id},#{name},#{address},#{time},#{normal},#{yes_noon_temp},
#{yes_night_temp},#{today_morning_temp},#{isolation})
</insert>
<select id="myReport" resultType="com.cxyxiaomo.epp.common.pojo.Report">
select name,time,normal,address from report where user_id = #{id}
order by time desc
</select>
</mapper>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cxyxiaomo.epp.visitor.dao.VisitorDao">
<insert id="visitorApply">
insert into visitor
(time,phone,issue,meet_name,create_time) values
(#{time},#{phone},#{issue},#{meet_name},#{create_time})
</insert>
<update id="visitorChangeState">
update visitor set state = #{state}
where id = #{id} and state = 0
</update>
<select id="getApplyByPhone" resultType="java.lang.Integer">
select count(*) from visitor where phone=#{phone} and TO_DAYS(NOW( )) - TO_DAYS(time) = 0
</select>
<select id="showMyVisitor" resultType="java.lang.Integer">
select state from visitor where phone = #{phone} and TO_DAYS(NOW( )) - TO_DAYS(time) = 0
</select>
<select id="showVisitorList" resultType="com.cxyxiaomo.epp.common.pojo.Visitor">
select * from visitor where state = 0
</select>
</mapper>

View File

@ -17,7 +17,6 @@
<module>microservice-common</module>
<module>microservice-provider-user-8001</module>
<module>microservice-provider-access-8002</module>
<module>microservice-provider-miniprogram-8080</module>
<module>microservice-provider-test-8011</module>
</modules>
@ -33,6 +32,7 @@
<mysql.version>8.0.30</mysql.version>
<druid.version>1.2.8</druid.version>
<!--<mybatis.spring.boot.version>2.2.2</mybatis.spring.boot.version>-->
<jackson.version>2.13.4</jackson.version>
</properties>
<!-- 子 module 继承之后,锁定版本 + 不用写groupId和version -->
@ -134,6 +134,23 @@
<version>2.0.19</version>
</dependency>
<!-- jackson -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- Log -->
<!-- log4j -->
<dependency>