chen.cheng 10 сар өмнө
parent
commit
2fc89b6c76

+ 13 - 3
ruoyi-system/src/main/java/com/ruoyi/system/domain/CpsUsrApply.java

@@ -1,9 +1,9 @@
 package com.ruoyi.system.domain;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
  * cps_usr_apply与会申请对象 cps_usr_apply
@@ -65,8 +65,9 @@ public class CpsUsrApply extends BaseEntity
     private Long usrWechatId;
 
     /** 与会内容 */
-    @Excel(name = "与会内容")
     private Long contentId;
+    @Excel(name = "与会内容")
+    private String contentTitle;
 
     private CpsContentInfo content;
 
@@ -205,6 +206,15 @@ public class CpsUsrApply extends BaseEntity
         this.content = content;
     }
 
+
+    public String getContentTitle() {
+        return contentTitle;
+    }
+
+    public void setContentTitle(String contentTitle) {
+        this.contentTitle = contentTitle;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 6 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CpsMeetingUsrServiceImpl.java

@@ -13,6 +13,7 @@ import com.ruoyi.system.domain.CpsContentInfo;
 import com.ruoyi.system.domain.CpsMeetingEnterpriseTripInfo;
 import com.ruoyi.system.domain.CpsMeetingUsr;
 import com.ruoyi.system.domain.CpsUsrApply;
+import com.ruoyi.system.mapper.CpsContentInfoMapper;
 import com.ruoyi.system.mapper.CpsMeetingEnterpriseTripInfoMapper;
 import com.ruoyi.system.mapper.CpsMeetingUsrMapper;
 import com.ruoyi.system.mapper.CpsUsrApplyMapper;
@@ -48,6 +49,9 @@ public class CpsMeetingUsrServiceImpl implements ICpsMeetingUsrService {
     private CpsUsrApplyMapper cpsUsrApplyMapper;
 
     @Autowired
+    private CpsContentInfoMapper contentInfoMapper;
+
+    @Autowired
     private ScheduledExecutorService executor;
 
     /**
@@ -189,6 +193,8 @@ public class CpsMeetingUsrServiceImpl implements ICpsMeetingUsrService {
         user.setReviewState(ReviewStatus.WAIT.getCode());
         user.setUsrWechatId(loginUser.getUserId());
         if (SysYesNo.YES.getCode().equals(user.getConferenceFlag())) {
+            CpsContentInfo cpsContentInfo = contentInfoMapper.selectCpsContentInfoById(user.getContentId());
+            user.setContentTitle(cpsContentInfo.getTitle());
             user.setApplyType(MeetingType.CONFERENCE.getCode());
             user.setConferenceFlag(SysYesNo.NO.getCode());
             cpsUsrApplyMapper.insertCpsUsrApplyOrUpdate(user);

+ 27 - 1
ruoyi-system/src/main/resources/mapper/cp/CpsUsrApplyMapper.xml

@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="reviewMsg"    column="review_msg"    />
         <result property="usrWechatId"    column="usr_wechat_id"    />
         <result property="contentId"    column="content_id"    />
+        <result property="contentTitle" column="content_title"/>
         <result property="updateTime"    column="update_time"    />
         <result property="createTime"    column="create_time"    />
         <result property="createBy"    column="create_by"    />
@@ -26,7 +27,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectCpsUsrApplyVo">
-        select id, usr_name, tel, org_unit_name, uni_level, email, usr_type, conference_flag, conference_rel, apply_type, review_state, review_msg, usr_wechat_id, content_id, update_time, create_time, create_by, update_by from cps_usr_apply
+        select id,
+               usr_name,
+               tel,
+               org_unit_name,
+               uni_level,
+               email,
+               usr_type,
+               conference_flag,
+               conference_rel,
+               apply_type,
+               review_state,
+               review_msg,
+               usr_wechat_id,
+               content_id,
+               content_title,
+               update_time,
+               create_time,
+               create_by,
+               update_by
+        from cps_usr_apply
     </sql>
 
     <select id="selectCpsUsrApplyList" parameterType="com.ruoyi.system.domain.CpsUsrApply" resultMap="CpsUsrApplyResult">
@@ -69,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reviewMsg != null">review_msg,</if>
             <if test="usrWechatId != null">usr_wechat_id,</if>
             <if test="contentId != null">content_id,</if>
+            <if test="contentTitle !=null">content_title,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="createTime != null">create_time,</if>
             <if test="createBy != null">create_by,</if>
@@ -88,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reviewMsg != null">#{reviewMsg},</if>
             <if test="usrWechatId != null">#{usrWechatId},</if>
             <if test="contentId != null">#{contentId},</if>
+            <if test="contentTitle !=null">#{contentTitle},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -111,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reviewMsg != null">review_msg,</if>
             <if test="usrWechatId != null">usr_wechat_id,</if>
             <if test="contentId != null">content_id,</if>
+            <if test="contentTitle !=null">content_title,</if>
             <if test="createBy != null">create_by,</if>
             <if test="updateBy != null">update_by,</if>
             update_time,
@@ -130,6 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reviewMsg != null">#{reviewMsg},</if>
             <if test="usrWechatId != null">#{usrWechatId},</if>
             <if test="contentId != null">#{contentId},</if>
+            <if test="contentTitle !=null">#{contentTitle},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="updateBy != null">#{updateBy},</if>
             now(),
@@ -149,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reviewMsg != null">review_msg = VALUES(review_msg),</if>
             <if test="usrWechatId != null">usr_wechat_id = VALUES(usr_wechat_id),</if>
             <if test="contentId != null">content_id = VALUES(content_id),</if>
+            <if test="contentTitle !=null">content_title = VALUES(content_title),</if>
             <if test="updateBy != null">update_by = VALUES(update_by),</if>
             conference_rel = VALUES(conference_rel),
             update_time = now()
@@ -171,6 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="reviewMsg != null">review_msg = #{reviewMsg},</if>
             <if test="usrWechatId != null">usr_wechat_id = #{usrWechatId},</if>
             <if test="contentId != null">content_id = #{contentId},</if>
+            <if test="contentTitle !=null">content_title = #{contentTitle},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="createBy != null">create_by = #{createBy},</if>