From f66a689bd2eb3368f7969d2e481c5aa9fa7021c7 Mon Sep 17 00:00:00 2001 From: zhangyuan Date: Mon, 8 Jun 2020 10:44:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E7=90=86=E5=92=A8=E8=AF=A2=E5=B8=88?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=20=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AppPsychologistController.java | 53 +++++++++++++++++++ .../psychology/dao/PsychologistDao.java | 11 ++++ .../service/PsychologistService.java | 12 +++++ .../service/impl/PsychologistServiceImpl.java | 7 +++ .../mapper/psychology/PsychologistDao.xml | 15 ++++++ 5 files changed, 98 insertions(+) create mode 100644 epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/AppPsychologistController.java diff --git a/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/AppPsychologistController.java b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/AppPsychologistController.java new file mode 100644 index 0000000..e284724 --- /dev/null +++ b/epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/AppPsychologistController.java @@ -0,0 +1,53 @@ +/** + * 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.constant.Constant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.psychology.form.PsychologistFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologistResultDTO; +import com.elink.esua.epdc.modules.psychology.service.PsychologistService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + + +/** + * 心理咨询师表 + * + * @author zhangyuan qu@elink-cn.com + * @since v1.0.0 2020-06-04 + */ +@RestController +@RequestMapping(Constant.EPDC_APP + "psychology") +public class AppPsychologistController { + + @Autowired + private PsychologistService psychologistService; + + @GetMapping("listPsychiatrist") + public Result> export(@RequestBody PsychologistFormDTO formDto) throws Exception { + List list = psychologistService.listPsychiatrist(formDto); + return new Result>().ok(list); + } + +} \ 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 index e8a29a0..4b1cd29 100644 --- 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 @@ -18,6 +18,7 @@ package com.elink.esua.epdc.modules.psychology.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.psychology.form.PsychologistFormDTO; import com.elink.esua.epdc.modules.psychology.entity.PsychologistEntity; import org.apache.ibatis.annotations.Mapper; @@ -42,4 +43,14 @@ public interface PsychologistDao extends BaseDao { * @since 2020/5/21 14:54 */ List selectListOfPsychologist(Map params); + + /** + * 心理咨询师列表 + * + * @return java.util.List + * @params [params] + * @author zhangyuan + * @since 2020/5/21 14:54 + */ + List listPsychiatrist(PsychologistFormDTO dto); } \ 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 index 833bdd8..2194709 100644 --- 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 @@ -20,6 +20,8 @@ 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.form.PsychologistFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologistResultDTO; import com.elink.esua.epdc.modules.psychology.entity.PsychologistEntity; import java.util.List; @@ -93,4 +95,14 @@ public interface PsychologistService extends BaseService { */ void delete(String[] ids); + /** + * 心理咨询师列表API + * + * @param dto + * @return List + * @author zhangyuan + * @date 2020-06-04 + */ + List listPsychiatrist(PsychologistFormDTO dto); + } \ 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 index 3a1748b..6019c47 100644 --- 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 @@ -24,6 +24,8 @@ 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.form.PsychologistFormDTO; +import com.elink.esua.epdc.dto.psychology.result.PsychologistResultDTO; import com.elink.esua.epdc.modules.psychology.dao.PsychologistDao; import com.elink.esua.epdc.modules.psychology.dao.PsychologistTitleRelationDao; import com.elink.esua.epdc.modules.psychology.entity.PsychologistEntity; @@ -129,4 +131,9 @@ public class PsychologistServiceImpl extends BaseServiceImpl listPsychiatrist(PsychologistFormDTO dto) { + List entity = baseDao.listPsychiatrist(dto); + return ConvertUtils.sourceToTarget(entity, PsychologistResultDTO.class); + } } \ 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 index ffe9afe..1e651d1 100644 --- a/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistDao.xml +++ b/epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistDao.xml @@ -42,4 +42,19 @@ SORT ASC, CREATED_TIME DESC + + \ No newline at end of file