Browse Source

rec_status=0

master
zhizhi wu 5 years ago
parent
commit
c8023eabfe
  1. 8
      game/src/main/resources/mapper_dao/GameUserJoinDao.xml
  2. 1
      ht/src/main/java/com/ccsens/ht/service/PatientService.java

8
game/src/main/resources/mapper_dao/GameUserJoinDao.xml

@ -18,7 +18,7 @@
<select id="selectTopTen" resultType="com.ccsens.game.bean.vo.ScreenVo$TopUsers">
select user_id, avatar_url as headImgUrl, nickname, score, score/100 as times
from t_game_user_join
where record_id = #{recordId,jdbcType=BIGINT}
where record_id = #{recordId,jdbcType=BIGINT} and rec_status = 0
ORDER BY score DESC
limit 10
</select>
@ -33,7 +33,7 @@
FROM
t_game_user_join
WHERE
record_id = #{recordId}
record_id = #{recordId} and rec_status = 0
</select>
<select id="getRanking" resultType="int">
@ -49,11 +49,11 @@ WHERE c.user_id= #{userId,jdbcType=BIGINT} limit 1
</select>
<select id="gameCount" resultType="com.ccsens.game.bean.dto.message.ChangeStatusMessageDto$CompletedData">
select count(*) as totalMembers, sum(score) as totalScore, AVG(score) as averageTimes from t_game_user_join where record_id = #{recordId,jdbcType=BIGINT}
select count(*) as totalMembers, sum(score) as totalScore, AVG(score) as averageTimes from t_game_user_join where record_id = #{recordId,jdbcType=BIGINT} and rec_status = 0
</select>
<select id="overNum" resultType="Integer">
select count(*) from t_game_user_join where record_id = #{recordId,jdbcType=BIGINT} and score &lt; #{score,jdbcType=INTEGER}
select count(*) from t_game_user_join where record_id = #{recordId,jdbcType=BIGINT} and score &lt; #{score,jdbcType=INTEGER} and rec_status = 0
</select>
<select id="getAllRanking" resultType="com.ccsens.game.bean.vo.ClientVo$MemberInfo">
SELECT a.*,(@rowNum:=@rowNum+1) AS sort

1
ht/src/main/java/com/ccsens/ht/service/PatientService.java

@ -230,6 +230,7 @@ public class PatientService implements IPatientService {
String id = "id";
if (json.getLong(id) == null || json.getLong(id) == 0 ) {
methodName = "insertSelective";
json.put("isDel", 0);
json.put(id, snowflake.nextId());
} else {
methodName = "updateByPrimaryKey";

Loading…
Cancel
Save