Browse Source

签到打卡按钮,控制

master
zhangyongzhangyong 5 years ago
parent
commit
2444e10d07
  1. 8
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java
  2. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java

8
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActDetailResultDTO.java

@ -139,9 +139,13 @@ public class ResiActDetailResultDTO implements Serializable {
private Boolean isSignUp;
/**
* 用户是否已报名该活动 true用户已报名false用户未报名
* 用户报名活动后当前状态
* --已报名/待审核auditing
* -- 审核通过passed
* -- 未报名(审核不通过 取消报名)canceled
* --
*/
private Boolean isRegistration;
private String isRegistration;
/**
* 打卡开始时间yyyy-MM-dd HH:mm

12
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java

@ -221,12 +221,18 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
// 查询用户是否已报名活动
String status = actUserRelationDao.selectUserStatusByActIdAndUserId(formDto.getActId(), formDto.getUserId());
detailResultDTO.setIsRegistration(false);
// 默认用户 未报名活动
detailResultDTO.setIsRegistration(ActConstant.ACT_USER_LOG_OPER_CANCELD);
if (null != status){
if (ActConstant.ACT_USER_STATUS_PASSED.equals(status) || ActConstant.ACT_USER_STATUS_AUDITING.equals(status)){
detailResultDTO.setIsRegistration(true);
if (ActConstant.ACT_USER_STATUS_PASSED.equals(status)){
// 用户报名活动审核通过,赋值 审核通过
detailResultDTO.setIsRegistration(status);
} else if ( ActConstant.ACT_USER_STATUS_AUDITING.equals(status)){
// 用户报名活动未审核,赋值 已报名/待审核
detailResultDTO.setIsRegistration(status);
}
}
// 获取用户报名状态
String currentUserStatus = getCurrentUserStatus(formDto.getActId(), formDto.getUserId());
detailResultDTO.setCurrentUserStatus(currentUserStatus);

Loading…
Cancel
Save