foreach控制循环if判断
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <c:forEach items= "${resultMap}" var= "daily" varStatus= "n" > <tr class = "<c:choose><c:when test=" ${n.index % 2 == 0 } ">row-even</c:when><c:otherwise>row-odd</c:otherwise></c:choose>" > <td> ${chMap[daily.key]} </td> <c:forEach items= "${headData}" var= "hdata" > <c:set var= "endFlag" value= "1" /> <c:forEach items= "${daily.value}" var= "order" varStatus= "st" > <c: if test= "${hdata==order.productName}" > <td> ${order.orderNum} </td> <td> <fmt:formatNumber value= "${order.allPayAmount/100 }" pattern= "0.00" /> </td> <c:set var= "endFlag" value= "2" ></c:set> </c: if > <c: if test= "${(st.index+1)==fn:length(daily.value) && endFlag!=2}" > <td> 0 </td> <td> 0.00 </td> </c: if > </c:forEach> </c:forEach> </c:forEach> |
愿你眼中有光芒,活成你想要的模样
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步