Commit c5909a03 authored by liming's avatar liming

个人排名查询修改

parent 7f87a412
......@@ -57,6 +57,8 @@ public class TrainingDetailVO {
private BigDecimal eventsDistance;
@ApiModelProperty("活动总爬升高度")
private BigDecimal eventsClimbDistance;
@ApiModelProperty("获得积分")
private Integer currency;
@ApiModelProperty("体重")
private BigDecimal weight;
......
......@@ -8,8 +8,10 @@ import com.antai.sport.http.server.repository.club.mapper.ClubMemberMapper;
import com.antai.sport.http.server.repository.roommode.entity.RoomMode;
import com.antai.sport.http.server.repository.roommode.mapper.RoomModeMapper;
import com.antai.sport.http.server.repository.shop.entity.SportUserGameCurrencyBaseRule;
import com.antai.sport.http.server.repository.shop.entity.SportUserGameCurrencyLog;
import com.antai.sport.http.server.repository.shop.entity.SportUserGameCurrencyMatchRule;
import com.antai.sport.http.server.repository.shop.mapper.SportUserGameCurrencyBaseRuleMapper;
import com.antai.sport.http.server.repository.shop.mapper.SportUserGameCurrencyLogMapper;
import com.antai.sport.http.server.repository.shop.mapper.SportUserGameCurrencyMatchRuleMapper;
import com.antai.sport.http.server.repository.simplematch.entity.SimpleMatch;
import com.antai.sport.http.server.repository.simplematch.mapper.SimpleMatchMapper;
......@@ -71,6 +73,8 @@ public class SportUserTrainingLogService {
private ClubMemberMapper clubMemberMapper;
@Resource
private ClubMapper clubMapper;
@Resource
private SportUserGameCurrencyLogMapper sportUserGameCurrencyLogMapper;
@Resource
private SportUserTrainingLogBusinessMapper sportUserTrainingLogBusinessMapper;
......@@ -505,6 +509,14 @@ public class SportUserTrainingLogService {
*/
public TrainingDetailVO getTrainingDetail(Long id) {
TrainingDetailVO result = sportUserTrainingLogBusinessMapper.getSportUserTrainingLogDetail(id);
QueryWrapper<SportUserGameCurrencyLog> currencyLogQuery = new QueryWrapper<>();
currencyLogQuery.lambda().eq(SportUserGameCurrencyLog::getSourceType, GameCurrencySourceType.SPORT)
.eq(SportUserGameCurrencyLog::getSourceId, id);
SportUserGameCurrencyLog currencyLog = sportUserGameCurrencyLogMapper.selectOne(currencyLogQuery);
if (currencyLog != null) {
result.setCurrency(currencyLog.getAmmount());
}
if (GameMode.SIMPLE_MATCH.equals(result.getGameMode())) {
SimpleMatch match = simpleMatchMapper.selectById(result.getSourceId());
if (match != null) {
......
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