From a5807d7f6f8fe84cf192f1b5829cfd9250cb4dfe Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Fri, 5 Jun 2020 10:52:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BF=83=E7=90=86=E5=92=A8?= =?UTF-8?q?=E8=AF=A2=E5=B8=88=E7=9B=B8=E5=85=B3=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PsychologistController.java | 100 ++++++++++++++++ .../PsychologistTitleController.java | 94 +++++++++++++++ .../PsychologistTitleRelationController.java | 94 +++++++++++++++ .../psychology/dao/PsychologistDao.java | 45 ++++++++ .../psychology/dao/PsychologistTitleDao.java | 33 ++++++ .../dao/PsychologistTitleRelationDao.java | 33 ++++++ .../psychology/entity/PsychologistEntity.java | 84 ++++++++++++++ .../entity/PsychologistTitleEntity.java | 49 ++++++++ .../PsychologistTitleRelationEntity.java | 49 ++++++++ .../psychology/excel/PsychologistExcel.java | 83 ++++++++++++++ .../excel/PsychologistTitleExcel.java | 62 ++++++++++ .../excel/PsychologistTitleRelationExcel.java | 62 ++++++++++ .../psychology/redis/PsychologistRedis.java | 47 ++++++++ .../redis/PsychologistTitleRedis.java | 47 ++++++++ .../redis/PsychologistTitleRelationRedis.java | 47 ++++++++ .../service/PsychologistService.java | 103 +++++++++++++++++ .../PsychologistTitleRelationService.java | 95 +++++++++++++++ .../service/PsychologistTitleService.java | 95 +++++++++++++++ .../service/impl/PsychologistServiceImpl.java | 108 ++++++++++++++++++ .../PsychologistTitleRelationServiceImpl.java | 104 +++++++++++++++++ .../impl/PsychologistTitleServiceImpl.java | 104 +++++++++++++++++ .../mapper/psychology/PsychologistDao.xml | 45 ++++++++ .../psychology/PsychologistTitleDao.xml | 19 +++ .../PsychologistTitleRelationDao.xml | 19 +++ 24 files changed, 1621 insertions(+) create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistController.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleController.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleRelationController.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistDao.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistTitleDao.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistTitleRelationDao.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistEntity.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistTitleEntity.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistTitleRelationEntity.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistExcel.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistTitleExcel.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistTitleRelationExcel.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistRedis.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistTitleRedis.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistTitleRelationRedis.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistService.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistTitleRelationService.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistTitleService.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistServiceImpl.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistTitleRelationServiceImpl.java create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistTitleServiceImpl.java create mode 100644 epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistDao.xml create mode 100644 epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistTitleDao.xml create mode 100644 epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistTitleRelationDao.xml diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistController.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistController.java new file mode 100644 index 0000000..1f28b1c --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistController.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.psychology.PsychologistDTO; +import com.elink.esua.epdc.dto.psychology.SysUserDictDTO; +import com.elink.esua.epdc.modules.psychology.excel.PsychologistExcel; +import com.elink.esua.epdc.modules.psychology.service.PsychologistService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 心理咨询师表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@RestController +@RequestMapping("psychologist") +public class PsychologistController { + + @Autowired + private PsychologistService psychologistService; + + @GetMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = psychologistService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + PsychologistDTO data = psychologistService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PsychologistDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + psychologistService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PsychologistDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + psychologistService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + psychologistService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = psychologistService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PsychologistExcel.class); + } + + @GetMapping("userList") + public Result> getSysUserDict() { + List data = psychologistService.getSysUserDict(); + return new Result>().ok(data); + } +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleController.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleController.java new file mode 100644 index 0000000..8d67ce9 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.psychology.PsychologistTitleDTO; +import com.elink.esua.epdc.modules.psychology.excel.PsychologistTitleExcel; +import com.elink.esua.epdc.modules.psychology.service.PsychologistTitleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@RestController +@RequestMapping("psychologisttitle") +public class PsychologistTitleController { + + @Autowired + private PsychologistTitleService psychologistTitleService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = psychologistTitleService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PsychologistTitleDTO data = psychologistTitleService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PsychologistTitleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + psychologistTitleService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PsychologistTitleDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + psychologistTitleService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + psychologistTitleService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = psychologistTitleService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PsychologistTitleExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleRelationController.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleRelationController.java new file mode 100644 index 0000000..a2521fb --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/PsychologistTitleRelationController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.psychology.PsychologistTitleRelationDTO; +import com.elink.esua.epdc.modules.psychology.excel.PsychologistTitleRelationExcel; +import com.elink.esua.epdc.modules.psychology.service.PsychologistTitleRelationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@RestController +@RequestMapping("psychologisttitlerelation") +public class PsychologistTitleRelationController { + + @Autowired + private PsychologistTitleRelationService psychologistTitleRelationService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = psychologistTitleRelationService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PsychologistTitleRelationDTO data = psychologistTitleRelationService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PsychologistTitleRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + psychologistTitleRelationService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PsychologistTitleRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + psychologistTitleRelationService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + psychologistTitleRelationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = psychologistTitleRelationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, PsychologistTitleRelationExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistDao.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistDao.java new file mode 100644 index 0000000..e8a29a0 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistDao.java @@ -0,0 +1,45 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.psychology.entity.PsychologistEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 心理咨询师表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Mapper +public interface PsychologistDao extends BaseDao { + + /** + * 咨询师列表 + * + * @return java.util.List + * @params [params] + * @author zhangyuan + * @since 2020/5/21 14:54 + */ + List selectListOfPsychologist(Map params); +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistTitleDao.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistTitleDao.java new file mode 100644 index 0000000..7bc58e2 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistTitleDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.psychology.entity.PsychologistTitleEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Mapper +public interface PsychologistTitleDao extends BaseDao { + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistTitleRelationDao.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistTitleRelationDao.java new file mode 100644 index 0000000..257d455 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistTitleRelationDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.modules.psychology.entity.PsychologistTitleRelationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Mapper +public interface PsychologistTitleRelationDao extends BaseDao { + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistEntity.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistEntity.java new file mode 100644 index 0000000..57f3c63 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistEntity.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 心理咨询师表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_psychologist") +public class PsychologistEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 咨询师姓名 + */ + private String name; + + /** + * 咨询师照片地址 + */ + private String avatar; + + /** + * 咨询师联系方式 + */ + private String mobile; + + /** + * 咨询师性别 0女 ,1男 + */ + private String sex; + + /** + * 绑定用户的id + */ + private String userId; + + /** + * 座右铭 + */ + private String motto; + + /** + * 简介 + */ + private String briefIntroduction; + + /** + * 排序 从小到大 + */ + private Integer sort; + + /** + * 是否展示 0否 ,1是 + */ + private String displayFlag; + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistTitleEntity.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistTitleEntity.java new file mode 100644 index 0000000..6c431bd --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistTitleEntity.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_psychologist_title") +public class PsychologistTitleEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 头衔 + */ + private String title; + + /** + * 头衔编码 + */ + private String code; + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistTitleRelationEntity.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistTitleRelationEntity.java new file mode 100644 index 0000000..f31a18c --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/entity/PsychologistTitleRelationEntity.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_psychologist_title_relation") +public class PsychologistTitleRelationEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 头衔id + */ + private String titleId; + + /** + * 咨询师id + */ + private String psychologistId; + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistExcel.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistExcel.java new file mode 100644 index 0000000..9038157 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistExcel.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 心理咨询师表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Data +public class PsychologistExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "咨询师姓名") + private String name; + + @Excel(name = "咨询师照片地址") + private String avatar; + + @Excel(name = "咨询师联系方式") + private String mobile; + + @Excel(name = "咨询师性别 0女 ,1男") + private String sex; + + @Excel(name = "绑定用户的id") + private String userId; + + @Excel(name = "座右铭") + private String motto; + + @Excel(name = "简介") + private String briefIntroduction; + + @Excel(name = "排序 从小到大") + private Integer sort; + + @Excel(name = "是否展示 0否 ,1是") + private String displayFlag; + + @Excel(name = "删除标记 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistTitleExcel.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistTitleExcel.java new file mode 100644 index 0000000..362f0e4 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistTitleExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Data +public class PsychologistTitleExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "头衔") + private String title; + + @Excel(name = "头衔编码") + private String code; + + @Excel(name = "删除标记 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistTitleRelationExcel.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistTitleRelationExcel.java new file mode 100644 index 0000000..4f6ef70 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/excel/PsychologistTitleRelationExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Data +public class PsychologistTitleRelationExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "头衔id") + private String titleId; + + @Excel(name = "咨询师id") + private String psychologistId; + + @Excel(name = "删除标记 0:未删除,1:已删除") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistRedis.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistRedis.java new file mode 100644 index 0000000..5da4690 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 心理咨询师表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Component +public class PsychologistRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistTitleRedis.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistTitleRedis.java new file mode 100644 index 0000000..2cd6ecb --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistTitleRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Component +public class PsychologistTitleRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistTitleRelationRedis.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistTitleRelationRedis.java new file mode 100644 index 0000000..1f30995 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/redis/PsychologistTitleRelationRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Component +public class PsychologistTitleRelationRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistService.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistService.java new file mode 100644 index 0000000..767118a --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistService.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.psychology.PsychologistDTO; +import com.elink.esua.epdc.dto.psychology.SysUserDictDTO; +import com.elink.esua.epdc.modules.psychology.entity.PsychologistEntity; + +import java.util.List; +import java.util.Map; + +/** + * 心理咨询师表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +public interface PsychologistService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-04 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-04 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PsychologistDTO + * @author generator + * @date 2020-06-04 + */ + PsychologistDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-04 + */ + void save(PsychologistDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-04 + */ + void update(PsychologistDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-04 + */ + void delete(String[] ids); + + /** + * 获取绑定用户下拉列表 + * + * @return + */ + List getSysUserDict(); +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistTitleRelationService.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistTitleRelationService.java new file mode 100644 index 0000000..ff6c2cd --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistTitleRelationService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.psychology.PsychologistTitleRelationDTO; +import com.elink.esua.epdc.modules.psychology.entity.PsychologistTitleRelationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +public interface PsychologistTitleRelationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-04 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-04 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PsychologistTitleRelationDTO + * @author generator + * @date 2020-06-04 + */ + PsychologistTitleRelationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-04 + */ + void save(PsychologistTitleRelationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-04 + */ + void update(PsychologistTitleRelationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-04 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistTitleService.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistTitleService.java new file mode 100644 index 0000000..0bd173c --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistTitleService.java @@ -0,0 +1,95 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.psychology.PsychologistTitleDTO; +import com.elink.esua.epdc.modules.psychology.entity.PsychologistTitleEntity; + +import java.util.List; +import java.util.Map; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +public interface PsychologistTitleService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-06-04 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-06-04 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PsychologistTitleDTO + * @author generator + * @date 2020-06-04 + */ + PsychologistTitleDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-04 + */ + void save(PsychologistTitleDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-06-04 + */ + void update(PsychologistTitleDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-06-04 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistServiceImpl.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistServiceImpl.java new file mode 100644 index 0000000..96e300e --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistServiceImpl.java @@ -0,0 +1,108 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dto.psychology.PsychologistDTO; +import com.elink.esua.epdc.dto.psychology.SysUserDictDTO; +import com.elink.esua.epdc.modules.psychology.dao.PsychologistDao; +import com.elink.esua.epdc.modules.psychology.entity.PsychologistEntity; +import com.elink.esua.epdc.modules.psychology.redis.PsychologistRedis; +import com.elink.esua.epdc.modules.psychology.service.PsychologistService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 心理咨询师表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Service +public class PsychologistServiceImpl extends BaseServiceImpl implements PsychologistService { + + @Autowired + private PsychologistRedis psychologistRedis; + + @Override + public PageData page(Map params) { + IPage page = getPage(params); + List entityList = baseDao.selectListOfPsychologist(params); + List list = ConvertUtils.sourceToTarget(entityList, PsychologistDTO.class); + return new PageData<>(list, page.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PsychologistDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PsychologistDTO get(String id) { + PsychologistEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PsychologistDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PsychologistDTO dto) { + PsychologistEntity entity = ConvertUtils.sourceToTarget(dto, PsychologistEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PsychologistDTO dto) { + PsychologistEntity entity = ConvertUtils.sourceToTarget(dto, PsychologistEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public List getSysUserDict() { + return null; + } +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistTitleRelationServiceImpl.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistTitleRelationServiceImpl.java new file mode 100644 index 0000000..5873200 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistTitleRelationServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.modules.psychology.dao.PsychologistTitleRelationDao; +import com.elink.esua.epdc.dto.psychology.PsychologistTitleRelationDTO; +import com.elink.esua.epdc.modules.psychology.entity.PsychologistTitleRelationEntity; +import com.elink.esua.epdc.modules.psychology.redis.PsychologistTitleRelationRedis; +import com.elink.esua.epdc.modules.psychology.service.PsychologistTitleRelationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Service +public class PsychologistTitleRelationServiceImpl extends BaseServiceImpl implements PsychologistTitleRelationService { + + @Autowired + private PsychologistTitleRelationRedis psychologistTitleRelationRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PsychologistTitleRelationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PsychologistTitleRelationDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PsychologistTitleRelationDTO get(String id) { + PsychologistTitleRelationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PsychologistTitleRelationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PsychologistTitleRelationDTO dto) { + PsychologistTitleRelationEntity entity = ConvertUtils.sourceToTarget(dto, PsychologistTitleRelationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PsychologistTitleRelationDTO dto) { + PsychologistTitleRelationEntity entity = ConvertUtils.sourceToTarget(dto, PsychologistTitleRelationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistTitleServiceImpl.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistTitleServiceImpl.java new file mode 100644 index 0000000..0c7d9d1 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistTitleServiceImpl.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.modules.psychology.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.modules.psychology.dao.PsychologistTitleDao; +import com.elink.esua.epdc.dto.psychology.PsychologistTitleDTO; +import com.elink.esua.epdc.modules.psychology.entity.PsychologistTitleEntity; +import com.elink.esua.epdc.modules.psychology.redis.PsychologistTitleRedis; +import com.elink.esua.epdc.modules.psychology.service.PsychologistTitleService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 心理咨询师头衔表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@Service +public class PsychologistTitleServiceImpl extends BaseServiceImpl implements PsychologistTitleService { + + @Autowired + private PsychologistTitleRedis psychologistTitleRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PsychologistTitleDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PsychologistTitleDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public PsychologistTitleDTO get(String id) { + PsychologistTitleEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PsychologistTitleDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PsychologistTitleDTO dto) { + PsychologistTitleEntity entity = ConvertUtils.sourceToTarget(dto, PsychologistTitleEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PsychologistTitleDTO dto) { + PsychologistTitleEntity entity = ConvertUtils.sourceToTarget(dto, PsychologistTitleEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistDao.xml b/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistDao.xml new file mode 100644 index 0000000..c3256ee --- /dev/null +++ b/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistDao.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ID, NAME, AVATAR, MOBILE, SEX, USER_ID, MOTTO, BRIEF_INTRODUCTION, SORT, + DISPLAY_FLAG, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME + + + \ No newline at end of file diff --git a/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistTitleDao.xml b/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistTitleDao.xml new file mode 100644 index 0000000..be71431 --- /dev/null +++ b/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistTitleDao.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistTitleRelationDao.xml b/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistTitleRelationDao.xml new file mode 100644 index 0000000..735dbeb --- /dev/null +++ b/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistTitleRelationDao.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file