新增微信端查看咨询师证书

This commit is contained in:
cjw 2024-08-20 14:14:15 +08:00
parent fb73d30588
commit 5602f14254
3 changed files with 21 additions and 8 deletions

View File

@ -35,7 +35,7 @@ import java.util.List;
@RequestMapping("/counselor/qualification") @RequestMapping("/counselor/qualification")
public class CounselorQualificationController extends BaseController { public class CounselorQualificationController extends BaseController {
private final ICounselorQualificationService counselorQualificationService; private final ICounselorQualificationService qualificationService;
/** /**
* 查询资质证书列表 * 查询资质证书列表
@ -43,7 +43,7 @@ public class CounselorQualificationController extends BaseController {
@SaCheckPermission("counselor:qualification:list") @SaCheckPermission("counselor:qualification:list")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<CounselorQualificationVo> list(CounselorQualificationBo bo, PageQuery pageQuery) { public TableDataInfo<CounselorQualificationVo> list(CounselorQualificationBo bo, PageQuery pageQuery) {
return counselorQualificationService.queryPageList(bo, pageQuery); return qualificationService.queryPageList(bo, pageQuery);
} }
/** /**
@ -53,7 +53,7 @@ public class CounselorQualificationController extends BaseController {
@Log(title = "资质证书", businessType = BusinessType.EXPORT) @Log(title = "资质证书", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(CounselorQualificationBo bo, HttpServletResponse response) { public void export(CounselorQualificationBo bo, HttpServletResponse response) {
List<CounselorQualificationVo> list = counselorQualificationService.queryList(bo); List<CounselorQualificationVo> list = qualificationService.queryList(bo);
ExcelUtil.exportExcel(list, "资质证书", CounselorQualificationVo.class, response); ExcelUtil.exportExcel(list, "资质证书", CounselorQualificationVo.class, response);
} }
@ -66,7 +66,7 @@ public class CounselorQualificationController extends BaseController {
@GetMapping("/{id}") @GetMapping("/{id}")
public R<CounselorQualificationVo> getInfo(@NotNull(message = "主键不能为空") public R<CounselorQualificationVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) { @PathVariable Long id) {
return R.ok(counselorQualificationService.queryById(id)); return R.ok(qualificationService.queryById(id));
} }
/** /**
@ -77,7 +77,7 @@ public class CounselorQualificationController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PostMapping() @PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody CounselorQualificationBo bo) { public R<Void> add(@Validated(AddGroup.class) @RequestBody CounselorQualificationBo bo) {
return toAjax(counselorQualificationService.insertByBo(bo)); return toAjax(qualificationService.insertByBo(bo));
} }
/** /**
@ -88,7 +88,7 @@ public class CounselorQualificationController extends BaseController {
@RepeatSubmit() @RepeatSubmit()
@PutMapping() @PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CounselorQualificationBo bo) { public R<Void> edit(@Validated(EditGroup.class) @RequestBody CounselorQualificationBo bo) {
return toAjax(counselorQualificationService.updateByBo(bo)); return toAjax(qualificationService.updateByBo(bo));
} }
/** /**
@ -101,6 +101,6 @@ public class CounselorQualificationController extends BaseController {
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public R<Void> remove(@NotEmpty(message = "主键不能为空") public R<Void> remove(@NotEmpty(message = "主键不能为空")
@PathVariable Long[] ids) { @PathVariable Long[] ids) {
return toAjax(counselorQualificationService.deleteWithValidByIds(List.of(ids), true)); return toAjax(qualificationService.deleteWithValidByIds(List.of(ids), true));
} }
} }

View File

@ -8,9 +8,12 @@ import org.dromara.common.log.annotation.Log;
import org.dromara.common.log.enums.BusinessType; import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.satoken.utils.LoginHelper; import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.common.web.core.BaseController; import org.dromara.common.web.core.BaseController;
import org.dromara.scale.domain.bo.CounselorQualificationBo;
import org.dromara.scale.domain.bo.ReservationDayBo; import org.dromara.scale.domain.bo.ReservationDayBo;
import org.dromara.scale.domain.vo.CounselorQualificationVo;
import org.dromara.scale.domain.vo.CounselorVo; import org.dromara.scale.domain.vo.CounselorVo;
import org.dromara.scale.domain.vo.ReservationDateVo; import org.dromara.scale.domain.vo.ReservationDateVo;
import org.dromara.scale.service.ICounselorQualificationService;
import org.dromara.scale.service.ICounselorService; import org.dromara.scale.service.ICounselorService;
import org.dromara.scale.service.IReservationService; import org.dromara.scale.service.IReservationService;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
@ -35,6 +38,8 @@ public class WxCounselorController extends BaseController {
private final IReservationService reservationService; private final IReservationService reservationService;
private final ICounselorQualificationService qualificationService;
/** /**
* 获取心理咨询师详细信息 * 获取心理咨询师详细信息
*/ */
@ -54,9 +59,17 @@ public class WxCounselorController extends BaseController {
return toAjax(reservationService.insertByBo(bo)); return toAjax(reservationService.insertByBo(bo));
} }
@GetMapping("/date") @GetMapping("/date")
public R<List<ReservationDateVo>> getReservationList(String time, Long counselorId) { public R<List<ReservationDateVo>> getReservationList(String time, Long counselorId) {
return R.ok(reservationService.selectDateList(time, counselorId)); return R.ok(reservationService.selectDateList(time, counselorId));
} }
@GetMapping("/qualification")
public R<List<CounselorQualificationVo>> getQualificationList() {
Long userId = LoginHelper.getUserId();
CounselorQualificationBo bo = new CounselorQualificationBo();
return R.ok(qualificationService.queryList(bo));
}
} }

View File

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.scale.mapper.ReservationDayMapper"> <mapper namespace="org.dromara.scale.mapper.ReservationDayMapper">
<select id="selectDateList" resultType="org.dromara.scale.domain.vo.ReservationDateVo"> <select id="selectDateList" resultType="org.dromara.scale.domain.vo.ReservationDateVo">
select rd.id as dayId, DATE_FORMAT(rd.day_time, '%Y-%m') as dayTime, t.num as notUseNum select rd.id as dayId, DATE_FORMAT(rd.day_time, '%Y-%m-%d') as dayTime, t.num as notUseNum
from m_reservation_day rd from m_reservation_day rd
left join (select count(*) as num, day_id left join (select count(*) as num, day_id
from m_reservation_time from m_reservation_time