fix: 添加@Slf4j注解修复编译错误
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import com.qiniu.util.Auth;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
* @author BladeX
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/martial/athlete")
|
||||
@Tag(name = "参赛选手管理", description = "参赛选手接口")
|
||||
@@ -55,8 +57,13 @@ public class MartialAthleteController extends BladeController {
|
||||
@PostMapping("/submit")
|
||||
@Operation(summary = "新增或修改", description = "传入实体")
|
||||
public R submit(@RequestBody MartialAthlete athlete) {
|
||||
athlete.setCreateUser(AuthUtil.getUserId());
|
||||
athlete.setUpdateUser(AuthUtil.getUserId());
|
||||
Long userId = AuthUtil.getUserId();
|
||||
log.info("=== 提交选手 === userId: {}, playerName: {}", userId, athlete.getPlayerName());
|
||||
// Only set createUser for new records (when id is null)
|
||||
if (athlete.getId() == null) {
|
||||
athlete.setCreateUser(userId);
|
||||
}
|
||||
athlete.setUpdateUser(userId);
|
||||
return R.status(athleteService.saveOrUpdate(athlete));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user