package me.zhengjie.modules.dmApp.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.dm.service.domain.DmServicePj;
import me.zhengjie.modules.dm.service.service.DmServicePjService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequiredArgsConstructor
@Api(tags = "App 服务评价接口")
@RequestMapping("/app/dmServicePj")
public class AppDmServicePjController {

    private final DmServicePjService dmServicePjService;

    @PostMapping(value = "/createApp")
    @Log("新增服务评价")
    @ApiOperation("新增服务评价")
    public ResponseEntity<Object> createApp(@Validated @RequestBody DmServicePj resources){
        return new ResponseEntity<>(dmServicePjService.createApp(resources), HttpStatus.OK);
    }

}
