You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.4 KiB

package com.youlai.boot.mini.controller;
import com.youlai.boot.common.annotation.Log;
import com.youlai.boot.common.annotation.RepeatSubmit;
import com.youlai.boot.common.enums.ActionTypeEnum;
import com.youlai.boot.common.enums.LogModuleEnum;
import com.youlai.boot.common.result.Result;
import com.youlai.boot.mini.model.form.StrayAnimalNoteCommentForm;
import com.youlai.boot.mini.model.vo.StrayAnimalNoteCommentVO;
import com.youlai.boot.mini.service.StrayAnimalNoteCommentService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
@Tag(name = "流浪动物笔记评论相关接口")
@RestController
@RequestMapping("/api/v1/mini/noteComment")
@RequiredArgsConstructor
public class StrayAnimalNoteCommentController {
private final StrayAnimalNoteCommentService strayAnimalNoteCommentService;
@Operation(summary = "笔记评论接口")
@PostMapping(value = "add")
@RepeatSubmit
@Log(module = LogModuleEnum.STRAY_ANIMAL_NOTE_COMMENT, value = ActionTypeEnum.INSERT)
public Result<?> addNoteComment(
@Valid @RequestBody StrayAnimalNoteCommentForm formData
) {
StrayAnimalNoteCommentVO vo = strayAnimalNoteCommentService.addNoteComment(formData);
return Result.success(vo);
}
}