diff --git a/src/main/java/com/gxwebsoft/clinic/entity/ClinicAppointment.java b/src/main/java/com/gxwebsoft/clinic/entity/ClinicAppointment.java index 462dcf7..c38ae8d 100644 --- a/src/main/java/com/gxwebsoft/clinic/entity/ClinicAppointment.java +++ b/src/main/java/com/gxwebsoft/clinic/entity/ClinicAppointment.java @@ -43,6 +43,10 @@ public class ClinicAppointment implements Serializable { @TableField(exist = false) private String doctorName; + @Schema(description = "医生职位") + @TableField(exist = false) + private String doctorPosition; + @Schema(description = "患者") private Integer userId; diff --git a/src/main/java/com/gxwebsoft/clinic/mapper/xml/ClinicAppointmentMapper.xml b/src/main/java/com/gxwebsoft/clinic/mapper/xml/ClinicAppointmentMapper.xml index c4ba8bb..5aee909 100644 --- a/src/main/java/com/gxwebsoft/clinic/mapper/xml/ClinicAppointmentMapper.xml +++ b/src/main/java/com/gxwebsoft/clinic/mapper/xml/ClinicAppointmentMapper.xml @@ -4,7 +4,7 @@ - SELECT a.*, b.nickname, b.phone, c.real_name as doctorName + SELECT a.*, b.nickname, b.phone, c.real_name as doctorName, c.position as doctorPosition FROM clinic_appointment a LEFT JOIN gxwebsoft_core.sys_user b ON a.user_id = b.user_id LEFT JOIN clinic_doctor_user c ON a.doctor_id = c.user_id diff --git a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleController.java b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleController.java index 98419cc..46478af 100644 --- a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleController.java +++ b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleController.java @@ -83,7 +83,10 @@ public class CmsArticleController extends BaseController { public ApiResult get(@PathVariable("id") @NotNull Integer id) { final CmsArticle article = cmsArticleService.getByIdRel(id); if (ObjectUtil.isNotEmpty(article)) { - return success(article); + final CmsArticleContent item = articleContentService.getByIdRel(article.getArticleId()); + if (ObjectUtil.isNotEmpty(item)) { + article.setContent(item.getContent()); + } } return fail("文章ID不存在",null); } @@ -92,6 +95,12 @@ public class CmsArticleController extends BaseController { @GetMapping("/getByCode/{code}") public ApiResult getByCode(@PathVariable("code") String code) { final CmsArticle article = cmsArticleService.getByIdCode(code); + if (ObjectUtil.isNotEmpty(article)) { + final CmsArticleContent item = articleContentService.getByIdRel(article.getArticleId()); + if (ObjectUtil.isNotEmpty(item)) { + article.setContent(item.getContent()); + } + } return success(article); } diff --git a/src/main/java/com/gxwebsoft/cms/service/impl/CmsArticleContentServiceImpl.java b/src/main/java/com/gxwebsoft/cms/service/impl/CmsArticleContentServiceImpl.java index a2a0faf..36f47c6 100644 --- a/src/main/java/com/gxwebsoft/cms/service/impl/CmsArticleContentServiceImpl.java +++ b/src/main/java/com/gxwebsoft/cms/service/impl/CmsArticleContentServiceImpl.java @@ -61,7 +61,7 @@ public class CmsArticleContentServiceImpl extends ServiceImpl - SELECT a.* + SELECT a.*,b.image FROM hjm_violation a LEFT JOIN hjm_car b ON a.code = b.code LEFT JOIN gxwebsoft_core.sys_organization c ON b.organization_id = c.organization_id @@ -57,6 +57,7 @@ AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + OR a.code = #{param.keywords} )