package com.ruoyi.chargingPile.controller;
|
|
|
import com.ruoyi.chargingPile.api.dto.TChargingGunDTO;
|
import com.ruoyi.chargingPile.api.model.TFaultMessage;
|
import com.ruoyi.chargingPile.service.TChargingPileService;
|
import com.ruoyi.chargingPile.service.TFaultMessageService;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.log.annotation.Log;
|
import com.ruoyi.common.log.enums.BusinessType;
|
import com.ruoyi.common.log.enums.OperatorType;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
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;
|
|
/**
|
* <p>
|
* 前端控制器
|
* </p>
|
*
|
* @author xiaochen
|
* @since 2024-08-08
|
*/
|
@RestController
|
@RequestMapping("/t-fault-message")
|
public class TFaultMessageController {
|
|
private final TFaultMessageService faultMessageService;
|
|
@Autowired
|
public TFaultMessageController(TFaultMessageService faultMessageService) {
|
this.faultMessageService = faultMessageService;
|
}
|
|
/**
|
* 添加故障报修管理
|
*/
|
@Log(title = "添加故障报修管理", businessType = BusinessType.INSERT,operatorType = OperatorType.MOBILE)
|
@ApiOperation(tags = {"小程序-故障报修"},value = "添加故障报修管理")
|
@PostMapping(value = "/add")
|
public AjaxResult<Boolean> add(@Validated @RequestBody TFaultMessage dto) {
|
return AjaxResult.ok(faultMessageService.save(dto));
|
}
|
|
|
}
|