咨询师相关信息初始化;小程序首页列表接口优化
This commit is contained in:
parent
dab19252bf
commit
fea2186856
|
@ -0,0 +1,105 @@
|
|||
package org.dromara.scale.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.scale.domain.vo.CounselorVo;
|
||||
import org.dromara.scale.domain.bo.CounselorBo;
|
||||
import org.dromara.scale.service.ICounselorService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 心理咨询师
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/scale/counselor")
|
||||
public class CounselorController extends BaseController {
|
||||
|
||||
private final ICounselorService counselorService;
|
||||
|
||||
/**
|
||||
* 查询心理咨询师列表
|
||||
*/
|
||||
@SaCheckPermission("scale:counselor:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CounselorVo> list(CounselorBo bo, PageQuery pageQuery) {
|
||||
return counselorService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出心理咨询师列表
|
||||
*/
|
||||
@SaCheckPermission("scale:counselor:export")
|
||||
@Log(title = "心理咨询师", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(CounselorBo bo, HttpServletResponse response) {
|
||||
List<CounselorVo> list = counselorService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "心理咨询师", CounselorVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取心理咨询师详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("scale:counselor:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<CounselorVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(counselorService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增心理咨询师
|
||||
*/
|
||||
@SaCheckPermission("scale:counselor:add")
|
||||
@Log(title = "心理咨询师", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody CounselorBo bo) {
|
||||
return toAjax(counselorService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改心理咨询师
|
||||
*/
|
||||
@SaCheckPermission("scale:counselor:edit")
|
||||
@Log(title = "心理咨询师", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CounselorBo bo) {
|
||||
return toAjax(counselorService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除心理咨询师
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("scale:counselor:remove")
|
||||
@Log(title = "心理咨询师", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(counselorService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package org.dromara.scale.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.scale.domain.vo.CounselorExperienceVo;
|
||||
import org.dromara.scale.domain.bo.CounselorExperienceBo;
|
||||
import org.dromara.scale.service.ICounselorExperienceService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 培训经历
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/scale/counselorExperience")
|
||||
public class CounselorExperienceController extends BaseController {
|
||||
|
||||
private final ICounselorExperienceService counselorExperienceService;
|
||||
|
||||
/**
|
||||
* 查询培训经历列表
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorExperience:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CounselorExperienceVo> list(CounselorExperienceBo bo, PageQuery pageQuery) {
|
||||
return counselorExperienceService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出培训经历列表
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorExperience:export")
|
||||
@Log(title = "培训经历", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(CounselorExperienceBo bo, HttpServletResponse response) {
|
||||
List<CounselorExperienceVo> list = counselorExperienceService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "培训经历", CounselorExperienceVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取培训经历详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorExperience:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<CounselorExperienceVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(counselorExperienceService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增培训经历
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorExperience:add")
|
||||
@Log(title = "培训经历", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody CounselorExperienceBo bo) {
|
||||
return toAjax(counselorExperienceService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改培训经历
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorExperience:edit")
|
||||
@Log(title = "培训经历", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CounselorExperienceBo bo) {
|
||||
return toAjax(counselorExperienceService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除培训经历
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorExperience:remove")
|
||||
@Log(title = "培训经历", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(counselorExperienceService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package org.dromara.scale.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.scale.domain.vo.CounselorQualificationVo;
|
||||
import org.dromara.scale.domain.bo.CounselorQualificationBo;
|
||||
import org.dromara.scale.service.ICounselorQualificationService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 资质证书
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/scale/counselorQualification")
|
||||
public class CounselorQualificationController extends BaseController {
|
||||
|
||||
private final ICounselorQualificationService counselorQualificationService;
|
||||
|
||||
/**
|
||||
* 查询资质证书列表
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorQualification:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CounselorQualificationVo> list(CounselorQualificationBo bo, PageQuery pageQuery) {
|
||||
return counselorQualificationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出资质证书列表
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorQualification:export")
|
||||
@Log(title = "资质证书", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(CounselorQualificationBo bo, HttpServletResponse response) {
|
||||
List<CounselorQualificationVo> list = counselorQualificationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "资质证书", CounselorQualificationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资质证书详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorQualification:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<CounselorQualificationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(counselorQualificationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资质证书
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorQualification:add")
|
||||
@Log(title = "资质证书", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody CounselorQualificationBo bo) {
|
||||
return toAjax(counselorQualificationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资质证书
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorQualification:edit")
|
||||
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody CounselorQualificationBo bo) {
|
||||
return toAjax(counselorQualificationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资质证书
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("scale:counselorQualification:remove")
|
||||
@Log(title = "资质证书", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(counselorQualificationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package org.dromara.scale.controller.wx;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
|
@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>TODO<p>
|
||||
*
|
||||
|
@ -34,9 +37,18 @@ public class WxScaleController extends BaseController {
|
|||
* 查询心理测评量列表
|
||||
*/
|
||||
@GetMapping("/pageList")
|
||||
public TableDataInfo<SysScaleVo> list(SysScaleBo bo, PageQuery pageQuery) {
|
||||
public TableDataInfo<SysScaleVo> pageList(SysScaleBo bo, PageQuery pageQuery) {
|
||||
return sysScaleService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询心理测评量列表,默认展示两条数据
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R<List<SysScaleVo>> list(@NotBlank(message = "类型不能为空") String scaleType) {
|
||||
return R.ok(sysScaleService.queryWxList(scaleType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取心理测评量详细信息
|
||||
*
|
||||
|
@ -44,7 +56,6 @@ public class WxScaleController extends BaseController {
|
|||
*/
|
||||
@GetMapping("/{scaleId}")
|
||||
public R<SysScaleVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long scaleId) {
|
||||
//todo
|
||||
return R.ok(sysScaleService.queryById(scaleId));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
package org.dromara.scale.controller.wx;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.scale.domain.bo.SysScaleOrderBo;
|
||||
import org.dromara.scale.domain.vo.SysScaleOrderVo;
|
||||
import org.dromara.scale.service.ISysScaleOrderService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 量表订单
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wx/scale/order")
|
||||
public class WxScaleOrderController extends BaseController {
|
||||
|
||||
private final ISysScaleOrderService sysScaleOrderService;
|
||||
|
||||
/**
|
||||
* 查询量表订单列表
|
||||
*/
|
||||
@SaCheckPermission("scale:scaleOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<SysScaleOrderVo> list(SysScaleOrderBo bo, PageQuery pageQuery) {
|
||||
return sysScaleOrderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出量表订单列表
|
||||
*/
|
||||
@SaCheckPermission("scale:scaleOrder:export")
|
||||
@Log(title = "量表订单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(SysScaleOrderBo bo, HttpServletResponse response) {
|
||||
List<SysScaleOrderVo> list = sysScaleOrderService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "量表订单", SysScaleOrderVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取量表订单详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("scale:scaleOrder:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<SysScaleOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(sysScaleOrderService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增量表订单
|
||||
*/
|
||||
@SaCheckPermission("scale:scaleOrder:add")
|
||||
@Log(title = "量表订单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody SysScaleOrderBo bo) {
|
||||
return toAjax(sysScaleOrderService.insertByBo(bo));
|
||||
}
|
||||
|
||||
}
|
|
@ -1,14 +1,10 @@
|
|||
package org.dromara.scale.controller.wx;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
|
@ -21,8 +17,6 @@ import org.dromara.scale.service.IScoreRecordService;
|
|||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 评分
|
||||
*
|
||||
|
@ -46,16 +40,6 @@ public class WxScoreRecordController extends BaseController {
|
|||
return scoreRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出评分列表
|
||||
*/
|
||||
@SaCheckPermission("scale:scoreRecord:export")
|
||||
@Log(title = "评分", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ScoreRecordBo bo, HttpServletResponse response) {
|
||||
List<ScoreRecordVo> list = scoreRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "评分", ScoreRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取评分详细信息
|
||||
|
@ -79,28 +63,4 @@ public class WxScoreRecordController extends BaseController {
|
|||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ScoreRecordBo bo) {
|
||||
return toAjax(scoreRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改评分
|
||||
*/
|
||||
@SaCheckPermission("scale:scoreRecord:edit")
|
||||
@Log(title = "评分", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ScoreRecordBo bo) {
|
||||
return toAjax(scoreRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除评分
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("scale:scoreRecord:remove")
|
||||
@Log(title = "评分", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(scoreRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
package org.dromara.scale.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 心理咨询师对象 m_counselor
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("m_counselor")
|
||||
public class Counselor extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 个人简介
|
||||
*/
|
||||
private String introduce;
|
||||
|
||||
/**
|
||||
* 擅长领域
|
||||
*/
|
||||
private String specialityField;
|
||||
|
||||
/**
|
||||
* 封面组
|
||||
*/
|
||||
private String covers;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package org.dromara.scale.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 培训经历对象 m_counselor_experience
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("m_counselor_experience")
|
||||
public class CounselorExperience extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 经历描述
|
||||
*/
|
||||
private String describe;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package org.dromara.scale.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 资质证书对象 m_counselor_qualification
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("m_counselor_qualification")
|
||||
public class CounselorQualification extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 咨询师主键
|
||||
*/
|
||||
private Long counselorId;
|
||||
|
||||
/**
|
||||
* 证书名
|
||||
*/
|
||||
private String certificateName;
|
||||
|
||||
/**
|
||||
* 证书图片
|
||||
*/
|
||||
private Long certificateImage;
|
||||
|
||||
|
||||
}
|
|
@ -4,6 +4,7 @@ import org.dromara.common.tenant.core.TenantEntity;
|
|||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
|
@ -23,9 +24,9 @@ public class ScoreRecord extends TenantEntity {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
@ -39,7 +40,7 @@ public class ScoreRecord extends TenantEntity {
|
|||
private Integer recordStatus;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
private BigDecimal score;
|
||||
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
package org.dromara.scale.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 量表订单对象 sys_scale_order
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_scale_order")
|
||||
public class SysScaleOrder extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 量表id
|
||||
*/
|
||||
private Long scaleId;
|
||||
|
||||
/**
|
||||
* 发布批次号
|
||||
*/
|
||||
private Long batchNo;
|
||||
|
||||
/**
|
||||
* 订单价格
|
||||
*/
|
||||
private BigDecimal orderPrice;
|
||||
|
||||
/**
|
||||
* 实付价格
|
||||
*/
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
/**
|
||||
* 0现金, 1扫码付款,2 公众号支付,3 h5支付,4 当面付,5 小程序支付
|
||||
*/
|
||||
private Integer payWay;
|
||||
|
||||
/**
|
||||
* 量表是否使用,0:未使用,1:已使用
|
||||
*/
|
||||
private Integer useStatus;
|
||||
|
||||
/**
|
||||
* 0:未支付,1:支付完成,2:待评分,3:已评分,99:已退款
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package org.dromara.scale.domain.bo;
|
||||
|
||||
import org.dromara.scale.domain.Counselor;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 心理咨询师业务对象 m_counselor
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = Counselor.class, reverseConvertGenerate = false)
|
||||
public class CounselorBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@NotBlank(message = "姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
@NotNull(message = "价格不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 个人简介
|
||||
*/
|
||||
@NotBlank(message = "个人简介不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String introduce;
|
||||
|
||||
/**
|
||||
* 擅长领域
|
||||
*/
|
||||
@NotBlank(message = "擅长领域不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String specialityField;
|
||||
|
||||
/**
|
||||
* 封面组
|
||||
*/
|
||||
@NotBlank(message = "封面组不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String covers;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package org.dromara.scale.domain.bo;
|
||||
|
||||
import org.dromara.scale.domain.CounselorExperience;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 培训经历业务对象 m_counselor_experience
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = CounselorExperience.class, reverseConvertGenerate = false)
|
||||
public class CounselorExperienceBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 经历描述
|
||||
*/
|
||||
@NotBlank(message = "经历描述不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String describe;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package org.dromara.scale.domain.bo;
|
||||
|
||||
import org.dromara.scale.domain.CounselorQualification;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 资质证书业务对象 m_counselor_qualification
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = CounselorQualification.class, reverseConvertGenerate = false)
|
||||
public class CounselorQualificationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 咨询师主键
|
||||
*/
|
||||
@NotNull(message = "咨询师主键不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long counselorId;
|
||||
|
||||
/**
|
||||
* 证书名
|
||||
*/
|
||||
@NotBlank(message = "证书名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String certificateName;
|
||||
|
||||
/**
|
||||
* 证书图片
|
||||
*/
|
||||
@NotNull(message = "证书图片不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long certificateImage;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package org.dromara.scale.domain.bo;
|
||||
|
||||
import org.dromara.scale.domain.SysScaleOrder;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 量表订单业务对象 sys_scale_order
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = SysScaleOrder.class, reverseConvertGenerate = false)
|
||||
public class SysScaleOrderBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 量表id
|
||||
*/
|
||||
@NotNull(message = "量表id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long scaleId;
|
||||
|
||||
/**
|
||||
* 发布批次号
|
||||
*/
|
||||
@NotNull(message = "发布批次号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long batchNo;
|
||||
|
||||
/**
|
||||
* 订单价格
|
||||
*/
|
||||
@NotNull(message = "订单价格不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal orderPrice;
|
||||
|
||||
/**
|
||||
* 实付价格
|
||||
*/
|
||||
@NotNull(message = "实付价格不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
/**
|
||||
* 0现金, 1扫码付款,2 公众号支付,3 h5支付,4 当面付,5 小程序支付
|
||||
*/
|
||||
@NotNull(message = "0现金, 1扫码付款,2 公众号支付,3 h5支付,4 当面付,5 小程序支付不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer payWay;
|
||||
|
||||
/**
|
||||
* 量表是否使用,0:未使用,1:已使用
|
||||
*/
|
||||
@NotNull(message = "量表是否使用,0:未使用,1:已使用不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer useStatus;
|
||||
|
||||
/**
|
||||
* 0:未支付,1:支付完成,2:待评分,3:已评分,99:已退款
|
||||
*/
|
||||
@NotNull(message = "0:未支付,1:支付完成,2:待评分,3:已评分,99:已退款不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer orderStatus;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package org.dromara.scale.domain.vo;
|
||||
|
||||
import org.dromara.scale.domain.CounselorExperience;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 培训经历视图对象 m_counselor_experience
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = CounselorExperience.class)
|
||||
public class CounselorExperienceVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 经历描述
|
||||
*/
|
||||
@ExcelProperty(value = "经历描述")
|
||||
private String describe;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package org.dromara.scale.domain.vo;
|
||||
|
||||
import org.dromara.scale.domain.CounselorQualification;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 资质证书视图对象 m_counselor_qualification
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = CounselorQualification.class)
|
||||
public class CounselorQualificationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 咨询师主键
|
||||
*/
|
||||
@ExcelProperty(value = "咨询师主键")
|
||||
private Long counselorId;
|
||||
|
||||
/**
|
||||
* 证书名
|
||||
*/
|
||||
@ExcelProperty(value = "证书名")
|
||||
private String certificateName;
|
||||
|
||||
/**
|
||||
* 证书图片
|
||||
*/
|
||||
@ExcelProperty(value = "证书图片")
|
||||
private Long certificateImage;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package org.dromara.scale.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.scale.domain.Counselor;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 心理咨询师视图对象 m_counselor
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = Counselor.class)
|
||||
public class CounselorVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@ExcelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
@ExcelProperty(value = "价格")
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 个人简介
|
||||
*/
|
||||
@ExcelProperty(value = "个人简介")
|
||||
private String introduce;
|
||||
|
||||
/**
|
||||
* 擅长领域
|
||||
*/
|
||||
@ExcelProperty(value = "擅长领域")
|
||||
private String specialityField;
|
||||
|
||||
/**
|
||||
* 封面组
|
||||
*/
|
||||
@ExcelProperty(value = "封面组")
|
||||
private String covers;
|
||||
|
||||
|
||||
}
|
|
@ -1,17 +1,12 @@
|
|||
package org.dromara.scale.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.scale.domain.ScoreRecord;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.scale.domain.ScoreRecord;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
|
||||
|
@ -22,7 +17,6 @@ import java.util.Date;
|
|||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = ScoreRecord.class)
|
||||
public class ScoreRecordVo implements Serializable {
|
||||
|
||||
|
@ -30,27 +24,23 @@ public class ScoreRecordVo implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* status为0是量表id,1是咨询师id
|
||||
*/
|
||||
@ExcelProperty(value = "status为0是量表id,1是咨询师id")
|
||||
private Long businessId;
|
||||
|
||||
/**
|
||||
* 0为scale 1为咨询师
|
||||
*/
|
||||
@ExcelProperty(value = "0为scale 1为咨询师")
|
||||
private Integer recordStatus;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private BigDecimal score;
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
package org.dromara.scale.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.dromara.scale.domain.SysScaleOrder;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 量表订单视图对象 sys_scale_order
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = SysScaleOrder.class)
|
||||
public class SysScaleOrderVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 量表id
|
||||
*/
|
||||
@ExcelProperty(value = "量表id")
|
||||
private Long scaleId;
|
||||
|
||||
/**
|
||||
* 发布批次号
|
||||
*/
|
||||
@ExcelProperty(value = "发布批次号")
|
||||
private Long batchNo;
|
||||
|
||||
/**
|
||||
* 订单价格
|
||||
*/
|
||||
@ExcelProperty(value = "订单价格")
|
||||
private BigDecimal orderPrice;
|
||||
|
||||
/**
|
||||
* 实付价格
|
||||
*/
|
||||
@ExcelProperty(value = "实付价格")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
/**
|
||||
* 0现金, 1扫码付款,2 公众号支付,3 h5支付,4 当面付,5 小程序支付
|
||||
*/
|
||||
@ExcelProperty(value = "0现金, 1扫码付款,2 公众号支付,3 h5支付,4 当面付,5 小程序支付")
|
||||
private Integer payWay;
|
||||
|
||||
/**
|
||||
* 量表是否使用,0:未使用,1:已使用
|
||||
*/
|
||||
@ExcelProperty(value = "量表是否使用,0:未使用,1:已使用")
|
||||
private Integer useStatus;
|
||||
|
||||
/**
|
||||
* 0:未支付,1:支付完成,2:待评分,3:已评分,99:已退款
|
||||
*/
|
||||
@ExcelProperty(value = "0:未支付,1:支付完成,2:待评分,3:已评分,99:已退款")
|
||||
private Integer orderStatus;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package org.dromara.scale.mapper;
|
||||
|
||||
import org.dromara.scale.domain.CounselorExperience;
|
||||
import org.dromara.scale.domain.vo.CounselorExperienceVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 培训经历Mapper接口
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
public interface CounselorExperienceMapper extends BaseMapperPlus<CounselorExperience, CounselorExperienceVo> {
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package org.dromara.scale.mapper;
|
||||
|
||||
import org.dromara.scale.domain.Counselor;
|
||||
import org.dromara.scale.domain.vo.CounselorVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 心理咨询师Mapper接口
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
public interface CounselorMapper extends BaseMapperPlus<Counselor, CounselorVo> {
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package org.dromara.scale.mapper;
|
||||
|
||||
import org.dromara.scale.domain.CounselorQualification;
|
||||
import org.dromara.scale.domain.vo.CounselorQualificationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 资质证书Mapper接口
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
public interface CounselorQualificationMapper extends BaseMapperPlus<CounselorQualification, CounselorQualificationVo> {
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package org.dromara.scale.mapper;
|
||||
|
||||
import org.dromara.scale.domain.SysScaleOrder;
|
||||
import org.dromara.scale.domain.vo.SysScaleOrderVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 量表订单Mapper接口
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
public interface SysScaleOrderMapper extends BaseMapperPlus<SysScaleOrder, SysScaleOrderVo> {
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.scale.domain.vo.CounselorExperienceVo;
|
||||
import org.dromara.scale.domain.bo.CounselorExperienceBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 培训经历Service接口
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
public interface ICounselorExperienceService {
|
||||
|
||||
/**
|
||||
* 查询培训经历
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 培训经历
|
||||
*/
|
||||
CounselorExperienceVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询培训经历列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 培训经历分页列表
|
||||
*/
|
||||
TableDataInfo<CounselorExperienceVo> queryPageList(CounselorExperienceBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的培训经历列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 培训经历列表
|
||||
*/
|
||||
List<CounselorExperienceVo> queryList(CounselorExperienceBo bo);
|
||||
|
||||
/**
|
||||
* 新增培训经历
|
||||
*
|
||||
* @param bo 培训经历
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(CounselorExperienceBo bo);
|
||||
|
||||
/**
|
||||
* 修改培训经历
|
||||
*
|
||||
* @param bo 培训经历
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(CounselorExperienceBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除培训经历信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.scale.domain.vo.CounselorQualificationVo;
|
||||
import org.dromara.scale.domain.bo.CounselorQualificationBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资质证书Service接口
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
public interface ICounselorQualificationService {
|
||||
|
||||
/**
|
||||
* 查询资质证书
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 资质证书
|
||||
*/
|
||||
CounselorQualificationVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询资质证书列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 资质证书分页列表
|
||||
*/
|
||||
TableDataInfo<CounselorQualificationVo> queryPageList(CounselorQualificationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的资质证书列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 资质证书列表
|
||||
*/
|
||||
List<CounselorQualificationVo> queryList(CounselorQualificationBo bo);
|
||||
|
||||
/**
|
||||
* 新增资质证书
|
||||
*
|
||||
* @param bo 资质证书
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(CounselorQualificationBo bo);
|
||||
|
||||
/**
|
||||
* 修改资质证书
|
||||
*
|
||||
* @param bo 资质证书
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(CounselorQualificationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除资质证书信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.scale.domain.vo.CounselorVo;
|
||||
import org.dromara.scale.domain.bo.CounselorBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 心理咨询师Service接口
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
public interface ICounselorService {
|
||||
|
||||
/**
|
||||
* 查询心理咨询师
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 心理咨询师
|
||||
*/
|
||||
CounselorVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询心理咨询师列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 心理咨询师分页列表
|
||||
*/
|
||||
TableDataInfo<CounselorVo> queryPageList(CounselorBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的心理咨询师列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 心理咨询师列表
|
||||
*/
|
||||
List<CounselorVo> queryList(CounselorBo bo);
|
||||
|
||||
/**
|
||||
* 新增心理咨询师
|
||||
*
|
||||
* @param bo 心理咨询师
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(CounselorBo bo);
|
||||
|
||||
/**
|
||||
* 修改心理咨询师
|
||||
*
|
||||
* @param bo 心理咨询师
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(CounselorBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除心理咨询师信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
|
@ -1,11 +1,10 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.scale.domain.vo.ScoreRecordVo;
|
||||
import org.dromara.scale.domain.bo.ScoreRecordBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.bo.ScoreRecordBo;
|
||||
import org.dromara.scale.domain.vo.ScoreRecordVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -49,20 +48,4 @@ public interface IScoreRecordService {
|
|||
*/
|
||||
Boolean insertByBo(ScoreRecordBo bo);
|
||||
|
||||
/**
|
||||
* 修改评分
|
||||
*
|
||||
* @param bo 评分
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(ScoreRecordBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除评分信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.bo.SysScaleOrderBo;
|
||||
import org.dromara.scale.domain.vo.SysScaleOrderVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 量表订单Service接口
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
public interface ISysScaleOrderService {
|
||||
|
||||
/**
|
||||
* 查询量表订单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 量表订单
|
||||
*/
|
||||
SysScaleOrderVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询量表订单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 量表订单分页列表
|
||||
*/
|
||||
TableDataInfo<SysScaleOrderVo> queryPageList(SysScaleOrderBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的量表订单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 量表订单列表
|
||||
*/
|
||||
List<SysScaleOrderVo> queryList(SysScaleOrderBo bo);
|
||||
|
||||
/**
|
||||
* 新增量表订单
|
||||
*
|
||||
* @param bo 量表订单
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(SysScaleOrderBo bo);
|
||||
|
||||
}
|
|
@ -1,10 +1,9 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.scale.domain.SysScale;
|
||||
import org.dromara.scale.domain.vo.SysScaleVo;
|
||||
import org.dromara.scale.domain.bo.SysScaleBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.bo.SysScaleBo;
|
||||
import org.dromara.scale.domain.vo.SysScaleVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
@ -46,4 +45,6 @@ public interface ISysScaleService {
|
|||
* 校验并批量删除心理测评量信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
List<SysScaleVo> queryWxList(String scaleType);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
package org.dromara.scale.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.scale.domain.bo.CounselorExperienceBo;
|
||||
import org.dromara.scale.domain.vo.CounselorExperienceVo;
|
||||
import org.dromara.scale.domain.CounselorExperience;
|
||||
import org.dromara.scale.mapper.CounselorExperienceMapper;
|
||||
import org.dromara.scale.service.ICounselorExperienceService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 培训经历Service业务层处理
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class CounselorExperienceServiceImpl implements ICounselorExperienceService {
|
||||
|
||||
private final CounselorExperienceMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询培训经历
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 培训经历
|
||||
*/
|
||||
@Override
|
||||
public CounselorExperienceVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询培训经历列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 培训经历分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<CounselorExperienceVo> queryPageList(CounselorExperienceBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<CounselorExperience> lqw = buildQueryWrapper(bo);
|
||||
Page<CounselorExperienceVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的培训经历列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 培训经历列表
|
||||
*/
|
||||
@Override
|
||||
public List<CounselorExperienceVo> queryList(CounselorExperienceBo bo) {
|
||||
LambdaQueryWrapper<CounselorExperience> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<CounselorExperience> buildQueryWrapper(CounselorExperienceBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<CounselorExperience> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDescribe()), CounselorExperience::getDescribe, bo.getDescribe());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增培训经历
|
||||
*
|
||||
* @param bo 培训经历
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(CounselorExperienceBo bo) {
|
||||
CounselorExperience add = MapstructUtils.convert(bo, CounselorExperience.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改培训经历
|
||||
*
|
||||
* @param bo 培训经历
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(CounselorExperienceBo bo) {
|
||||
CounselorExperience update = MapstructUtils.convert(bo, CounselorExperience.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(CounselorExperience entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除培训经历信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,131 @@
|
|||
package org.dromara.scale.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.scale.domain.bo.CounselorQualificationBo;
|
||||
import org.dromara.scale.domain.vo.CounselorQualificationVo;
|
||||
import org.dromara.scale.domain.CounselorQualification;
|
||||
import org.dromara.scale.mapper.CounselorQualificationMapper;
|
||||
import org.dromara.scale.service.ICounselorQualificationService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 资质证书Service业务层处理
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class CounselorQualificationServiceImpl implements ICounselorQualificationService {
|
||||
|
||||
private final CounselorQualificationMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询资质证书
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 资质证书
|
||||
*/
|
||||
@Override
|
||||
public CounselorQualificationVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询资质证书列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 资质证书分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<CounselorQualificationVo> queryPageList(CounselorQualificationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<CounselorQualification> lqw = buildQueryWrapper(bo);
|
||||
Page<CounselorQualificationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的资质证书列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 资质证书列表
|
||||
*/
|
||||
@Override
|
||||
public List<CounselorQualificationVo> queryList(CounselorQualificationBo bo) {
|
||||
LambdaQueryWrapper<CounselorQualification> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<CounselorQualification> buildQueryWrapper(CounselorQualificationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<CounselorQualification> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getCounselorId() != null, CounselorQualification::getCounselorId, bo.getCounselorId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCertificateName()), CounselorQualification::getCertificateName, bo.getCertificateName());
|
||||
lqw.eq(bo.getCertificateImage() != null, CounselorQualification::getCertificateImage, bo.getCertificateImage());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资质证书
|
||||
*
|
||||
* @param bo 资质证书
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(CounselorQualificationBo bo) {
|
||||
CounselorQualification add = MapstructUtils.convert(bo, CounselorQualification.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资质证书
|
||||
*
|
||||
* @param bo 资质证书
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(CounselorQualificationBo bo) {
|
||||
CounselorQualification update = MapstructUtils.convert(bo, CounselorQualification.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(CounselorQualification entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除资质证书信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
package org.dromara.scale.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.scale.domain.bo.CounselorBo;
|
||||
import org.dromara.scale.domain.vo.CounselorVo;
|
||||
import org.dromara.scale.domain.Counselor;
|
||||
import org.dromara.scale.mapper.CounselorMapper;
|
||||
import org.dromara.scale.service.ICounselorService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 心理咨询师Service业务层处理
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class CounselorServiceImpl implements ICounselorService {
|
||||
|
||||
private final CounselorMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询心理咨询师
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 心理咨询师
|
||||
*/
|
||||
@Override
|
||||
public CounselorVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询心理咨询师列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 心理咨询师分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<CounselorVo> queryPageList(CounselorBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<Counselor> lqw = buildQueryWrapper(bo);
|
||||
Page<CounselorVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的心理咨询师列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 心理咨询师列表
|
||||
*/
|
||||
@Override
|
||||
public List<CounselorVo> queryList(CounselorBo bo) {
|
||||
LambdaQueryWrapper<Counselor> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<Counselor> buildQueryWrapper(CounselorBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<Counselor> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getName()), Counselor::getName, bo.getName());
|
||||
lqw.eq(bo.getPrice() != null, Counselor::getPrice, bo.getPrice());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getIntroduce()), Counselor::getIntroduce, bo.getIntroduce());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecialityField()), Counselor::getSpecialityField, bo.getSpecialityField());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCovers()), Counselor::getCovers, bo.getCovers());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增心理咨询师
|
||||
*
|
||||
* @param bo 心理咨询师
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(CounselorBo bo) {
|
||||
Counselor add = MapstructUtils.convert(bo, Counselor.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改心理咨询师
|
||||
*
|
||||
* @param bo 心理咨询师
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(CounselorBo bo) {
|
||||
Counselor update = MapstructUtils.convert(bo, Counselor.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(Counselor entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除心理咨询师信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
|
@ -1,23 +1,21 @@
|
|||
package org.dromara.scale.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.ScoreRecord;
|
||||
import org.dromara.scale.domain.bo.ScoreRecordBo;
|
||||
import org.dromara.scale.domain.vo.ScoreRecordVo;
|
||||
import org.dromara.scale.domain.ScoreRecord;
|
||||
import org.dromara.scale.mapper.ScoreRecordMapper;
|
||||
import org.dromara.scale.service.IScoreRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 评分Service业务层处理
|
||||
|
@ -94,19 +92,6 @@ public class ScoreRecordServiceImpl implements IScoreRecordService {
|
|||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改评分
|
||||
*
|
||||
* @param bo 评分
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ScoreRecordBo bo) {
|
||||
ScoreRecord update = MapstructUtils.convert(bo, ScoreRecord.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
|
@ -114,18 +99,4 @@ public class ScoreRecordServiceImpl implements IScoreRecordService {
|
|||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除评分信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
package org.dromara.scale.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.SysScaleOrder;
|
||||
import org.dromara.scale.domain.bo.SysScaleOrderBo;
|
||||
import org.dromara.scale.domain.vo.SysScaleOrderVo;
|
||||
import org.dromara.scale.mapper.SysScaleOrderMapper;
|
||||
import org.dromara.scale.service.ISysScaleOrderService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 量表订单Service业务层处理
|
||||
*
|
||||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class SysScaleOrderServiceImpl implements ISysScaleOrderService {
|
||||
|
||||
private final SysScaleOrderMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询量表订单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 量表订单
|
||||
*/
|
||||
@Override
|
||||
public SysScaleOrderVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询量表订单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 量表订单分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<SysScaleOrderVo> queryPageList(SysScaleOrderBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<SysScaleOrder> lqw = buildQueryWrapper(bo);
|
||||
Page<SysScaleOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的量表订单列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 量表订单列表
|
||||
*/
|
||||
@Override
|
||||
public List<SysScaleOrderVo> queryList(SysScaleOrderBo bo) {
|
||||
LambdaQueryWrapper<SysScaleOrder> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<SysScaleOrder> buildQueryWrapper(SysScaleOrderBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<SysScaleOrder> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getScaleId() != null, SysScaleOrder::getScaleId, bo.getScaleId());
|
||||
lqw.eq(bo.getBatchNo() != null, SysScaleOrder::getBatchNo, bo.getBatchNo());
|
||||
lqw.eq(bo.getOrderPrice() != null, SysScaleOrder::getOrderPrice, bo.getOrderPrice());
|
||||
lqw.eq(bo.getActualPrice() != null, SysScaleOrder::getActualPrice, bo.getActualPrice());
|
||||
lqw.eq(bo.getPayWay() != null, SysScaleOrder::getPayWay, bo.getPayWay());
|
||||
lqw.eq(bo.getUseStatus() != null, SysScaleOrder::getUseStatus, bo.getUseStatus());
|
||||
lqw.eq(bo.getOrderStatus() != null, SysScaleOrder::getOrderStatus, bo.getOrderStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增量表订单
|
||||
*
|
||||
* @param bo 量表订单
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(SysScaleOrderBo bo) {
|
||||
SysScaleOrder add = MapstructUtils.convert(bo, SysScaleOrder.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(SysScaleOrder entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
}
|
|
@ -100,7 +100,7 @@ public class SysScaleServiceImpl implements ISysScaleService {
|
|||
lqw.like(StringUtils.isNotBlank(bo.getScaleCode()), SysScale::getScaleCode, bo.getScaleCode());
|
||||
lqw.eq(bo.getStatus() != null, SysScale::getStatus, bo.getStatus());
|
||||
if (CollUtil.isNotEmpty(bo.getScaleType())) {
|
||||
lqw.like(CollUtil.isNotEmpty(bo.getScaleType()), SysScale::getScaleType, bo.getScaleType().get(0));
|
||||
lqw.like(SysScale::getScaleType, bo.getScaleType().get(0));
|
||||
}
|
||||
return lqw;
|
||||
}
|
||||
|
@ -146,4 +146,13 @@ public class SysScaleServiceImpl implements ISysScaleService {
|
|||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysScaleVo> queryWxList(String scaleType) {
|
||||
LambdaQueryWrapper<SysScale> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.like(SysScale::getScaleType, scaleType);
|
||||
lqw.orderByDesc(SysScale::getPublishNums);
|
||||
lqw.last("limit 2");
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.scale.mapper.SysScaleOrderMapper">
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue