无关风月
2024-09-03 85c4410b0948799a93f19f345b4ed18c253c89f3
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TFaultMessageController.java
@@ -1,6 +1,19 @@
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;
@@ -16,5 +29,24 @@
@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<String> add(@Validated @RequestBody TFaultMessage dto) {
        faultMessageService.add(dto);
        return AjaxResult.success();
    }
}