Merge branch 'master' of https://codeup.aliyun.com/bsdtec/biz-api-cloud
This commit is contained in:
commit
46d4757f55
6 files changed
+167
-3
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.order;
|
||||
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardOrderEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 用户点餐明细dto
|
||||
*/
|
||||
@Data
|
||||
public class HardOrderPreferencesDto {
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
@Schema(description="订单类型")
|
||||
private String orderType;
|
||||
|
||||
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
@Schema(description="商户id")
|
||||
private Long merchantId;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDate[] times;
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
@Schema(description="订单状态")
|
||||
private String orderStatus;
|
||||
|
||||
}
|
||||
+8
@@ -1,11 +1,15 @@
|
||||
package com.bsd.pjcloud.hard.api.feign;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.constant.ServiceNameConstants;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.feign.annotation.NoToken;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardOrderPreferencesDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardOrderEntity;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
@@ -17,4 +21,8 @@ public interface RemoteHardOrderService {
|
||||
@GetMapping("/hard-order/get-by-ids")
|
||||
R<List<HardOrderEntity>> getByIds(@RequestParam List<Long> ids);
|
||||
|
||||
|
||||
|
||||
@PostMapping("/hard-order/page")
|
||||
R<Page<List<HardOrderEntity>>> getPage(@RequestParam Page page, @RequestBody HardOrderPreferencesDto hardOrderPreferencesDto);
|
||||
}
|
||||
+7
-2
@@ -15,6 +15,7 @@ import com.bsd.pjcloud.hard.api.constant.HardTypeEnum;
|
||||
import com.bsd.pjcloud.hard.api.constant.order.HardOrderTypeEnum;
|
||||
import com.bsd.pjcloud.hard.api.constant.order.HardPayTypeEnum;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardOrderDto;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardOrderPreferencesDto;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.app.HardAppCreateOrderDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardOrderEntity;
|
||||
import com.bsd.pjcloud.hard.mapper.order.HardOrderMapper;
|
||||
@@ -87,10 +88,14 @@ public class HardOrderController {
|
||||
/* ************************************* end app end ************************************* */
|
||||
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PostMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardwareOrder_view')")
|
||||
public R getHardwareOrderPage(@ParameterObject Page page, @ParameterObject HardOrderEntity hardwareOrder) {
|
||||
public R<Page<List<HardOrderEntity>>> getHardwareOrderPage(@ParameterObject Page page, @RequestBody HardOrderPreferencesDto hpPreferencesDto) {
|
||||
LambdaQueryWrapper<HardOrderEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(hpPreferencesDto.getMerchantId()!=null, HardOrderEntity::getMerchantId, hpPreferencesDto.getMerchantId());
|
||||
wrapper.eq(HardOrderEntity::getOrderType, hpPreferencesDto.getOrderType());
|
||||
wrapper.eq(hpPreferencesDto.getOrderStatus()!=null, HardOrderEntity::getOrderStatus, hpPreferencesDto.getOrderStatus());
|
||||
wrapper.between(hpPreferencesDto.getTimes()!=null, HardOrderEntity::getCreateTime, hpPreferencesDto.getTimes()[0], hpPreferencesDto.getTimes()[1]);
|
||||
return R.ok(hardwareOrderService.page(page, wrapper));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user