xuhy
2024-08-09 5ec98728a942b2660d78bb0e5c82762e132c4c83
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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));
    }
 
 
}