Commit 01084876 by jscat

nyx javaapp: 功能优化

1. 新增 tbl_match表match_status字段 "查询之后更新"的功能
主要用于my-points的扫码操作
parent 028b90f4
package cn.com.fun.nyxkey.api.service;
package cn.com.fun.nyxkey.api.service;
......@@ -28,6 +28,8 @@ public interface Rockwell_keyService {
// 1. match详情,指定matchId
// 2. 查询比赛历史 with pagination, 指定matchTeam, order by create_datetime desc, match_status == 1
JSONResult Rockwell_keyServiceGetT_match_by_matchid(String matchId);
// only used for checking qrcode mode; 扫码之后, 立即更新match_status='00', 然后返回初次查询结果
JSONResult Rockwell_keyServiceGetThenUpdateT_match_by_matchid(String matchId);
JSONResult Rockwell_keyServiceGetT_match_by_page(String memberId, String userId, String matchStatus);
void Rockwell_keyServiceAddT_matchList(List<Rockwell_keyT_match> listRockwell_keyT_match);
JSONResult Rockwell_keyServiceAddT_matchItem(String matchId, String activityId, String memberId, String userId,
......
package cn.com.fun.nyxkey.api.service.impl;
package cn.com.fun.nyxkey.api.service.impl;
......@@ -155,6 +155,24 @@ public class Rockwell_keyServiceImpl implements Rockwell_keyService {
}
public JSONResult Rockwell_keyServiceGetThenUpdateT_match_by_matchid(String matchId){
LOGGER.debug("find Rockwell_keyServiceGetThenUpdateT_match_by_matchid");
List<Rockwell_keyT_match> listRockwell_keyT_match = new ArrayList<Rockwell_keyT_match>();
Rockwell_keyT_matchQuery rockwell_keyT_matchQuery = new Rockwell_keyT_matchQuery();
rockwell_keyT_matchQuery.setMatchId(matchId);
listRockwell_keyT_match = rockwell_keyMapper.getT_match_by_matchid(rockwell_keyT_matchQuery);
int totalCount = listRockwell_keyT_match.size();
JSONResult jsonResult = new JSONResult(totalCount, listRockwell_keyT_match);
if(totalCount >= 1 && listRockwell_keyT_match.get(0).getMatchStatus().equals("01"))
{
rockwell_keyMapper.updateT_match_status(rockwell_keyT_matchQuery);
}
return jsonResult;
}
// 暂时未使用
public JSONResult Rockwell_keyServiceGetT_match_by_page(String memberId, String userId, String matchStatus)
{
LOGGER.debug("find Rockwell_keyServiceGetT_match_by_page");
......
package cn.com.fun.nyxkey.api.web.controller;
package cn.com.fun.nyxkey.api.web.controller;
......@@ -197,11 +197,12 @@ public class NyxApiController {
// 2.5 get t_match by matchId
// or check the qrcode
@ApiOperation(value="get t_match by matchId", notes="get t_match by matchId")
@ApiImplicitParams({
@ApiImplicitParam(name = "matchId", value = "竞答id", required = true, dataType = "String")
})
@RequestMapping(value = "/nyx/match/query/matchid", method = RequestMethod.GET)
@RequestMapping(value = "/nyx/match/query/id", method = RequestMethod.GET)
public JSONResult RockwellGetMatchById(
@RequestParam(value = "matchId", required = true) String matchId
) {
......@@ -210,7 +211,7 @@ public class NyxApiController {
}
// 2.6 get v_match_point by page
@ApiOperation(value="get t_match by matchId", notes="get t_match by matchId")
@ApiOperation(value="get v_match_point by page", notes="get v_match_point by page")
@ApiImplicitParams({
@ApiImplicitParam(name = "memberId", value = "商家id", required = false, dataType = "String"),
@ApiImplicitParam(name = "userId", value = "用户id", required = false, dataType = "String"),
......@@ -218,7 +219,7 @@ public class NyxApiController {
@ApiImplicitParam(name = "pageNum", value = "页码,从1开始", required = false, dataType = "String", defaultValue = "1"),
@ApiImplicitParam(name = "pageCount", value = "每页的数据个数,默认是5个", required = false, dataType = "String", defaultValue = "5")
})
@RequestMapping(value = "/nyx/match/point/query", method = RequestMethod.GET)
@RequestMapping(value = "/nyx/match/query", method = RequestMethod.GET)
public JSONResult RockwellGetMatchPointByPage(
@RequestParam(value = "memberId", required = false, defaultValue = "0" ) String memberId,
@RequestParam(value = "userId", required = false, defaultValue = "0" ) String userId,
......@@ -243,6 +244,21 @@ public class NyxApiController {
return keyService.Rockwell_keyServiceGetT_match_bonus_by_id(matchId);
}
// 2.8 get t_match by matchId, then update the match_status jscat 2020/08/10
// used for checking the qrcode main process
@ApiOperation(value="query then update match_status='00' for t_match by matchId",
notes="query then update match_status='00' for t_match by matchId")
@ApiImplicitParams({
@ApiImplicitParam(name = "matchId", value = "竞答id", required = true, dataType = "String")
})
@RequestMapping(value = "/nyx/match/queryThenUpdate/id", method = RequestMethod.GET)
public JSONResult RockwellGetThenUpdateMatchById(
@RequestParam(value = "matchId", required = true) String matchId
) {
return keyService.Rockwell_keyServiceGetThenUpdateT_match_by_matchid(matchId);
}
// APi3 tbl_activity接口 jscat 20200804
// 3.1 获取 view_activity_info 的数据 by page, not by activityId
// 返回 Rockwell_keyV_activity_info
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论