rentaiming
2024-06-18 1a7c0511f65e406d459f4ec6a0c12737d0933946
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
51
52
53
54
55
56
57
58
59
package com.ruoyi.order.controller.forepart;
 
 
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.page.PageDTO;
import com.ruoyi.order.domain.MemberInvoice;
import com.ruoyi.order.dto.MemberInvoiceDTO;
import com.ruoyi.order.service.ILogisticsService;
import com.ruoyi.order.service.impl.LogisticsServiceImpl;
import com.ruoyi.system.api.domain.Logistics;
import com.ruoyi.system.api.domain.Order;
import com.ruoyi.system.api.domain.dto.LogisticsDTO;
import com.ruoyi.system.api.domain.vo.Express100VO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * <p>
 * 物流公司 前端控制器
 * </p>
 *
 * @author mitao
 * @since 2024-06-07
 */
@RestController
@RequestMapping("/forepart/logistics")
@Api(value = "用户端-获取快递信息", tags = "用户端-获取快递信息", description = "用户端-获取快递信息")
public class ForepartLogisticsController {
    @Resource
    private ILogisticsService iLogisticsService;
    @PostMapping("/getLogistics")
    @ApiOperation(value = "用户端-获取快递公司")
    public R<List<Logistics>> getLogistics() {
        return R.ok(iLogisticsService.list());
    }
 
    @PostMapping("/getLogisticsList")
    @ApiOperation(value = "用户端-获取快递信息")
    public R<Express100VO> getLogisticsList(@RequestBody LogisticsDTO logisticsDTO) {
        return R.ok(iLogisticsService.getLogisticsList(logisticsDTO));
    }
 
    @PostMapping("/getLogisticsOne")
    @ApiOperation(value = "用户端-获取快递公司名稱")
    public R<Logistics> getLogisticsOne(@RequestBody LogisticsDTO logisticsDTO) {
        LambdaQueryWrapper<Logistics> wrapper= Wrappers.lambdaQuery();
        wrapper.eq(Logistics::getLogisticsNum,logisticsDTO.getCompany());
        return R.ok(  iLogisticsService.getOne(wrapper));
    }
}