Selaa lähdekoodia

新增了已结束训练营不可再导入人员,修改了校验人员是否参加其他未结束的训练的规则

Pota1ovO 2 vuotta sitten
vanhempi
commit
9772f33a6a

+ 4 - 2
kxs-system/kxs-system-biz/src/main/java/com/kxs/system/biz/service/impl/KxsCampServiceImpl.java

@@ -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() + "创客未实名!");
                 }

+ 3 - 1
kxs-system/kxs-system-biz/src/main/resources/mapper/KxsCampMapper.xml

@@ -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>
     </select>