├── image ├── 1.png ├── 2.png ├── 3.png ├── 4.png └── 5.png ├── limage └── 1.png ├── src ├── main │ ├── resources │ │ ├── mapper │ │ │ ├── ConfigDao.xml │ │ │ ├── UserDao.xml │ │ │ ├── TokenDao.xml │ │ │ ├── YihuleixingDao.xml │ │ │ ├── PaibanleixingDao.xml │ │ │ ├── StoreupDao.xml │ │ │ ├── ForumDao.xml │ │ │ ├── KeshixinxiDao.xml │ │ │ ├── TousuxinxiDao.xml │ │ │ ├── DiscusskeshixinxiDao.xml │ │ │ ├── DiscussyiyuanxinxiDao.xml │ │ │ ├── YihuDao.xml │ │ │ ├── YihuxinxiDao.xml │ │ │ ├── YiyuanxinxiDao.xml │ │ │ ├── PaibanxinxiDao.xml │ │ │ └── CommonDao.xml │ │ └── application.yml │ └── java │ │ └── com │ │ ├── dao │ │ ├── ConfigDao.java │ │ ├── UserDao.java │ │ ├── TokenDao.java │ │ ├── CommonDao.java │ │ ├── YihuDao.java │ │ ├── ForumDao.java │ │ ├── StoreupDao.java │ │ ├── YihuxinxiDao.java │ │ ├── KeshixinxiDao.java │ │ ├── TousuxinxiDao.java │ │ ├── PaibanxinxiDao.java │ │ ├── YihuleixingDao.java │ │ ├── YiyuanxinxiDao.java │ │ ├── PaibanleixingDao.java │ │ ├── DiscusskeshixinxiDao.java │ │ └── DiscussyiyuanxinxiDao.java │ │ ├── annotation │ │ ├── IgnoreAuth.java │ │ ├── LoginUser.java │ │ └── APPLoginUser.java │ │ ├── service │ │ ├── ConfigService.java │ │ ├── CommonService.java │ │ ├── UserService.java │ │ ├── TokenService.java │ │ ├── impl │ │ │ ├── ConfigServiceImpl.java │ │ │ ├── CommonServiceImpl.java │ │ │ ├── UserServiceImpl.java │ │ │ ├── YihuServiceImpl.java │ │ │ ├── ForumServiceImpl.java │ │ │ ├── StoreupServiceImpl.java │ │ │ ├── YihuxinxiServiceImpl.java │ │ │ ├── KeshixinxiServiceImpl.java │ │ │ ├── TousuxinxiServiceImpl.java │ │ │ ├── PaibanxinxiServiceImpl.java │ │ │ ├── YihuleixingServiceImpl.java │ │ │ ├── YiyuanxinxiServiceImpl.java │ │ │ ├── PaibanleixingServiceImpl.java │ │ │ ├── DiscusskeshixinxiServiceImpl.java │ │ │ ├── DiscussyiyuanxinxiServiceImpl.java │ │ │ └── TokenServiceImpl.java │ │ ├── YihuService.java │ │ ├── ForumService.java │ │ ├── StoreupService.java │ │ ├── YihuxinxiService.java │ │ ├── KeshixinxiService.java │ │ ├── TousuxinxiService.java │ │ ├── PaibanxinxiService.java │ │ ├── YihuleixingService.java │ │ ├── YiyuanxinxiService.java │ │ ├── PaibanleixingService.java │ │ ├── DiscusskeshixinxiService.java │ │ └── DiscussyiyuanxinxiService.java │ │ ├── utils │ │ ├── MD5Util.java │ │ ├── CommonUtil.java │ │ ├── FileUtil.java │ │ ├── JQPageInfo.java │ │ ├── R.java │ │ ├── SQLFilter.java │ │ ├── HttpClientUtils.java │ │ ├── ValidatorUtils.java │ │ ├── SpringContextUtils.java │ │ ├── PageUtils.java │ │ ├── Query.java │ │ └── BaiduUtil.java │ │ ├── config │ │ ├── MybatisPlusConfig.java │ │ └── InterceptorConfig.java │ │ ├── entity │ │ ├── vo │ │ │ ├── YihuleixingVO.java │ │ │ ├── PaibanleixingVO.java │ │ │ ├── StoreupVO.java │ │ │ ├── DiscusskeshixinxiVO.java │ │ │ ├── DiscussyiyuanxinxiVO.java │ │ │ ├── ForumVO.java │ │ │ ├── KeshixinxiVO.java │ │ │ ├── TousuxinxiVO.java │ │ │ ├── YiyuanxinxiVO.java │ │ │ ├── YihuxinxiVO.java │ │ │ └── YihuVO.java │ │ ├── model │ │ │ ├── YihuleixingModel.java │ │ │ ├── PaibanleixingModel.java │ │ │ ├── StoreupModel.java │ │ │ ├── DiscusskeshixinxiModel.java │ │ │ ├── DiscussyiyuanxinxiModel.java │ │ │ ├── ForumModel.java │ │ │ ├── KeshixinxiModel.java │ │ │ ├── TousuxinxiModel.java │ │ │ ├── YiyuanxinxiModel.java │ │ │ ├── YihuxinxiModel.java │ │ │ └── YihuModel.java │ │ ├── view │ │ │ ├── YihuView.java │ │ │ ├── ForumView.java │ │ │ ├── StoreupView.java │ │ │ ├── YihuxinxiView.java │ │ │ ├── KeshixinxiView.java │ │ │ ├── TousuxinxiView.java │ │ │ ├── PaibanxinxiView.java │ │ │ ├── YihuleixingView.java │ │ │ ├── YiyuanxinxiView.java │ │ │ ├── PaibanleixingView.java │ │ │ ├── DiscusskeshixinxiView.java │ │ │ └── DiscussyiyuanxinxiView.java │ │ ├── EIException.java │ │ ├── ConfigEntity.java │ │ ├── UserEntity.java │ │ ├── PaibanleixingEntity.java │ │ ├── YihuleixingEntity.java │ │ ├── TokenEntity.java │ │ ├── StoreupEntity.java │ │ ├── DiscusskeshixinxiEntity.java │ │ ├── DiscussyiyuanxinxiEntity.java │ │ ├── KeshixinxiEntity.java │ │ ├── TousuxinxiEntity.java │ │ └── ForumEntity.java │ │ ├── SpringbootSchemaApplication.java │ │ ├── controller │ │ └── ConfigController.java │ │ └── interceptor │ │ └── AuthorizationInterceptor.java └── test │ └── java │ └── com │ └── SpringbootSchemaApplicationTests.java ├── .gitignore └── README.md /image/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No215Medical-staff-scheduling-system/HEAD/image/1.png -------------------------------------------------------------------------------- /image/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No215Medical-staff-scheduling-system/HEAD/image/2.png -------------------------------------------------------------------------------- /image/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No215Medical-staff-scheduling-system/HEAD/image/3.png -------------------------------------------------------------------------------- /image/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No215Medical-staff-scheduling-system/HEAD/image/4.png -------------------------------------------------------------------------------- /image/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No215Medical-staff-scheduling-system/HEAD/image/5.png -------------------------------------------------------------------------------- /limage/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nature924/No215Medical-staff-scheduling-system/HEAD/limage/1.png -------------------------------------------------------------------------------- /src/main/resources/mapper/ConfigDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/java/com/dao/ConfigDao.java: -------------------------------------------------------------------------------- 1 | 2 | package com.dao; 3 | 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import com.entity.ConfigEntity; 6 | 7 | /** 8 | * 配置 9 | */ 10 | public interface ConfigDao extends BaseMapper { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/annotation/IgnoreAuth.java: -------------------------------------------------------------------------------- 1 | package com.annotation; 2 | 3 | import java.lang.annotation.*; 4 | 5 | /** 6 | * 忽略Token验证 7 | */ 8 | @Target(ElementType.METHOD) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | @Documented 11 | public @interface IgnoreAuth { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/test/java/com/SpringbootSchemaApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class SpringbootSchemaApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/service/ConfigService.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service; 3 | 4 | import java.util.Map; 5 | 6 | import com.baomidou.mybatisplus.service.IService; 7 | import com.entity.ConfigEntity; 8 | import com.utils.PageUtils; 9 | 10 | 11 | /** 12 | * 系统用户 13 | */ 14 | public interface ConfigService extends IService { 15 | PageUtils queryPage(Map params); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/com/utils/MD5Util.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import cn.hutool.crypto.digest.DigestUtil; 4 | 5 | public class MD5Util { 6 | 7 | /** 8 | * @param text明文 9 | * @param key密钥 10 | * @return 密文 11 | */ 12 | // 带秘钥加密 13 | public static String md5(String text) { 14 | // 加密后的字符串 15 | String md5str = DigestUtil.md5Hex(text); 16 | return md5str; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/annotation/LoginUser.java: -------------------------------------------------------------------------------- 1 | package com.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * 登录用户信息 10 | */ 11 | @Target(ElementType.PARAMETER) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface LoginUser { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/annotation/APPLoginUser.java: -------------------------------------------------------------------------------- 1 | package com.annotation; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * 登录用户信息 10 | */ 11 | @Target(ElementType.PARAMETER) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | public @interface APPLoginUser { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/mapper/UserDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/mapper/TokenDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /src/main/java/com/config/MybatisPlusConfig.java: -------------------------------------------------------------------------------- 1 | 2 | package com.config; 3 | 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | import com.baomidou.mybatisplus.mapper.MetaObjectHandler; 8 | import com.baomidou.mybatisplus.plugins.PaginationInterceptor; 9 | 10 | /** 11 | * mybatis-plus配置 12 | */ 13 | @Configuration 14 | public class MybatisPlusConfig { 15 | 16 | /** 17 | * 分页插件 18 | */ 19 | @Bean 20 | public PaginationInterceptor paginationInterceptor() { 21 | return new PaginationInterceptor(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/service/CommonService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | public interface CommonService { 7 | List getOption(Map params); 8 | 9 | Map getFollowByOption(Map params); 10 | 11 | void sh(Map params); 12 | 13 | int remindCount(Map params); 14 | 15 | Map selectCal(Map params); 16 | 17 | List> selectGroup(Map params); 18 | 19 | List> selectValue(Map params); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | 2 | package com.dao; 3 | 4 | import java.util.List; 5 | 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import com.baomidou.mybatisplus.mapper.BaseMapper; 9 | import com.baomidou.mybatisplus.mapper.Wrapper; 10 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 11 | import com.entity.UserEntity; 12 | 13 | /** 14 | * 用户 15 | */ 16 | public interface UserDao extends BaseMapper { 17 | 18 | List selectListView(@Param("ew") Wrapper wrapper); 19 | 20 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/YihuleixingVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.YihuleixingEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医护类型 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public class YihuleixingVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/PaibanleixingVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.PaibanleixingEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 排班类型 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public class PaibanleixingVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/utils/CommonUtil.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import java.util.Random; 4 | 5 | public class CommonUtil { 6 | /** 7 | * 获取随机字符串 8 | * 9 | * @param num 10 | * @return 11 | */ 12 | public static String getRandomString(Integer num) { 13 | String base = "abcdefghijklmnopqrstuvwxyz0123456789"; 14 | Random random = new Random(); 15 | StringBuffer sb = new StringBuffer(); 16 | for (int i = 0; i < num; i++) { 17 | int number = random.nextInt(base.length()); 18 | sb.append(base.charAt(number)); 19 | } 20 | return sb.toString(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/dao/TokenDao.java: -------------------------------------------------------------------------------- 1 | 2 | package com.dao; 3 | 4 | import java.util.List; 5 | 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import com.baomidou.mybatisplus.mapper.BaseMapper; 9 | import com.baomidou.mybatisplus.mapper.Wrapper; 10 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 11 | import com.entity.TokenEntity; 12 | 13 | /** 14 | * token 15 | */ 16 | public interface TokenDao extends BaseMapper { 17 | 18 | List selectListView(@Param("ew") Wrapper wrapper); 19 | 20 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/service/UserService.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service; 3 | 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.apache.ibatis.annotations.Param; 8 | 9 | import com.baomidou.mybatisplus.mapper.Wrapper; 10 | import com.baomidou.mybatisplus.service.IService; 11 | import com.entity.UserEntity; 12 | import com.utils.PageUtils; 13 | 14 | 15 | /** 16 | * 系统用户 17 | */ 18 | public interface UserService extends IService { 19 | PageUtils queryPage(Map params); 20 | 21 | List selectListView(Wrapper wrapper); 22 | 23 | PageUtils queryPage(Map params,Wrapper wrapper); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/YihuleixingModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.YihuleixingEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医护类型 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:19 21 | */ 22 | public class YihuleixingModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/PaibanleixingModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.PaibanleixingEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 排班类型 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:19 21 | */ 22 | public class PaibanleixingModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/dao/CommonDao.java: -------------------------------------------------------------------------------- 1 | 2 | package com.dao; 3 | 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | /** 8 | * 通用接口 9 | */ 10 | public interface CommonDao{ 11 | List getOption(Map params); 12 | 13 | Map getFollowByOption(Map params); 14 | 15 | List getFollowByOption2(Map params); 16 | 17 | void sh(Map params); 18 | 19 | int remindCount(Map params); 20 | 21 | Map selectCal(Map params); 22 | 23 | List> selectGroup(Map params); 24 | 25 | List> selectValue(Map params); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/utils/FileUtil.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import java.io.ByteArrayOutputStream; 4 | import java.io.File; 5 | import java.io.FileInputStream; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | 9 | /** 10 | * 类说明 : 11 | */ 12 | 13 | public class FileUtil { 14 | public static byte[] FileToByte(File file) throws IOException { 15 | // 将数据转为流 16 | @SuppressWarnings("resource") 17 | InputStream content = new FileInputStream(file); 18 | ByteArrayOutputStream swapStream = new ByteArrayOutputStream(); 19 | byte[] buff = new byte[100]; 20 | int rc = 0; 21 | while ((rc = content.read(buff, 0, 100)) > 0) { 22 | swapStream.write(buff, 0, rc); 23 | } 24 | // 获得二进制数组 25 | return swapStream.toByteArray(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/service/TokenService.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service; 3 | 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.service.IService; 9 | import com.entity.TokenEntity; 10 | import com.utils.PageUtils; 11 | 12 | 13 | /** 14 | * token 15 | */ 16 | public interface TokenService extends IService { 17 | PageUtils queryPage(Map params); 18 | 19 | List selectListView(Wrapper wrapper); 20 | 21 | PageUtils queryPage(Map params,Wrapper wrapper); 22 | 23 | String generateToken(Long userid,String username,String tableName, String role); 24 | 25 | TokenEntity getTokenEntity(String token); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/SpringbootSchemaApplication.java: -------------------------------------------------------------------------------- 1 | package com; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.builder.SpringApplicationBuilder; 7 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 8 | 9 | @SpringBootApplication 10 | @MapperScan(basePackages = {"com.dao"}) 11 | public class SpringbootSchemaApplication extends SpringBootServletInitializer{ 12 | 13 | public static void main(String[] args) { 14 | SpringApplication.run(SpringbootSchemaApplication.class, args); 15 | } 16 | 17 | @Override 18 | protected SpringApplicationBuilder configure(SpringApplicationBuilder applicationBuilder) { 19 | return applicationBuilder.sources(SpringbootSchemaApplication.class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/YihuView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.YihuEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 医护 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("yihu") 21 | public class YihuView extends YihuEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public YihuView(){ 25 | } 26 | 27 | public YihuView(YihuEntity yihuEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, yihuEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/ForumView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.ForumEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 论坛表 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("forum") 21 | public class ForumView extends ForumEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public ForumView(){ 25 | } 26 | 27 | public ForumView(ForumEntity forumEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, forumEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/StoreupView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.StoreupEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 收藏表 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("storeup") 21 | public class StoreupView extends StoreupEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public StoreupView(){ 25 | } 26 | 27 | public StoreupView(StoreupEntity storeupEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, storeupEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/YihuxinxiView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.YihuxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 医护信息 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("yihuxinxi") 21 | public class YihuxinxiView extends YihuxinxiEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public YihuxinxiView(){ 25 | } 26 | 27 | public YihuxinxiView(YihuxinxiEntity yihuxinxiEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, yihuxinxiEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/dao/YihuDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.YihuEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.YihuVO; 11 | import com.entity.view.YihuView; 12 | 13 | 14 | /** 15 | * 医护 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface YihuDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | YihuVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | YihuView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/KeshixinxiView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.KeshixinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 科室信息 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("keshixinxi") 21 | public class KeshixinxiView extends KeshixinxiEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public KeshixinxiView(){ 25 | } 26 | 27 | public KeshixinxiView(KeshixinxiEntity keshixinxiEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, keshixinxiEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/TousuxinxiView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.TousuxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 投诉信息 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("tousuxinxi") 21 | public class TousuxinxiView extends TousuxinxiEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public TousuxinxiView(){ 25 | } 26 | 27 | public TousuxinxiView(TousuxinxiEntity tousuxinxiEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, tousuxinxiEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/utils/JQPageInfo.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | public class JQPageInfo{ 4 | private Integer page; 5 | 6 | private Integer limit; 7 | 8 | private String sidx; 9 | 10 | private String order; 11 | 12 | private Integer offset; 13 | 14 | public Integer getPage() { 15 | return page; 16 | } 17 | 18 | public void setPage(Integer page) { 19 | this.page = page; 20 | } 21 | 22 | public Integer getLimit() { 23 | return limit; 24 | } 25 | 26 | public void setLimit(Integer limit) { 27 | this.limit = limit; 28 | } 29 | 30 | public String getSidx() { 31 | return sidx; 32 | } 33 | 34 | public void setSidx(String sidx) { 35 | this.sidx = sidx; 36 | } 37 | 38 | public String getOrder() { 39 | return order; 40 | } 41 | 42 | public void setOrder(String order) { 43 | this.order = order; 44 | } 45 | 46 | public Integer getOffset() { 47 | return offset; 48 | } 49 | 50 | public void setOffset(Integer offset) { 51 | this.offset = offset; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/dao/ForumDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.ForumEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.ForumVO; 11 | import com.entity.view.ForumView; 12 | 13 | 14 | /** 15 | * 论坛表 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface ForumDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | ForumVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | ForumView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/PaibanxinxiView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.PaibanxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 排班信息 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("paibanxinxi") 21 | public class PaibanxinxiView extends PaibanxinxiEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public PaibanxinxiView(){ 25 | } 26 | 27 | public PaibanxinxiView(PaibanxinxiEntity paibanxinxiEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, paibanxinxiEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/YihuleixingView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.YihuleixingEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 医护类型 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("yihuleixing") 21 | public class YihuleixingView extends YihuleixingEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public YihuleixingView(){ 25 | } 26 | 27 | public YihuleixingView(YihuleixingEntity yihuleixingEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, yihuleixingEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/YiyuanxinxiView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.YiyuanxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 医院信息 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("yiyuanxinxi") 21 | public class YiyuanxinxiView extends YiyuanxinxiEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public YiyuanxinxiView(){ 25 | } 26 | 27 | public YiyuanxinxiView(YiyuanxinxiEntity yiyuanxinxiEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, yiyuanxinxiEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/ConfigServiceImpl.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service.impl; 3 | 4 | 5 | import java.util.Map; 6 | 7 | import org.springframework.stereotype.Service; 8 | 9 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 10 | import com.baomidou.mybatisplus.plugins.Page; 11 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 12 | import com.dao.ConfigDao; 13 | import com.entity.ConfigEntity; 14 | import com.entity.UserEntity; 15 | import com.service.ConfigService; 16 | import com.utils.PageUtils; 17 | import com.utils.Query; 18 | 19 | 20 | /** 21 | * 系统用户 22 | */ 23 | @Service("configService") 24 | public class ConfigServiceImpl extends ServiceImpl implements ConfigService { 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/PaibanleixingView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.PaibanleixingEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 排班类型 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:19 19 | */ 20 | @TableName("paibanleixing") 21 | public class PaibanleixingView extends PaibanleixingEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public PaibanleixingView(){ 25 | } 26 | 27 | public PaibanleixingView(PaibanleixingEntity paibanleixingEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, paibanleixingEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/EIException.java: -------------------------------------------------------------------------------- 1 | 2 | package com.entity; 3 | 4 | /** 5 | * 自定义异常 6 | */ 7 | public class EIException extends RuntimeException { 8 | private static final long serialVersionUID = 1L; 9 | 10 | private String msg; 11 | private int code = 500; 12 | 13 | public EIException(String msg) { 14 | super(msg); 15 | this.msg = msg; 16 | } 17 | 18 | public EIException(String msg, Throwable e) { 19 | super(msg, e); 20 | this.msg = msg; 21 | } 22 | 23 | public EIException(String msg, int code) { 24 | super(msg); 25 | this.msg = msg; 26 | this.code = code; 27 | } 28 | 29 | public EIException(String msg, int code, Throwable e) { 30 | super(msg, e); 31 | this.msg = msg; 32 | this.code = code; 33 | } 34 | 35 | public String getMsg() { 36 | return msg; 37 | } 38 | 39 | public void setMsg(String msg) { 40 | this.msg = msg; 41 | } 42 | 43 | public int getCode() { 44 | return code; 45 | } 46 | 47 | public void setCode(int code) { 48 | this.code = code; 49 | } 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/dao/StoreupDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.StoreupEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.StoreupVO; 11 | import com.entity.view.StoreupView; 12 | 13 | 14 | /** 15 | * 收藏表 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface StoreupDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | StoreupVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | StoreupView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/utils/R.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * 返回数据 8 | */ 9 | public class R extends HashMap { 10 | private static final long serialVersionUID = 1L; 11 | 12 | public R() { 13 | put("code", 0); 14 | } 15 | 16 | public static R error() { 17 | return error(500, "未知异常,请联系管理员"); 18 | } 19 | 20 | public static R error(String msg) { 21 | return error(500, msg); 22 | } 23 | 24 | public static R error(int code, String msg) { 25 | R r = new R(); 26 | r.put("code", code); 27 | r.put("msg", msg); 28 | return r; 29 | } 30 | 31 | public static R ok(String msg) { 32 | R r = new R(); 33 | r.put("msg", msg); 34 | return r; 35 | } 36 | 37 | public static R ok(Map map) { 38 | R r = new R(); 39 | r.putAll(map); 40 | return r; 41 | } 42 | 43 | public static R ok() { 44 | return new R(); 45 | } 46 | 47 | public R put(String key, Object value) { 48 | super.put(key, value); 49 | return this; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/entity/ConfigEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableId; 6 | import com.baomidou.mybatisplus.annotations.TableName; 7 | import com.baomidou.mybatisplus.enums.IdType; 8 | 9 | /** 10 | * 类说明 : 11 | */ 12 | @TableName("config") 13 | public class ConfigEntity implements Serializable{ 14 | private static final long serialVersionUID = 1L; 15 | 16 | @TableId(type = IdType.AUTO) 17 | private Long id; 18 | 19 | /** 20 | * key 21 | */ 22 | private String name; 23 | 24 | /** 25 | * value 26 | */ 27 | private String value; 28 | 29 | public Long getId() { 30 | return id; 31 | } 32 | 33 | public void setId(Long id) { 34 | this.id = id; 35 | } 36 | 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | public void setName(String name) { 42 | this.name = name; 43 | } 44 | 45 | public String getValue() { 46 | return value; 47 | } 48 | 49 | public void setValue(String value) { 50 | this.value = value; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/service/YihuService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.YihuEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.YihuVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.YihuView; 12 | 13 | 14 | /** 15 | * 医护 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface YihuService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | YihuVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | YihuView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/DiscusskeshixinxiView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.DiscusskeshixinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 科室信息评论表 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:20 19 | */ 20 | @TableName("discusskeshixinxi") 21 | public class DiscusskeshixinxiView extends DiscusskeshixinxiEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public DiscusskeshixinxiView(){ 25 | } 26 | 27 | public DiscusskeshixinxiView(DiscusskeshixinxiEntity discusskeshixinxiEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, discusskeshixinxiEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/dao/YihuxinxiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.YihuxinxiEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.YihuxinxiVO; 11 | import com.entity.view.YihuxinxiView; 12 | 13 | 14 | /** 15 | * 医护信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface YihuxinxiDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | YihuxinxiVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | YihuxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/service/ForumService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.ForumEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.ForumVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.ForumView; 12 | 13 | 14 | /** 15 | * 论坛表 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface ForumService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | ForumVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | ForumView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/entity/view/DiscussyiyuanxinxiView.java: -------------------------------------------------------------------------------- 1 | package com.entity.view; 2 | 3 | import com.entity.DiscussyiyuanxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import org.apache.commons.beanutils.BeanUtils; 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | import java.io.Serializable; 10 | 11 | 12 | /** 13 | * 医院信息评论表 14 | * 后端返回视图实体辅助类 15 | * (通常后端关联的表或者自定义的字段需要返回使用) 16 | * @author 17 | * @email 18 | * @date 2021-05-08 16:41:20 19 | */ 20 | @TableName("discussyiyuanxinxi") 21 | public class DiscussyiyuanxinxiView extends DiscussyiyuanxinxiEntity implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | public DiscussyiyuanxinxiView(){ 25 | } 26 | 27 | public DiscussyiyuanxinxiView(DiscussyiyuanxinxiEntity discussyiyuanxinxiEntity){ 28 | try { 29 | BeanUtils.copyProperties(this, discussyiyuanxinxiEntity); 30 | } catch (IllegalAccessException | InvocationTargetException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/dao/KeshixinxiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.KeshixinxiEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.KeshixinxiVO; 11 | import com.entity.view.KeshixinxiView; 12 | 13 | 14 | /** 15 | * 科室信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface KeshixinxiDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | KeshixinxiVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | KeshixinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/dao/TousuxinxiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.TousuxinxiEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.TousuxinxiVO; 11 | import com.entity.view.TousuxinxiView; 12 | 13 | 14 | /** 15 | * 投诉信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface TousuxinxiDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | TousuxinxiVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | TousuxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/service/StoreupService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.StoreupEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.StoreupVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.StoreupView; 12 | 13 | 14 | /** 15 | * 收藏表 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface StoreupService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | StoreupVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | StoreupView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/dao/PaibanxinxiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.PaibanxinxiEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.PaibanxinxiVO; 11 | import com.entity.view.PaibanxinxiView; 12 | 13 | 14 | /** 15 | * 排班信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface PaibanxinxiDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | PaibanxinxiVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | PaibanxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/dao/YihuleixingDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.YihuleixingEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.YihuleixingVO; 11 | import com.entity.view.YihuleixingView; 12 | 13 | 14 | /** 15 | * 医护类型 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface YihuleixingDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | YihuleixingVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | YihuleixingView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/dao/YiyuanxinxiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.YiyuanxinxiEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.YiyuanxinxiVO; 11 | import com.entity.view.YiyuanxinxiView; 12 | 13 | 14 | /** 15 | * 医院信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface YiyuanxinxiDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | YiyuanxinxiVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | YiyuanxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/service/YihuxinxiService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.YihuxinxiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.YihuxinxiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.YihuxinxiView; 12 | 13 | 14 | /** 15 | * 医护信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface YihuxinxiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | YihuxinxiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | YihuxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/dao/PaibanleixingDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.PaibanleixingEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.PaibanleixingVO; 11 | import com.entity.view.PaibanleixingView; 12 | 13 | 14 | /** 15 | * 排班类型 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface PaibanleixingDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | PaibanleixingVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | PaibanleixingView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/utils/SQLFilter.java: -------------------------------------------------------------------------------- 1 | 2 | package com.utils; 3 | 4 | import org.apache.commons.lang3.StringUtils; 5 | 6 | import com.entity.EIException; 7 | 8 | /** 9 | * SQL过滤 10 | */ 11 | public class SQLFilter { 12 | 13 | /** 14 | * SQL注入过滤 15 | * @param str 待验证的字符串 16 | */ 17 | public static String sqlInject(String str){ 18 | if(StringUtils.isBlank(str)){ 19 | return null; 20 | } 21 | //去掉'|"|;|\字符 22 | str = StringUtils.replace(str, "'", ""); 23 | str = StringUtils.replace(str, "\"", ""); 24 | str = StringUtils.replace(str, ";", ""); 25 | str = StringUtils.replace(str, "\\", ""); 26 | 27 | //转换成小写 28 | str = str.toLowerCase(); 29 | 30 | //非法字符 31 | String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alter", "drop"}; 32 | 33 | //判断是否包含非法字符 34 | for(String keyword : keywords){ 35 | if(str.indexOf(keyword) != -1){ 36 | throw new EIException("包含非法字符"); 37 | } 38 | } 39 | 40 | return str; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/service/KeshixinxiService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.KeshixinxiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.KeshixinxiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.KeshixinxiView; 12 | 13 | 14 | /** 15 | * 科室信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface KeshixinxiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | KeshixinxiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | KeshixinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/service/TousuxinxiService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.TousuxinxiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.TousuxinxiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.TousuxinxiView; 12 | 13 | 14 | /** 15 | * 投诉信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface TousuxinxiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | TousuxinxiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | TousuxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/service/PaibanxinxiService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.PaibanxinxiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.PaibanxinxiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.PaibanxinxiView; 12 | 13 | 14 | /** 15 | * 排班信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface PaibanxinxiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | PaibanxinxiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | PaibanxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/service/YihuleixingService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.YihuleixingEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.YihuleixingVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.YihuleixingView; 12 | 13 | 14 | /** 15 | * 医护类型 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface YihuleixingService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | YihuleixingVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | YihuleixingView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/service/YiyuanxinxiService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.YiyuanxinxiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.YiyuanxinxiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.YiyuanxinxiView; 12 | 13 | 14 | /** 15 | * 医院信息 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface YiyuanxinxiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | YiyuanxinxiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | YiyuanxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/utils/HttpClientUtils.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.InputStreamReader; 5 | import java.net.HttpURLConnection; 6 | import java.net.URL; 7 | 8 | 9 | /** 10 | * HttpClient工具类 11 | */ 12 | public class HttpClientUtils { 13 | 14 | /** 15 | * @param uri 16 | * @return String 17 | * @description get请求方式 18 | * @author: long.he01 19 | */ 20 | public static String doGet(String uri) { 21 | 22 | StringBuilder result = new StringBuilder(); 23 | try { 24 | String res = ""; 25 | URL url = new URL(uri); 26 | HttpURLConnection conn = (HttpURLConnection) url.openConnection(); 27 | BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")); 28 | String line; 29 | while ((line = in.readLine()) != null) { 30 | res += line+"\n"; 31 | } 32 | in.close(); 33 | return res; 34 | }catch (Exception e) { 35 | e.printStackTrace(); 36 | return null; 37 | } 38 | 39 | } 40 | 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/main/java/com/service/PaibanleixingService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.PaibanleixingEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.PaibanleixingVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.PaibanleixingView; 12 | 13 | 14 | /** 15 | * 排班类型 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public interface PaibanleixingService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | PaibanleixingVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | PaibanleixingView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/com/utils/ValidatorUtils.java: -------------------------------------------------------------------------------- 1 | 2 | package com.utils; 3 | 4 | 5 | import java.util.Set; 6 | 7 | import javax.validation.ConstraintViolation; 8 | import javax.validation.Validation; 9 | import javax.validation.Validator; 10 | 11 | import com.entity.EIException; 12 | 13 | /** 14 | * hibernate-validator校验工具类 15 | */ 16 | public class ValidatorUtils { 17 | private static Validator validator; 18 | 19 | static { 20 | validator = Validation.buildDefaultValidatorFactory().getValidator(); 21 | } 22 | 23 | /** 24 | * 校验对象 25 | * @param object 待校验对象 26 | * @param groups 待校验的组 27 | * @throws EIException 校验不通过,则报EIException异常 28 | */ 29 | public static void validateEntity(Object object, Class... groups) 30 | throws EIException { 31 | Set> constraintViolations = validator.validate(object, groups); 32 | if (!constraintViolations.isEmpty()) { 33 | ConstraintViolation constraint = (ConstraintViolation)constraintViolations.iterator().next(); 34 | throw new EIException(constraint.getMessage()); 35 | } 36 | } 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/dao/DiscusskeshixinxiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.DiscusskeshixinxiEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.DiscusskeshixinxiVO; 11 | import com.entity.view.DiscusskeshixinxiView; 12 | 13 | 14 | /** 15 | * 科室信息评论表 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:20 20 | */ 21 | public interface DiscusskeshixinxiDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | DiscusskeshixinxiVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | DiscusskeshixinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/dao/DiscussyiyuanxinxiDao.java: -------------------------------------------------------------------------------- 1 | package com.dao; 2 | 3 | import com.entity.DiscussyiyuanxinxiEntity; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import java.util.List; 6 | import com.baomidou.mybatisplus.mapper.Wrapper; 7 | import com.baomidou.mybatisplus.plugins.pagination.Pagination; 8 | 9 | import org.apache.ibatis.annotations.Param; 10 | import com.entity.vo.DiscussyiyuanxinxiVO; 11 | import com.entity.view.DiscussyiyuanxinxiView; 12 | 13 | 14 | /** 15 | * 医院信息评论表 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:20 20 | */ 21 | public interface DiscussyiyuanxinxiDao extends BaseMapper { 22 | 23 | List selectListVO(@Param("ew") Wrapper wrapper); 24 | 25 | DiscussyiyuanxinxiVO selectVO(@Param("ew") Wrapper wrapper); 26 | 27 | List selectListView(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Pagination page,@Param("ew") Wrapper wrapper); 30 | 31 | DiscussyiyuanxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/service/DiscusskeshixinxiService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.DiscusskeshixinxiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.DiscusskeshixinxiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.DiscusskeshixinxiView; 12 | 13 | 14 | /** 15 | * 科室信息评论表 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:20 20 | */ 21 | public interface DiscusskeshixinxiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | DiscusskeshixinxiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | DiscusskeshixinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 基于Springboot的医护人员排班系统(程序+论文) 2 | = 3 | ### 完整代码获取地址:从戎源码网 ([https://armycodes.com/](https://armycodes.com/)) 4 | ### 作者微信:19941326836 QQ:952045282 5 | ### 承接计算机毕业设计、Java毕业设计、Python毕业设计、深度学习、机器学习 6 | ### 选题+开题报告+任务书+程序定制+安装调试+论文+答辩ppt 一条龙服务 7 | ### 所有选题地址https://github.com/nature924/allProject 8 | 9 | 一、项目介绍 10 | --- 11 | 系统包含两种角色:用户、管理员,系统主要功能如下: 12 | 13 | 医护类型管理:管理员可以添加、修改、删除医护类型,确保系统能够区分不同类型的医护人员。 14 | 15 | 排班类型管理:允许管理员定义不同的排班类型,包括添加新类型、修改类型属性以及删除不再需要的类型。 16 | 17 | 科室信息管理:提供对科室信息的添加、修改和删除功能,以维护准确的科室信息记录。 18 | 19 | 医院信息管理:管理员可以管理医院的基本信息,包括名称、地址和联系方式,确保信息始终保持最新和准确。 20 | 21 | 医护信息管理:允许管理员添加、修改和删除医护人员的详细信息,包括姓名、职称和联系方式等。 22 | 23 | 24 | 25 | 26 | 27 | 28 | 二、项目技术 29 | --- 30 | - 编程语言:Java 31 | - 数据库:MySQL 32 | - 项目管理工具:Maven 33 | - 前端技术:VUE、HTML、Jquery、Bootstrap 34 | - 后端技术:Spring、SpringMVC、MyBatis 35 | 36 | 三、运行环境 37 | --- 38 | - 操作系统:Windows、macOS都可以 39 | - JDK版本:JDK1.8以上都可以 40 | - 开发工具:IDEA、Ecplise、Myecplise都可以 41 | - 数据库: MySQL5.7以上都可以 42 | - Tomcat:任意版本都可以 43 | - Maven:任意版本都可以 44 | 45 | 四、运行截图 46 | --- 47 | ### 论文截图: 48 | ![image/1.png](limage/1.png) 49 | 50 | ### 程序截图: 51 | ![image/1.png](image/1.png) 52 | ![image/1.png](image/2.png) 53 | ![image/1.png](image/3.png) 54 | ![image/1.png](image/4.png) 55 | ![image/1.png](image/5.png) 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/java/com/service/DiscussyiyuanxinxiService.java: -------------------------------------------------------------------------------- 1 | package com.service; 2 | 3 | import com.baomidou.mybatisplus.mapper.Wrapper; 4 | import com.baomidou.mybatisplus.service.IService; 5 | import com.utils.PageUtils; 6 | import com.entity.DiscussyiyuanxinxiEntity; 7 | import java.util.List; 8 | import java.util.Map; 9 | import com.entity.vo.DiscussyiyuanxinxiVO; 10 | import org.apache.ibatis.annotations.Param; 11 | import com.entity.view.DiscussyiyuanxinxiView; 12 | 13 | 14 | /** 15 | * 医院信息评论表 16 | * 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:20 20 | */ 21 | public interface DiscussyiyuanxinxiService extends IService { 22 | 23 | PageUtils queryPage(Map params); 24 | 25 | List selectListVO(Wrapper wrapper); 26 | 27 | DiscussyiyuanxinxiVO selectVO(@Param("ew") Wrapper wrapper); 28 | 29 | List selectListView(Wrapper wrapper); 30 | 31 | DiscussyiyuanxinxiView selectView(@Param("ew") Wrapper wrapper); 32 | 33 | PageUtils queryPage(Map params,Wrapper wrapper); 34 | 35 | } 36 | 37 | -------------------------------------------------------------------------------- /src/main/resources/mapper/YihuleixingDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | 22 | 23 | 29 | 30 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/resources/mapper/PaibanleixingDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | 22 | 23 | 29 | 30 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/com/utils/SpringContextUtils.java: -------------------------------------------------------------------------------- 1 | 2 | package com.utils; 3 | 4 | import org.springframework.beans.BeansException; 5 | import org.springframework.context.ApplicationContext; 6 | import org.springframework.context.ApplicationContextAware; 7 | import org.springframework.stereotype.Component; 8 | 9 | 10 | /** 11 | * Spring Context 工具类 12 | */ 13 | @Component 14 | public class SpringContextUtils implements ApplicationContextAware { 15 | public static ApplicationContext applicationContext; 16 | 17 | @Override 18 | public void setApplicationContext(ApplicationContext applicationContext) 19 | throws BeansException { 20 | SpringContextUtils.applicationContext = applicationContext; 21 | } 22 | 23 | public static Object getBean(String name) { 24 | return applicationContext.getBean(name); 25 | } 26 | 27 | public static T getBean(String name, Class requiredType) { 28 | return applicationContext.getBean(name, requiredType); 29 | } 30 | 31 | public static boolean containsBean(String name) { 32 | return applicationContext.containsBean(name); 33 | } 34 | 35 | public static boolean isSingleton(String name) { 36 | return applicationContext.isSingleton(name); 37 | } 38 | 39 | public static Class getType(String name) { 40 | return applicationContext.getType(name); 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /src/main/resources/mapper/StoreupDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 26 | 27 | 33 | 34 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ForumDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 27 | 28 | 34 | 35 | 39 | 40 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/CommonServiceImpl.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service.impl; 3 | 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import com.dao.CommonDao; 12 | import com.service.CommonService; 13 | 14 | 15 | /** 16 | * 系统用户 17 | */ 18 | @Service("commonService") 19 | public class CommonServiceImpl implements CommonService { 20 | 21 | @Autowired 22 | private CommonDao commonDao; 23 | 24 | @Override 25 | public List getOption(Map params) { 26 | return commonDao.getOption(params); 27 | } 28 | 29 | @Override 30 | public Map getFollowByOption(Map params) { 31 | return commonDao.getFollowByOption(params); 32 | } 33 | 34 | @Override 35 | public void sh(Map params) { 36 | commonDao.sh(params); 37 | } 38 | 39 | @Override 40 | public int remindCount(Map params) { 41 | return commonDao.remindCount(params); 42 | } 43 | 44 | @Override 45 | public Map selectCal(Map params) { 46 | return commonDao.selectCal(params); 47 | } 48 | 49 | @Override 50 | public List> selectGroup(Map params) { 51 | return commonDao.selectGroup(params); 52 | } 53 | 54 | @Override 55 | public List> selectValue(Map params) { 56 | return commonDao.selectValue(params); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/entity/UserEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import com.baomidou.mybatisplus.annotations.TableId; 7 | import com.baomidou.mybatisplus.annotations.TableName; 8 | import com.baomidou.mybatisplus.enums.IdType; 9 | 10 | /** 11 | * 用户 12 | */ 13 | @TableName("users") 14 | public class UserEntity implements Serializable { 15 | private static final long serialVersionUID = 1L; 16 | 17 | @TableId(type = IdType.AUTO) 18 | private Long id; 19 | 20 | /** 21 | * 用户账号 22 | */ 23 | private String username; 24 | 25 | /** 26 | * 密码 27 | */ 28 | private String password; 29 | 30 | /** 31 | * 用户类型 32 | */ 33 | private String role; 34 | 35 | private Date addtime; 36 | 37 | public String getUsername() { 38 | return username; 39 | } 40 | 41 | public void setUsername(String username) { 42 | this.username = username; 43 | } 44 | 45 | public String getPassword() { 46 | return password; 47 | } 48 | 49 | public void setPassword(String password) { 50 | this.password = password; 51 | } 52 | 53 | public String getRole() { 54 | return role; 55 | } 56 | 57 | public void setRole(String role) { 58 | this.role = role; 59 | } 60 | 61 | public Date getAddtime() { 62 | return addtime; 63 | } 64 | 65 | public void setAddtime(Date addtime) { 66 | this.addtime = addtime; 67 | } 68 | 69 | public Long getId() { 70 | return id; 71 | } 72 | 73 | public void setId(Long id) { 74 | this.id = id; 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service.impl; 3 | 4 | 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.springframework.stereotype.Service; 9 | 10 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 11 | import com.baomidou.mybatisplus.mapper.Wrapper; 12 | import com.baomidou.mybatisplus.plugins.Page; 13 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 14 | import com.dao.UserDao; 15 | import com.entity.UserEntity; 16 | import com.service.UserService; 17 | import com.utils.PageUtils; 18 | import com.utils.Query; 19 | 20 | 21 | /** 22 | * 系统用户 23 | */ 24 | @Service("userService") 25 | public class UserServiceImpl extends ServiceImpl implements UserService { 26 | 27 | @Override 28 | public PageUtils queryPage(Map params) { 29 | Page page = this.selectPage( 30 | new Query(params).getPage(), 31 | new EntityWrapper() 32 | ); 33 | return new PageUtils(page); 34 | } 35 | 36 | @Override 37 | public List selectListView(Wrapper wrapper) { 38 | return baseMapper.selectListView(wrapper); 39 | } 40 | 41 | @Override 42 | public PageUtils queryPage(Map params, 43 | Wrapper wrapper) { 44 | Page page =new Query(params).getPage(); 45 | page.setRecords(baseMapper.selectListView(page,wrapper)); 46 | PageUtils pageUtil = new PageUtils(page); 47 | return pageUtil; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/resources/mapper/KeshixinxiDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 27 | 28 | 34 | 35 | 39 | 40 | -------------------------------------------------------------------------------- /src/main/resources/mapper/TousuxinxiDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 27 | 28 | 34 | 35 | 39 | 40 | -------------------------------------------------------------------------------- /src/main/resources/mapper/DiscusskeshixinxiDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 26 | 27 | 33 | 34 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/java/com/config/InterceptorConfig.java: -------------------------------------------------------------------------------- 1 | package com.config; 2 | 3 | import org.springframework.context.annotation.Bean; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 6 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 7 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; 8 | 9 | import com.interceptor.AuthorizationInterceptor; 10 | 11 | @Configuration 12 | public class InterceptorConfig extends WebMvcConfigurationSupport{ 13 | 14 | @Bean 15 | public AuthorizationInterceptor getAuthorizationInterceptor() { 16 | return new AuthorizationInterceptor(); 17 | } 18 | 19 | @Override 20 | public void addInterceptors(InterceptorRegistry registry) { 21 | registry.addInterceptor(getAuthorizationInterceptor()).addPathPatterns("/**").excludePathPatterns("/static/**"); 22 | super.addInterceptors(registry); 23 | } 24 | 25 | /** 26 | * springboot 2.0配置WebMvcConfigurationSupport之后,会导致默认配置被覆盖,要访问静态资源需要重写addResourceHandlers方法 27 | */ 28 | @Override 29 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 30 | registry.addResourceHandler("/**") 31 | .addResourceLocations("classpath:/resources/") 32 | .addResourceLocations("classpath:/static/") 33 | .addResourceLocations("classpath:/admin/") 34 | .addResourceLocations("classpath:/front/") 35 | .addResourceLocations("classpath:/public/"); 36 | super.addResourceHandlers(registry); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/mapper/DiscussyiyuanxinxiDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 26 | 27 | 33 | 34 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/resources/mapper/YihuDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 30 | 31 | 37 | 38 | 42 | 43 | -------------------------------------------------------------------------------- /src/main/resources/mapper/YihuxinxiDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 29 | 30 | 36 | 37 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/mapper/YiyuanxinxiDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 23 | 28 | 29 | 35 | 36 | 40 | 41 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # Tomcat 2 | server: 3 | tomcat: 4 | uri-encoding: UTF-8 5 | port: 8080 6 | servlet: 7 | context-path: /springbootjf5zc 8 | 9 | spring: 10 | datasource: 11 | driverClassName: com.mysql.cj.jdbc.Driver 12 | url: jdbc:mysql://127.0.0.1:3306/springbootjf5zc?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8 13 | username: root 14 | password: 123456 15 | 16 | # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver 17 | # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=springbootjf5zc 18 | # username: sa 19 | # password: 123456 20 | 21 | servlet: 22 | multipart: 23 | max-file-size: 10MB 24 | max-request-size: 10MB 25 | resources: 26 | static-locations: classpath:static/,file:static/ 27 | 28 | #mybatis 29 | mybatis-plus: 30 | mapper-locations: classpath*:mapper/*.xml 31 | #实体扫描,多个package用逗号或者分号分隔 32 | typeAliasesPackage: com.entity 33 | global-config: 34 | #主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID"; 35 | id-type: 1 36 | #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断" 37 | field-strategy: 2 38 | #驼峰下划线转换 39 | db-column-underline: true 40 | #刷新mapper 调试神器 41 | refresh-mapper: true 42 | #逻辑删除配置 43 | logic-delete-value: -1 44 | logic-not-delete-value: 0 45 | #自定义SQL注入器 46 | sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector 47 | configuration: 48 | map-underscore-to-camel-case: true 49 | cache-enabled: false 50 | call-setters-on-nulls: true 51 | #springboot 项目mybatis plus 设置 jdbcTypeForNull (oracle数据库需配置JdbcType.NULL, 默认是Other) 52 | jdbc-type-for-null: 'null' 53 | -------------------------------------------------------------------------------- /src/main/resources/mapper/PaibanxinxiDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 26 | 27 | 32 | 33 | 39 | 40 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/mapper/CommonDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 19 | 20 | 21 | UPDATE ${table} set sfsh=#{sfsh} where id=#{id} 22 | 23 | 24 | 44 | 45 | 48 | 49 | 52 | 53 | 56 | 57 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/StoreupVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.StoreupEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 收藏表 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public class StoreupVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 收藏id 27 | */ 28 | 29 | private Long refid; 30 | 31 | /** 32 | * 表名 33 | */ 34 | 35 | private String tablename; 36 | 37 | /** 38 | * 收藏名称 39 | */ 40 | 41 | private String name; 42 | 43 | /** 44 | * 收藏图片 45 | */ 46 | 47 | private String picture; 48 | 49 | 50 | /** 51 | * 设置:收藏id 52 | */ 53 | 54 | public void setRefid(Long refid) { 55 | this.refid = refid; 56 | } 57 | 58 | /** 59 | * 获取:收藏id 60 | */ 61 | public Long getRefid() { 62 | return refid; 63 | } 64 | 65 | 66 | /** 67 | * 设置:表名 68 | */ 69 | 70 | public void setTablename(String tablename) { 71 | this.tablename = tablename; 72 | } 73 | 74 | /** 75 | * 获取:表名 76 | */ 77 | public String getTablename() { 78 | return tablename; 79 | } 80 | 81 | 82 | /** 83 | * 设置:收藏名称 84 | */ 85 | 86 | public void setName(String name) { 87 | this.name = name; 88 | } 89 | 90 | /** 91 | * 获取:收藏名称 92 | */ 93 | public String getName() { 94 | return name; 95 | } 96 | 97 | 98 | /** 99 | * 设置:收藏图片 100 | */ 101 | 102 | public void setPicture(String picture) { 103 | this.picture = picture; 104 | } 105 | 106 | /** 107 | * 获取:收藏图片 108 | */ 109 | public String getPicture() { 110 | return picture; 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/YihuServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.YihuDao; 16 | import com.entity.YihuEntity; 17 | import com.service.YihuService; 18 | import com.entity.vo.YihuVO; 19 | import com.entity.view.YihuView; 20 | 21 | @Service("yihuService") 22 | public class YihuServiceImpl extends ServiceImpl implements YihuService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public YihuVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public YihuView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/ForumServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.ForumDao; 16 | import com.entity.ForumEntity; 17 | import com.service.ForumService; 18 | import com.entity.vo.ForumVO; 19 | import com.entity.view.ForumView; 20 | 21 | @Service("forumService") 22 | public class ForumServiceImpl extends ServiceImpl implements ForumService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public ForumVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public ForumView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/DiscusskeshixinxiVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.DiscusskeshixinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 科室信息评论表 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:20 20 | */ 21 | public class DiscusskeshixinxiVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 用户id 27 | */ 28 | 29 | private Long userid; 30 | 31 | /** 32 | * 用户名 33 | */ 34 | 35 | private String nickname; 36 | 37 | /** 38 | * 评论内容 39 | */ 40 | 41 | private String content; 42 | 43 | /** 44 | * 回复内容 45 | */ 46 | 47 | private String reply; 48 | 49 | 50 | /** 51 | * 设置:用户id 52 | */ 53 | 54 | public void setUserid(Long userid) { 55 | this.userid = userid; 56 | } 57 | 58 | /** 59 | * 获取:用户id 60 | */ 61 | public Long getUserid() { 62 | return userid; 63 | } 64 | 65 | 66 | /** 67 | * 设置:用户名 68 | */ 69 | 70 | public void setNickname(String nickname) { 71 | this.nickname = nickname; 72 | } 73 | 74 | /** 75 | * 获取:用户名 76 | */ 77 | public String getNickname() { 78 | return nickname; 79 | } 80 | 81 | 82 | /** 83 | * 设置:评论内容 84 | */ 85 | 86 | public void setContent(String content) { 87 | this.content = content; 88 | } 89 | 90 | /** 91 | * 获取:评论内容 92 | */ 93 | public String getContent() { 94 | return content; 95 | } 96 | 97 | 98 | /** 99 | * 设置:回复内容 100 | */ 101 | 102 | public void setReply(String reply) { 103 | this.reply = reply; 104 | } 105 | 106 | /** 107 | * 获取:回复内容 108 | */ 109 | public String getReply() { 110 | return reply; 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/DiscussyiyuanxinxiVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.DiscussyiyuanxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医院信息评论表 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:20 20 | */ 21 | public class DiscussyiyuanxinxiVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 用户id 27 | */ 28 | 29 | private Long userid; 30 | 31 | /** 32 | * 用户名 33 | */ 34 | 35 | private String nickname; 36 | 37 | /** 38 | * 评论内容 39 | */ 40 | 41 | private String content; 42 | 43 | /** 44 | * 回复内容 45 | */ 46 | 47 | private String reply; 48 | 49 | 50 | /** 51 | * 设置:用户id 52 | */ 53 | 54 | public void setUserid(Long userid) { 55 | this.userid = userid; 56 | } 57 | 58 | /** 59 | * 获取:用户id 60 | */ 61 | public Long getUserid() { 62 | return userid; 63 | } 64 | 65 | 66 | /** 67 | * 设置:用户名 68 | */ 69 | 70 | public void setNickname(String nickname) { 71 | this.nickname = nickname; 72 | } 73 | 74 | /** 75 | * 获取:用户名 76 | */ 77 | public String getNickname() { 78 | return nickname; 79 | } 80 | 81 | 82 | /** 83 | * 设置:评论内容 84 | */ 85 | 86 | public void setContent(String content) { 87 | this.content = content; 88 | } 89 | 90 | /** 91 | * 获取:评论内容 92 | */ 93 | public String getContent() { 94 | return content; 95 | } 96 | 97 | 98 | /** 99 | * 设置:回复内容 100 | */ 101 | 102 | public void setReply(String reply) { 103 | this.reply = reply; 104 | } 105 | 106 | /** 107 | * 获取:回复内容 108 | */ 109 | public String getReply() { 110 | return reply; 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/StoreupModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.StoreupEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 收藏表 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:19 21 | */ 22 | public class StoreupModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 收藏id 28 | */ 29 | 30 | private Long refid; 31 | 32 | /** 33 | * 表名 34 | */ 35 | 36 | private String tablename; 37 | 38 | /** 39 | * 收藏名称 40 | */ 41 | 42 | private String name; 43 | 44 | /** 45 | * 收藏图片 46 | */ 47 | 48 | private String picture; 49 | 50 | 51 | /** 52 | * 设置:收藏id 53 | */ 54 | 55 | public void setRefid(Long refid) { 56 | this.refid = refid; 57 | } 58 | 59 | /** 60 | * 获取:收藏id 61 | */ 62 | public Long getRefid() { 63 | return refid; 64 | } 65 | 66 | 67 | /** 68 | * 设置:表名 69 | */ 70 | 71 | public void setTablename(String tablename) { 72 | this.tablename = tablename; 73 | } 74 | 75 | /** 76 | * 获取:表名 77 | */ 78 | public String getTablename() { 79 | return tablename; 80 | } 81 | 82 | 83 | /** 84 | * 设置:收藏名称 85 | */ 86 | 87 | public void setName(String name) { 88 | this.name = name; 89 | } 90 | 91 | /** 92 | * 获取:收藏名称 93 | */ 94 | public String getName() { 95 | return name; 96 | } 97 | 98 | 99 | /** 100 | * 设置:收藏图片 101 | */ 102 | 103 | public void setPicture(String picture) { 104 | this.picture = picture; 105 | } 106 | 107 | /** 108 | * 获取:收藏图片 109 | */ 110 | public String getPicture() { 111 | return picture; 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/StoreupServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.StoreupDao; 16 | import com.entity.StoreupEntity; 17 | import com.service.StoreupService; 18 | import com.entity.vo.StoreupVO; 19 | import com.entity.view.StoreupView; 20 | 21 | @Service("storeupService") 22 | public class StoreupServiceImpl extends ServiceImpl implements StoreupService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public StoreupVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public StoreupView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/DiscusskeshixinxiModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.DiscusskeshixinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 科室信息评论表 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:20 21 | */ 22 | public class DiscusskeshixinxiModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 用户id 28 | */ 29 | 30 | private Long userid; 31 | 32 | /** 33 | * 用户名 34 | */ 35 | 36 | private String nickname; 37 | 38 | /** 39 | * 评论内容 40 | */ 41 | 42 | private String content; 43 | 44 | /** 45 | * 回复内容 46 | */ 47 | 48 | private String reply; 49 | 50 | 51 | /** 52 | * 设置:用户id 53 | */ 54 | 55 | public void setUserid(Long userid) { 56 | this.userid = userid; 57 | } 58 | 59 | /** 60 | * 获取:用户id 61 | */ 62 | public Long getUserid() { 63 | return userid; 64 | } 65 | 66 | 67 | /** 68 | * 设置:用户名 69 | */ 70 | 71 | public void setNickname(String nickname) { 72 | this.nickname = nickname; 73 | } 74 | 75 | /** 76 | * 获取:用户名 77 | */ 78 | public String getNickname() { 79 | return nickname; 80 | } 81 | 82 | 83 | /** 84 | * 设置:评论内容 85 | */ 86 | 87 | public void setContent(String content) { 88 | this.content = content; 89 | } 90 | 91 | /** 92 | * 获取:评论内容 93 | */ 94 | public String getContent() { 95 | return content; 96 | } 97 | 98 | 99 | /** 100 | * 设置:回复内容 101 | */ 102 | 103 | public void setReply(String reply) { 104 | this.reply = reply; 105 | } 106 | 107 | /** 108 | * 获取:回复内容 109 | */ 110 | public String getReply() { 111 | return reply; 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/DiscussyiyuanxinxiModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.DiscussyiyuanxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医院信息评论表 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:20 21 | */ 22 | public class DiscussyiyuanxinxiModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 用户id 28 | */ 29 | 30 | private Long userid; 31 | 32 | /** 33 | * 用户名 34 | */ 35 | 36 | private String nickname; 37 | 38 | /** 39 | * 评论内容 40 | */ 41 | 42 | private String content; 43 | 44 | /** 45 | * 回复内容 46 | */ 47 | 48 | private String reply; 49 | 50 | 51 | /** 52 | * 设置:用户id 53 | */ 54 | 55 | public void setUserid(Long userid) { 56 | this.userid = userid; 57 | } 58 | 59 | /** 60 | * 获取:用户id 61 | */ 62 | public Long getUserid() { 63 | return userid; 64 | } 65 | 66 | 67 | /** 68 | * 设置:用户名 69 | */ 70 | 71 | public void setNickname(String nickname) { 72 | this.nickname = nickname; 73 | } 74 | 75 | /** 76 | * 获取:用户名 77 | */ 78 | public String getNickname() { 79 | return nickname; 80 | } 81 | 82 | 83 | /** 84 | * 设置:评论内容 85 | */ 86 | 87 | public void setContent(String content) { 88 | this.content = content; 89 | } 90 | 91 | /** 92 | * 获取:评论内容 93 | */ 94 | public String getContent() { 95 | return content; 96 | } 97 | 98 | 99 | /** 100 | * 设置:回复内容 101 | */ 102 | 103 | public void setReply(String reply) { 104 | this.reply = reply; 105 | } 106 | 107 | /** 108 | * 获取:回复内容 109 | */ 110 | public String getReply() { 111 | return reply; 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/YihuxinxiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.YihuxinxiDao; 16 | import com.entity.YihuxinxiEntity; 17 | import com.service.YihuxinxiService; 18 | import com.entity.vo.YihuxinxiVO; 19 | import com.entity.view.YihuxinxiView; 20 | 21 | @Service("yihuxinxiService") 22 | public class YihuxinxiServiceImpl extends ServiceImpl implements YihuxinxiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public YihuxinxiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public YihuxinxiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/KeshixinxiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.KeshixinxiDao; 16 | import com.entity.KeshixinxiEntity; 17 | import com.service.KeshixinxiService; 18 | import com.entity.vo.KeshixinxiVO; 19 | import com.entity.view.KeshixinxiView; 20 | 21 | @Service("keshixinxiService") 22 | public class KeshixinxiServiceImpl extends ServiceImpl implements KeshixinxiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public KeshixinxiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public KeshixinxiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/TousuxinxiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.TousuxinxiDao; 16 | import com.entity.TousuxinxiEntity; 17 | import com.service.TousuxinxiService; 18 | import com.entity.vo.TousuxinxiVO; 19 | import com.entity.view.TousuxinxiView; 20 | 21 | @Service("tousuxinxiService") 22 | public class TousuxinxiServiceImpl extends ServiceImpl implements TousuxinxiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public TousuxinxiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public TousuxinxiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/PaibanxinxiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.PaibanxinxiDao; 16 | import com.entity.PaibanxinxiEntity; 17 | import com.service.PaibanxinxiService; 18 | import com.entity.vo.PaibanxinxiVO; 19 | import com.entity.view.PaibanxinxiView; 20 | 21 | @Service("paibanxinxiService") 22 | public class PaibanxinxiServiceImpl extends ServiceImpl implements PaibanxinxiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public PaibanxinxiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public PaibanxinxiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/YihuleixingServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.YihuleixingDao; 16 | import com.entity.YihuleixingEntity; 17 | import com.service.YihuleixingService; 18 | import com.entity.vo.YihuleixingVO; 19 | import com.entity.view.YihuleixingView; 20 | 21 | @Service("yihuleixingService") 22 | public class YihuleixingServiceImpl extends ServiceImpl implements YihuleixingService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public YihuleixingVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public YihuleixingView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/YiyuanxinxiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.YiyuanxinxiDao; 16 | import com.entity.YiyuanxinxiEntity; 17 | import com.service.YiyuanxinxiService; 18 | import com.entity.vo.YiyuanxinxiVO; 19 | import com.entity.view.YiyuanxinxiView; 20 | 21 | @Service("yiyuanxinxiService") 22 | public class YiyuanxinxiServiceImpl extends ServiceImpl implements YiyuanxinxiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public YiyuanxinxiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public YiyuanxinxiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/PaibanleixingServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.PaibanleixingDao; 16 | import com.entity.PaibanleixingEntity; 17 | import com.service.PaibanleixingService; 18 | import com.entity.vo.PaibanleixingVO; 19 | import com.entity.view.PaibanleixingView; 20 | 21 | @Service("paibanleixingService") 22 | public class PaibanleixingServiceImpl extends ServiceImpl implements PaibanleixingService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public PaibanleixingVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public PaibanleixingView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/entity/PaibanleixingEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 排班类型 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2021-05-08 16:41:19 30 | */ 31 | @TableName("paibanleixing") 32 | public class PaibanleixingEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public PaibanleixingEntity() { 37 | 38 | } 39 | 40 | public PaibanleixingEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 班次 56 | */ 57 | 58 | private String banci; 59 | 60 | 61 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 62 | @DateTimeFormat 63 | private Date addtime; 64 | 65 | public Date getAddtime() { 66 | return addtime; 67 | } 68 | public void setAddtime(Date addtime) { 69 | this.addtime = addtime; 70 | } 71 | 72 | public Long getId() { 73 | return id; 74 | } 75 | 76 | public void setId(Long id) { 77 | this.id = id; 78 | } 79 | /** 80 | * 设置:班次 81 | */ 82 | public void setBanci(String banci) { 83 | this.banci = banci; 84 | } 85 | /** 86 | * 获取:班次 87 | */ 88 | public String getBanci() { 89 | return banci; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/entity/YihuleixingEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 医护类型 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2021-05-08 16:41:19 30 | */ 31 | @TableName("yihuleixing") 32 | public class YihuleixingEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public YihuleixingEntity() { 37 | 38 | } 39 | 40 | public YihuleixingEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 医护类型 56 | */ 57 | 58 | private String yihuleixing; 59 | 60 | 61 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 62 | @DateTimeFormat 63 | private Date addtime; 64 | 65 | public Date getAddtime() { 66 | return addtime; 67 | } 68 | public void setAddtime(Date addtime) { 69 | this.addtime = addtime; 70 | } 71 | 72 | public Long getId() { 73 | return id; 74 | } 75 | 76 | public void setId(Long id) { 77 | this.id = id; 78 | } 79 | /** 80 | * 设置:医护类型 81 | */ 82 | public void setYihuleixing(String yihuleixing) { 83 | this.yihuleixing = yihuleixing; 84 | } 85 | /** 86 | * 获取:医护类型 87 | */ 88 | public String getYihuleixing() { 89 | return yihuleixing; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/utils/PageUtils.java: -------------------------------------------------------------------------------- 1 | 2 | package com.utils; 3 | 4 | import java.io.Serializable; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import com.baomidou.mybatisplus.plugins.Page; 9 | 10 | /** 11 | * 分页工具类 12 | */ 13 | public class PageUtils implements Serializable { 14 | private static final long serialVersionUID = 1L; 15 | //总记录数 16 | private long total; 17 | //每页记录数 18 | private int pageSize; 19 | //总页数 20 | private long totalPage; 21 | //当前页数 22 | private int currPage; 23 | //列表数据 24 | private List list; 25 | 26 | /** 27 | * 分页 28 | * @param list 列表数据 29 | * @param totalCount 总记录数 30 | * @param pageSize 每页记录数 31 | * @param currPage 当前页数 32 | */ 33 | public PageUtils(List list, int totalCount, int pageSize, int currPage) { 34 | this.list = list; 35 | this.total = totalCount; 36 | this.pageSize = pageSize; 37 | this.currPage = currPage; 38 | this.totalPage = (int)Math.ceil((double)totalCount/pageSize); 39 | } 40 | 41 | /** 42 | * 分页 43 | */ 44 | public PageUtils(Page page) { 45 | this.list = page.getRecords(); 46 | this.total = page.getTotal(); 47 | this.pageSize = page.getSize(); 48 | this.currPage = page.getCurrent(); 49 | this.totalPage = page.getPages(); 50 | } 51 | 52 | /* 53 | * 空数据的分页 54 | */ 55 | public PageUtils(Map params) { 56 | Page page =new Query(params).getPage(); 57 | new PageUtils(page); 58 | } 59 | 60 | 61 | public int getPageSize() { 62 | return pageSize; 63 | } 64 | 65 | public void setPageSize(int pageSize) { 66 | this.pageSize = pageSize; 67 | } 68 | 69 | public int getCurrPage() { 70 | return currPage; 71 | } 72 | 73 | public void setCurrPage(int currPage) { 74 | this.currPage = currPage; 75 | } 76 | 77 | public List getList() { 78 | return list; 79 | } 80 | 81 | public void setList(List list) { 82 | this.list = list; 83 | } 84 | 85 | public long getTotalPage() { 86 | return totalPage; 87 | } 88 | 89 | public void setTotalPage(long totalPage) { 90 | this.totalPage = totalPage; 91 | } 92 | 93 | public long getTotal() { 94 | return total; 95 | } 96 | 97 | public void setTotal(long total) { 98 | this.total = total; 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/DiscusskeshixinxiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.DiscusskeshixinxiDao; 16 | import com.entity.DiscusskeshixinxiEntity; 17 | import com.service.DiscusskeshixinxiService; 18 | import com.entity.vo.DiscusskeshixinxiVO; 19 | import com.entity.view.DiscusskeshixinxiView; 20 | 21 | @Service("discusskeshixinxiService") 22 | public class DiscusskeshixinxiServiceImpl extends ServiceImpl implements DiscusskeshixinxiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public DiscusskeshixinxiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public DiscusskeshixinxiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/DiscussyiyuanxinxiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | import java.util.Map; 5 | import java.util.List; 6 | 7 | import com.baomidou.mybatisplus.mapper.Wrapper; 8 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 9 | import com.baomidou.mybatisplus.plugins.Page; 10 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 11 | import com.utils.PageUtils; 12 | import com.utils.Query; 13 | 14 | 15 | import com.dao.DiscussyiyuanxinxiDao; 16 | import com.entity.DiscussyiyuanxinxiEntity; 17 | import com.service.DiscussyiyuanxinxiService; 18 | import com.entity.vo.DiscussyiyuanxinxiVO; 19 | import com.entity.view.DiscussyiyuanxinxiView; 20 | 21 | @Service("discussyiyuanxinxiService") 22 | public class DiscussyiyuanxinxiServiceImpl extends ServiceImpl implements DiscussyiyuanxinxiService { 23 | 24 | 25 | @Override 26 | public PageUtils queryPage(Map params) { 27 | Page page = this.selectPage( 28 | new Query(params).getPage(), 29 | new EntityWrapper() 30 | ); 31 | return new PageUtils(page); 32 | } 33 | 34 | @Override 35 | public PageUtils queryPage(Map params, Wrapper wrapper) { 36 | Page page =new Query(params).getPage(); 37 | page.setRecords(baseMapper.selectListView(page,wrapper)); 38 | PageUtils pageUtil = new PageUtils(page); 39 | return pageUtil; 40 | } 41 | 42 | @Override 43 | public List selectListVO(Wrapper wrapper) { 44 | return baseMapper.selectListVO(wrapper); 45 | } 46 | 47 | @Override 48 | public DiscussyiyuanxinxiVO selectVO(Wrapper wrapper) { 49 | return baseMapper.selectVO(wrapper); 50 | } 51 | 52 | @Override 53 | public List selectListView(Wrapper wrapper) { 54 | return baseMapper.selectListView(wrapper); 55 | } 56 | 57 | @Override 58 | public DiscussyiyuanxinxiView selectView(Wrapper wrapper) { 59 | return baseMapper.selectView(wrapper); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/ForumVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.ForumEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 论坛表 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public class ForumVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 帖子内容 27 | */ 28 | 29 | private String content; 30 | 31 | /** 32 | * 父节点id 33 | */ 34 | 35 | private Long parentid; 36 | 37 | /** 38 | * 用户id 39 | */ 40 | 41 | private Long userid; 42 | 43 | /** 44 | * 用户名 45 | */ 46 | 47 | private String username; 48 | 49 | /** 50 | * 状态 51 | */ 52 | 53 | private String isdone; 54 | 55 | 56 | /** 57 | * 设置:帖子内容 58 | */ 59 | 60 | public void setContent(String content) { 61 | this.content = content; 62 | } 63 | 64 | /** 65 | * 获取:帖子内容 66 | */ 67 | public String getContent() { 68 | return content; 69 | } 70 | 71 | 72 | /** 73 | * 设置:父节点id 74 | */ 75 | 76 | public void setParentid(Long parentid) { 77 | this.parentid = parentid; 78 | } 79 | 80 | /** 81 | * 获取:父节点id 82 | */ 83 | public Long getParentid() { 84 | return parentid; 85 | } 86 | 87 | 88 | /** 89 | * 设置:用户id 90 | */ 91 | 92 | public void setUserid(Long userid) { 93 | this.userid = userid; 94 | } 95 | 96 | /** 97 | * 获取:用户id 98 | */ 99 | public Long getUserid() { 100 | return userid; 101 | } 102 | 103 | 104 | /** 105 | * 设置:用户名 106 | */ 107 | 108 | public void setUsername(String username) { 109 | this.username = username; 110 | } 111 | 112 | /** 113 | * 获取:用户名 114 | */ 115 | public String getUsername() { 116 | return username; 117 | } 118 | 119 | 120 | /** 121 | * 设置:状态 122 | */ 123 | 124 | public void setIsdone(String isdone) { 125 | this.isdone = isdone; 126 | } 127 | 128 | /** 129 | * 获取:状态 130 | */ 131 | public String getIsdone() { 132 | return isdone; 133 | } 134 | 135 | } 136 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/ForumModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.ForumEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 论坛表 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:19 21 | */ 22 | public class ForumModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 帖子内容 28 | */ 29 | 30 | private String content; 31 | 32 | /** 33 | * 父节点id 34 | */ 35 | 36 | private Long parentid; 37 | 38 | /** 39 | * 用户id 40 | */ 41 | 42 | private Long userid; 43 | 44 | /** 45 | * 用户名 46 | */ 47 | 48 | private String username; 49 | 50 | /** 51 | * 状态 52 | */ 53 | 54 | private String isdone; 55 | 56 | 57 | /** 58 | * 设置:帖子内容 59 | */ 60 | 61 | public void setContent(String content) { 62 | this.content = content; 63 | } 64 | 65 | /** 66 | * 获取:帖子内容 67 | */ 68 | public String getContent() { 69 | return content; 70 | } 71 | 72 | 73 | /** 74 | * 设置:父节点id 75 | */ 76 | 77 | public void setParentid(Long parentid) { 78 | this.parentid = parentid; 79 | } 80 | 81 | /** 82 | * 获取:父节点id 83 | */ 84 | public Long getParentid() { 85 | return parentid; 86 | } 87 | 88 | 89 | /** 90 | * 设置:用户id 91 | */ 92 | 93 | public void setUserid(Long userid) { 94 | this.userid = userid; 95 | } 96 | 97 | /** 98 | * 获取:用户id 99 | */ 100 | public Long getUserid() { 101 | return userid; 102 | } 103 | 104 | 105 | /** 106 | * 设置:用户名 107 | */ 108 | 109 | public void setUsername(String username) { 110 | this.username = username; 111 | } 112 | 113 | /** 114 | * 获取:用户名 115 | */ 116 | public String getUsername() { 117 | return username; 118 | } 119 | 120 | 121 | /** 122 | * 设置:状态 123 | */ 124 | 125 | public void setIsdone(String isdone) { 126 | this.isdone = isdone; 127 | } 128 | 129 | /** 130 | * 获取:状态 131 | */ 132 | public String getIsdone() { 133 | return isdone; 134 | } 135 | 136 | } 137 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/KeshixinxiVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.KeshixinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 科室信息 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public class KeshixinxiVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 图片 27 | */ 28 | 29 | private String tupian; 30 | 31 | /** 32 | * 科室介绍 33 | */ 34 | 35 | private String keshijieshao; 36 | 37 | /** 38 | * 科室位置 39 | */ 40 | 41 | private String keshiweizhi; 42 | 43 | /** 44 | * 科室医生 45 | */ 46 | 47 | private String keshiyisheng; 48 | 49 | /** 50 | * 联系电话 51 | */ 52 | 53 | private String lianxidianhua; 54 | 55 | 56 | /** 57 | * 设置:图片 58 | */ 59 | 60 | public void setTupian(String tupian) { 61 | this.tupian = tupian; 62 | } 63 | 64 | /** 65 | * 获取:图片 66 | */ 67 | public String getTupian() { 68 | return tupian; 69 | } 70 | 71 | 72 | /** 73 | * 设置:科室介绍 74 | */ 75 | 76 | public void setKeshijieshao(String keshijieshao) { 77 | this.keshijieshao = keshijieshao; 78 | } 79 | 80 | /** 81 | * 获取:科室介绍 82 | */ 83 | public String getKeshijieshao() { 84 | return keshijieshao; 85 | } 86 | 87 | 88 | /** 89 | * 设置:科室位置 90 | */ 91 | 92 | public void setKeshiweizhi(String keshiweizhi) { 93 | this.keshiweizhi = keshiweizhi; 94 | } 95 | 96 | /** 97 | * 获取:科室位置 98 | */ 99 | public String getKeshiweizhi() { 100 | return keshiweizhi; 101 | } 102 | 103 | 104 | /** 105 | * 设置:科室医生 106 | */ 107 | 108 | public void setKeshiyisheng(String keshiyisheng) { 109 | this.keshiyisheng = keshiyisheng; 110 | } 111 | 112 | /** 113 | * 获取:科室医生 114 | */ 115 | public String getKeshiyisheng() { 116 | return keshiyisheng; 117 | } 118 | 119 | 120 | /** 121 | * 设置:联系电话 122 | */ 123 | 124 | public void setLianxidianhua(String lianxidianhua) { 125 | this.lianxidianhua = lianxidianhua; 126 | } 127 | 128 | /** 129 | * 获取:联系电话 130 | */ 131 | public String getLianxidianhua() { 132 | return lianxidianhua; 133 | } 134 | 135 | } 136 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/KeshixinxiModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.KeshixinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 科室信息 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:19 21 | */ 22 | public class KeshixinxiModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 图片 28 | */ 29 | 30 | private String tupian; 31 | 32 | /** 33 | * 科室介绍 34 | */ 35 | 36 | private String keshijieshao; 37 | 38 | /** 39 | * 科室位置 40 | */ 41 | 42 | private String keshiweizhi; 43 | 44 | /** 45 | * 科室医生 46 | */ 47 | 48 | private String keshiyisheng; 49 | 50 | /** 51 | * 联系电话 52 | */ 53 | 54 | private String lianxidianhua; 55 | 56 | 57 | /** 58 | * 设置:图片 59 | */ 60 | 61 | public void setTupian(String tupian) { 62 | this.tupian = tupian; 63 | } 64 | 65 | /** 66 | * 获取:图片 67 | */ 68 | public String getTupian() { 69 | return tupian; 70 | } 71 | 72 | 73 | /** 74 | * 设置:科室介绍 75 | */ 76 | 77 | public void setKeshijieshao(String keshijieshao) { 78 | this.keshijieshao = keshijieshao; 79 | } 80 | 81 | /** 82 | * 获取:科室介绍 83 | */ 84 | public String getKeshijieshao() { 85 | return keshijieshao; 86 | } 87 | 88 | 89 | /** 90 | * 设置:科室位置 91 | */ 92 | 93 | public void setKeshiweizhi(String keshiweizhi) { 94 | this.keshiweizhi = keshiweizhi; 95 | } 96 | 97 | /** 98 | * 获取:科室位置 99 | */ 100 | public String getKeshiweizhi() { 101 | return keshiweizhi; 102 | } 103 | 104 | 105 | /** 106 | * 设置:科室医生 107 | */ 108 | 109 | public void setKeshiyisheng(String keshiyisheng) { 110 | this.keshiyisheng = keshiyisheng; 111 | } 112 | 113 | /** 114 | * 获取:科室医生 115 | */ 116 | public String getKeshiyisheng() { 117 | return keshiyisheng; 118 | } 119 | 120 | 121 | /** 122 | * 设置:联系电话 123 | */ 124 | 125 | public void setLianxidianhua(String lianxidianhua) { 126 | this.lianxidianhua = lianxidianhua; 127 | } 128 | 129 | /** 130 | * 获取:联系电话 131 | */ 132 | public String getLianxidianhua() { 133 | return lianxidianhua; 134 | } 135 | 136 | } 137 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/TousuxinxiVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.TousuxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 投诉信息 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public class TousuxinxiVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 姓名 27 | */ 28 | 29 | private String xingming; 30 | 31 | /** 32 | * 照片 33 | */ 34 | 35 | private String zhaopian; 36 | 37 | /** 38 | * 投诉名称 39 | */ 40 | 41 | private String tousumingcheng; 42 | 43 | /** 44 | * 投诉内容 45 | */ 46 | 47 | private String tousuneirong; 48 | 49 | /** 50 | * 投诉日期 51 | */ 52 | 53 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 54 | @DateTimeFormat 55 | private Date tousuriqi; 56 | 57 | 58 | /** 59 | * 设置:姓名 60 | */ 61 | 62 | public void setXingming(String xingming) { 63 | this.xingming = xingming; 64 | } 65 | 66 | /** 67 | * 获取:姓名 68 | */ 69 | public String getXingming() { 70 | return xingming; 71 | } 72 | 73 | 74 | /** 75 | * 设置:照片 76 | */ 77 | 78 | public void setZhaopian(String zhaopian) { 79 | this.zhaopian = zhaopian; 80 | } 81 | 82 | /** 83 | * 获取:照片 84 | */ 85 | public String getZhaopian() { 86 | return zhaopian; 87 | } 88 | 89 | 90 | /** 91 | * 设置:投诉名称 92 | */ 93 | 94 | public void setTousumingcheng(String tousumingcheng) { 95 | this.tousumingcheng = tousumingcheng; 96 | } 97 | 98 | /** 99 | * 获取:投诉名称 100 | */ 101 | public String getTousumingcheng() { 102 | return tousumingcheng; 103 | } 104 | 105 | 106 | /** 107 | * 设置:投诉内容 108 | */ 109 | 110 | public void setTousuneirong(String tousuneirong) { 111 | this.tousuneirong = tousuneirong; 112 | } 113 | 114 | /** 115 | * 获取:投诉内容 116 | */ 117 | public String getTousuneirong() { 118 | return tousuneirong; 119 | } 120 | 121 | 122 | /** 123 | * 设置:投诉日期 124 | */ 125 | 126 | public void setTousuriqi(Date tousuriqi) { 127 | this.tousuriqi = tousuriqi; 128 | } 129 | 130 | /** 131 | * 获取:投诉日期 132 | */ 133 | public Date getTousuriqi() { 134 | return tousuriqi; 135 | } 136 | 137 | } 138 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/TousuxinxiModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.TousuxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 投诉信息 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:19 21 | */ 22 | public class TousuxinxiModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 姓名 28 | */ 29 | 30 | private String xingming; 31 | 32 | /** 33 | * 照片 34 | */ 35 | 36 | private String zhaopian; 37 | 38 | /** 39 | * 投诉名称 40 | */ 41 | 42 | private String tousumingcheng; 43 | 44 | /** 45 | * 投诉内容 46 | */ 47 | 48 | private String tousuneirong; 49 | 50 | /** 51 | * 投诉日期 52 | */ 53 | 54 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 55 | @DateTimeFormat 56 | private Date tousuriqi; 57 | 58 | 59 | /** 60 | * 设置:姓名 61 | */ 62 | 63 | public void setXingming(String xingming) { 64 | this.xingming = xingming; 65 | } 66 | 67 | /** 68 | * 获取:姓名 69 | */ 70 | public String getXingming() { 71 | return xingming; 72 | } 73 | 74 | 75 | /** 76 | * 设置:照片 77 | */ 78 | 79 | public void setZhaopian(String zhaopian) { 80 | this.zhaopian = zhaopian; 81 | } 82 | 83 | /** 84 | * 获取:照片 85 | */ 86 | public String getZhaopian() { 87 | return zhaopian; 88 | } 89 | 90 | 91 | /** 92 | * 设置:投诉名称 93 | */ 94 | 95 | public void setTousumingcheng(String tousumingcheng) { 96 | this.tousumingcheng = tousumingcheng; 97 | } 98 | 99 | /** 100 | * 获取:投诉名称 101 | */ 102 | public String getTousumingcheng() { 103 | return tousumingcheng; 104 | } 105 | 106 | 107 | /** 108 | * 设置:投诉内容 109 | */ 110 | 111 | public void setTousuneirong(String tousuneirong) { 112 | this.tousuneirong = tousuneirong; 113 | } 114 | 115 | /** 116 | * 获取:投诉内容 117 | */ 118 | public String getTousuneirong() { 119 | return tousuneirong; 120 | } 121 | 122 | 123 | /** 124 | * 设置:投诉日期 125 | */ 126 | 127 | public void setTousuriqi(Date tousuriqi) { 128 | this.tousuriqi = tousuriqi; 129 | } 130 | 131 | /** 132 | * 获取:投诉日期 133 | */ 134 | public Date getTousuriqi() { 135 | return tousuriqi; 136 | } 137 | 138 | } 139 | -------------------------------------------------------------------------------- /src/main/java/com/service/impl/TokenServiceImpl.java: -------------------------------------------------------------------------------- 1 | 2 | package com.service.impl; 3 | 4 | 5 | import java.util.Calendar; 6 | import java.util.Date; 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | import org.springframework.stereotype.Service; 11 | 12 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 13 | import com.baomidou.mybatisplus.mapper.Wrapper; 14 | import com.baomidou.mybatisplus.plugins.Page; 15 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; 16 | import com.dao.TokenDao; 17 | import com.entity.TokenEntity; 18 | import com.entity.TokenEntity; 19 | import com.service.TokenService; 20 | import com.utils.CommonUtil; 21 | import com.utils.PageUtils; 22 | import com.utils.Query; 23 | 24 | 25 | /** 26 | * token 27 | */ 28 | @Service("tokenService") 29 | public class TokenServiceImpl extends ServiceImpl implements TokenService { 30 | 31 | @Override 32 | public PageUtils queryPage(Map params) { 33 | Page page = this.selectPage( 34 | new Query(params).getPage(), 35 | new EntityWrapper() 36 | ); 37 | return new PageUtils(page); 38 | } 39 | 40 | @Override 41 | public List selectListView(Wrapper wrapper) { 42 | return baseMapper.selectListView(wrapper); 43 | } 44 | 45 | @Override 46 | public PageUtils queryPage(Map params, 47 | Wrapper wrapper) { 48 | Page page =new Query(params).getPage(); 49 | page.setRecords(baseMapper.selectListView(page,wrapper)); 50 | PageUtils pageUtil = new PageUtils(page); 51 | return pageUtil; 52 | } 53 | 54 | @Override 55 | public String generateToken(Long userid,String username, String tableName, String role) { 56 | TokenEntity tokenEntity = this.selectOne(new EntityWrapper().eq("userid", userid).eq("role", role)); 57 | String token = CommonUtil.getRandomString(32); 58 | Calendar cal = Calendar.getInstance(); 59 | cal.setTime(new Date()); 60 | cal.add(Calendar.HOUR_OF_DAY, 1); 61 | if(tokenEntity!=null) { 62 | tokenEntity.setToken(token); 63 | tokenEntity.setExpiratedtime(cal.getTime()); 64 | this.updateById(tokenEntity); 65 | } else { 66 | this.insert(new TokenEntity(userid,username, tableName, role, token, cal.getTime())); 67 | } 68 | return token; 69 | } 70 | 71 | @Override 72 | public TokenEntity getTokenEntity(String token) { 73 | TokenEntity tokenEntity = this.selectOne(new EntityWrapper().eq("token", token)); 74 | if(tokenEntity == null || tokenEntity.getExpiratedtime().getTime() extends LinkedHashMap { 15 | private static final long serialVersionUID = 1L; 16 | /** 17 | * mybatis-plus分页参数 18 | */ 19 | private Page page; 20 | /** 21 | * 当前页码 22 | */ 23 | private int currPage = 1; 24 | /** 25 | * 每页条数 26 | */ 27 | private int limit = 10; 28 | 29 | public Query(JQPageInfo pageInfo) { 30 | //分页参数 31 | if(pageInfo.getPage()!= null){ 32 | currPage = pageInfo.getPage(); 33 | } 34 | if(pageInfo.getLimit()!= null){ 35 | limit = pageInfo.getLimit(); 36 | } 37 | 38 | 39 | //防止SQL注入(因为sidx、order是通过拼接SQL实现排序的,会有SQL注入风险) 40 | String sidx = SQLFilter.sqlInject(pageInfo.getSidx()); 41 | String order = SQLFilter.sqlInject(pageInfo.getOrder()); 42 | 43 | 44 | //mybatis-plus分页 45 | this.page = new Page<>(currPage, limit); 46 | 47 | //排序 48 | if(StringUtils.isNotBlank(sidx) && StringUtils.isNotBlank(order)){ 49 | this.page.setOrderByField(sidx); 50 | this.page.setAsc("ASC".equalsIgnoreCase(order)); 51 | } 52 | } 53 | 54 | 55 | public Query(Map params){ 56 | this.putAll(params); 57 | 58 | //分页参数 59 | if(params.get("page") != null){ 60 | currPage = Integer.parseInt((String)params.get("page")); 61 | } 62 | if(params.get("limit") != null){ 63 | limit = Integer.parseInt((String)params.get("limit")); 64 | } 65 | 66 | this.put("offset", (currPage - 1) * limit); 67 | this.put("page", currPage); 68 | this.put("limit", limit); 69 | 70 | //防止SQL注入(因为sidx、order是通过拼接SQL实现排序的,会有SQL注入风险) 71 | String sidx = SQLFilter.sqlInject((String)params.get("sidx")); 72 | String order = SQLFilter.sqlInject((String)params.get("order")); 73 | this.put("sidx", sidx); 74 | this.put("order", order); 75 | 76 | //mybatis-plus分页 77 | this.page = new Page<>(currPage, limit); 78 | 79 | //排序 80 | if(StringUtils.isNotBlank(sidx) && StringUtils.isNotBlank(order)){ 81 | this.page.setOrderByField(sidx); 82 | this.page.setAsc("ASC".equalsIgnoreCase(order)); 83 | } 84 | 85 | } 86 | 87 | public Page getPage() { 88 | return page; 89 | } 90 | 91 | public int getCurrPage() { 92 | return currPage; 93 | } 94 | 95 | public int getLimit() { 96 | return limit; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/YiyuanxinxiVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.YiyuanxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医院信息 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public class YiyuanxinxiVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 医院地址 27 | */ 28 | 29 | private String yiyuandizhi; 30 | 31 | /** 32 | * 联系电话 33 | */ 34 | 35 | private String lianxidianhua; 36 | 37 | /** 38 | * 医院图片 39 | */ 40 | 41 | private String yiyuantupian; 42 | 43 | /** 44 | * 医院简介 45 | */ 46 | 47 | private String yiyuanjianjie; 48 | 49 | /** 50 | * 赞 51 | */ 52 | 53 | private Integer thumbsupnum; 54 | 55 | /** 56 | * 踩 57 | */ 58 | 59 | private Integer crazilynum; 60 | 61 | 62 | /** 63 | * 设置:医院地址 64 | */ 65 | 66 | public void setYiyuandizhi(String yiyuandizhi) { 67 | this.yiyuandizhi = yiyuandizhi; 68 | } 69 | 70 | /** 71 | * 获取:医院地址 72 | */ 73 | public String getYiyuandizhi() { 74 | return yiyuandizhi; 75 | } 76 | 77 | 78 | /** 79 | * 设置:联系电话 80 | */ 81 | 82 | public void setLianxidianhua(String lianxidianhua) { 83 | this.lianxidianhua = lianxidianhua; 84 | } 85 | 86 | /** 87 | * 获取:联系电话 88 | */ 89 | public String getLianxidianhua() { 90 | return lianxidianhua; 91 | } 92 | 93 | 94 | /** 95 | * 设置:医院图片 96 | */ 97 | 98 | public void setYiyuantupian(String yiyuantupian) { 99 | this.yiyuantupian = yiyuantupian; 100 | } 101 | 102 | /** 103 | * 获取:医院图片 104 | */ 105 | public String getYiyuantupian() { 106 | return yiyuantupian; 107 | } 108 | 109 | 110 | /** 111 | * 设置:医院简介 112 | */ 113 | 114 | public void setYiyuanjianjie(String yiyuanjianjie) { 115 | this.yiyuanjianjie = yiyuanjianjie; 116 | } 117 | 118 | /** 119 | * 获取:医院简介 120 | */ 121 | public String getYiyuanjianjie() { 122 | return yiyuanjianjie; 123 | } 124 | 125 | 126 | /** 127 | * 设置:赞 128 | */ 129 | 130 | public void setThumbsupnum(Integer thumbsupnum) { 131 | this.thumbsupnum = thumbsupnum; 132 | } 133 | 134 | /** 135 | * 获取:赞 136 | */ 137 | public Integer getThumbsupnum() { 138 | return thumbsupnum; 139 | } 140 | 141 | 142 | /** 143 | * 设置:踩 144 | */ 145 | 146 | public void setCrazilynum(Integer crazilynum) { 147 | this.crazilynum = crazilynum; 148 | } 149 | 150 | /** 151 | * 获取:踩 152 | */ 153 | public Integer getCrazilynum() { 154 | return crazilynum; 155 | } 156 | 157 | } 158 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/YiyuanxinxiModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.YiyuanxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医院信息 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:19 21 | */ 22 | public class YiyuanxinxiModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 医院地址 28 | */ 29 | 30 | private String yiyuandizhi; 31 | 32 | /** 33 | * 联系电话 34 | */ 35 | 36 | private String lianxidianhua; 37 | 38 | /** 39 | * 医院图片 40 | */ 41 | 42 | private String yiyuantupian; 43 | 44 | /** 45 | * 医院简介 46 | */ 47 | 48 | private String yiyuanjianjie; 49 | 50 | /** 51 | * 赞 52 | */ 53 | 54 | private Integer thumbsupnum; 55 | 56 | /** 57 | * 踩 58 | */ 59 | 60 | private Integer crazilynum; 61 | 62 | 63 | /** 64 | * 设置:医院地址 65 | */ 66 | 67 | public void setYiyuandizhi(String yiyuandizhi) { 68 | this.yiyuandizhi = yiyuandizhi; 69 | } 70 | 71 | /** 72 | * 获取:医院地址 73 | */ 74 | public String getYiyuandizhi() { 75 | return yiyuandizhi; 76 | } 77 | 78 | 79 | /** 80 | * 设置:联系电话 81 | */ 82 | 83 | public void setLianxidianhua(String lianxidianhua) { 84 | this.lianxidianhua = lianxidianhua; 85 | } 86 | 87 | /** 88 | * 获取:联系电话 89 | */ 90 | public String getLianxidianhua() { 91 | return lianxidianhua; 92 | } 93 | 94 | 95 | /** 96 | * 设置:医院图片 97 | */ 98 | 99 | public void setYiyuantupian(String yiyuantupian) { 100 | this.yiyuantupian = yiyuantupian; 101 | } 102 | 103 | /** 104 | * 获取:医院图片 105 | */ 106 | public String getYiyuantupian() { 107 | return yiyuantupian; 108 | } 109 | 110 | 111 | /** 112 | * 设置:医院简介 113 | */ 114 | 115 | public void setYiyuanjianjie(String yiyuanjianjie) { 116 | this.yiyuanjianjie = yiyuanjianjie; 117 | } 118 | 119 | /** 120 | * 获取:医院简介 121 | */ 122 | public String getYiyuanjianjie() { 123 | return yiyuanjianjie; 124 | } 125 | 126 | 127 | /** 128 | * 设置:赞 129 | */ 130 | 131 | public void setThumbsupnum(Integer thumbsupnum) { 132 | this.thumbsupnum = thumbsupnum; 133 | } 134 | 135 | /** 136 | * 获取:赞 137 | */ 138 | public Integer getThumbsupnum() { 139 | return thumbsupnum; 140 | } 141 | 142 | 143 | /** 144 | * 设置:踩 145 | */ 146 | 147 | public void setCrazilynum(Integer crazilynum) { 148 | this.crazilynum = crazilynum; 149 | } 150 | 151 | /** 152 | * 获取:踩 153 | */ 154 | public Integer getCrazilynum() { 155 | return crazilynum; 156 | } 157 | 158 | } 159 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/YihuxinxiVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.YihuxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医护信息 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public class YihuxinxiVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 姓名 27 | */ 28 | 29 | private String xingming; 30 | 31 | /** 32 | * 照片 33 | */ 34 | 35 | private String zhaopian; 36 | 37 | /** 38 | * 医护类型 39 | */ 40 | 41 | private String yihuleixing; 42 | 43 | /** 44 | * 医院 45 | */ 46 | 47 | private String yiyuan; 48 | 49 | /** 50 | * 科室 51 | */ 52 | 53 | private String keshi; 54 | 55 | /** 56 | * 擅长 57 | */ 58 | 59 | private String shanzhang; 60 | 61 | /** 62 | * 简介 63 | */ 64 | 65 | private String jianjie; 66 | 67 | 68 | /** 69 | * 设置:姓名 70 | */ 71 | 72 | public void setXingming(String xingming) { 73 | this.xingming = xingming; 74 | } 75 | 76 | /** 77 | * 获取:姓名 78 | */ 79 | public String getXingming() { 80 | return xingming; 81 | } 82 | 83 | 84 | /** 85 | * 设置:照片 86 | */ 87 | 88 | public void setZhaopian(String zhaopian) { 89 | this.zhaopian = zhaopian; 90 | } 91 | 92 | /** 93 | * 获取:照片 94 | */ 95 | public String getZhaopian() { 96 | return zhaopian; 97 | } 98 | 99 | 100 | /** 101 | * 设置:医护类型 102 | */ 103 | 104 | public void setYihuleixing(String yihuleixing) { 105 | this.yihuleixing = yihuleixing; 106 | } 107 | 108 | /** 109 | * 获取:医护类型 110 | */ 111 | public String getYihuleixing() { 112 | return yihuleixing; 113 | } 114 | 115 | 116 | /** 117 | * 设置:医院 118 | */ 119 | 120 | public void setYiyuan(String yiyuan) { 121 | this.yiyuan = yiyuan; 122 | } 123 | 124 | /** 125 | * 获取:医院 126 | */ 127 | public String getYiyuan() { 128 | return yiyuan; 129 | } 130 | 131 | 132 | /** 133 | * 设置:科室 134 | */ 135 | 136 | public void setKeshi(String keshi) { 137 | this.keshi = keshi; 138 | } 139 | 140 | /** 141 | * 获取:科室 142 | */ 143 | public String getKeshi() { 144 | return keshi; 145 | } 146 | 147 | 148 | /** 149 | * 设置:擅长 150 | */ 151 | 152 | public void setShanzhang(String shanzhang) { 153 | this.shanzhang = shanzhang; 154 | } 155 | 156 | /** 157 | * 获取:擅长 158 | */ 159 | public String getShanzhang() { 160 | return shanzhang; 161 | } 162 | 163 | 164 | /** 165 | * 设置:简介 166 | */ 167 | 168 | public void setJianjie(String jianjie) { 169 | this.jianjie = jianjie; 170 | } 171 | 172 | /** 173 | * 获取:简介 174 | */ 175 | public String getJianjie() { 176 | return jianjie; 177 | } 178 | 179 | } 180 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/YihuxinxiModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.YihuxinxiEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医护信息 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:19 21 | */ 22 | public class YihuxinxiModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 姓名 28 | */ 29 | 30 | private String xingming; 31 | 32 | /** 33 | * 照片 34 | */ 35 | 36 | private String zhaopian; 37 | 38 | /** 39 | * 医护类型 40 | */ 41 | 42 | private String yihuleixing; 43 | 44 | /** 45 | * 医院 46 | */ 47 | 48 | private String yiyuan; 49 | 50 | /** 51 | * 科室 52 | */ 53 | 54 | private String keshi; 55 | 56 | /** 57 | * 擅长 58 | */ 59 | 60 | private String shanzhang; 61 | 62 | /** 63 | * 简介 64 | */ 65 | 66 | private String jianjie; 67 | 68 | 69 | /** 70 | * 设置:姓名 71 | */ 72 | 73 | public void setXingming(String xingming) { 74 | this.xingming = xingming; 75 | } 76 | 77 | /** 78 | * 获取:姓名 79 | */ 80 | public String getXingming() { 81 | return xingming; 82 | } 83 | 84 | 85 | /** 86 | * 设置:照片 87 | */ 88 | 89 | public void setZhaopian(String zhaopian) { 90 | this.zhaopian = zhaopian; 91 | } 92 | 93 | /** 94 | * 获取:照片 95 | */ 96 | public String getZhaopian() { 97 | return zhaopian; 98 | } 99 | 100 | 101 | /** 102 | * 设置:医护类型 103 | */ 104 | 105 | public void setYihuleixing(String yihuleixing) { 106 | this.yihuleixing = yihuleixing; 107 | } 108 | 109 | /** 110 | * 获取:医护类型 111 | */ 112 | public String getYihuleixing() { 113 | return yihuleixing; 114 | } 115 | 116 | 117 | /** 118 | * 设置:医院 119 | */ 120 | 121 | public void setYiyuan(String yiyuan) { 122 | this.yiyuan = yiyuan; 123 | } 124 | 125 | /** 126 | * 获取:医院 127 | */ 128 | public String getYiyuan() { 129 | return yiyuan; 130 | } 131 | 132 | 133 | /** 134 | * 设置:科室 135 | */ 136 | 137 | public void setKeshi(String keshi) { 138 | this.keshi = keshi; 139 | } 140 | 141 | /** 142 | * 获取:科室 143 | */ 144 | public String getKeshi() { 145 | return keshi; 146 | } 147 | 148 | 149 | /** 150 | * 设置:擅长 151 | */ 152 | 153 | public void setShanzhang(String shanzhang) { 154 | this.shanzhang = shanzhang; 155 | } 156 | 157 | /** 158 | * 获取:擅长 159 | */ 160 | public String getShanzhang() { 161 | return shanzhang; 162 | } 163 | 164 | 165 | /** 166 | * 设置:简介 167 | */ 168 | 169 | public void setJianjie(String jianjie) { 170 | this.jianjie = jianjie; 171 | } 172 | 173 | /** 174 | * 获取:简介 175 | */ 176 | public String getJianjie() { 177 | return jianjie; 178 | } 179 | 180 | } 181 | -------------------------------------------------------------------------------- /src/main/java/com/entity/vo/YihuVO.java: -------------------------------------------------------------------------------- 1 | package com.entity.vo; 2 | 3 | import com.entity.YihuEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医护 15 | * 手机端接口返回实体辅助类 16 | * (主要作用去除一些不必要的字段) 17 | * @author 18 | * @email 19 | * @date 2021-05-08 16:41:19 20 | */ 21 | public class YihuVO implements Serializable { 22 | private static final long serialVersionUID = 1L; 23 | 24 | 25 | /** 26 | * 密码 27 | */ 28 | 29 | private String mima; 30 | 31 | /** 32 | * 姓名 33 | */ 34 | 35 | private String xingming; 36 | 37 | /** 38 | * 性别 39 | */ 40 | 41 | private String xingbie; 42 | 43 | /** 44 | * 年龄 45 | */ 46 | 47 | private Integer nianling; 48 | 49 | /** 50 | * 手机号 51 | */ 52 | 53 | private String shoujihao; 54 | 55 | /** 56 | * 邮箱 57 | */ 58 | 59 | private String youxiang; 60 | 61 | /** 62 | * 身份证 63 | */ 64 | 65 | private String shenfenzheng; 66 | 67 | /** 68 | * 照片 69 | */ 70 | 71 | private String zhaopian; 72 | 73 | 74 | /** 75 | * 设置:密码 76 | */ 77 | 78 | public void setMima(String mima) { 79 | this.mima = mima; 80 | } 81 | 82 | /** 83 | * 获取:密码 84 | */ 85 | public String getMima() { 86 | return mima; 87 | } 88 | 89 | 90 | /** 91 | * 设置:姓名 92 | */ 93 | 94 | public void setXingming(String xingming) { 95 | this.xingming = xingming; 96 | } 97 | 98 | /** 99 | * 获取:姓名 100 | */ 101 | public String getXingming() { 102 | return xingming; 103 | } 104 | 105 | 106 | /** 107 | * 设置:性别 108 | */ 109 | 110 | public void setXingbie(String xingbie) { 111 | this.xingbie = xingbie; 112 | } 113 | 114 | /** 115 | * 获取:性别 116 | */ 117 | public String getXingbie() { 118 | return xingbie; 119 | } 120 | 121 | 122 | /** 123 | * 设置:年龄 124 | */ 125 | 126 | public void setNianling(Integer nianling) { 127 | this.nianling = nianling; 128 | } 129 | 130 | /** 131 | * 获取:年龄 132 | */ 133 | public Integer getNianling() { 134 | return nianling; 135 | } 136 | 137 | 138 | /** 139 | * 设置:手机号 140 | */ 141 | 142 | public void setShoujihao(String shoujihao) { 143 | this.shoujihao = shoujihao; 144 | } 145 | 146 | /** 147 | * 获取:手机号 148 | */ 149 | public String getShoujihao() { 150 | return shoujihao; 151 | } 152 | 153 | 154 | /** 155 | * 设置:邮箱 156 | */ 157 | 158 | public void setYouxiang(String youxiang) { 159 | this.youxiang = youxiang; 160 | } 161 | 162 | /** 163 | * 获取:邮箱 164 | */ 165 | public String getYouxiang() { 166 | return youxiang; 167 | } 168 | 169 | 170 | /** 171 | * 设置:身份证 172 | */ 173 | 174 | public void setShenfenzheng(String shenfenzheng) { 175 | this.shenfenzheng = shenfenzheng; 176 | } 177 | 178 | /** 179 | * 获取:身份证 180 | */ 181 | public String getShenfenzheng() { 182 | return shenfenzheng; 183 | } 184 | 185 | 186 | /** 187 | * 设置:照片 188 | */ 189 | 190 | public void setZhaopian(String zhaopian) { 191 | this.zhaopian = zhaopian; 192 | } 193 | 194 | /** 195 | * 获取:照片 196 | */ 197 | public String getZhaopian() { 198 | return zhaopian; 199 | } 200 | 201 | } 202 | -------------------------------------------------------------------------------- /src/main/java/com/entity/model/YihuModel.java: -------------------------------------------------------------------------------- 1 | package com.entity.model; 2 | 3 | import com.entity.YihuEntity; 4 | 5 | import com.baomidou.mybatisplus.annotations.TableName; 6 | import java.util.Date; 7 | import org.springframework.format.annotation.DateTimeFormat; 8 | 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | import java.io.Serializable; 11 | 12 | 13 | /** 14 | * 医护 15 | * 接收传参的实体类 16 | *(实际开发中配合移动端接口开发手动去掉些没用的字段, 后端一般用entity就够用了) 17 | * 取自ModelAndView 的model名称 18 | * @author 19 | * @email 20 | * @date 2021-05-08 16:41:19 21 | */ 22 | public class YihuModel implements Serializable { 23 | private static final long serialVersionUID = 1L; 24 | 25 | 26 | /** 27 | * 密码 28 | */ 29 | 30 | private String mima; 31 | 32 | /** 33 | * 姓名 34 | */ 35 | 36 | private String xingming; 37 | 38 | /** 39 | * 性别 40 | */ 41 | 42 | private String xingbie; 43 | 44 | /** 45 | * 年龄 46 | */ 47 | 48 | private Integer nianling; 49 | 50 | /** 51 | * 手机号 52 | */ 53 | 54 | private String shoujihao; 55 | 56 | /** 57 | * 邮箱 58 | */ 59 | 60 | private String youxiang; 61 | 62 | /** 63 | * 身份证 64 | */ 65 | 66 | private String shenfenzheng; 67 | 68 | /** 69 | * 照片 70 | */ 71 | 72 | private String zhaopian; 73 | 74 | 75 | /** 76 | * 设置:密码 77 | */ 78 | 79 | public void setMima(String mima) { 80 | this.mima = mima; 81 | } 82 | 83 | /** 84 | * 获取:密码 85 | */ 86 | public String getMima() { 87 | return mima; 88 | } 89 | 90 | 91 | /** 92 | * 设置:姓名 93 | */ 94 | 95 | public void setXingming(String xingming) { 96 | this.xingming = xingming; 97 | } 98 | 99 | /** 100 | * 获取:姓名 101 | */ 102 | public String getXingming() { 103 | return xingming; 104 | } 105 | 106 | 107 | /** 108 | * 设置:性别 109 | */ 110 | 111 | public void setXingbie(String xingbie) { 112 | this.xingbie = xingbie; 113 | } 114 | 115 | /** 116 | * 获取:性别 117 | */ 118 | public String getXingbie() { 119 | return xingbie; 120 | } 121 | 122 | 123 | /** 124 | * 设置:年龄 125 | */ 126 | 127 | public void setNianling(Integer nianling) { 128 | this.nianling = nianling; 129 | } 130 | 131 | /** 132 | * 获取:年龄 133 | */ 134 | public Integer getNianling() { 135 | return nianling; 136 | } 137 | 138 | 139 | /** 140 | * 设置:手机号 141 | */ 142 | 143 | public void setShoujihao(String shoujihao) { 144 | this.shoujihao = shoujihao; 145 | } 146 | 147 | /** 148 | * 获取:手机号 149 | */ 150 | public String getShoujihao() { 151 | return shoujihao; 152 | } 153 | 154 | 155 | /** 156 | * 设置:邮箱 157 | */ 158 | 159 | public void setYouxiang(String youxiang) { 160 | this.youxiang = youxiang; 161 | } 162 | 163 | /** 164 | * 获取:邮箱 165 | */ 166 | public String getYouxiang() { 167 | return youxiang; 168 | } 169 | 170 | 171 | /** 172 | * 设置:身份证 173 | */ 174 | 175 | public void setShenfenzheng(String shenfenzheng) { 176 | this.shenfenzheng = shenfenzheng; 177 | } 178 | 179 | /** 180 | * 获取:身份证 181 | */ 182 | public String getShenfenzheng() { 183 | return shenfenzheng; 184 | } 185 | 186 | 187 | /** 188 | * 设置:照片 189 | */ 190 | 191 | public void setZhaopian(String zhaopian) { 192 | this.zhaopian = zhaopian; 193 | } 194 | 195 | /** 196 | * 获取:照片 197 | */ 198 | public String getZhaopian() { 199 | return zhaopian; 200 | } 201 | 202 | } 203 | -------------------------------------------------------------------------------- /src/main/java/com/controller/ConfigController.java: -------------------------------------------------------------------------------- 1 | 2 | package com.controller; 3 | 4 | 5 | import java.util.Arrays; 6 | import java.util.Map; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.PathVariable; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestBody; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import com.annotation.IgnoreAuth; 17 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 18 | import com.entity.ConfigEntity; 19 | import com.service.ConfigService; 20 | import com.utils.PageUtils; 21 | import com.utils.R; 22 | import com.utils.ValidatorUtils; 23 | 24 | /** 25 | * 登录相关 26 | */ 27 | @RequestMapping("config") 28 | @RestController 29 | public class ConfigController{ 30 | 31 | @Autowired 32 | private ConfigService configService; 33 | 34 | /** 35 | * 列表 36 | */ 37 | @RequestMapping("/page") 38 | public R page(@RequestParam Map params,ConfigEntity config){ 39 | EntityWrapper ew = new EntityWrapper(); 40 | PageUtils page = configService.queryPage(params); 41 | return R.ok().put("data", page); 42 | } 43 | 44 | /** 45 | * 列表 46 | */ 47 | @IgnoreAuth 48 | @RequestMapping("/list") 49 | public R list(@RequestParam Map params,ConfigEntity config){ 50 | EntityWrapper ew = new EntityWrapper(); 51 | PageUtils page = configService.queryPage(params); 52 | return R.ok().put("data", page); 53 | } 54 | 55 | /** 56 | * 信息 57 | */ 58 | @RequestMapping("/info/{id}") 59 | public R info(@PathVariable("id") String id){ 60 | ConfigEntity config = configService.selectById(id); 61 | return R.ok().put("data", config); 62 | } 63 | 64 | /** 65 | * 详情 66 | */ 67 | @IgnoreAuth 68 | @RequestMapping("/detail/{id}") 69 | public R detail(@PathVariable("id") String id){ 70 | ConfigEntity config = configService.selectById(id); 71 | return R.ok().put("data", config); 72 | } 73 | 74 | /** 75 | * 根据name获取信息 76 | */ 77 | @RequestMapping("/info") 78 | public R infoByName(@RequestParam String name){ 79 | ConfigEntity config = configService.selectOne(new EntityWrapper().eq("name", "faceFile")); 80 | return R.ok().put("data", config); 81 | } 82 | 83 | /** 84 | * 保存 85 | */ 86 | @PostMapping("/save") 87 | public R save(@RequestBody ConfigEntity config){ 88 | // ValidatorUtils.validateEntity(config); 89 | configService.insert(config); 90 | return R.ok(); 91 | } 92 | 93 | /** 94 | * 修改 95 | */ 96 | @RequestMapping("/update") 97 | public R update(@RequestBody ConfigEntity config){ 98 | // ValidatorUtils.validateEntity(config); 99 | configService.updateById(config);//全部更新 100 | return R.ok(); 101 | } 102 | 103 | /** 104 | * 删除 105 | */ 106 | @RequestMapping("/delete") 107 | public R delete(@RequestBody Long[] ids){ 108 | configService.deleteBatchIds(Arrays.asList(ids)); 109 | return R.ok(); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /src/main/java/com/entity/StoreupEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 收藏表 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2021-05-08 16:41:19 30 | */ 31 | @TableName("storeup") 32 | public class StoreupEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public StoreupEntity() { 37 | 38 | } 39 | 40 | public StoreupEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 用户id 56 | */ 57 | 58 | private Long userid; 59 | 60 | /** 61 | * 收藏id 62 | */ 63 | 64 | private Long refid; 65 | 66 | /** 67 | * 表名 68 | */ 69 | 70 | private String tablename; 71 | 72 | /** 73 | * 收藏名称 74 | */ 75 | 76 | private String name; 77 | 78 | /** 79 | * 收藏图片 80 | */ 81 | 82 | private String picture; 83 | 84 | 85 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 86 | @DateTimeFormat 87 | private Date addtime; 88 | 89 | public Date getAddtime() { 90 | return addtime; 91 | } 92 | public void setAddtime(Date addtime) { 93 | this.addtime = addtime; 94 | } 95 | 96 | public Long getId() { 97 | return id; 98 | } 99 | 100 | public void setId(Long id) { 101 | this.id = id; 102 | } 103 | /** 104 | * 设置:用户id 105 | */ 106 | public void setUserid(Long userid) { 107 | this.userid = userid; 108 | } 109 | /** 110 | * 获取:用户id 111 | */ 112 | public Long getUserid() { 113 | return userid; 114 | } 115 | /** 116 | * 设置:收藏id 117 | */ 118 | public void setRefid(Long refid) { 119 | this.refid = refid; 120 | } 121 | /** 122 | * 获取:收藏id 123 | */ 124 | public Long getRefid() { 125 | return refid; 126 | } 127 | /** 128 | * 设置:表名 129 | */ 130 | public void setTablename(String tablename) { 131 | this.tablename = tablename; 132 | } 133 | /** 134 | * 获取:表名 135 | */ 136 | public String getTablename() { 137 | return tablename; 138 | } 139 | /** 140 | * 设置:收藏名称 141 | */ 142 | public void setName(String name) { 143 | this.name = name; 144 | } 145 | /** 146 | * 获取:收藏名称 147 | */ 148 | public String getName() { 149 | return name; 150 | } 151 | /** 152 | * 设置:收藏图片 153 | */ 154 | public void setPicture(String picture) { 155 | this.picture = picture; 156 | } 157 | /** 158 | * 获取:收藏图片 159 | */ 160 | public String getPicture() { 161 | return picture; 162 | } 163 | 164 | } 165 | -------------------------------------------------------------------------------- /src/main/java/com/entity/DiscusskeshixinxiEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 科室信息评论表 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2021-05-08 16:41:20 30 | */ 31 | @TableName("discusskeshixinxi") 32 | public class DiscusskeshixinxiEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public DiscusskeshixinxiEntity() { 37 | 38 | } 39 | 40 | public DiscusskeshixinxiEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 关联表id 56 | */ 57 | 58 | private Long refid; 59 | 60 | /** 61 | * 用户id 62 | */ 63 | 64 | private Long userid; 65 | 66 | /** 67 | * 用户名 68 | */ 69 | 70 | private String nickname; 71 | 72 | /** 73 | * 评论内容 74 | */ 75 | 76 | private String content; 77 | 78 | /** 79 | * 回复内容 80 | */ 81 | 82 | private String reply; 83 | 84 | 85 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 86 | @DateTimeFormat 87 | private Date addtime; 88 | 89 | public Date getAddtime() { 90 | return addtime; 91 | } 92 | public void setAddtime(Date addtime) { 93 | this.addtime = addtime; 94 | } 95 | 96 | public Long getId() { 97 | return id; 98 | } 99 | 100 | public void setId(Long id) { 101 | this.id = id; 102 | } 103 | /** 104 | * 设置:关联表id 105 | */ 106 | public void setRefid(Long refid) { 107 | this.refid = refid; 108 | } 109 | /** 110 | * 获取:关联表id 111 | */ 112 | public Long getRefid() { 113 | return refid; 114 | } 115 | /** 116 | * 设置:用户id 117 | */ 118 | public void setUserid(Long userid) { 119 | this.userid = userid; 120 | } 121 | /** 122 | * 获取:用户id 123 | */ 124 | public Long getUserid() { 125 | return userid; 126 | } 127 | /** 128 | * 设置:用户名 129 | */ 130 | public void setNickname(String nickname) { 131 | this.nickname = nickname; 132 | } 133 | /** 134 | * 获取:用户名 135 | */ 136 | public String getNickname() { 137 | return nickname; 138 | } 139 | /** 140 | * 设置:评论内容 141 | */ 142 | public void setContent(String content) { 143 | this.content = content; 144 | } 145 | /** 146 | * 获取:评论内容 147 | */ 148 | public String getContent() { 149 | return content; 150 | } 151 | /** 152 | * 设置:回复内容 153 | */ 154 | public void setReply(String reply) { 155 | this.reply = reply; 156 | } 157 | /** 158 | * 获取:回复内容 159 | */ 160 | public String getReply() { 161 | return reply; 162 | } 163 | 164 | } 165 | -------------------------------------------------------------------------------- /src/main/java/com/entity/DiscussyiyuanxinxiEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 医院信息评论表 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2021-05-08 16:41:20 30 | */ 31 | @TableName("discussyiyuanxinxi") 32 | public class DiscussyiyuanxinxiEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public DiscussyiyuanxinxiEntity() { 37 | 38 | } 39 | 40 | public DiscussyiyuanxinxiEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 关联表id 56 | */ 57 | 58 | private Long refid; 59 | 60 | /** 61 | * 用户id 62 | */ 63 | 64 | private Long userid; 65 | 66 | /** 67 | * 用户名 68 | */ 69 | 70 | private String nickname; 71 | 72 | /** 73 | * 评论内容 74 | */ 75 | 76 | private String content; 77 | 78 | /** 79 | * 回复内容 80 | */ 81 | 82 | private String reply; 83 | 84 | 85 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 86 | @DateTimeFormat 87 | private Date addtime; 88 | 89 | public Date getAddtime() { 90 | return addtime; 91 | } 92 | public void setAddtime(Date addtime) { 93 | this.addtime = addtime; 94 | } 95 | 96 | public Long getId() { 97 | return id; 98 | } 99 | 100 | public void setId(Long id) { 101 | this.id = id; 102 | } 103 | /** 104 | * 设置:关联表id 105 | */ 106 | public void setRefid(Long refid) { 107 | this.refid = refid; 108 | } 109 | /** 110 | * 获取:关联表id 111 | */ 112 | public Long getRefid() { 113 | return refid; 114 | } 115 | /** 116 | * 设置:用户id 117 | */ 118 | public void setUserid(Long userid) { 119 | this.userid = userid; 120 | } 121 | /** 122 | * 获取:用户id 123 | */ 124 | public Long getUserid() { 125 | return userid; 126 | } 127 | /** 128 | * 设置:用户名 129 | */ 130 | public void setNickname(String nickname) { 131 | this.nickname = nickname; 132 | } 133 | /** 134 | * 获取:用户名 135 | */ 136 | public String getNickname() { 137 | return nickname; 138 | } 139 | /** 140 | * 设置:评论内容 141 | */ 142 | public void setContent(String content) { 143 | this.content = content; 144 | } 145 | /** 146 | * 获取:评论内容 147 | */ 148 | public String getContent() { 149 | return content; 150 | } 151 | /** 152 | * 设置:回复内容 153 | */ 154 | public void setReply(String reply) { 155 | this.reply = reply; 156 | } 157 | /** 158 | * 获取:回复内容 159 | */ 160 | public String getReply() { 161 | return reply; 162 | } 163 | 164 | } 165 | -------------------------------------------------------------------------------- /src/main/java/com/interceptor/AuthorizationInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.interceptor; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | import com.alibaba.fastjson.JSONObject; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | 11 | import org.apache.commons.lang3.StringUtils; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Component; 14 | import org.springframework.web.method.HandlerMethod; 15 | import org.springframework.web.servlet.HandlerInterceptor; 16 | import org.springframework.web.bind.annotation.RequestMethod; 17 | import org.springframework.http.HttpStatus; 18 | 19 | import com.annotation.IgnoreAuth; 20 | import com.entity.EIException; 21 | import com.entity.TokenEntity; 22 | import com.service.TokenService; 23 | import com.utils.R; 24 | 25 | /** 26 | * 权限(Token)验证 27 | */ 28 | @Component 29 | public class AuthorizationInterceptor implements HandlerInterceptor { 30 | 31 | public static final String LOGIN_TOKEN_KEY = "Token"; 32 | 33 | @Autowired 34 | private TokenService tokenService; 35 | 36 | @Override 37 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 38 | 39 | //支持跨域请求 40 | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); 41 | response.setHeader("Access-Control-Max-Age", "3600"); 42 | response.setHeader("Access-Control-Allow-Credentials", "true"); 43 | response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization"); 44 | response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin")); 45 | // 跨域时会首先发送一个OPTIONS请求,这里我们给OPTIONS请求直接返回正常状态 46 | if (request.getMethod().equals(RequestMethod.OPTIONS.name())) { 47 | response.setStatus(HttpStatus.OK.value()); 48 | return false; 49 | } 50 | 51 | IgnoreAuth annotation; 52 | if (handler instanceof HandlerMethod) { 53 | annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class); 54 | } else { 55 | return true; 56 | } 57 | 58 | //从header中获取token 59 | String token = request.getHeader(LOGIN_TOKEN_KEY); 60 | 61 | /** 62 | * 不需要验证权限的方法直接放过 63 | */ 64 | if(annotation!=null) { 65 | return true; 66 | } 67 | 68 | TokenEntity tokenEntity = null; 69 | if(StringUtils.isNotBlank(token)) { 70 | tokenEntity = tokenService.getTokenEntity(token); 71 | } 72 | 73 | if(tokenEntity != null) { 74 | request.getSession().setAttribute("userId", tokenEntity.getUserid()); 75 | request.getSession().setAttribute("role", tokenEntity.getRole()); 76 | request.getSession().setAttribute("tableName", tokenEntity.getTablename()); 77 | request.getSession().setAttribute("username", tokenEntity.getUsername()); 78 | return true; 79 | } 80 | 81 | PrintWriter writer = null; 82 | response.setCharacterEncoding("UTF-8"); 83 | response.setContentType("application/json; charset=utf-8"); 84 | try { 85 | writer = response.getWriter(); 86 | writer.print(JSONObject.toJSONString(R.error(401, "请先登录"))); 87 | } finally { 88 | if(writer != null){ 89 | writer.close(); 90 | } 91 | } 92 | // throw new EIException("请先登录", 401); 93 | return false; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/utils/BaiduUtil.java: -------------------------------------------------------------------------------- 1 | package com.utils; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.InputStreamReader; 5 | import java.net.HttpURLConnection; 6 | import java.net.URL; 7 | import java.util.HashMap; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | import org.json.JSONObject; 12 | 13 | 14 | /** 15 | * 类说明 : 16 | */ 17 | 18 | public class BaiduUtil { 19 | 20 | /** 21 | * 根据经纬度获得省市区信息 22 | * @param lon 纬度 23 | * @param lat 经度 24 | * @param coordtype 经纬度坐标系 25 | * @return 26 | */ 27 | public static Map getCityByLonLat(String key, String lng, String lat) { 28 | String location = lat + "," + lng; 29 | try { 30 | //拼装url 31 | String url = "http://api.map.baidu.com/reverse_geocoding/v3/?ak="+key+"&output=json&coordtype=wgs84ll&location="+location; 32 | String result = HttpClientUtils.doGet(url); 33 | JSONObject o = new JSONObject(result); 34 | Map area = new HashMap<>(); 35 | area.put("province", o.getJSONObject("result").getJSONObject("addressComponent").getString("province")); 36 | area.put("city", o.getJSONObject("result").getJSONObject("addressComponent").getString("city")); 37 | area.put("district", o.getJSONObject("result").getJSONObject("addressComponent").getString("district")); 38 | area.put("street", o.getJSONObject("result").getJSONObject("addressComponent").getString("street")); 39 | return area; 40 | }catch (Exception e) { 41 | e.printStackTrace(); 42 | } 43 | return null; 44 | } 45 | 46 | /** 47 | * 获取API访问token 48 | * 该token有一定的有效期,需要自行管理,当失效时需重新获取. 49 | * @param ak - 百度云官网获取的 API Key 50 | * @param sk - 百度云官网获取的 Securet Key 51 | * @return assess_token 52 | */ 53 | public static String getAuth(String ak, String sk) { 54 | // 获取token地址 55 | String authHost = "https://aip.baidubce.com/oauth/2.0/token?"; 56 | String getAccessTokenUrl = authHost 57 | // 1. grant_type为固定参数 58 | + "grant_type=client_credentials" 59 | // 2. 官网获取的 API Key 60 | + "&client_id=" + ak 61 | // 3. 官网获取的 Secret Key 62 | + "&client_secret=" + sk; 63 | try { 64 | URL realUrl = new URL(getAccessTokenUrl); 65 | // 打开和URL之间的连接 66 | HttpURLConnection connection = (HttpURLConnection) realUrl.openConnection(); 67 | connection.setRequestMethod("GET"); 68 | connection.connect(); 69 | // 获取所有响应头字段 70 | Map> map = connection.getHeaderFields(); 71 | // 遍历所有的响应头字段 72 | for (String key : map.keySet()) { 73 | System.err.println(key + "--->" + map.get(key)); 74 | } 75 | // 定义 BufferedReader输入流来读取URL的响应 76 | BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); 77 | String result = ""; 78 | String line; 79 | while ((line = in.readLine()) != null) { 80 | result += line; 81 | } 82 | /** 83 | * 返回结果示例 84 | */ 85 | System.err.println("result:" + result); 86 | org.json.JSONObject jsonObject = new org.json.JSONObject(result); 87 | String access_token = jsonObject.getString("access_token"); 88 | return access_token; 89 | } catch (Exception e) { 90 | System.err.printf("获取token失败!"); 91 | e.printStackTrace(System.err); 92 | } 93 | return null; 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /src/main/java/com/entity/KeshixinxiEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 科室信息 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2021-05-08 16:41:19 30 | */ 31 | @TableName("keshixinxi") 32 | public class KeshixinxiEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public KeshixinxiEntity() { 37 | 38 | } 39 | 40 | public KeshixinxiEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 科室 56 | */ 57 | 58 | private String keshi; 59 | 60 | /** 61 | * 图片 62 | */ 63 | 64 | private String tupian; 65 | 66 | /** 67 | * 科室介绍 68 | */ 69 | 70 | private String keshijieshao; 71 | 72 | /** 73 | * 科室位置 74 | */ 75 | 76 | private String keshiweizhi; 77 | 78 | /** 79 | * 科室医生 80 | */ 81 | 82 | private String keshiyisheng; 83 | 84 | /** 85 | * 联系电话 86 | */ 87 | 88 | private String lianxidianhua; 89 | 90 | 91 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 92 | @DateTimeFormat 93 | private Date addtime; 94 | 95 | public Date getAddtime() { 96 | return addtime; 97 | } 98 | public void setAddtime(Date addtime) { 99 | this.addtime = addtime; 100 | } 101 | 102 | public Long getId() { 103 | return id; 104 | } 105 | 106 | public void setId(Long id) { 107 | this.id = id; 108 | } 109 | /** 110 | * 设置:科室 111 | */ 112 | public void setKeshi(String keshi) { 113 | this.keshi = keshi; 114 | } 115 | /** 116 | * 获取:科室 117 | */ 118 | public String getKeshi() { 119 | return keshi; 120 | } 121 | /** 122 | * 设置:图片 123 | */ 124 | public void setTupian(String tupian) { 125 | this.tupian = tupian; 126 | } 127 | /** 128 | * 获取:图片 129 | */ 130 | public String getTupian() { 131 | return tupian; 132 | } 133 | /** 134 | * 设置:科室介绍 135 | */ 136 | public void setKeshijieshao(String keshijieshao) { 137 | this.keshijieshao = keshijieshao; 138 | } 139 | /** 140 | * 获取:科室介绍 141 | */ 142 | public String getKeshijieshao() { 143 | return keshijieshao; 144 | } 145 | /** 146 | * 设置:科室位置 147 | */ 148 | public void setKeshiweizhi(String keshiweizhi) { 149 | this.keshiweizhi = keshiweizhi; 150 | } 151 | /** 152 | * 获取:科室位置 153 | */ 154 | public String getKeshiweizhi() { 155 | return keshiweizhi; 156 | } 157 | /** 158 | * 设置:科室医生 159 | */ 160 | public void setKeshiyisheng(String keshiyisheng) { 161 | this.keshiyisheng = keshiyisheng; 162 | } 163 | /** 164 | * 获取:科室医生 165 | */ 166 | public String getKeshiyisheng() { 167 | return keshiyisheng; 168 | } 169 | /** 170 | * 设置:联系电话 171 | */ 172 | public void setLianxidianhua(String lianxidianhua) { 173 | this.lianxidianhua = lianxidianhua; 174 | } 175 | /** 176 | * 获取:联系电话 177 | */ 178 | public String getLianxidianhua() { 179 | return lianxidianhua; 180 | } 181 | 182 | } 183 | -------------------------------------------------------------------------------- /src/main/java/com/entity/TousuxinxiEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 投诉信息 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2021-05-08 16:41:19 30 | */ 31 | @TableName("tousuxinxi") 32 | public class TousuxinxiEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public TousuxinxiEntity() { 37 | 38 | } 39 | 40 | public TousuxinxiEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 工号 56 | */ 57 | 58 | private String gonghao; 59 | 60 | /** 61 | * 姓名 62 | */ 63 | 64 | private String xingming; 65 | 66 | /** 67 | * 照片 68 | */ 69 | 70 | private String zhaopian; 71 | 72 | /** 73 | * 投诉名称 74 | */ 75 | 76 | private String tousumingcheng; 77 | 78 | /** 79 | * 投诉内容 80 | */ 81 | 82 | private String tousuneirong; 83 | 84 | /** 85 | * 投诉日期 86 | */ 87 | 88 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd") 89 | @DateTimeFormat 90 | private Date tousuriqi; 91 | 92 | 93 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 94 | @DateTimeFormat 95 | private Date addtime; 96 | 97 | public Date getAddtime() { 98 | return addtime; 99 | } 100 | public void setAddtime(Date addtime) { 101 | this.addtime = addtime; 102 | } 103 | 104 | public Long getId() { 105 | return id; 106 | } 107 | 108 | public void setId(Long id) { 109 | this.id = id; 110 | } 111 | /** 112 | * 设置:工号 113 | */ 114 | public void setGonghao(String gonghao) { 115 | this.gonghao = gonghao; 116 | } 117 | /** 118 | * 获取:工号 119 | */ 120 | public String getGonghao() { 121 | return gonghao; 122 | } 123 | /** 124 | * 设置:姓名 125 | */ 126 | public void setXingming(String xingming) { 127 | this.xingming = xingming; 128 | } 129 | /** 130 | * 获取:姓名 131 | */ 132 | public String getXingming() { 133 | return xingming; 134 | } 135 | /** 136 | * 设置:照片 137 | */ 138 | public void setZhaopian(String zhaopian) { 139 | this.zhaopian = zhaopian; 140 | } 141 | /** 142 | * 获取:照片 143 | */ 144 | public String getZhaopian() { 145 | return zhaopian; 146 | } 147 | /** 148 | * 设置:投诉名称 149 | */ 150 | public void setTousumingcheng(String tousumingcheng) { 151 | this.tousumingcheng = tousumingcheng; 152 | } 153 | /** 154 | * 获取:投诉名称 155 | */ 156 | public String getTousumingcheng() { 157 | return tousumingcheng; 158 | } 159 | /** 160 | * 设置:投诉内容 161 | */ 162 | public void setTousuneirong(String tousuneirong) { 163 | this.tousuneirong = tousuneirong; 164 | } 165 | /** 166 | * 获取:投诉内容 167 | */ 168 | public String getTousuneirong() { 169 | return tousuneirong; 170 | } 171 | /** 172 | * 设置:投诉日期 173 | */ 174 | public void setTousuriqi(Date tousuriqi) { 175 | this.tousuriqi = tousuriqi; 176 | } 177 | /** 178 | * 获取:投诉日期 179 | */ 180 | public Date getTousuriqi() { 181 | return tousuriqi; 182 | } 183 | 184 | } 185 | -------------------------------------------------------------------------------- /src/main/java/com/entity/ForumEntity.java: -------------------------------------------------------------------------------- 1 | package com.entity; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableId; 4 | import com.baomidou.mybatisplus.annotations.TableName; 5 | import javax.validation.constraints.NotBlank; 6 | import javax.validation.constraints.NotEmpty; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 10 | import java.lang.reflect.InvocationTargetException; 11 | 12 | import java.io.Serializable; 13 | import java.util.Date; 14 | import java.util.List; 15 | 16 | import org.springframework.format.annotation.DateTimeFormat; 17 | import com.fasterxml.jackson.annotation.JsonFormat; 18 | import org.apache.commons.beanutils.BeanUtils; 19 | import com.baomidou.mybatisplus.annotations.TableField; 20 | import com.baomidou.mybatisplus.enums.FieldFill; 21 | import com.baomidou.mybatisplus.enums.IdType; 22 | 23 | 24 | /** 25 | * 论坛表 26 | * 数据库通用操作实体类(普通增删改查) 27 | * @author 28 | * @email 29 | * @date 2021-05-08 16:41:19 30 | */ 31 | @TableName("forum") 32 | public class ForumEntity implements Serializable { 33 | private static final long serialVersionUID = 1L; 34 | 35 | 36 | public ForumEntity() { 37 | 38 | } 39 | 40 | public ForumEntity(T t) { 41 | try { 42 | BeanUtils.copyProperties(this, t); 43 | } catch (IllegalAccessException | InvocationTargetException e) { 44 | // TODO Auto-generated catch block 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | /** 50 | * 主键id 51 | */ 52 | @TableId 53 | private Long id; 54 | /** 55 | * 帖子标题 56 | */ 57 | 58 | private String title; 59 | 60 | /** 61 | * 帖子内容 62 | */ 63 | 64 | private String content; 65 | 66 | /** 67 | * 父节点id 68 | */ 69 | 70 | private Long parentid; 71 | 72 | /** 73 | * 用户id 74 | */ 75 | 76 | private Long userid; 77 | 78 | /** 79 | * 用户名 80 | */ 81 | 82 | private String username; 83 | 84 | /** 85 | * 状态 86 | */ 87 | 88 | private String isdone; 89 | 90 | 91 | @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") 92 | @DateTimeFormat 93 | private Date addtime; 94 | 95 | public Date getAddtime() { 96 | return addtime; 97 | } 98 | public void setAddtime(Date addtime) { 99 | this.addtime = addtime; 100 | } 101 | 102 | public Long getId() { 103 | return id; 104 | } 105 | 106 | public void setId(Long id) { 107 | this.id = id; 108 | } 109 | @TableField(exist = false) 110 | private List childs; 111 | 112 | public List getChilds() { 113 | return childs; 114 | } 115 | 116 | public void setChilds(List childs) { 117 | this.childs = childs; 118 | } 119 | /** 120 | * 设置:帖子标题 121 | */ 122 | public void setTitle(String title) { 123 | this.title = title; 124 | } 125 | /** 126 | * 获取:帖子标题 127 | */ 128 | public String getTitle() { 129 | return title; 130 | } 131 | /** 132 | * 设置:帖子内容 133 | */ 134 | public void setContent(String content) { 135 | this.content = content; 136 | } 137 | /** 138 | * 获取:帖子内容 139 | */ 140 | public String getContent() { 141 | return content; 142 | } 143 | /** 144 | * 设置:父节点id 145 | */ 146 | public void setParentid(Long parentid) { 147 | this.parentid = parentid; 148 | } 149 | /** 150 | * 获取:父节点id 151 | */ 152 | public Long getParentid() { 153 | return parentid; 154 | } 155 | /** 156 | * 设置:用户id 157 | */ 158 | public void setUserid(Long userid) { 159 | this.userid = userid; 160 | } 161 | /** 162 | * 获取:用户id 163 | */ 164 | public Long getUserid() { 165 | return userid; 166 | } 167 | /** 168 | * 设置:用户名 169 | */ 170 | public void setUsername(String username) { 171 | this.username = username; 172 | } 173 | /** 174 | * 获取:用户名 175 | */ 176 | public String getUsername() { 177 | return username; 178 | } 179 | /** 180 | * 设置:状态 181 | */ 182 | public void setIsdone(String isdone) { 183 | this.isdone = isdone; 184 | } 185 | /** 186 | * 获取:状态 187 | */ 188 | public String getIsdone() { 189 | return isdone; 190 | } 191 | 192 | } 193 | --------------------------------------------------------------------------------