소스 검색

* 小程序变更

chen.cheng 10 달 전
부모
커밋
bba14504a8

+ 5 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/cp/CpsUsrApplyController.java

@@ -72,6 +72,11 @@ public class CpsUsrApplyController extends BaseController
         return success(cpsUsrApplyService.selectCpsUsrApplyByTel());
     }
 
+    @GetMapping(value = "/info/meeting/{type}")
+    public AjaxResult getUsrThemeMeetingInfo(@PathVariable("type") String type) {
+        return success(cpsUsrApplyService.selectCpsUsrApplyThemeMeeting(type));
+    }
+
     /**
      * 新增cps_usr_apply与会申请
      */

+ 2 - 2
ruoyi-common/src/main/java/com/ruoyi/common/enums/MeetingType.java

@@ -17,13 +17,13 @@ public enum MeetingType {
      *
      * @author chen.cheng
      */
-    CONFERENCE("2", "会场报名"),
+    CONFERENCE("2", "会场调研"),
     /**
      * Theme meeting type.
      *
      * @author chen.cheng
      */
-    THEME("3", "主题报名");
+    THEME("3", "主题研讨");
 
     /**
      * The Code.

+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/CpsUsrApply.java

@@ -68,6 +68,8 @@ public class CpsUsrApply extends BaseEntity
     @Excel(name = "与会内容")
     private Long contentId;
 
+    private CpsContentInfo content;
+
     public void setId(Long id)
     {
         this.id = id;
@@ -195,6 +197,14 @@ public class CpsUsrApply extends BaseEntity
         return contentId;
     }
 
+    public CpsContentInfo getContent() {
+        return content;
+    }
+
+    public void setContent(CpsContentInfo content) {
+        this.content = content;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ICpsUsrApplyService.java

@@ -21,6 +21,8 @@ public interface ICpsUsrApplyService
 
     CpsUsrApply selectCpsUsrApplyByTel();
 
+    CpsUsrApply selectCpsUsrApplyThemeMeeting(String meetType);
+
     /**
      * 查询cps_usr_apply与会申请列表
      *

+ 21 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CpsUsrApplyServiceImpl.java

@@ -1,15 +1,17 @@
 package com.ruoyi.system.service.impl;
 
-import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.core.domain.model.WeChatUser;
 import com.ruoyi.common.enums.MeetingType;
 import com.ruoyi.common.enums.ReviewStatus;
 import com.ruoyi.common.enums.SysYesNo;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.CpsContentInfo;
 import com.ruoyi.system.domain.CpsUsrApply;
+import com.ruoyi.system.mapper.CpsContentInfoMapper;
 import com.ruoyi.system.mapper.CpsUsrApplyMapper;
 import com.ruoyi.system.service.ICpsUsrApplyService;
+import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -27,6 +29,9 @@ public class CpsUsrApplyServiceImpl implements ICpsUsrApplyService {
     @Autowired
     private CpsUsrApplyMapper cpsUsrApplyMapper;
 
+    @Autowired
+    private CpsContentInfoMapper cpsContentInfoMapper;
+
     /**
      * 查询cps_usr_apply与会申请
      *
@@ -44,6 +49,21 @@ public class CpsUsrApplyServiceImpl implements ICpsUsrApplyService {
         return cpsUsrApplyMapper.selectCpsUsrApplyByTel(loginUser.getTel(), MeetingType.MEETING.getCode());
     }
 
+    @Override
+    public CpsUsrApply selectCpsUsrApplyThemeMeeting(String meetType) {
+        WeChatUser loginUser = (WeChatUser) SecurityUtils.getLoginUser();
+        CpsUsrApply cpsUsrApply = cpsUsrApplyMapper.selectCpsUsrApplyByTel(loginUser.getTel(), meetType);
+        if (ObjectUtils.isEmpty(cpsUsrApply) || ObjectUtils.isEmpty(cpsUsrApply.getContentId())) {
+            return null;
+        }
+        CpsContentInfo cpsContentInfo = cpsContentInfoMapper.selectCpsContentInfoById(cpsUsrApply.getContentId());
+        if (ObjectUtils.isEmpty(cpsContentInfo)) {
+            return null;
+        }
+        cpsUsrApply.setContent(cpsContentInfo);
+        return cpsUsrApply;
+    }
+
     /**
      * 查询cps_usr_apply与会申请列表
      *