package top.continew.admin.controller.business;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.continew.admin.business.service.AssignmentSubmissionsService;
import top.continew.admin.system.service.DeptService;
import top.continew.starter.extension.crud.model.query.PageQuery;
import top.continew.starter.extension.crud.model.resp.PageResp;

/**
 * @author 张波
 * @since 2024/10/26 18:31
 */
@Tag(name = "图片接口")
@RestController
@RequiredArgsConstructor
@RequestMapping("/image")
public class ImageController {

    private final AssignmentSubmissionsService assignmentSubmissionsService;

    private final DeptService deptService;

    @Operation(summary = "获取优秀图片列表")
    @GetMapping("/getGoodImage")
    public PageResp<String> getGoodImageList(PageQuery pageQuery) {
        //todo
        /* LoginUser loginUser = LoginHelper.getLoginUser();
        DeptResp dept = deptService.get(loginUser.getDeptId());
        String dbName = dept.getDbName();
        if (dept.getParentId() != 0) {
            DeptDO deptDO = deptService.selectDoById(loginUser.getDeptId());
            dbName = deptDO.getDbName();
        }*/
        return assignmentSubmissionsService.getGoodImageList(null, pageQuery);
    }
}
