Browse Source

心理咨询师列表接口 业务

hotfix/yujt_opt
zhangyuan 5 years ago
parent
commit
f66a689bd2
  1. 53
      epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/controller/AppPsychologistController.java
  2. 11
      epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/dao/PsychologistDao.java
  3. 12
      epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/PsychologistService.java
  4. 7
      epdc-cloud-property/src/main/java/com/elink/esua/epdc/modules/psychology/service/impl/PsychologistServiceImpl.java
  5. 15
      epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistDao.xml

53
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<List<PsychologistResultDTO>> export(@RequestBody PsychologistFormDTO formDto) throws Exception {
List<PsychologistResultDTO> list = psychologistService.listPsychiatrist(formDto);
return new Result<List<PsychologistResultDTO>>().ok(list);
}
}

11
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<PsychologistEntity> {
* @since 2020/5/21 14:54
*/
List<PsychologistEntity> selectListOfPsychologist(Map<String, Object> params);
/**
* 心理咨询师列表
*
* @return java.util.List<com.elink.esua.epdc.modules.psychology.entity.PsychologistEntity>
* @params [params]
* @author zhangyuan
* @since 2020/5/21 14:54
*/
List<PsychologistEntity> listPsychiatrist(PsychologistFormDTO dto);
}

12
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<PsychologistEntity> {
*/
void delete(String[] ids);
/**
* 心理咨询师列表API
*
* @param dto
* @return List<PsychologistResultDTO>
* @author zhangyuan
* @date 2020-06-04
*/
List<PsychologistResultDTO> listPsychiatrist(PsychologistFormDTO dto);
}

7
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<PsychologistDao, Ps
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
public List<PsychologistResultDTO> listPsychiatrist(PsychologistFormDTO dto) {
List<PsychologistEntity> entity = baseDao.listPsychiatrist(dto);
return ConvertUtils.sourceToTarget(entity, PsychologistResultDTO.class);
}
}

15
epdc-cloud-property/src/main/resources/mapper/psychology/PsychologistDao.xml

@ -42,4 +42,19 @@
SORT ASC,
CREATED_TIME DESC
</select>
<select id="listPsychiatrist" resultType="com.elink.esua.epdc.modules.psychology.entity.PsychologistEntity">
SELECT
<include refid="Base_Column_List"/>
FROM
epdc_psychologist
WHERE
DEL_FLAG = '0'
ORDER BY
SORT ASC,
CREATED_TIME DESC
<if test="allFlag == '0'">
LIMIT 4
</if>
</select>
</mapper>
Loading…
Cancel
Save