Commit 3030cee3 by 徐康

查询最近一单数据

parent c3f45d59
...@@ -98,7 +98,8 @@ public class WebAspect { ...@@ -98,7 +98,8 @@ public class WebAspect {
} }
List<String> unauthorizedUrls = Arrays.asList(getNotFilterUrl(CommonRedisKeyConstant.SAAS_NOT_AUTHORIZED_URL, NOT_AUTHORIZED_KEY).split(",")); List<String> unauthorizedUrls = Arrays.asList(getNotFilterUrl(CommonRedisKeyConstant.SAAS_NOT_AUTHORIZED_URL, NOT_AUTHORIZED_KEY).split(","));
List<String> mcCafeUnauthorizedUrls = Arrays.asList("/MCoffee/mcCafePaySuccessCallback","/openStoreMCCafeQueryPaymentCallback","/MCoffee/mcCafeRefund", List<String> mcCafeUnauthorizedUrls = Arrays.asList("/MCoffee/mcCafePaySuccessCallback","/openStoreMCCafeQueryPaymentCallback","/MCoffee/mcCafeRefund",
"/maCafeQueryOrders","/mcCafeQueryOrderById","/reminder","/listFreeRider","/mcCafePollingPickUpCode","/mcCafe/statusOperate","/MCoffee/mcCafeRefundNotifyCallback"); "/maCafeQueryOrders","/mcCafeQueryOrderById","/reminder","/listFreeRider","/mcCafePollingPickUpCode","/mcCafe/statusOperate",
"/MCoffee/mcCafeRefundNotifyCallback","mcCafeQueryRecentOrder");
if (!unauthorizedUrls.contains(requestUrl) && StringUtils.isEmpty(userInfo.getUnionId()) if (!unauthorizedUrls.contains(requestUrl) && StringUtils.isEmpty(userInfo.getUnionId())
&& mcCafeUnauthorizedUrls.stream().noneMatch(o -> requestUrl.contains(o))) { && mcCafeUnauthorizedUrls.stream().noneMatch(o -> requestUrl.contains(o))) {
throw new CommonServiceException(CommonResponseResult.USER_UNAUTHORIZED); throw new CommonServiceException(CommonResponseResult.USER_UNAUTHORIZED);
......
package cn.freemud.controller;
import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.vo.*;
import cn.freemud.monitorcenter.tools.HealthUtil;
import cn.freemud.service.MCCafeOrderService;
import cn.freemud.service.OrderAdapterService;
import cn.freemud.service.Orderservice;
import com.freemud.application.sdk.api.log.ApiAnnotation;
import com.freemud.application.sdk.api.log.LogParams;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
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;
@Slf4j
@RequestMapping("/order")
@RestController
@Validated
public class McCafeController {
@Autowired
private Orderservice orderservice;
@Autowired
private MCCafeOrderService mcCafeOrderService;
@Autowired
private OrderAdapterService orderAdapterService;
/**
* 麦咖啡创建订单
*/
@ApiAnnotation(logMessage = "createMCCafeOrder")
@PostMapping("/MCoffee/createMCCafeOrder")
public BaseResponse createOrderMCCafe(@Validated @LogParams @RequestBody CreateOrderVo createOrderVo) {
return orderAdapterService.createMCCafeOrder(createOrderVo);
}
/**
* 麦咖啡订单支付成功后通知
*/
@ApiAnnotation(logMessage = "mcCafePaySuccessCallback")
@PostMapping({"/MCoffee/mcCafePaySuccessCallback","/openStoreMCCafeQueryPaymentCallback"})
public String mcCafePaySuccessCallback(@LogParams @RequestBody NewPaysuccessNoticeMessage message) {
return mcCafeOrderService.mcCafePaySuccessCallback(message);
}
/**
* 查询麦咖啡订单列表
*/
@ApiAnnotation(logMessage = "maCafeQueryOrders")
@PostMapping("/maCafeQueryOrders")
public BaseResponse maCafeQueryOrders(@Validated @LogParams @RequestBody McCafeQueryOrderVo queryOrderVo) {
return mcCafeOrderService.mcCafeQueryOrders(queryOrderVo);
}
/**
* 麦咖啡 获取订单详情
*/
@ApiAnnotation(logMessage = "mcCafeQueryOrderById")
@PostMapping("/mcCafeQueryOrderById")
public BaseResponse mcCafeQueryOrderById(@Validated @LogParams @RequestBody MaCafeQueryOrderVo queryOrderVo) {
return mcCafeOrderService.mcCafeQueryOrderById(queryOrderVo);
}
/**
* 麦咖啡用户申请退款
*/
@ApiAnnotation(logMessage = "mcCafeRefund")
@PostMapping("/MCoffee/mcCafeRefund")
public BaseResponse mcCafeRefund(@Validated @LogParams @RequestBody OrderRefundVo orderRefundVo) {
return mcCafeOrderService.orderRefund(orderRefundVo);
}
/**
* 退款回掉通知
*/
@ApiAnnotation(logMessage = "mcCafeRefundNotifyCallback")
@PostMapping("/MCoffee/mcCafeRefundNotifyCallback")
public String mcCafeRefundNotifyCallback(@LogParams @RequestBody RefundNotifyCallbackRequestVo requestVo) {
return mcCafeOrderService.mcCafeRefundNotifyCallback(requestVo);
}
/**
* 根据订单号查询订单状态和取餐码
*/
@ApiAnnotation(logMessage = "mcCafePollingPickUpCode")
@PostMapping("/mcCafePollingPickUpCode")
public BaseResponse mcCafePollingPickUpCode(@Validated @LogParams @RequestBody MaCafeQueryOrderVo vo) {
return mcCafeOrderService.mcCafePollingPickUpCode(vo);
}
/**
* 麦咖啡催单
*/
@ApiAnnotation(logMessage = "reminder")
@PostMapping("/reminder")
public BaseResponse reminder(@Validated @LogParams @RequestBody ReminderVo reminderVo) {
return mcCafeOrderService.reminder(reminderVo);
}
/**
* 麦咖啡根据订单号查询骑手位置
*/
@ApiAnnotation(logMessage = "listFreeRider")
@PostMapping("/listFreeRider")
public BaseResponse listFreeRider(@Validated @LogParams @RequestBody FreeRiderPositionVo vo) {
return mcCafeOrderService.listFreeRider(vo);
}
/**
* 查询麦咖啡最近已完成的一单
*/
@ApiAnnotation(logMessage = "mcCafeQueryRecentOrder")
@PostMapping("/mcCafeQueryRecentOrder")
public BaseResponse mcCafeQueryRecentOrder(@Validated @LogParams @RequestBody McCafeQueryOrderVo queryOrderVo) {
return mcCafeOrderService.mcCafeQueryRecentOrder(queryOrderVo);
}
}
...@@ -97,15 +97,6 @@ public class OrderController { ...@@ -97,15 +97,6 @@ public class OrderController {
} }
/** /**
* 麦咖啡创建订单
*/
@ApiAnnotation(logMessage = "createMCCafeOrder")
@PostMapping("/MCoffee/createMCCafeOrder")
public BaseResponse createOrderMCCafe(@Validated @LogParams @RequestBody CreateOrderVo createOrderVo) {
return orderAdapterService.createMCCafeOrder(createOrderVo);
}
/**
* 扫脸支付下单 * 扫脸支付下单
*/ */
@ApiAnnotation(logMessage = "scanFaceCreateOrder") @ApiAnnotation(logMessage = "scanFaceCreateOrder")
...@@ -142,15 +133,6 @@ public class OrderController { ...@@ -142,15 +133,6 @@ public class OrderController {
} }
/** /**
* 麦咖啡订单支付成功后通知
*/
@ApiAnnotation(logMessage = "mcCafePaySuccessCallback")
@PostMapping({"/MCoffee/mcCafePaySuccessCallback","/openStoreMCCafeQueryPaymentCallback"})
public String mcCafePaySuccessCallback(@LogParams @RequestBody NewPaysuccessNoticeMessage message) {
return mcCafeOrderService.mcCafePaySuccessCallback(message);
}
/**
* 退款回掉通知 * 退款回掉通知
*/ */
@ApiAnnotation(logMessage = "refundNotifyCallback") @ApiAnnotation(logMessage = "refundNotifyCallback")
...@@ -169,15 +151,6 @@ public class OrderController { ...@@ -169,15 +151,6 @@ public class OrderController {
} }
/** /**
* 查询麦咖啡订单列表
*/
@ApiAnnotation(logMessage = "maCafeQueryOrders")
@PostMapping("/maCafeQueryOrders")
public BaseResponse maCafeQueryOrders(@Validated @LogParams @RequestBody McCafeQueryOrderVo queryOrderVo) {
return orderservice.mcCafeQueryOrders(queryOrderVo);
}
/**
* 围餐-预览订单 * 围餐-预览订单
* @param queryOrderVo * @param queryOrderVo
* @return * @return
...@@ -224,15 +197,6 @@ public class OrderController { ...@@ -224,15 +197,6 @@ public class OrderController {
/** /**
* 麦咖啡 获取订单详情
*/
@ApiAnnotation(logMessage = "mcCafeQueryOrderById")
@PostMapping("/mcCafeQueryOrderById")
public BaseResponse mcCafeQueryOrderById(@Validated @LogParams @RequestBody MaCafeQueryOrderVo queryOrderVo) {
return orderservice.mcCafeQueryOrderById(queryOrderVo);
}
/**
* 取消支付订单 * 取消支付订单
*/ */
@ApiAnnotation(logMessage = "cancelPayOrder") @ApiAnnotation(logMessage = "cancelPayOrder")
...@@ -270,24 +234,6 @@ public class OrderController { ...@@ -270,24 +234,6 @@ public class OrderController {
} }
/** /**
* 麦咖啡用户申请退款
*/
@ApiAnnotation(logMessage = "mcCafeRefund")
@PostMapping("/MCoffee/mcCafeRefund")
public BaseResponse mcCafeRefund(@Validated @LogParams @RequestBody OrderRefundVo orderRefundVo) {
return mcCafeOrderService.orderRefund(orderRefundVo);
}
/**
* 退款回掉通知
*/
@ApiAnnotation(logMessage = "mcCafeRefundNotifyCallback")
@PostMapping("/MCoffee/mcCafeRefundNotifyCallback")
public String mcCafeRefundNotifyCallback(@LogParams @RequestBody RefundNotifyCallbackRequestVo requestVo) {
return mcCafeOrderService.mcCafeRefundNotifyCallback(requestVo);
}
/**
* 获取订单排队号 * 获取订单排队号
*/ */
@ApiAnnotation(logMessage = "queueIndex") @ApiAnnotation(logMessage = "queueIndex")
...@@ -373,33 +319,6 @@ public class OrderController { ...@@ -373,33 +319,6 @@ public class OrderController {
} }
/** /**
* 麦咖啡催单
*/
@ApiAnnotation(logMessage = "reminder")
@PostMapping("/reminder")
public BaseResponse reminder(@Validated @LogParams @RequestBody ReminderVo reminderVo) {
return orderservice.reminder(reminderVo);
}
/**
* 麦咖啡根据订单号查询骑手位置
*/
@ApiAnnotation(logMessage = "listFreeRider")
@PostMapping("/listFreeRider")
public BaseResponse listFreeRider(@Validated @LogParams @RequestBody FreeRiderPositionVo vo) {
return orderservice.listFreeRider(vo);
}
/**
* 根据订单号查询订单状态和取餐码
*/
@ApiAnnotation(logMessage = "mcCafePollingPickUpCode")
@PostMapping("/mcCafePollingPickUpCode")
public BaseResponse mcCafePollingPickUpCode(@Validated @LogParams @RequestBody MaCafeQueryOrderVo vo) {
return orderservice.mcCafePollingPickUpCode(vo);
}
/**
* timeOutRefund * timeOutRefund
* @param timeOutOrderVo * @param timeOutOrderVo
* @return * @return
......
package cn.freemud.entities.vo.mccafe;
import cn.freemud.entities.vo.CartGoods;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* All rights Reserved, Designed By sunary.site
*
* @version v1.0
* @Title: IntelliJ IDEA
* @Package cn.freemud.service.impl.mcoffee.entity
* @Description: 请简单描述下这个类是做什么用的
* @author: yu.sun
* @date: 2021-01-26 09:50:21
* @Copyright: 2019 www.freemud.cn Inc. All rights reserved.
*/
@Data
public class RecentGoodsInfoVo {
@NotEmpty(message = "spuId不能为空")
private String spuId;
private String skuId;
/**
* 数量
*/
@NotNull(message = "商品数量不可为空")
private Integer qty;
/**
* 操作类型 1= 添加商品券 2=加价购
*/
private Integer operationType;
/**
* 套餐名称
*/
private String groupName;
/**
* 1.6.0 版本增加 分类名
*/
private String categoryName;
/**
* 商品额外的属性
*/
private List<CartGoodsExtra> extra;
/**
* 套餐固定商品
*/
private List<ComboxGoodsVo> productComboList;
/**
* 套餐可选商品
*/
private List<ComboxGoodsVo> productGroupList;
/**
* 加料
*/
private List<MaterialGoodsVo> productMaterialList;
/**
* 麦咖啡定制属性
*/
private List<SpecialExtra> specialExtra;
@Data
public final static class ComboxGoodsVo {
/**
* 麦咖啡多规格商品spuid
*/
private String spuId;
private String skuId;
private Integer qty;
/**
* 商品组Id
*/
private String productGroupId;
/**
* 麦咖啡空键位
*/
private String emptyKey;
/**
* 商品额外的属性
*/
List<CartGoods.CartGoodsExtra> extra;
private List<SpecialExtra> specialExtra;
/**
* 麦咖啡多规格商品加料
*/
private List<MaterialGoodsVo> productMaterialList;
}
@Data
public final static class MaterialGoodsVo {
/**
* 加料商品ID
*/
private String spuId;
/**
* 加料商品组ID
*/
private String groupId;
/**
* 数量
*/
private Integer qty;
/**
* 麦咖啡入机键位
*/
private String customerCode;
}
@Data
public final static class SpecialExtra {
/**
* 属性Id
*/
private String attributeId;
/**
* 属性名
*/
private String attributeName;
private String attributeForeignName;
/**
* 麦咖啡特定属性入机code
*/
private String specialCode;
}
@Data
public final static class CartGoodsExtra {
/**
* 属性Id
*/
private String attributeId;
/**
* 属性名
*/
private String attributeName;
private String attributeForeignName;
}
}
...@@ -40,5 +40,19 @@ public interface MCCafeOrderService { ...@@ -40,5 +40,19 @@ public interface MCCafeOrderService {
*/ */
String mcCafeRefundNotifyCallback(RefundNotifyCallbackRequestVo message); String mcCafeRefundNotifyCallback(RefundNotifyCallbackRequestVo message);
BaseResponse mcCafeQueryOrderById(MaCafeQueryOrderVo queryOrderVo);
BaseResponse mcCafeQueryOrders(McCafeQueryOrderVo queryOrderVo);
BaseResponse mcCafePollingPickUpCode(MaCafeQueryOrderVo vo);
BaseResponse reminder(ReminderVo reminderVo);
BaseResponse listFreeRider(FreeRiderPositionVo vo);
/**
* 查询麦咖啡最近已完成的一单
*/
BaseResponse mcCafeQueryRecentOrder(McCafeQueryOrderVo queryOrderVo);
} }
...@@ -127,16 +127,6 @@ public interface Orderservice { ...@@ -127,16 +127,6 @@ public interface Orderservice {
*/ */
BaseResponse queryOrderByConditions(QueryOrderByConditionsRequestVo queryOrderByConditionsRequestVo); BaseResponse queryOrderByConditions(QueryOrderByConditionsRequestVo queryOrderByConditionsRequestVo);
BaseResponse reminder(ReminderVo reminderVo);
BaseResponse listFreeRider(FreeRiderPositionVo vo);
BaseResponse mcCafeQueryOrderById(MaCafeQueryOrderVo queryOrderVo);
BaseResponse mcCafeQueryOrders(McCafeQueryOrderVo queryOrderVo);
BaseResponse mcCafePollingPickUpCode(MaCafeQueryOrderVo vo);
/** /**
* 通过订单号查询订单详情 * 通过订单号查询订单详情
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment