Skip to content

Commit

Permalink
for UE
Browse files Browse the repository at this point in the history
  • Loading branch information
leedar360 committed Oct 15, 2015
1 parent 204cbc4 commit afc44f2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,16 @@ public Object preOrder(@RequestParam String gameName, @RequestParam long gameId,
//接受微信支付成功通知
//获取要访问的请求路径,作为微信登录的回调路径
StringBuffer requestUrl = request.getRequestURL();
log.debug("preOrder requestUrl is ---> " + requestUrl);
String domain = requestUrl.delete(requestUrl.length() - request.getRequestURI().length(), requestUrl.length()) + request.getServletContext().getContextPath();
log.debug("preOrder domain is ---> " + domain);
StringBuilder orderUrl = new StringBuilder();
GameApply ga = gayService.getApplyByGameIdAndCreatorId(gameId, currentUser.getId());
log.debug("preOrder orderUrl is ---> " + orderUrl);
log.debug("preOrder gameId is ---> " + gameId);
log.debug("preOrder currentUser is ---> " + currentUser.getId());

GameApply ga = (GameApply)gayService.getApplyByGameIdAndCreatorId(gameId, currentUser.getId());
log.debug("preOrder GameApply teamid is ---> " + String.valueOf(ga.getTeamId()));
orderUrl.append(domain).append("/site/wechat/createOrder/").append(gameId).append("/").append(ga.getTeamId())
.append("/").append(currentUser.getId()).append("/").append(fee).append("/").append(orderNo);
log.info("微信支付成功后回调路径:{}",orderUrl);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/zmsport/iyuesai/mapper/gameApply.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</select>

<select id="getMyGames" parameterType="long" resultType="java.util.HashMap">
SELECT ga.id,ga.gameId,ga.status,g.name,g.fee,g.location,g.duration, ga.creatorId, g.pic FROM t_userTeam ut, t_game g, t_gameApply ga WHERE ut.uid=#{uid} AND ut.status=1 AND ut.tid=ga.teamId AND g.id=ga.gameId ORDER BY g.createTime DESC
SELECT ga.id,ga.gameId,ga.status,g.name,g.fee,g.location,g.duration, ga.creatorId, g.pic FROM t_userTeam ut, t_game g, t_gameApply ga WHERE ut.uid=#{uid} AND ga.creatorId=#{uid} AND ut.status=1 AND ut.tid=ga.teamId AND g.id=ga.gameId ORDER BY g.createTime DESC
</select>

<insert id="insert" parameterType="gameApply" useGeneratedKeys="true" keyProperty="id">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public interface GameApplyService {
* @return
*/
public List<Map> getMyGames(long uid);

/**
* 删除用户相关信息
* @param creatorId
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/site/pages/me.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<i ><span class="red_del"><a href="<c:url value="/site/game/deleteGameApply/${game.id }/${game.gameId }" />">取消报名</a></span> </i></p>
</c:when>
<c:when test="${game.status == 1 }">
<p><i class="lv_zhf"><span><a href="javascript:PageUtil.pay('<c:url value="/site/pages/pay.html?gameName=" /><c:out value="${game.name }" />&gameId=<c:out value="${game.id }" />&fee=<c:out value="${game.fee }" />',<c:out value="${game.creatorId }" />,<c:out value="${user.id }" />);void 0;">去支付</a></span></i></p>
<p><i class="lv_zhf"><span><a href="javascript:PageUtil.pay('<c:url value="/site/pages/pay.html?gameName=" /><c:out value="${game.name }" />&gameId=<c:out value="${game.gameId }" />&fee=<c:out value="${game.fee }" />','<c:out value="${game.creatorId }" />', '<c:out value="${user.id }" />');void 0;">去支付</a></span></i></p>
</c:when>
<c:when test="${game.status == 2 }">
<p><i><span class="notice">已报名</span></i></p>
Expand Down

0 comments on commit afc44f2

Please sign in to comment.