package org.jeecg.modules.api.studytourController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.api.service.ExperienceService;
import org.jeecg.modules.api.service.ImageService;
import org.jeecg.modules.studytourBindperson.entity.StudytourBindperson;
import org.jeecg.modules.studytourComment.entity.StudytourComment;
import org.jeecg.modules.studytourRecord.entity.StudytourRecord;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags="成长档案-相关接口")
@RestController
@RequestMapping("/studytour/experience")
@Slf4j
public class ExperienceController {

    /******************************************************************************************************************/
    //配置信息
    @Resource
    private ExperienceService experienceService;
    /******************************************************************************************************************/

    @ApiOperation(value="成长档案-查询成长档案列表", notes="成长档案-查询成长档案列表")
    @RequestMapping(value = "/queryExperienceList", method = {RequestMethod.GET})
    public Result<?> queryExperienceList(@RequestHeader("X-Access-Token") String token, StudytourRecord studytourRecord, PageBean pageBean){
        return experienceService.queryExperienceList(token, studytourRecord, pageBean);
    }

    @ApiOperation(value="成长档案-查询成长档案详情", notes="成长档案-查询成长档案详情")
    @RequestMapping(value = "/queryExperienceById", method = {RequestMethod.GET})
    public Result<?> queryExperienceById(@RequestHeader("X-Access-Token") String token, String recordId){
        return experienceService.queryExperienceById(token, recordId);
    }

    @ApiOperation(value="成长档案-新增成长档案", notes="成长档案-新增成长档案")
    @RequestMapping(value = "/addExperience", method = {RequestMethod.POST})
    public Result<?> addExperience(@RequestHeader("X-Access-Token") String token, StudytourRecord studytourRecord){
        return experienceService.addExperience(token, studytourRecord);
    }


}
