فهرست منبع

修复赛事bug

zhangxin 3 هفته پیش
والد
کامیت
97b2013bc9

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppOrderMapper.xml

@@ -187,7 +187,7 @@
     <select id="findByProductIds" resultType="java.lang.Long">
         select count(1) from  nm_order where order_status in (0,1) and type =1 and product_ids in
         <foreach collection="productIds" item="productId" open="(" separator="," close=")">
-            #{productId}
+            #{productId.id}
         </foreach>
     </select>
 </mapper>

+ 3 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppGameServiceImpl.java

@@ -105,6 +105,9 @@ public class AppGameServiceImpl extends ServiceImpl<AppGameMapper, AppGame> impl
         if (null == dbGame) throw new JeecgBootException("未找到对应数据", SC_INTERNAL_SERVER_ERROR_500);
 
         List<AppGameRuleDTO> byGameId = rulesMapper.findByGameId(dbGame.getId());
+        if(byGameId==null||byGameId.isEmpty()){
+            throw new JeecgBootException("该赛事的比赛项目与价格为空", SC_INTERNAL_SERVER_ERROR_500);
+        }
         Long orderNum=  appOrderMapper.findByProductIds(byGameId);
         if (orderNum>0){
             throw new JeecgBootException("该赛事已存在报名不允许修改", SC_INTERNAL_SERVER_ERROR_500);