cl
2 天以前 b21ca070526ec10fbea98e29135751776dc31059
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
package com.vincent.rsf.server.manager.controller;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.server.common.domain.BaseParam;
import com.vincent.rsf.server.common.domain.PageParam;
import com.vincent.rsf.server.manager.entity.CloudWmsNotifyLog;
import com.vincent.rsf.server.manager.service.CloudWmsNotifyLogService;
import com.vincent.rsf.server.system.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
 
import java.util.Map;
 
/**
 * 云仓上报待办/记录查询(请求体、最近一次响应见表字段)
 */
@RestController
@Api(tags = "云仓上报记录")
public class CloudWmsNotifyLogController extends BaseController {
 
    @Autowired
    private CloudWmsNotifyLogService cloudWmsNotifyLogService;
 
    @ApiOperation("分页查询(可选 bizRefLike:按业务关联模糊匹配,如单号)")
    @PreAuthorize("hasAuthority('manager:task:list')")
    @PostMapping("/cloudWmsNotifyLog/page")
    public R page(@RequestBody Map<String, Object> map) {
        BaseParam baseParam = buildParam(map, BaseParam.class);
        PageParam<CloudWmsNotifyLog, BaseParam> pageParam = new PageParam<>(baseParam, CloudWmsNotifyLog.class);
        QueryWrapper<CloudWmsNotifyLog> qw = pageParam.buildWrapper(true);
        Object bizRefLike = map.get("bizRefLike");
        if (bizRefLike != null && StringUtils.isNotBlank(String.valueOf(bizRefLike))) {
            qw.like("biz_ref", String.valueOf(bizRefLike).trim());
        }
        return R.ok().add(cloudWmsNotifyLogService.page(pageParam, qw));
    }
 
    @ApiOperation("详情")
    @PreAuthorize("hasAuthority('manager:task:list')")
    @GetMapping("/cloudWmsNotifyLog/{id}")
    public R get(@PathVariable Long id) {
        return R.ok().add(cloudWmsNotifyLogService.getById(id));
    }
}