Browse Source

historicalact接口修改

master
yinzuomei 5 years ago
parent
commit
c8063455e7
  1. 23
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/UserHistoricalActInfoDTO.java
  2. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java
  3. 24
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml

23
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/UserHistoricalActInfoDTO.java

@ -53,4 +53,27 @@ public class UserHistoricalActInfoDTO implements Serializable {
* 已处理: handled; 默认"",重新处理时reward_flag置为空字符串
*/
private String processFlag;
// 新增以下参数
/**
* 活动状态
已发布/报名中published
已取消canceled;
已结束finished
*/
private String actStatus;
/**
* 当前状态已报名/待审核auditing
审核通过passed
审核不通过refused
取消报名canceled
*/
private String userActStatus;
/**
* true已签到false未签到
*/
private Boolean signInFlag;
}

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java

@ -359,7 +359,11 @@ public class WorkActUserServiceImpl implements WorkActUserService {
resultDTO.setSignUpActNum(historicalActInfo.getSignUpActNum());
resultDTO.setObtainPointsActNum(historicalActInfo.getObtainPointsActNum());
//历史活动列表
resultDTO.setActInfoList(actUserRelationDao.selectAllByUserId(formDTO.getUserId()));
List<UserHistoricalActInfoDTO> actInfoList=actUserRelationDao.selectAllByUserId(formDTO.getUserId());
for(UserHistoricalActInfoDTO userHistoricalActInfoDTO:actInfoList){
}
resultDTO.setActInfoList(actInfoList);
return resultDTO;
}

24
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml

@ -138,7 +138,7 @@
<!-- 根据userId,查询参与活动记录 -->
<select id="selectAllByUserId" resultType="com.epmet.dto.result.work.UserHistoricalActInfoDTO" parameterType="java.lang.String">
SELECT
SELECT
acr.ACT_ID AS actId,
ACR.USER_ID AS userId,
ai.TITLE AS title,
@ -148,17 +148,27 @@
acr.REWARD_FLAG AS rewardFlag,
acr.DENY_REWARD_REASON AS denyRewardReason,
acr.PROCESS_FLAG AS processFlag,
(select CREATED_TIME
from act_sign_in_rec ar
where ar.ACT_ID=acr.ACT_ID
and ar.USER_ID=acr.USER_ID
order by ar.CREATED_TIME asc limit 1) as signInTime
(
SELECT
CREATED_TIME
FROM
act_sign_in_rec ar
WHERE
ar.ACT_ID = acr.ACT_ID
AND ar.USER_ID = acr.USER_ID
ORDER BY
ar.CREATED_TIME ASC
LIMIT 1
) AS signInTime,
ai.ACT_STATUS AS actStatus,
acr.STATUS AS userActStatus,
( CASE acr.SIGN_IN_FLAG WHEN 'signed_in' THEN 1 ELSE 0 END ) AS signInFlag
FROM
act_user_relation acr
LEFT JOIN act_info ai ON ( acr.ACT_ID = ai.id )
WHERE
acr.DEL_FLAG = '0'
AND acr.USER_ID = #{userId}
AND acr.USER_ID =#{userId}
ORDER BY
acr.CREATED_TIME DESC
</select>

Loading…
Cancel
Save