Commit 3124ec5a authored by chenlin's avatar chenlin

赛客现场助手不显示 '2022-12-12 22:20:00' 以后创建的赛事

parent b8e83f37
...@@ -184,6 +184,9 @@ ...@@ -184,6 +184,9 @@
AND c.createUserId NOT IN (SELECT user_id from gksite.gk_app_info WHERE user_id>0) AND c.createUserId NOT IN (SELECT user_id from gksite.gk_app_info WHERE user_id>0)
and a.cmpt_status = 2 and a.cmpt_status = 2
</if> </if>
<if test="param.partnerId == 'PRODF4E96E99A2B48AEA' ">
AND '2022-12-12 22:20:00' > a.create_date
</if>
</sql> </sql>
<update id="updateCmpt"> <update id="updateCmpt">
......
...@@ -156,16 +156,16 @@ public class CmptService { ...@@ -156,16 +156,16 @@ public class CmptService {
public Page<List<Cmpt>> queryCmpt(Pageable page, Map<String,String> param) { public Page<List<Cmpt>> queryCmpt(Pageable page, Map<String,String> param) {
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
long count = cmptMapper.countCount(param); long count = cmptMapper.countCount(param);
log.info("耗时1:"+(System.currentTimeMillis()-start)); // log.info("耗时1:"+(System.currentTimeMillis()-start));
List<Cmpt> list = cmptMapper.queryCmpt(page, param); List<Cmpt> list = cmptMapper.queryCmpt(page, param);
log.info("耗时2:"+(System.currentTimeMillis()-start)); // log.info("耗时2:"+(System.currentTimeMillis()-start));
list.forEach(cmpt -> { list.forEach(cmpt -> {
Object o = valueOperations.get("gk:view:" + cmpt.getCmptId()); Object o = valueOperations.get("gk:view:" + cmpt.getCmptId());
if(o != null){ if(o != null){
cmpt.setView((Integer) o); cmpt.setView((Integer) o);
} }
log.info("耗时3:"+(System.currentTimeMillis()-start)); // log.info("耗时3:"+(System.currentTimeMillis()-start));
Object countStr = valueOperations.get("count:cmptid:" + cmpt.getCmptId()); Object countStr = valueOperations.get("count:cmptid:" + cmpt.getCmptId());
if(countStr != null){ if(countStr != null){
cmpt.setEnroll(Integer.valueOf(countStr.toString())); cmpt.setEnroll(Integer.valueOf(countStr.toString()));
...@@ -173,7 +173,7 @@ public class CmptService { ...@@ -173,7 +173,7 @@ public class CmptService {
int cmptEnrollCount = remoteService.getCmptEnrollCount(cmpt.getCmptId()); int cmptEnrollCount = remoteService.getCmptEnrollCount(cmpt.getCmptId());
cmpt.setEnroll(cmptEnrollCount); cmpt.setEnroll(cmptEnrollCount);
valueOperations.set("count:cmptid:"+cmpt.getCmptId(),cmptEnrollCount+"",30, TimeUnit.MINUTES); valueOperations.set("count:cmptid:"+cmpt.getCmptId(),cmptEnrollCount+"",30, TimeUnit.MINUTES);
log.info("耗时4:"+(System.currentTimeMillis()-start)); // log.info("耗时4:"+(System.currentTimeMillis()-start));
} }
}); });
return PageFactory.setContent(list, page, count); return PageFactory.setContent(list, page, count);
......
...@@ -259,8 +259,8 @@ public class CmptController { ...@@ -259,8 +259,8 @@ public class CmptController {
public com.neusoft.www.utils.web.Result updateDayRank(@RequestParam("cmptId") int cmptId, public com.neusoft.www.utils.web.Result updateDayRank(@RequestParam("cmptId") int cmptId,
@RequestParam("status") int status, @RequestParam("status") int status,
@RequestParam("rankName") String rankName) { @RequestParam("rankName") String rankName) {
cmptService.updateDayRank(cmptId, status, rankName); cmptService.updateDayRank(cmptId, status, rankName);
return new com.neusoft.www.utils.web.Result().success().setMsg("设置成功!"); return com.neusoft.www.utils.web.Result.success().setMsg("设置成功!");
} }
......
...@@ -434,6 +434,7 @@ public class MicroApiController { ...@@ -434,6 +434,7 @@ public class MicroApiController {
param.put("creator",creator); param.put("creator",creator);
param.put("type",type+""); param.put("type",type+"");
param.put("keyword",keyword); param.put("keyword",keyword);
param.put("partnerId",partnerId);
Page<List<Cmpt>> result = cmptService.queryCmpt(page, param); Page<List<Cmpt>> result = cmptService.queryCmpt(page, param);
result.setCode(200); result.setCode(200);
return result; return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment