Browse Source

heart-work:报名审核-概要统计v1

dev_shibei_match
yinzuomei 5 years ago
parent
commit
995837f5ab
  1. 61
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActSignUpStatResultDTO.java
  2. 20
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java
  3. 20
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java
  4. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java
  5. 49
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActUserRelationDao.java
  6. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java
  7. 43
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java
  8. 14
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java
  9. 56
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java
  10. 57
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActUserServiceImpl.java
  11. 13
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
  12. 57
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActUserRelationDao.xml
  13. 2
      epmet-user/epmet-user-server/pom.xml

61
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/ActSignUpStatResultDTO.java

@ -0,0 +1,61 @@
package com.epmet.dto.result.work;
import lombok.Data;
import java.io.Serializable;
/**
* 报名审核-概要统计 返参DTO
*
* @author yinzuomei@elink-cn.com
* @date 2020/7/22 16:44
*/
@Data
public class ActSignUpStatResultDTO implements Serializable {
private static final long serialVersionUID = 3218353394763939617L;
/**
* 活动id
*/
private String actId;
/**
* 活动标题
*/
private String title;
/**
* true:固定名额 false 不限制名额
*/
private Boolean actQuotaCategory;
/**
* 活动名额
*/
private Integer actQuota;
/**
* 剩余报名名额
*/
private Integer residueNum;
/**
* 待审核总人数
*/
private Integer auditingNum;
/**
* 已通过总人数
*/
private Integer passedNum;
/**
* 已拒绝总人数
*/
private Integer refusedNum;
/**
* 已取消总人数
*/
private Integer canceledNum;
/**
* 已报名待审核+已通过
*/
private Integer totalSignUp;
}

20
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java

@ -67,4 +67,24 @@ public interface ActConstant {
* 活动操作日志重新发布活动
*/
String ACT_OPER_TYPE_UPDATE="update";
/**
* (1)act_user_relation表的status已报名/待审核auditing
*/
String ACT_USER_STATUS_AUDITING="auditing";
/**
* (2)act_user_relation表的status审核通过passed
*/
String ACT_USER_STATUS_PASSED="passed";
/**
* (3)act_user_relation表的status审核不通过refused
*/
String ACT_USER_STATUS_REFUSED="refused";
/**
* (4)act_user_relation表的status取消报名canceld
*/
String ACT_USER_STATUS_CANCELD="canceld";
}

20
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActUserController.java

@ -3,10 +3,7 @@ package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.work.AuditingActUserFormDTO;
import com.epmet.dto.result.work.AuditingActUserResultDTO;
import com.epmet.dto.result.work.CanceledActUserResultDTO;
import com.epmet.dto.result.work.PassedActUserResultDTO;
import com.epmet.dto.result.work.RejectedActUserResultDTO;
import com.epmet.dto.result.work.*;
import com.epmet.service.WorkActUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -85,4 +82,19 @@ public class WorkActUserController {
List<CanceledActUserResultDTO> list=workActUserService.getCanceledList(formDTO);
return new Result<List<CanceledActUserResultDTO>>().ok(list);
}
/**
* @return com.epmet.commons.tools.utils.Result
* @param formDTO
* @author yinzuomei
* @description 报名审核-概要统计
* @Date 2020/7/22 16:43
**/
@PostMapping("signupstat")
public Result<ActSignUpStatResultDTO> getActSignUpStat(@RequestBody AuditingActUserFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, AuditingActUserFormDTO.AddUserInternalGroup.class);
ActSignUpStatResultDTO resultDTO=workActUserService.getActSignUpStat(formDTO.getActId());
return new Result<ActSignUpStatResultDTO>().ok(resultDTO);
}
}

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java

@ -23,6 +23,7 @@ import com.epmet.dto.form.resi.ResiActBaseFormDTO;
import com.epmet.dto.form.resi.ResiLatestActFormDTO;
import com.epmet.dto.form.resi.ResiMyActFormDTO;
import com.epmet.dto.result.resi.*;
import com.epmet.dto.result.work.ActSignUpStatResultDTO;
import com.epmet.entity.ActInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -174,4 +175,13 @@ public interface ActInfoDao extends BaseDao<ActInfoEntity> {
* @Date 17:39 2020-07-20
**/
ActInfoDTO queryActAccordingToActIdAndUserId(@Param("actId") String actId, @Param("userId") String userId);
/**
* @return com.epmet.dto.result.work.ActSignUpStatResultDTO
* @param actId
* @author yinzuomei
* @description 报名审核-概要统计:活动基本信息
* @Date 2020/7/22 17:08
**/
ActSignUpStatResultDTO getActSignUpStat(String actId);
}

49
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActUserRelationDao.java

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ActUserRelationDTO;
import com.epmet.entity.ActUserRelationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -34,56 +35,30 @@ import java.util.List;
public interface ActUserRelationDao extends BaseDao<ActUserRelationEntity> {
/**
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @param actId 活动id
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @author yinzuomei
* @description 根据活动id查询待审核人员关系记录
* @description 根据活动id当前状态已报名/待审核auditing审核通过passed审核不通过refused取消报名canceld查询待审核人员关系记录
* @Date 2020/7/21 22:41
**/
List<ActUserRelationDTO> selectAuditingUserList(String actId);
List<ActUserRelationDTO> selecUserList(@Param("actId") String actId,@Param("status") String status);
/**
* @return java.util.List<java.lang.String>
* @param actId 活动id
* @author yinzuomei
* @description 根据活动id查询待审核人员,返回用户id集合
* @Date 2020/7/21 22:45
**/
List<String> selectAuditingUserIds(String actId);
/**
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @param actId
* @author yinzuomei
* @description 根据活动id查询已通过人员关系记录
* @Date 2020/7/22 15:33
**/
List<ActUserRelationDTO> selectPassedList(String actId);
/**
* @return java.util.List<java.lang.String>
* @param actId
* @author yinzuomei
* @description 根据活动id查询已通过人员,返回用户id集合
* @Date 2020/7/22 15:38
**/
List<String> selectPassedListUserIds(String actId);
/**
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @param actId
* @author yinzuomei
* @description 根据活动id查询已拒绝人员关系记录
* @Date 2020/7/22 16:20
* @description 根据活动id当前状态已报名/待审核auditing审核通过passed审核不通过refused取消报名canceld返回用户id集合
* @Date 2020/7/21 22:45
**/
List<ActUserRelationDTO> selectRejectedList(String actId);
List<String> selectUserIdList(@Param("actId") String actId,@Param("status") String status);
/**
* @return java.util.List<java.lang.String>
* @return java.lang.Integer
* @param actId
* @param status
* @author yinzuomei
* @description 根据活动id查询已拒绝人员,返回用户id集合
* @Date 2020/7/22 16:20
* @description 根据活动id, 用户状态统计用户数eg:待审核总数审核通过总数已拒绝总数已取消报名总数
* @Date 2020/7/22 18:20
**/
List<String> selectRejectedListUserIds(String actId);
Integer selectCountUser(@Param("actId") String actId, @Param("status")String status);
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ActInfoEntity.java

@ -125,7 +125,7 @@ public class ActInfoEntity extends BaseEpmetEntity {
private Integer signInRadius;
/**
* 活动名额类型(0-不限名额1-固定名额)
* 活动名额类型(0(false)-不限名额1(true)-固定名额)
*/
private Boolean actQuotaCategory;

43
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java

@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.ActUserRelationDTO;
import com.epmet.entity.ActUserRelationEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@ -96,54 +97,30 @@ public interface ActUserRelationService extends BaseService<ActUserRelationEntit
/**
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @param actId
* @param status 当前状态已报名/待审核auditing审核通过passed审核不通过refused取消报名canceld
* @author yinzuomei
* @description 根据活动id查询待审核人员关系记录
* @Date 2020/7/21 22:40
**/
List<ActUserRelationDTO> getAuditingUserList(String actId);
List<ActUserRelationDTO> getUserList(@Param("actId") String actId,@Param("status") String status);
/**
* @return java.util.List<java.lang.String>
* @param actId
* @param status 当前状态已报名/待审核auditing审核通过passed审核不通过refused取消报名canceld
* @author yinzuomei
* @description 根据活动id查询待审核人员,返回用户id集合
* @Date 2020/7/21 22:44
**/
List<String> getAuditingUserIds(String actId);
List<String> getUserIdList(@Param("actId") String actId,@Param("status")String status);
/**
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @param actId
* @author yinzuomei
* @description 查询已通过的人员列表
* @Date 2020/7/22 15:31
**/
List<ActUserRelationDTO> getPassedList(String actId);
/**
* @return java.util.List<java.lang.String>
* @param actId
* @author yinzuomei
* @description 查询已通过的人员列表 userId集合
* @Date 2020/7/22 15:37
**/
List<String> getPassedListUserIds(String actId);
/**
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @param actId
* @author yinzuomei
* @description 查询已拒绝过的人员列表
* @Date 2020/7/22 16:19
**/
List<ActUserRelationDTO> getRejectedList(String actId);
/**
* @return java.util.List<java.lang.String>
* @return java.lang.Integer
* @param actId
* @param status
* @author yinzuomei
* @description 查询已拒绝的人员列表 userId集合
* @Date 2020/7/22 16:19
* @description 根据活动id,用户状态统计用户数
* @Date 2020/7/22 18:17
**/
List<String> getRejectedListUserIds(String actId);
Integer selectCountUser(@Param("actId") String actId, @Param("status") String status);
}

14
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActUserService.java

@ -1,10 +1,7 @@
package com.epmet.service;
import com.epmet.dto.form.work.AuditingActUserFormDTO;
import com.epmet.dto.result.work.AuditingActUserResultDTO;
import com.epmet.dto.result.work.CanceledActUserResultDTO;
import com.epmet.dto.result.work.PassedActUserResultDTO;
import com.epmet.dto.result.work.RejectedActUserResultDTO;
import com.epmet.dto.result.work.*;
import java.util.List;
@ -50,4 +47,13 @@ public interface WorkActUserService {
* @Date 2020/7/22 16:35
**/
List<CanceledActUserResultDTO> getCanceledList(AuditingActUserFormDTO formDTO);
/**
* @return com.epmet.dto.result.work.ActSignUpStatResultDTO
* @param actId
* @author yinzuomei
* @description 报名审核-概要统计
* @Date 2020/7/22 17:02
**/
ActSignUpStatResultDTO getActSignUpStat(String actId);
}

56
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java

@ -103,74 +103,42 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD
/**
* @param actId
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @author yinzuomei
* @description 根据活动id查询待审核人员关系记录
* @Date 2020/7/21 22:40
**/
@Override
public List<ActUserRelationDTO> getAuditingUserList(String actId) {
return baseDao.selectAuditingUserList(actId);
}
/**
* @param actId
* @return java.util.List<java.lang.String>
* @author yinzuomei
* @description 根据活动id查询待审核人员,返回用户id集合
* @Date 2020/7/21 22:44
**/
@Override
public List<String> getAuditingUserIds(String actId) {
return baseDao.selectAuditingUserIds(actId);
}
/**
* @param actId
* @param status 当前状态已报名/待审核auditing审核通过passed审核不通过refused取消报名canceld
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @author yinzuomei
* @description 查询已通过的人员列表
* @Date 2020/7/22 15:31
**/
@Override
public List<ActUserRelationDTO> getPassedList(String actId) {
return baseDao.selectPassedList(actId);
public List<ActUserRelationDTO> getUserList(String actId, String status) {
return baseDao.selecUserList(actId, status);
}
/**
* @param actId
* @param status 当前状态已报名/待审核auditing审核通过passed审核不通过refused取消报名canceld
* @return java.util.List<java.lang.String>
* @author yinzuomei
* @description 查询已通过的人员列表 userId集合
* @Date 2020/7/22 15:37
**/
@Override
public List<String> getPassedListUserIds(String actId) {
return baseDao.selectPassedListUserIds(actId);
public List<String> getUserIdList(String actId, String status) {
return baseDao.selectUserIdList(actId, status);
}
/**
* @param actId
* @return java.util.List<com.epmet.dto.ActUserRelationDTO>
* @param status
* @return java.lang.Integer
* @author yinzuomei
* @description 查询已拒绝过的人员列表
* @Date 2020/7/22 16:19
* @description 根据活动id, 用户状态统计用户数eg:待审核总数审核通过总数已拒绝总数已取消报名总数
* @Date 2020/7/22 18:17
**/
@Override
public List<ActUserRelationDTO> getRejectedList(String actId) {
return baseDao.selectRejectedList(actId);
public Integer selectCountUser(String actId, String status) {
return baseDao.selectCountUser(actId, status);
}
/**
* @param actId
* @return java.util.List<java.lang.String>
* @author yinzuomei
* @description 查询已拒绝的人员列表 userId集合
* @Date 2020/7/22 16:19
**/
@Override
public List<String> getRejectedListUserIds(String actId) {
return baseDao.selectRejectedListUserIds(actId);
}
}

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

@ -1,14 +1,13 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.ActConstant;
import com.epmet.dao.ActInfoDao;
import com.epmet.dto.ActUserRelationDTO;
import com.epmet.dto.HeartUserInfoDTO;
import com.epmet.dto.form.work.AuditingActUserFormDTO;
import com.epmet.dto.result.UserBaseInfoResultDTO;
import com.epmet.dto.result.work.AuditingActUserResultDTO;
import com.epmet.dto.result.work.CanceledActUserResultDTO;
import com.epmet.dto.result.work.PassedActUserResultDTO;
import com.epmet.dto.result.work.RejectedActUserResultDTO;
import com.epmet.dto.result.work.*;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.ActUserRelationService;
import com.epmet.service.HeartUserInfoService;
@ -36,7 +35,8 @@ public class WorkActUserServiceImpl implements WorkActUserService {
private HeartUserInfoService heartUserInfoService;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private ActInfoDao actInfoDao;
/**
* @param formDTO
* @return java.util.List<com.epmet.dto.result.work.AuditingActUserResultDTO>
@ -48,13 +48,13 @@ public class WorkActUserServiceImpl implements WorkActUserService {
public List<AuditingActUserResultDTO> getAuditingList(AuditingActUserFormDTO formDTO) {
List<AuditingActUserResultDTO> list=new ArrayList<>();
//查询出待审核的人员列表
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getAuditingUserList(formDTO.getActId());
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getUserList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_AUDITING);
if(null==actUserRelationDTOList||actUserRelationDTOList.size()==0){
logger.info(String.format("当前活动,actId=%s待审核列表为空",formDTO.getActId()));
return list;
}
//查询出待审核的人员id集合
List<String> userIdList=actUserRelationService.getAuditingUserIds(formDTO.getActId());
List<String> userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_AUDITING);
//根据待审核的人员集合,查询出用户基本信息
List<UserBaseInfoResultDTO> userInfoList=this.queryUserBaseInfo(userIdList);
for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){
@ -90,13 +90,13 @@ public class WorkActUserServiceImpl implements WorkActUserService {
public List<PassedActUserResultDTO> getPassedList(AuditingActUserFormDTO formDTO) {
List<PassedActUserResultDTO> resultList=new ArrayList<>();
//查询已通过的人员列表
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getPassedList(formDTO.getActId());
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getUserList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_PASSED);
if(null==actUserRelationDTOList||actUserRelationDTOList.size()==0){
logger.info(String.format("当前活动,actId=%s已通过列表为空",formDTO.getActId()));
return resultList;
}
//查询已通过审核的人员id集合
List<String> userIdList=actUserRelationService.getPassedListUserIds(formDTO.getActId());
List<String> userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_PASSED);
//根据已通过的人员集合,查询出用户基本信息
List<UserBaseInfoResultDTO> userInfoList=this.queryUserBaseInfo(userIdList);
for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){
@ -133,13 +133,13 @@ public class WorkActUserServiceImpl implements WorkActUserService {
public List<RejectedActUserResultDTO> getRejectedlist(AuditingActUserFormDTO formDTO) {
List<RejectedActUserResultDTO> resultList=new ArrayList<>();
//查询已拒绝的人员列表
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getRejectedList(formDTO.getActId());
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getUserList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_REFUSED);
if(null==actUserRelationDTOList||actUserRelationDTOList.size()==0){
logger.info(String.format("当前活动,actId=%s已拒绝列表为空",formDTO.getActId()));
return resultList;
}
//查询已拒绝审核的人员id集合
List<String> userIdList=actUserRelationService.getRejectedListUserIds(formDTO.getActId());
List<String> userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_REFUSED);
//根据已拒绝的人员集合,查询出用户基本信息
List<UserBaseInfoResultDTO> userInfoList=this.queryUserBaseInfo(userIdList);
for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){
@ -177,13 +177,13 @@ public class WorkActUserServiceImpl implements WorkActUserService {
public List<CanceledActUserResultDTO> getCanceledList(AuditingActUserFormDTO formDTO) {
List<CanceledActUserResultDTO> resultList=new ArrayList<>();
//查询已取消的人员列表
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getRejectedList(formDTO.getActId());
List<ActUserRelationDTO> actUserRelationDTOList=actUserRelationService.getUserList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_CANCELD);
if(null==actUserRelationDTOList||actUserRelationDTOList.size()==0){
logger.info(String.format("当前活动,actId=%s已取消报名列表为空",formDTO.getActId()));
return resultList;
}
//查询已取消审核的人员id集合
List<String> userIdList=actUserRelationService.getRejectedListUserIds(formDTO.getActId());
List<String> userIdList=actUserRelationService.getUserIdList(formDTO.getActId(), ActConstant.ACT_USER_STATUS_CANCELD);
//根据已取消的人员集合,查询出用户基本信息
List<UserBaseInfoResultDTO> userInfoList=this.queryUserBaseInfo(userIdList);
for(ActUserRelationDTO actUserRelationDTO:actUserRelationDTOList){
@ -210,6 +210,37 @@ public class WorkActUserServiceImpl implements WorkActUserService {
return resultList;
}
/**
* @param actId
* @return com.epmet.dto.result.work.ActSignUpStatResultDTO
* @author yinzuomei
* @description 报名审核-概要统计
* @Date 2020/7/22 17:02
**/
@Override
public ActSignUpStatResultDTO getActSignUpStat(String actId) {
ActSignUpStatResultDTO actInfo=actInfoDao.getActSignUpStat(actId);
if(null!=actInfo){
//待审核总人数
actInfo.setAuditingNum(actUserRelationService.selectCountUser(actId,ActConstant.ACT_USER_STATUS_AUDITING));
//已通过总人数
actInfo.setPassedNum(actUserRelationService.selectCountUser(actId,ActConstant.ACT_USER_STATUS_PASSED));
//已拒绝总人数
actInfo.setRefusedNum(actUserRelationService.selectCountUser(actId,ActConstant.ACT_USER_STATUS_REFUSED));
//已取消总人数
actInfo.setCanceledNum(actUserRelationService.selectCountUser(actId,ActConstant.ACT_USER_STATUS_CANCELD));
//true:固定名额 false: 不限制名额
if(actInfo.getActQuotaCategory()){
Integer totalSignUp=actInfo.getAuditingNum()+actInfo.getPassedNum();
actInfo.setTotalSignUp(totalSignUp);
//剩余报名名额
Integer residueNum=actInfo.getActQuota()-totalSignUp;
actInfo.setResidueNum(residueNum);
}
}
return actInfo;
}
private Boolean getVolunteerFlag(String userId) {
HeartUserInfoDTO heartUserInfoDTO=heartUserInfoService.getByUserId(userId);
//true: 是志愿者 false : 不是志愿者

13
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml

@ -362,4 +362,17 @@
AND i.ID = #{actId}
AND u.USER_ID = #{userId}
</select>
<select id="getActSignUpStat" resultType="com.epmet.dto.result.work.ActSignUpStatResultDTO" parameterType="java.lang.String">
SELECT
ai.id AS actId,
ai.TITLE AS title,
ai.ACT_QUOTA AS actQuota,
ai.ACT_QUOTA_CATEGORY AS actQuotaCategory
FROM
act_info ai
WHERE
ai.DEL_FLAG = '0'
AND ai.id =#{actId}
</select>
</mapper>

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

@ -25,79 +25,40 @@
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<!-- 根据活动id,查询待审核人员关系记录 -->
<select id="selectAuditingUserList" resultType="com.epmet.dto.ActUserRelationDTO" parameterType="java.lang.String">
<!-- 根据活动id,当前状态(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld,)查询待审核人员关系记录 -->
<select id="selecUserList" resultType="com.epmet.dto.ActUserRelationDTO" parameterType="map">
SELECT
aur.*
FROM
act_user_relation aur
WHERE
aur.DEL_FLAG = '0'
AND aur.`STATUS` = 'auditing'
AND aur.`STATUS` = #{status}
AND aur.ACT_ID = #{actId}
order by aur.CREATED_TIME desc
</select>
<!-- 根据活动id,查询待审核人员,返回用户id集合-->
<select id="selectAuditingUserIds" resultType="java.lang.String" parameterType="java.lang.String">
<!-- 根据活动id,当前状态(已报名/待审核auditing,审核通过passed,审核不通过refused取消报名canceld,)返回用户id集合 -->
<select id="selectUserIdList" resultType="java.lang.String" parameterType="map">
SELECT
distinct aur.USER_ID as userIds
FROM
act_user_relation aur
WHERE
aur.DEL_FLAG = '0'
AND aur.`STATUS` = 'auditing'
AND aur.`STATUS` =#{status}
AND aur.ACT_ID = #{actId}
order by aur.CREATED_TIME desc
</select>
<!-- 根据活动id,查询已通过人员关系记录 -->
<select id="selectPassedList" parameterType="java.lang.String" resultType="com.epmet.dto.ActUserRelationDTO">
SELECT
aur.*
FROM
act_user_relation aur
WHERE
aur.DEL_FLAG = '0'
AND aur.`STATUS` = 'passed'
AND aur.ACT_ID = #{actId}
order by aur.AUDIT_TIME desc
</select>
<!-- 根据活动id,查询已通过人员,返回用户id集合 -->
<select id="selectPassedListUserIds" resultType="java.lang.String" parameterType="java.lang.String">
SELECT
distinct aur.USER_ID as userIds
FROM
act_user_relation aur
WHERE
aur.DEL_FLAG = '0'
AND aur.`STATUS` = 'passed'
AND aur.ACT_ID = #{actId}
order by aur.AUDIT_TIME desc
</select>
<!-- 根据活动id,查询已拒绝人员关系记录 -->
<select id="selectRejectedList" parameterType="java.lang.String" resultType="com.epmet.dto.ActUserRelationDTO">
SELECT
aur.*
FROM
act_user_relation aur
WHERE
aur.DEL_FLAG = '0'
AND aur.`STATUS` = 'refused'
AND aur.ACT_ID = #{actId}
order by aur.AUDIT_TIME desc
</select>
<!-- 根据活动id,查询已拒绝人员,返回用户id集合 -->
<select id="selectRejectedListUserIds" resultType="java.lang.String" parameterType="java.lang.String">
<select id="selectCountUser" resultType="java.lang.Integer" parameterType="map">
SELECT
distinct aur.USER_ID as userIds
COUNT(1) AS TOTAL
FROM
act_user_relation aur
WHERE
aur.DEL_FLAG = '0'
AND aur.`STATUS` = 'refused'
AND aur.`STATUS` =#{status}
AND aur.ACT_ID = #{actId}
order by aur.AUDIT_TIME desc
</select>
</mapper>

2
epmet-user/epmet-user-server/pom.xml

@ -137,7 +137,7 @@
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.register-enabled>false</nacos.register-enabled>
<nacos.server-addr>122.152.200.70:8848</nacos.server-addr>
<nacos.discovery.namespace>fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>

Loading…
Cancel
Save