diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActRegistrationResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActRegistrationResultDTO.java
new file mode 100644
index 0000000000..14e8cbd9b3
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/resi/ResiActRegistrationResultDTO.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto.result.resi;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+/**
+ * 活动内容
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-19
+ */
+@Data
+public class ResiActRegistrationResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 编码
+ */
+ private Integer flag;
+
+ /**
+ * 提示信息
+ */
+ private String tip;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
index 54f4d3a219..df911d5ab5 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
+++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
@@ -2,7 +2,7 @@ version: "3.7"
services:
epmet-heart-server:
container_name: epmet-heart-server-dev
- image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.17
+ image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.18
ports:
- "8111:8111"
network_mode: host # 使用现有网络
diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml
index e551f4bc82..af9cf135ba 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml
+++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml
@@ -2,7 +2,7 @@
4.0.0
- 0.0.17
+ 0.0.18
com.epmet
epmet-heart
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java
index 73605d19a9..046a2c6854 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiActListController.java
@@ -294,12 +294,12 @@ public class ResiActListController {
*
* @param tokenDto
* @param formDTO
- * @return com.epmet.commons.tools.utils.Result
+ * @return com.epmet.commons.tools.utils.Result
* @Author zhangyong
* @Date 16:26 2020-07-28
**/
@PostMapping("registration")
- public Result registration(@LoginUser TokenDto tokenDto, @RequestBody ResiActRegistrationFormDTO formDTO) {
+ public Result registration(@LoginUser TokenDto tokenDto, @RequestBody ResiActRegistrationFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, ResiActRegistrationFormDTO.AddUserInternalGroup.class);
return actUserRelationService.registration(tokenDto, formDTO);
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java
index f77b373208..91ec9355da 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/ActUserRelationService.java
@@ -24,6 +24,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.ActUserRelationDTO;
import com.epmet.dto.form.resi.ResiActRegistrationFormDTO;
import com.epmet.dto.form.resi.ResiActUserCancelSignUpFormDTO;
+import com.epmet.dto.result.resi.ResiActRegistrationResultDTO;
import com.epmet.entity.ActUserRelationEntity;
import org.apache.ibatis.annotations.Param;
@@ -145,9 +146,9 @@ public interface ActUserRelationService extends BaseService
* @Author zhangyong
- * @Date 15:54 2020-07-28
+ * @Date 17:14 2020-07-30
**/
- Result registration(TokenDto tokenDto, ResiActRegistrationFormDTO formDTO);
+ Result registration(TokenDto tokenDto, ResiActRegistrationFormDTO formDTO);
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java
index e9e675b7e4..f8c48c27a5 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActUserRelationServiceImpl.java
@@ -39,6 +39,7 @@ import com.epmet.dto.ActUserRelationDTO;
import com.epmet.dto.form.resi.ResiActRegistrationFormDTO;
import com.epmet.dto.form.resi.ResiActUserCancelSignUpFormDTO;
import com.epmet.dto.result.UserRoleResultDTO;
+import com.epmet.dto.result.resi.ResiActRegistrationResultDTO;
import com.epmet.entity.ActUserLogEntity;
import com.epmet.entity.ActUserRelationEntity;
import com.epmet.entity.HeartUserInfoEntity;
@@ -195,7 +196,7 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl registration(TokenDto tokenDto, ResiActRegistrationFormDTO formDTO) {
formDTO.setUserId(tokenDto.getUserId());
boolean satisfy = false;
@@ -221,12 +222,18 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl().ok(dto);
}
} else {
// 不满足,提示用户去认证志愿者
logger.info(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER);
- throw new RenException(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER.getCode());
+ ResiActRegistrationResultDTO dto = new ResiActRegistrationResultDTO();
+ dto.setFlag(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER.getCode());
+ dto.setTip(EpmetErrorCode.NON_CERTIFIED_VOLUNTEER.getMsg());
+ return new Result().ok(dto);
}
return new Result();
}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
index 75d62f1059..957e8f9dfb 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml
@@ -142,7 +142,7 @@
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'in_progress' AS actCurrentState, -- 活动状态:进行中
- IF(u.USER_ID = #{userId},'1','0') as signupFlag -- 用户报名状态(0-未报名,1已报名)
+ IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag
FROM act_info i
LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0'
LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` = 'passed' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID
@@ -168,7 +168,7 @@
i.ACT_QUOTA actQuota,
IFNULL(c.signupNum, 0) signupNum, -- 已报名人数
'finished' AS actCurrentState, -- 活动状态:已结束
- IF(u.USER_ID = #{userId},'1','0') as signupFlag -- 用户报名状态(0-未报名,1已报名)
+ IF(u.USER_ID = #{userId},'signed_up','no_signed_up') as signupFlag
FROM act_info i
LEFT JOIN act_user_relation u ON i.ID = u.ACT_ID AND U.DEL_FLAG = '0'
LEFT JOIN (SELECT count(1) signupNum, re.ACT_ID from act_user_relation re WHERE re.DEL_FLAG = '0' AND re.`STATUS` = 'passed' GROUP BY re.ACT_ID) c ON c.ACT_ID = i.ID