diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/domain/OmsOrder.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/domain/OmsOrder.java index 8f4eca145..39f6cba9e 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/domain/OmsOrder.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/domain/OmsOrder.java @@ -100,4 +100,10 @@ public class OmsOrder extends BaseEntity { @TableField(exist = false) private List orderItems; + @TableField(exist = false) + private String startDate; + + @TableField(exist = false) + private String endDate; + } diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/controller/admin/OrderController.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/controller/admin/OrderController.java index 91d6af328..a63c5557a 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/controller/admin/OrderController.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/controller/admin/OrderController.java @@ -45,29 +45,12 @@ public class OrderController { @GetMapping @ApiImplicitParams({ @ApiImplicitParam(name = "page", defaultValue = "1", value = "页码", paramType = "query", dataType = "Long"), - @ApiImplicitParam(name = "limit", defaultValue = "10", value = "每页数量", paramType = "query", dataType = "Long"), - @ApiImplicitParam(name = "status", value = "订单状态", paramType = "query", dataType = "Integer"), - + @ApiImplicitParam(name = "limit", defaultValue = "10", value = "每页数量", paramType = "query", dataType = "Long") }) - public Result list( - @RequestParam(defaultValue = "1") Long page, - @RequestParam(defaultValue = "10") Long limit, - Integer status, - String startDate, - String endDate, - String orderSn - ) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() - .like(StrUtil.isNotBlank(orderSn), OmsOrder::getOrderSn, orderSn) - .eq(status != null, OmsOrder::getStatus, status) - .apply(StrUtil.isNotBlank(startDate), - "date_format (gmt_crate,'%Y-%m-%d') >= date_format('" + startDate + "','%Y-%m-%d')") - .apply(StrUtil.isNotBlank(endDate), - "date_format (gmt_crate,'%Y-%m-%d') <= date_format('" + endDate + "','%Y-%m-%d')") - .orderByDesc(OmsOrder::getGmtModified) - .orderByDesc(OmsOrder::getGmtCreate); - - IPage result = orderService.list(new Page<>(page, limit), new OmsOrder().setStatus(status)); + public Result list(@RequestParam(defaultValue = "1") Long page, + @RequestParam(defaultValue = "10") Long limit, + OmsOrder order) { + IPage result = orderService.list(new Page<>(page, limit), order); return Result.success(result.getRecords(), result.getTotal()); } diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/mapper/OrderMapper.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/mapper/OrderMapper.java index 262ad9cd4..297206c7c 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/mapper/OrderMapper.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/mapper/OrderMapper.java @@ -1,9 +1,10 @@ package com.youlai.mall.oms.mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.youlai.mall.oms.pojo.domain.OmsOrder; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.*; + import java.util.List; /** @@ -16,13 +17,22 @@ import java.util.List; @Mapper public interface OrderMapper extends BaseMapper { - @Select("") @Results({ @Result(id = true, column = "id", property = "id"), diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java index 78bd48c74..de966c4e3 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java @@ -54,7 +54,6 @@ public class CartServiceImpl implements ICartService { return cartItems; } - /** * 删除用户购物车(清空购物车) */ diff --git a/mall-pms/pms-boot/pom.xml b/mall-pms/pms-boot/pom.xml index ce1e742aa..4a18d804f 100644 --- a/mall-pms/pms-boot/pom.xml +++ b/mall-pms/pms-boot/pom.xml @@ -149,7 +149,7 @@ 1.0.0 - - https://b.youlai.store:2376 + https://f.youlai.store:2376 - C:\cert\docker\b.youlai.store + C:\cert\docker\f.youlai.store diff --git a/mall-pms/pms-boot/src/main/resources/bootstrap.yml b/mall-pms/pms-boot/src/main/resources/bootstrap.yml index caf4dfcd6..3d7808a0c 100644 --- a/mall-pms/pms-boot/src/main/resources/bootstrap.yml +++ b/mall-pms/pms-boot/src/main/resources/bootstrap.yml @@ -1,3 +1,3 @@ spring: profiles: - active: dev \ No newline at end of file + active: dev diff --git a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/vo/MemberVO.java b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/vo/MemberVO.java index ae508cd63..b31c1b04f 100644 --- a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/vo/MemberVO.java +++ b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/vo/MemberVO.java @@ -5,6 +5,8 @@ import lombok.Data; @Data public class MemberVO { + private Long id; + private String nickname; diff --git a/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/controller/app/AddressController.java b/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/controller/app/AddressController.java index 1415bd795..8c73d1120 100644 --- a/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/controller/app/AddressController.java +++ b/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/controller/app/AddressController.java @@ -30,7 +30,7 @@ public class AddressController { @ApiOperation(value = "获取会员的地址列表") @GetMapping - public Result list(@RequestParam Long memberId) { + public Result list(@RequestParam(required = false) Long memberId) { List addressList = iUmsAddressService.list(new LambdaQueryWrapper() .eq(UmsAddress::getMemberId, memberId) .orderByDesc(UmsAddress::getDefaulted)); diff --git a/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/mapper/UmsAddressMapper.java b/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/mapper/UmsAddressMapper.java index ccfb78c6a..87e1358f3 100644 --- a/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/mapper/UmsAddressMapper.java +++ b/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/mapper/UmsAddressMapper.java @@ -11,7 +11,7 @@ import java.util.List; public interface UmsAddressMapper extends BaseMapper { @Select("") List listByUserId(Long userId); diff --git a/youlai-admin/admin-boot/pom.xml b/youlai-admin/admin-boot/pom.xml index 3dcdac911..dcf5170e6 100644 --- a/youlai-admin/admin-boot/pom.xml +++ b/youlai-admin/admin-boot/pom.xml @@ -117,7 +117,7 @@ ["java","-jar","${project.build.finalName}.jar"] - http://f.youlai.store:2375 + https://f.youlai.store:2376 C:\cert\docker\f.youlai.store diff --git a/youlai-auth/pom.xml b/youlai-auth/pom.xml index 518b1a93a..260a2a2f8 100644 --- a/youlai-auth/pom.xml +++ b/youlai-auth/pom.xml @@ -153,7 +153,7 @@ ["java","-jar","${project.build.finalName}.jar"] - http://f.youlai.store:2375 + https://f.youlai.store:2376 C:\cert\docker\f.youlai.store diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/result/Result.java b/youlai-common/common-core/src/main/java/com/youlai/common/result/Result.java index cf06044a3..8b6337574 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/result/Result.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/result/Result.java @@ -34,6 +34,15 @@ public class Result implements Serializable { } + public static Result success(T data, Long total) { + Result result = new Result(); + result.setCode(ResultCode.SUCCESS.getCode()); + result.setMsg(ResultCode.SUCCESS.getMsg()); + result.setData(data); + result.setTotal(total.intValue()); + return result; + } + public static Result failed() { return result(ResultCode.SYSTEM_EXECUTION_ERROR.getCode(), ResultCode.SYSTEM_EXECUTION_ERROR.getMsg(), null); } @@ -66,15 +75,6 @@ public class Result implements Serializable { return result; } - public static Result success(T data, Long total) { - Result result = new Result(); - result.setCode(ResultCode.SUCCESS.getCode()); - result.setMsg(ResultCode.SUCCESS.getMsg()); - result.setData(data); - result.setTotal(total.intValue()); - return result; - } - public static boolean isSuccess(Result result) { if(result!=null&&ResultCode.SUCCESS.getCode().equals(result.getCode())){