查看消费明细的功能该如何实现呢?
这是我完成第一步的效果
<table border="1">
<tr>
<th>用户ID</th>
<th>客人姓名</th>
<th>用餐时间</th>
<th>消费金额</th>
<th>操作</th>
</tr>
<c:forEach items="${list }" var="u">
<tr>
<td>${u.id }</td>
<td>${u.username }</td>
<td>${u.otime+u.ctime+u.etime }</td>
<c:if test="${u.otime+u.ctime+u.etime>60}">
<td>${(u.otime+u.ctime+u.etime-60-u.cid*15)*5+u.price}</td>
</c:if>
<c:if test="${u.otime+u.ctime+u.etime<60}">
<td>${u.price }</td>
</c:if>
<td>
<button onclick="look(${u.id })">查看消费明细</button>
</td>
</tr>
</c:forEach>
</table>
//xml部分查询的sql
<select id="findInfo" resultType="com.ln.pojo.Shop">
SELECT a.*,GROUP_CONCAT(m.course) course,sum(m.otime) otime,sum(m.price) price,COUNT(m.cid) cid FROM admin a
LEFT JOIN admin_menu am on a.id=am.id
LEFT JOIN menu m on am.cid=m.cid
GROUP BY a.id
</select>