无关风月
21 小时以前 7cab5bda99ca42188bc15b2dae7d1fa4d1833fd9
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
package com.ruoyi.order.controller;
 
 
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.entity.ServeRecord;
import com.ruoyi.order.service.ServeRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
/**
 * <p>
 * 用户评价表 前端控制器
 * </p>
 *
 * @author hjl
 * @since 2024-05-29
 */
@RestController
@RequestMapping("/serveRecord")
@Api(tags = {"后台-系统设置-订单评价管理"})
public class ServeRecordController {
 
    @Resource
    private ServeRecordService serveRecordService;
 
    /**
     * 根据订单id获取服务记录
     *
     * @param orderId 订单id
     */
    @ApiOperation(value = "根据订单id获取服务记录", tags = {"后台-系统设置-订单评价管理"})
    @GetMapping(value = "/serveRecordByOrderId")
    public R<ServeRecord> serveRecordByOrderId(@RequestParam("orderId") String orderId) {
        return R.ok(serveRecordService.lambdaQuery().eq(ServeRecord::getOrderId, orderId)
                .eq(ServeRecord::getIsDelete, 0).one());
    }
 
}