OMS-商业合作伙伴页面查询
This commit is contained in:
@@ -191,4 +191,21 @@ public interface UserServiceFeign {
|
||||
@ApiOperation("根据用户ID查询货主信息")
|
||||
@GetMapping("/userShipperApi/getShipperByUserId/{userId}")
|
||||
public AjaxResult<?> getShipperByUserId(@PathVariable("userId") Long userId);
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation("商业合作伙伴-分页查询托运人列表")
|
||||
@GetMapping("/userShipperApi/userShipperList")
|
||||
public AjaxResult<?> userShipperList(@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(value = "userAccount", required = false) String userAccount,
|
||||
@RequestParam(value = "shipperEnterpriseName", required = false) String shipperEnterpriseName,
|
||||
@RequestParam(value = "organizationId", required = false) Long organizationId,
|
||||
@RequestParam(value = "organizationName", required = false) String organizationName,
|
||||
@RequestParam(value = "createTimeFrom", required = false) String createTimeFrom,
|
||||
@RequestParam(value = "createTimeTo", required = false) String createTimeTo,
|
||||
@RequestParam(value = "updateTimeFrom", required = false) String updateTimeFrom,
|
||||
@RequestParam(value = "updateTimeTo", required = false) String updateTimeTo,
|
||||
@RequestParam(value = "shipperType", required = false) Integer shipperType);
|
||||
}
|
||||
+5
@@ -181,6 +181,11 @@ public class RemoteUserFeignFallbackFactory implements FallbackFactory<UserServi
|
||||
public AjaxResult<?> getShipperByUserId(Long userId) {
|
||||
return AjaxResult.error("查询失败" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult<?> userShipperList(Integer pageNum, Integer pageSize, String userAccount, String shipperEnterpriseName, Long organizationId, String organizationName, String createTimeFrom, String createTimeTo, String updateTimeFrom, String updateTimeTo, Integer shipperType) {
|
||||
return AjaxResult.error("查询失败" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.mhd.oms.application.service.businessPartner;
|
||||
|
||||
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.oms.interfaces.dto.businessPartner.BusinessPartnerDTO;
|
||||
import com.mhd.system.api.UserServiceFeign;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BusinessPartnerApplicationService {
|
||||
|
||||
@Resource
|
||||
private UserServiceFeign userServiceFeign;
|
||||
|
||||
|
||||
|
||||
public TableDataInfo queryShipperPage(BusinessPartnerDTO businessPartnerDTO) {
|
||||
AjaxResult<?> result = userServiceFeign.userShipperList(
|
||||
businessPartnerDTO.getPageNum(),
|
||||
businessPartnerDTO.getPageSize(),
|
||||
businessPartnerDTO.getUserAccount(),
|
||||
businessPartnerDTO.getShipperEnterpriseName(),
|
||||
businessPartnerDTO.getOrganizationId(),
|
||||
businessPartnerDTO.getOrganizationName(),
|
||||
businessPartnerDTO.getCreateTimeFrom(),
|
||||
businessPartnerDTO.getCreateTimeTo(),
|
||||
businessPartnerDTO.getUpdateTimeFrom(),
|
||||
businessPartnerDTO.getUpdateTimeTo(),
|
||||
businessPartnerDTO.getShipperType()
|
||||
);
|
||||
|
||||
if ("200".equals((String.valueOf(result.get("code"))))){
|
||||
List<?> list = (List<?>) result.get("data");
|
||||
|
||||
TableDataInfo tableDataInfo = new TableDataInfo();
|
||||
tableDataInfo.setData(list);
|
||||
tableDataInfo.setTotal(list.size());
|
||||
tableDataInfo.setCode(200);
|
||||
return tableDataInfo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package com.mhd.oms.interfaces.dto.businessPartner;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(description = "商业合作伙伴DTO")
|
||||
public class BusinessPartnerDTO {
|
||||
|
||||
@ApiModelProperty(value = "登录账号")
|
||||
private String userAccount;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String shipperEnterpriseName;
|
||||
|
||||
@ApiModelProperty(value = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(value = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty(value = "创建时间起")
|
||||
private String createTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "创建时间止")
|
||||
private String createTimeTo;
|
||||
|
||||
@ApiModelProperty(value = "更新时间起")
|
||||
private String updateTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "更新时间止")
|
||||
private String updateTimeTo;
|
||||
|
||||
@ApiModelProperty(value = "推送时间起")
|
||||
private String pushTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "推送时间止")
|
||||
private String pushTimeTo;
|
||||
|
||||
@ApiModelProperty(value = "货主类型:1-个人,2-企业")
|
||||
private Integer shipperType;
|
||||
|
||||
@ApiModelProperty(value = "页码")
|
||||
private Integer pageNum = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页数量")
|
||||
private Integer pageSize = 10;
|
||||
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.mhd.oms.interfaces.facade.businessPartner;
|
||||
|
||||
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.oms.application.service.businessPartner.BusinessPartnerApplicationService;
|
||||
import com.mhd.oms.interfaces.dto.businessPartner.BusinessPartnerDTO;
|
||||
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.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/businessPartnerApi")
|
||||
public class BusinessPartnerApi {
|
||||
|
||||
@Resource
|
||||
private BusinessPartnerApplicationService businessPartnerApplicationService;
|
||||
|
||||
@ApiOperation("商业合作伙伴-分页查询委托方列表")
|
||||
@GetMapping("/shippperList")
|
||||
public TableDataInfo shipperList(BusinessPartnerDTO businessPartnerDTO){
|
||||
return businessPartnerApplicationService.queryShipperPage(businessPartnerDTO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user