@@ -137,10 +137,12 @@ public class KxsCampServiceImpl extends ServiceImpl<KxsCampMapper, KxsCamp> impl
if(kxsCamp == null){
return R.failed(excel.getCampId() + "训练营编号不存在,请重新上传!");
}
-
+ if (kxsCamp.getStatus() == 2){
+ return R.failed(excel.getCampId() + "该训练营已结束,无法再参与");
+ }
if (Objects.isNull(user)) {
errorMsg.add(excel.getUserCode() + "创客未找到!");
- }else{
+ } else {
if(user.getRealStatus() != 1){
errorMsg.add(excel.getUserCode() + "创客未实名!");
@@ -38,6 +38,8 @@
group by a.id
order by id desc
</select>
+
<select id="selectByUserId" resultType="com.kxs.system.api.model.KxsCampUser">
SELECT a.id, a.status, a.camp_num, a.camp_type, a.pic_url, a.title
from kxs_camp a
@@ -45,7 +47,7 @@
<where>
and a.del_flag = 0
and b.user_id = #{userId}
- and a.end_time <![CDATA[ >= ]]> #{now}
+ and a.status != 2
</where>