格式化

This commit is contained in:
石皮幼鸟 2024-04-12 11:15:43 +08:00
parent baa889f73b
commit 289fe1c009
1 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ public class LevelServiceImpl implements LevelService {
@Override
public R<Level> levelDetail(String id) {
Level level = mongoTemplate.findOne(new Query(Criteria.where("id").is(id)), Level.class);
if (level == null){
if (level == null) {
return R.fail("查询失败,请重试");
}
return R.ok(level);
@ -51,10 +51,10 @@ public class LevelServiceImpl implements LevelService {
if (map != null) {
id = map.get("id").asString().replaceAll("\"", "");
}
if (id == null){
if (id == null) {
return R.fail("token解析失败");
}
if (id.equals(scoreInfo.getUserId().toString())){
if (id.equals(scoreInfo.getUserId())) {
ScoreInfo insert = mongoTemplate.insert(scoreInfo);
return R.ok(insert);
}