This commit is contained in:
parent
2e76407706
commit
41f2183d37
|
|
@ -0,0 +1,124 @@
|
|||
package com.bonus.canteen.core.order.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderDetail;
|
||||
import com.bonus.canteen.core.order.service.IOrderDetailService;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.BusinessType;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 订单详情Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/detail")
|
||||
public class OrderDetailController extends BaseController
|
||||
{
|
||||
private String prefix = "system/detail";
|
||||
|
||||
@Autowired
|
||||
private IOrderDetailService orderDetailService;
|
||||
|
||||
@GetMapping()
|
||||
public String detail()
|
||||
{
|
||||
return prefix + "/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单详情列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(OrderDetail orderDetail)
|
||||
{
|
||||
startPage();
|
||||
List<OrderDetail> list = orderDetailService.selectOrderDetailList(orderDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单详情列表
|
||||
*/
|
||||
@SysLog(title = "订单详情", module = "订单-订单详情", businessType = OperaType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public void export(OrderDetail orderDetail, HttpServletResponse response)
|
||||
{
|
||||
List<OrderDetail> list = orderDetailService.selectOrderDetailList(orderDetail);
|
||||
ExcelUtil<OrderDetail> util = new ExcelUtil<OrderDetail>(OrderDetail.class);
|
||||
util.exportExcel(response, list, "订单详情数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单详情
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存订单详情
|
||||
*/
|
||||
@SysLog(title = "订单详情", module = "订单-订单详情", businessType = OperaType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(OrderDetail orderDetail)
|
||||
{
|
||||
return toAjax(orderDetailService.insertOrderDetail(orderDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单详情
|
||||
*/
|
||||
@GetMapping("/edit/{detailId}")
|
||||
public String edit(@PathVariable("detailId") Long detailId, ModelMap mmap)
|
||||
{
|
||||
OrderDetail orderDetail = orderDetailService.selectOrderDetailByDetailId(detailId);
|
||||
mmap.put("orderDetail", orderDetail);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存订单详情
|
||||
*/
|
||||
@SysLog(title = "订单详情", module = "订单-订单详情", businessType = OperaType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(OrderDetail orderDetail)
|
||||
{
|
||||
return toAjax(orderDetailService.updateOrderDetail(orderDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单详情
|
||||
*/
|
||||
@SysLog(title = "订单详情", module = "订单-订单详情", businessType = OperaType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(List<Long> ids)
|
||||
{
|
||||
return toAjax(orderDetailService.deleteOrderDetailByDetailIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
package com.bonus.canteen.core.order.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderInfo;
|
||||
import com.bonus.canteen.core.order.service.IOrderInfoService;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.BusinessType;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 订单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/info")
|
||||
public class OrderInfoController extends BaseController
|
||||
{
|
||||
private String prefix = "system/info";
|
||||
|
||||
@Autowired
|
||||
private IOrderInfoService orderInfoService;
|
||||
|
||||
@GetMapping()
|
||||
public String info()
|
||||
{
|
||||
return prefix + "/info";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(OrderInfo orderInfo)
|
||||
{
|
||||
startPage();
|
||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单列表
|
||||
*/
|
||||
@SysLog(title = "订单", module = "订单", businessType = OperaType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public void export(OrderInfo orderInfo, HttpServletResponse response)
|
||||
{
|
||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||
ExcelUtil<OrderInfo> util = new ExcelUtil<OrderInfo>(OrderInfo.class);
|
||||
util.exportExcel(response, list, "订单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存订单
|
||||
*/
|
||||
@SysLog(title = "订单", module = "订单", businessType = OperaType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(OrderInfo orderInfo)
|
||||
{
|
||||
return toAjax(orderInfoService.insertOrderInfo(orderInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*/
|
||||
@GetMapping("/edit/{orderId}")
|
||||
public String edit(@PathVariable("orderId") Long orderId, ModelMap mmap)
|
||||
{
|
||||
OrderInfo orderInfo = orderInfoService.selectOrderInfoByOrderId(orderId);
|
||||
mmap.put("orderInfo", orderInfo);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存订单
|
||||
*/
|
||||
@SysLog(title = "订单", module = "订单", businessType = OperaType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(OrderInfo orderInfo)
|
||||
{
|
||||
return toAjax(orderInfoService.updateOrderInfo(orderInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
@SysLog(title = "订单", module = "订单", businessType = OperaType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(List<Long> ids)
|
||||
{
|
||||
return toAjax(orderInfoService.deleteOrderInfoByOrderIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
package com.bonus.canteen.core.order.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderShoppingCart;
|
||||
import com.bonus.canteen.core.order.service.IOrderShoppingCartService;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.BusinessType;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 订单购物车Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/cart")
|
||||
public class OrderShoppingCartController extends BaseController
|
||||
{
|
||||
private String prefix = "system/cart";
|
||||
|
||||
@Autowired
|
||||
private IOrderShoppingCartService orderShoppingCartService;
|
||||
|
||||
@GetMapping()
|
||||
public String cart()
|
||||
{
|
||||
return prefix + "/cart";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单购物车列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(OrderShoppingCart orderShoppingCart)
|
||||
{
|
||||
startPage();
|
||||
List<OrderShoppingCart> list = orderShoppingCartService.selectOrderShoppingCartList(orderShoppingCart);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单购物车列表
|
||||
*/
|
||||
@SysLog(title = "订单购物车", module = "订单-订单详情", businessType = OperaType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public void export(OrderShoppingCart orderShoppingCart, HttpServletResponse response)
|
||||
{
|
||||
List<OrderShoppingCart> list = orderShoppingCartService.selectOrderShoppingCartList(orderShoppingCart);
|
||||
ExcelUtil<OrderShoppingCart> util = new ExcelUtil<OrderShoppingCart>(OrderShoppingCart.class);
|
||||
util.exportExcel(response, list, "订单购物车数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单购物车
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存订单购物车
|
||||
*/
|
||||
@SysLog(title = "订单购物车", module = "订单-订单详情", businessType = OperaType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(OrderShoppingCart orderShoppingCart)
|
||||
{
|
||||
return toAjax(orderShoppingCartService.insertOrderShoppingCart(orderShoppingCart));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单购物车
|
||||
*/
|
||||
@GetMapping("/edit/{shoppingCartId}")
|
||||
public String edit(@PathVariable("shoppingCartId") Long shoppingCartId, ModelMap mmap)
|
||||
{
|
||||
OrderShoppingCart orderShoppingCart = orderShoppingCartService.selectOrderShoppingCartByShoppingCartId(shoppingCartId);
|
||||
mmap.put("orderShoppingCart", orderShoppingCart);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存订单购物车
|
||||
*/
|
||||
@SysLog(title = "订单购物车", module = "订单-订单详情", businessType = OperaType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(OrderShoppingCart orderShoppingCart)
|
||||
{
|
||||
return toAjax(orderShoppingCartService.updateOrderShoppingCart(orderShoppingCart));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单购物车
|
||||
*/
|
||||
@SysLog(title = "订单购物车", module = "订单-订单详情", businessType = OperaType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(List<Long> ids)
|
||||
{
|
||||
return toAjax(orderShoppingCartService.deleteOrderShoppingCartByShoppingCartIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,345 @@
|
|||
package com.bonus.canteen.core.order.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 订单详情对象 order_detail
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public class OrderDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 详情id */
|
||||
private Long detailId;
|
||||
|
||||
/** 订单id */
|
||||
@Excel(name = "订单id")
|
||||
private Long orderId;
|
||||
|
||||
/** 订单日期 yyyy-MM-dd */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "订单日期 yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderDate;
|
||||
|
||||
/** 商品菜品id */
|
||||
@Excel(name = "商品菜品id")
|
||||
private Long goodsId;
|
||||
|
||||
/** 商品菜品名称 */
|
||||
@Excel(name = "商品菜品名称")
|
||||
private String goodsName;
|
||||
|
||||
/** 商品菜品图片路径 */
|
||||
@Excel(name = "商品菜品图片路径")
|
||||
private String goodsImgUrl;
|
||||
|
||||
/** 菜品详情id */
|
||||
@Excel(name = "菜品详情id")
|
||||
private Long menuDetailId;
|
||||
|
||||
/** 售卖价格 分 */
|
||||
@Excel(name = "售卖价格 分")
|
||||
private Long salePrice;
|
||||
|
||||
/** 优惠价格 分 */
|
||||
@Excel(name = "优惠价格 分")
|
||||
private Long discountPrice;
|
||||
|
||||
/** 计算价格 分 会员为优惠价格 非会员为售卖价格 */
|
||||
@Excel(name = "计算价格 分 会员为优惠价格 非会员为售卖价格")
|
||||
private Long finalPrice;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long quantity;
|
||||
|
||||
/** 销售方式 1 按份 */
|
||||
@Excel(name = "销售方式 1 按份")
|
||||
private Long salesMode;
|
||||
|
||||
/** 明细类别 1 菜品 2 套餐 3 商品 4 按键 5 补扣 */
|
||||
@Excel(name = "明细类别 1 菜品 2 套餐 3 商品 4 按键 5 补扣")
|
||||
private Long detailType;
|
||||
|
||||
/** 订单详情总金额 分 */
|
||||
@Excel(name = "订单详情总金额 分")
|
||||
private Long totalAmount;
|
||||
|
||||
/** 订单详情计算总金额 分 会员为优惠总额 非会员为售卖总额 */
|
||||
@Excel(name = "订单详情计算总金额 分 会员为优惠总额 非会员为售卖总额")
|
||||
private Long calcTotalAmount;
|
||||
|
||||
/** 实际付款金额 分 */
|
||||
@Excel(name = "实际付款金额 分")
|
||||
private Long realAmount;
|
||||
|
||||
/** 已退金额 分 */
|
||||
@Excel(name = "已退金额 分")
|
||||
private Long refundAmount;
|
||||
|
||||
/** 订单详情状态 1 正常 2 已退菜 3 部分退菜 */
|
||||
@Excel(name = "订单详情状态 1 正常 2 已退菜 3 部分退菜")
|
||||
private Long detailState;
|
||||
|
||||
/** 商品已退数量 */
|
||||
@Excel(name = "商品已退数量")
|
||||
private Long refundNum;
|
||||
|
||||
/** 设备sn */
|
||||
@Excel(name = "设备sn")
|
||||
private String deviceSn;
|
||||
|
||||
/** 流水号 */
|
||||
@Excel(name = "流水号")
|
||||
private String serialNum;
|
||||
|
||||
public void setDetailId(Long detailId)
|
||||
{
|
||||
this.detailId = detailId;
|
||||
}
|
||||
|
||||
public Long getDetailId()
|
||||
{
|
||||
return detailId;
|
||||
}
|
||||
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderDate(Date orderDate)
|
||||
{
|
||||
this.orderDate = orderDate;
|
||||
}
|
||||
|
||||
public Date getOrderDate()
|
||||
{
|
||||
return orderDate;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId)
|
||||
{
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getGoodsId()
|
||||
{
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName)
|
||||
{
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getGoodsName()
|
||||
{
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsImgUrl(String goodsImgUrl)
|
||||
{
|
||||
this.goodsImgUrl = goodsImgUrl;
|
||||
}
|
||||
|
||||
public String getGoodsImgUrl()
|
||||
{
|
||||
return goodsImgUrl;
|
||||
}
|
||||
|
||||
public void setMenuDetailId(Long menuDetailId)
|
||||
{
|
||||
this.menuDetailId = menuDetailId;
|
||||
}
|
||||
|
||||
public Long getMenuDetailId()
|
||||
{
|
||||
return menuDetailId;
|
||||
}
|
||||
|
||||
public void setSalePrice(Long salePrice)
|
||||
{
|
||||
this.salePrice = salePrice;
|
||||
}
|
||||
|
||||
public Long getSalePrice()
|
||||
{
|
||||
return salePrice;
|
||||
}
|
||||
|
||||
public void setDiscountPrice(Long discountPrice)
|
||||
{
|
||||
this.discountPrice = discountPrice;
|
||||
}
|
||||
|
||||
public Long getDiscountPrice()
|
||||
{
|
||||
return discountPrice;
|
||||
}
|
||||
|
||||
public void setFinalPrice(Long finalPrice)
|
||||
{
|
||||
this.finalPrice = finalPrice;
|
||||
}
|
||||
|
||||
public Long getFinalPrice()
|
||||
{
|
||||
return finalPrice;
|
||||
}
|
||||
|
||||
public void setQuantity(Long quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Long getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setSalesMode(Long salesMode)
|
||||
{
|
||||
this.salesMode = salesMode;
|
||||
}
|
||||
|
||||
public Long getSalesMode()
|
||||
{
|
||||
return salesMode;
|
||||
}
|
||||
|
||||
public void setDetailType(Long detailType)
|
||||
{
|
||||
this.detailType = detailType;
|
||||
}
|
||||
|
||||
public Long getDetailType()
|
||||
{
|
||||
return detailType;
|
||||
}
|
||||
|
||||
public void setTotalAmount(Long totalAmount)
|
||||
{
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
|
||||
public Long getTotalAmount()
|
||||
{
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
public void setCalcTotalAmount(Long calcTotalAmount)
|
||||
{
|
||||
this.calcTotalAmount = calcTotalAmount;
|
||||
}
|
||||
|
||||
public Long getCalcTotalAmount()
|
||||
{
|
||||
return calcTotalAmount;
|
||||
}
|
||||
|
||||
public void setRealAmount(Long realAmount)
|
||||
{
|
||||
this.realAmount = realAmount;
|
||||
}
|
||||
|
||||
public Long getRealAmount()
|
||||
{
|
||||
return realAmount;
|
||||
}
|
||||
|
||||
public void setRefundAmount(Long refundAmount)
|
||||
{
|
||||
this.refundAmount = refundAmount;
|
||||
}
|
||||
|
||||
public Long getRefundAmount()
|
||||
{
|
||||
return refundAmount;
|
||||
}
|
||||
|
||||
public void setDetailState(Long detailState)
|
||||
{
|
||||
this.detailState = detailState;
|
||||
}
|
||||
|
||||
public Long getDetailState()
|
||||
{
|
||||
return detailState;
|
||||
}
|
||||
|
||||
public void setRefundNum(Long refundNum)
|
||||
{
|
||||
this.refundNum = refundNum;
|
||||
}
|
||||
|
||||
public Long getRefundNum()
|
||||
{
|
||||
return refundNum;
|
||||
}
|
||||
|
||||
public void setDeviceSn(String deviceSn)
|
||||
{
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public String getDeviceSn()
|
||||
{
|
||||
return deviceSn;
|
||||
}
|
||||
|
||||
public void setSerialNum(String serialNum)
|
||||
{
|
||||
this.serialNum = serialNum;
|
||||
}
|
||||
|
||||
public String getSerialNum()
|
||||
{
|
||||
return serialNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("detailId", getDetailId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("orderDate", getOrderDate())
|
||||
.append("goodsId", getGoodsId())
|
||||
.append("goodsName", getGoodsName())
|
||||
.append("goodsImgUrl", getGoodsImgUrl())
|
||||
.append("menuDetailId", getMenuDetailId())
|
||||
.append("salePrice", getSalePrice())
|
||||
.append("discountPrice", getDiscountPrice())
|
||||
.append("finalPrice", getFinalPrice())
|
||||
.append("quantity", getQuantity())
|
||||
.append("salesMode", getSalesMode())
|
||||
.append("detailType", getDetailType())
|
||||
.append("totalAmount", getTotalAmount())
|
||||
.append("calcTotalAmount", getCalcTotalAmount())
|
||||
.append("realAmount", getRealAmount())
|
||||
.append("refundAmount", getRefundAmount())
|
||||
.append("detailState", getDetailState())
|
||||
.append("refundNum", getRefundNum())
|
||||
.append("deviceSn", getDeviceSn())
|
||||
.append("serialNum", getSerialNum())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,528 @@
|
|||
package com.bonus.canteen.core.order.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 订单对象 order_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public class OrderInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 订单号 */
|
||||
private Long orderId;
|
||||
|
||||
/** 设备订单号 */
|
||||
@Excel(name = "设备订单号")
|
||||
private String deviceOrderId;
|
||||
|
||||
/** 设备sn */
|
||||
@Excel(name = "设备sn")
|
||||
private String deviceSn;
|
||||
|
||||
/** 设备编号 */
|
||||
@Excel(name = "设备编号")
|
||||
private String deviceNum;
|
||||
|
||||
/** 人员编号 */
|
||||
@Excel(name = "人员编号")
|
||||
private Long userId;
|
||||
|
||||
/** 身份验证方式 1 刷卡 2 刷脸 3 扫码 */
|
||||
@Excel(name = "身份验证方式 1 刷卡 2 刷脸 3 扫码")
|
||||
private Long identityVerification;
|
||||
|
||||
/** 订单来源类型 */
|
||||
@Excel(name = "订单来源类型")
|
||||
private Long sourceType;
|
||||
|
||||
/** 是否在线订单 1 是 2 否 */
|
||||
@Excel(name = "是否在线订单 1 是 2 否")
|
||||
private Long isOnline;
|
||||
|
||||
/** 食堂id */
|
||||
@Excel(name = "食堂id")
|
||||
private Long canteenId;
|
||||
|
||||
/** 档口id */
|
||||
@Excel(name = "档口id")
|
||||
private Long stallId;
|
||||
|
||||
/** 餐次类型 1-早餐 2-午餐 3-晚餐 4-下午茶 5-夜宵 */
|
||||
@Excel(name = "餐次类型 1-早餐 2-午餐 3-晚餐 4-下午茶 5-夜宵")
|
||||
private Long mealtimeType;
|
||||
|
||||
/** 餐次名称 */
|
||||
@Excel(name = "餐次名称")
|
||||
private String mealtimeName;
|
||||
|
||||
/** 订单日期 yyyy-MM-dd */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "订单日期 yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderDate;
|
||||
|
||||
/** 应付金额 分 */
|
||||
@Excel(name = "应付金额 分")
|
||||
private Long payableAmount;
|
||||
|
||||
/** 优惠金额 分 */
|
||||
@Excel(name = "优惠金额 分")
|
||||
private Long discountsAmount;
|
||||
|
||||
/** 实付金额 分 */
|
||||
@Excel(name = "实付金额 分")
|
||||
private Long realAmount;
|
||||
|
||||
/** 账户支付金额 分 */
|
||||
@Excel(name = "账户支付金额 分")
|
||||
private Long accountPayAmount;
|
||||
|
||||
/** 外部支付金额 分(除账户外) */
|
||||
@Excel(name = "外部支付金额 分", readConverterExp = "除=账户外")
|
||||
private Long externalPayAmount;
|
||||
|
||||
/** 累计退款金额 分 */
|
||||
@Excel(name = "累计退款金额 分")
|
||||
private Long refundAmount;
|
||||
|
||||
/** 下单时间 yyyy-MM-dd HH:mm:ss */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "下单时间 yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderTime;
|
||||
|
||||
/** 订单类型 1 当餐 2 预订餐 3 报餐 4 商城 11 线下消费 12 自助餐 21 补扣 22 外部订单 */
|
||||
@Excel(name = "订单类型 1 当餐 2 预订餐 3 报餐 4 商城 11 线下消费 12 自助餐 21 补扣 22 外部订单")
|
||||
private Long orderType;
|
||||
|
||||
/** 订单状态 1 已下单 2 已完成 3 已取消 */
|
||||
@Excel(name = "订单状态 1 已下单 2 已完成 3 已取消")
|
||||
private Long orderState;
|
||||
|
||||
/** 订单退款状态 1 未退单 2 已退单 3 部分退单 */
|
||||
@Excel(name = "订单退款状态 1 未退单 2 已退单 3 部分退单")
|
||||
private Long orderRefundState;
|
||||
|
||||
/** 扣款类型 1 下单扣款 2 核销扣款 */
|
||||
@Excel(name = "扣款类型 1 下单扣款 2 核销扣款")
|
||||
private Long deductionType;
|
||||
|
||||
/** 支付时间 yyyy-MM-dd HH:mm:ss */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "支付时间 yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date payTime;
|
||||
|
||||
/** 支付方式 */
|
||||
@Excel(name = "支付方式")
|
||||
private Long payType;
|
||||
|
||||
/** 支付渠道 */
|
||||
@Excel(name = "支付渠道")
|
||||
private Long payChannel;
|
||||
|
||||
/** 支付状态 1 待支付 2 支付中 3 支付成功 4 支付失败 5 支付取消 6 部分支付 */
|
||||
@Excel(name = "支付状态 1 待支付 2 支付中 3 支付成功 4 支付失败 5 支付取消 6 部分支付")
|
||||
private Long payState;
|
||||
|
||||
/** 支付参数 刷卡:卡号 扫码:二维码 */
|
||||
@Excel(name = "支付参数 刷卡:卡号 扫码:二维码")
|
||||
private String payParam;
|
||||
|
||||
/** 配送费 分 */
|
||||
@Excel(name = "配送费 分")
|
||||
private Long deliveryAmount;
|
||||
|
||||
/** 包装费 分 */
|
||||
@Excel(name = "包装费 分")
|
||||
private Long packingAmount;
|
||||
|
||||
/** 配送方式 */
|
||||
@Excel(name = "配送方式")
|
||||
private Long deliveryType;
|
||||
|
||||
/** 评论状态 1 已评论 2 未评论 */
|
||||
@Excel(name = "评论状态 1 已评论 2 未评论")
|
||||
private Long commentState;
|
||||
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setDeviceOrderId(String deviceOrderId)
|
||||
{
|
||||
this.deviceOrderId = deviceOrderId;
|
||||
}
|
||||
|
||||
public String getDeviceOrderId()
|
||||
{
|
||||
return deviceOrderId;
|
||||
}
|
||||
|
||||
public void setDeviceSn(String deviceSn)
|
||||
{
|
||||
this.deviceSn = deviceSn;
|
||||
}
|
||||
|
||||
public String getDeviceSn()
|
||||
{
|
||||
return deviceSn;
|
||||
}
|
||||
|
||||
public void setDeviceNum(String deviceNum)
|
||||
{
|
||||
this.deviceNum = deviceNum;
|
||||
}
|
||||
|
||||
public String getDeviceNum()
|
||||
{
|
||||
return deviceNum;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setIdentityVerification(Long identityVerification)
|
||||
{
|
||||
this.identityVerification = identityVerification;
|
||||
}
|
||||
|
||||
public Long getIdentityVerification()
|
||||
{
|
||||
return identityVerification;
|
||||
}
|
||||
|
||||
public void setSourceType(Long sourceType)
|
||||
{
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public Long getSourceType()
|
||||
{
|
||||
return sourceType;
|
||||
}
|
||||
|
||||
public void setIsOnline(Long isOnline)
|
||||
{
|
||||
this.isOnline = isOnline;
|
||||
}
|
||||
|
||||
public Long getIsOnline()
|
||||
{
|
||||
return isOnline;
|
||||
}
|
||||
|
||||
public void setCanteenId(Long canteenId)
|
||||
{
|
||||
this.canteenId = canteenId;
|
||||
}
|
||||
|
||||
public Long getCanteenId()
|
||||
{
|
||||
return canteenId;
|
||||
}
|
||||
|
||||
public void setStallId(Long stallId)
|
||||
{
|
||||
this.stallId = stallId;
|
||||
}
|
||||
|
||||
public Long getStallId()
|
||||
{
|
||||
return stallId;
|
||||
}
|
||||
|
||||
public void setMealtimeType(Long mealtimeType)
|
||||
{
|
||||
this.mealtimeType = mealtimeType;
|
||||
}
|
||||
|
||||
public Long getMealtimeType()
|
||||
{
|
||||
return mealtimeType;
|
||||
}
|
||||
|
||||
public void setMealtimeName(String mealtimeName)
|
||||
{
|
||||
this.mealtimeName = mealtimeName;
|
||||
}
|
||||
|
||||
public String getMealtimeName()
|
||||
{
|
||||
return mealtimeName;
|
||||
}
|
||||
|
||||
public void setOrderDate(Date orderDate)
|
||||
{
|
||||
this.orderDate = orderDate;
|
||||
}
|
||||
|
||||
public Date getOrderDate()
|
||||
{
|
||||
return orderDate;
|
||||
}
|
||||
|
||||
public void setPayableAmount(Long payableAmount)
|
||||
{
|
||||
this.payableAmount = payableAmount;
|
||||
}
|
||||
|
||||
public Long getPayableAmount()
|
||||
{
|
||||
return payableAmount;
|
||||
}
|
||||
|
||||
public void setDiscountsAmount(Long discountsAmount)
|
||||
{
|
||||
this.discountsAmount = discountsAmount;
|
||||
}
|
||||
|
||||
public Long getDiscountsAmount()
|
||||
{
|
||||
return discountsAmount;
|
||||
}
|
||||
|
||||
public void setRealAmount(Long realAmount)
|
||||
{
|
||||
this.realAmount = realAmount;
|
||||
}
|
||||
|
||||
public Long getRealAmount()
|
||||
{
|
||||
return realAmount;
|
||||
}
|
||||
|
||||
public void setAccountPayAmount(Long accountPayAmount)
|
||||
{
|
||||
this.accountPayAmount = accountPayAmount;
|
||||
}
|
||||
|
||||
public Long getAccountPayAmount()
|
||||
{
|
||||
return accountPayAmount;
|
||||
}
|
||||
|
||||
public void setExternalPayAmount(Long externalPayAmount)
|
||||
{
|
||||
this.externalPayAmount = externalPayAmount;
|
||||
}
|
||||
|
||||
public Long getExternalPayAmount()
|
||||
{
|
||||
return externalPayAmount;
|
||||
}
|
||||
|
||||
public void setRefundAmount(Long refundAmount)
|
||||
{
|
||||
this.refundAmount = refundAmount;
|
||||
}
|
||||
|
||||
public Long getRefundAmount()
|
||||
{
|
||||
return refundAmount;
|
||||
}
|
||||
|
||||
public void setOrderTime(Date orderTime)
|
||||
{
|
||||
this.orderTime = orderTime;
|
||||
}
|
||||
|
||||
public Date getOrderTime()
|
||||
{
|
||||
return orderTime;
|
||||
}
|
||||
|
||||
public void setOrderType(Long orderType)
|
||||
{
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public Long getOrderType()
|
||||
{
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setOrderState(Long orderState)
|
||||
{
|
||||
this.orderState = orderState;
|
||||
}
|
||||
|
||||
public Long getOrderState()
|
||||
{
|
||||
return orderState;
|
||||
}
|
||||
|
||||
public void setOrderRefundState(Long orderRefundState)
|
||||
{
|
||||
this.orderRefundState = orderRefundState;
|
||||
}
|
||||
|
||||
public Long getOrderRefundState()
|
||||
{
|
||||
return orderRefundState;
|
||||
}
|
||||
|
||||
public void setDeductionType(Long deductionType)
|
||||
{
|
||||
this.deductionType = deductionType;
|
||||
}
|
||||
|
||||
public Long getDeductionType()
|
||||
{
|
||||
return deductionType;
|
||||
}
|
||||
|
||||
public void setPayTime(Date payTime)
|
||||
{
|
||||
this.payTime = payTime;
|
||||
}
|
||||
|
||||
public Date getPayTime()
|
||||
{
|
||||
return payTime;
|
||||
}
|
||||
|
||||
public void setPayType(Long payType)
|
||||
{
|
||||
this.payType = payType;
|
||||
}
|
||||
|
||||
public Long getPayType()
|
||||
{
|
||||
return payType;
|
||||
}
|
||||
|
||||
public void setPayChannel(Long payChannel)
|
||||
{
|
||||
this.payChannel = payChannel;
|
||||
}
|
||||
|
||||
public Long getPayChannel()
|
||||
{
|
||||
return payChannel;
|
||||
}
|
||||
|
||||
public void setPayState(Long payState)
|
||||
{
|
||||
this.payState = payState;
|
||||
}
|
||||
|
||||
public Long getPayState()
|
||||
{
|
||||
return payState;
|
||||
}
|
||||
|
||||
public void setPayParam(String payParam)
|
||||
{
|
||||
this.payParam = payParam;
|
||||
}
|
||||
|
||||
public String getPayParam()
|
||||
{
|
||||
return payParam;
|
||||
}
|
||||
|
||||
public void setDeliveryAmount(Long deliveryAmount)
|
||||
{
|
||||
this.deliveryAmount = deliveryAmount;
|
||||
}
|
||||
|
||||
public Long getDeliveryAmount()
|
||||
{
|
||||
return deliveryAmount;
|
||||
}
|
||||
|
||||
public void setPackingAmount(Long packingAmount)
|
||||
{
|
||||
this.packingAmount = packingAmount;
|
||||
}
|
||||
|
||||
public Long getPackingAmount()
|
||||
{
|
||||
return packingAmount;
|
||||
}
|
||||
|
||||
public void setDeliveryType(Long deliveryType)
|
||||
{
|
||||
this.deliveryType = deliveryType;
|
||||
}
|
||||
|
||||
public Long getDeliveryType()
|
||||
{
|
||||
return deliveryType;
|
||||
}
|
||||
|
||||
public void setCommentState(Long commentState)
|
||||
{
|
||||
this.commentState = commentState;
|
||||
}
|
||||
|
||||
public Long getCommentState()
|
||||
{
|
||||
return commentState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("orderId", getOrderId())
|
||||
.append("deviceOrderId", getDeviceOrderId())
|
||||
.append("deviceSn", getDeviceSn())
|
||||
.append("deviceNum", getDeviceNum())
|
||||
.append("userId", getUserId())
|
||||
.append("identityVerification", getIdentityVerification())
|
||||
.append("sourceType", getSourceType())
|
||||
.append("isOnline", getIsOnline())
|
||||
.append("canteenId", getCanteenId())
|
||||
.append("stallId", getStallId())
|
||||
.append("mealtimeType", getMealtimeType())
|
||||
.append("mealtimeName", getMealtimeName())
|
||||
.append("orderDate", getOrderDate())
|
||||
.append("payableAmount", getPayableAmount())
|
||||
.append("discountsAmount", getDiscountsAmount())
|
||||
.append("realAmount", getRealAmount())
|
||||
.append("accountPayAmount", getAccountPayAmount())
|
||||
.append("externalPayAmount", getExternalPayAmount())
|
||||
.append("refundAmount", getRefundAmount())
|
||||
.append("orderTime", getOrderTime())
|
||||
.append("orderType", getOrderType())
|
||||
.append("orderState", getOrderState())
|
||||
.append("orderRefundState", getOrderRefundState())
|
||||
.append("deductionType", getDeductionType())
|
||||
.append("payTime", getPayTime())
|
||||
.append("payType", getPayType())
|
||||
.append("payChannel", getPayChannel())
|
||||
.append("payState", getPayState())
|
||||
.append("payParam", getPayParam())
|
||||
.append("deliveryAmount", getDeliveryAmount())
|
||||
.append("packingAmount", getPackingAmount())
|
||||
.append("deliveryType", getDeliveryType())
|
||||
.append("commentState", getCommentState())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
package com.bonus.canteen.core.order.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 订单购物车对象 order_shopping_cart
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public class OrderShoppingCart extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long shoppingCartId;
|
||||
|
||||
/** 人员id */
|
||||
@Excel(name = "人员id")
|
||||
private Long userId;
|
||||
|
||||
/** 菜谱id */
|
||||
@Excel(name = "菜谱id")
|
||||
private Long menuId;
|
||||
|
||||
/** 食堂id */
|
||||
@Excel(name = "食堂id")
|
||||
private Long canteenId;
|
||||
|
||||
/** 档口id */
|
||||
@Excel(name = "档口id")
|
||||
private Long stallId;
|
||||
|
||||
/** 商品菜品id */
|
||||
@Excel(name = "商品菜品id")
|
||||
private Long goodsId;
|
||||
|
||||
/** 商品菜品名称 */
|
||||
@Excel(name = "商品菜品名称")
|
||||
private String goodsName;
|
||||
|
||||
/** 商品菜品图片路径 */
|
||||
@Excel(name = "商品菜品图片路径")
|
||||
private String goodsImgUrl;
|
||||
|
||||
/** 数量/重量 */
|
||||
@Excel(name = "数量/重量")
|
||||
private Long quantity;
|
||||
|
||||
/** 订单类型 */
|
||||
@Excel(name = "订单类型")
|
||||
private Long orderType;
|
||||
|
||||
/** 明细类别 1 菜品 2 套餐 3 商品 4 按键 5 补扣 6 报餐 */
|
||||
@Excel(name = "明细类别 1 菜品 2 套餐 3 商品 4 按键 5 补扣 6 报餐")
|
||||
private Long detailType;
|
||||
|
||||
/** 订单日期 yyyy-MM-dd */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "订单日期 yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderDate;
|
||||
|
||||
/** 餐次类型 1-早餐 2-午餐 3-晚餐 4-下午茶 5-夜宵 */
|
||||
@Excel(name = "餐次类型 1-早餐 2-午餐 3-晚餐 4-下午茶 5-夜宵")
|
||||
private Long mealtimeType;
|
||||
|
||||
public void setShoppingCartId(Long shoppingCartId)
|
||||
{
|
||||
this.shoppingCartId = shoppingCartId;
|
||||
}
|
||||
|
||||
public Long getShoppingCartId()
|
||||
{
|
||||
return shoppingCartId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setMenuId(Long menuId)
|
||||
{
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public Long getMenuId()
|
||||
{
|
||||
return menuId;
|
||||
}
|
||||
|
||||
public void setCanteenId(Long canteenId)
|
||||
{
|
||||
this.canteenId = canteenId;
|
||||
}
|
||||
|
||||
public Long getCanteenId()
|
||||
{
|
||||
return canteenId;
|
||||
}
|
||||
|
||||
public void setStallId(Long stallId)
|
||||
{
|
||||
this.stallId = stallId;
|
||||
}
|
||||
|
||||
public Long getStallId()
|
||||
{
|
||||
return stallId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId)
|
||||
{
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getGoodsId()
|
||||
{
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName)
|
||||
{
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getGoodsName()
|
||||
{
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsImgUrl(String goodsImgUrl)
|
||||
{
|
||||
this.goodsImgUrl = goodsImgUrl;
|
||||
}
|
||||
|
||||
public String getGoodsImgUrl()
|
||||
{
|
||||
return goodsImgUrl;
|
||||
}
|
||||
|
||||
public void setQuantity(Long quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Long getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setOrderType(Long orderType)
|
||||
{
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public Long getOrderType()
|
||||
{
|
||||
return orderType;
|
||||
}
|
||||
|
||||
public void setDetailType(Long detailType)
|
||||
{
|
||||
this.detailType = detailType;
|
||||
}
|
||||
|
||||
public Long getDetailType()
|
||||
{
|
||||
return detailType;
|
||||
}
|
||||
|
||||
public void setOrderDate(Date orderDate)
|
||||
{
|
||||
this.orderDate = orderDate;
|
||||
}
|
||||
|
||||
public Date getOrderDate()
|
||||
{
|
||||
return orderDate;
|
||||
}
|
||||
|
||||
public void setMealtimeType(Long mealtimeType)
|
||||
{
|
||||
this.mealtimeType = mealtimeType;
|
||||
}
|
||||
|
||||
public Long getMealtimeType()
|
||||
{
|
||||
return mealtimeType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("shoppingCartId", getShoppingCartId())
|
||||
.append("userId", getUserId())
|
||||
.append("menuId", getMenuId())
|
||||
.append("canteenId", getCanteenId())
|
||||
.append("stallId", getStallId())
|
||||
.append("goodsId", getGoodsId())
|
||||
.append("goodsName", getGoodsName())
|
||||
.append("goodsImgUrl", getGoodsImgUrl())
|
||||
.append("quantity", getQuantity())
|
||||
.append("orderType", getOrderType())
|
||||
.append("detailType", getDetailType())
|
||||
.append("orderDate", getOrderDate())
|
||||
.append("mealtimeType", getMealtimeType())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.canteen.core.order.mapper;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单详情Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface OrderDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单详情
|
||||
*
|
||||
* @param detailId 订单详情主键
|
||||
* @return 订单详情
|
||||
*/
|
||||
public OrderDetail selectOrderDetailByDetailId(Long detailId);
|
||||
|
||||
/**
|
||||
* 查询订单详情列表
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
* @return 订单详情集合
|
||||
*/
|
||||
public List<OrderDetail> selectOrderDetailList(OrderDetail orderDetail);
|
||||
|
||||
/**
|
||||
* 新增订单详情
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderDetail(OrderDetail orderDetail);
|
||||
|
||||
/**
|
||||
* 修改订单详情
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderDetail(OrderDetail orderDetail);
|
||||
|
||||
/**
|
||||
* 删除订单详情
|
||||
*
|
||||
* @param detailId 订单详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderDetailByDetailId(Long detailId);
|
||||
|
||||
/**
|
||||
* 批量删除订单详情
|
||||
*
|
||||
* @param detailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderDetailByDetailIds(List<Long> detailIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.canteen.core.order.mapper;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface OrderInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单
|
||||
*
|
||||
* @param orderId 订单主键
|
||||
* @return 订单
|
||||
*/
|
||||
public OrderInfo selectOrderInfoByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 订单集合
|
||||
*/
|
||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 删除订单
|
||||
*
|
||||
* @param orderId 订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param orderIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByOrderIds(List<Long> orderIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.canteen.core.order.mapper;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderShoppingCart;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单购物车Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface OrderShoppingCartMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单购物车
|
||||
*
|
||||
* @param shoppingCartId 订单购物车主键
|
||||
* @return 订单购物车
|
||||
*/
|
||||
public OrderShoppingCart selectOrderShoppingCartByShoppingCartId(Long shoppingCartId);
|
||||
|
||||
/**
|
||||
* 查询订单购物车列表
|
||||
*
|
||||
* @param orderShoppingCart 订单购物车
|
||||
* @return 订单购物车集合
|
||||
*/
|
||||
public List<OrderShoppingCart> selectOrderShoppingCartList(OrderShoppingCart orderShoppingCart);
|
||||
|
||||
/**
|
||||
* 新增订单购物车
|
||||
*
|
||||
* @param orderShoppingCart 订单购物车
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderShoppingCart(OrderShoppingCart orderShoppingCart);
|
||||
|
||||
/**
|
||||
* 修改订单购物车
|
||||
*
|
||||
* @param orderShoppingCart 订单购物车
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderShoppingCart(OrderShoppingCart orderShoppingCart);
|
||||
|
||||
/**
|
||||
* 删除订单购物车
|
||||
*
|
||||
* @param shoppingCartId 订单购物车主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderShoppingCartByShoppingCartId(Long shoppingCartId);
|
||||
|
||||
/**
|
||||
* 批量删除订单购物车
|
||||
*
|
||||
* @param shoppingCartIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderShoppingCartByShoppingCartIds(List<Long> shoppingCartIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.canteen.core.order.service;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单详情Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface IOrderDetailService
|
||||
{
|
||||
/**
|
||||
* 查询订单详情
|
||||
*
|
||||
* @param detailId 订单详情主键
|
||||
* @return 订单详情
|
||||
*/
|
||||
public OrderDetail selectOrderDetailByDetailId(Long detailId);
|
||||
|
||||
/**
|
||||
* 查询订单详情列表
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
* @return 订单详情集合
|
||||
*/
|
||||
public List<OrderDetail> selectOrderDetailList(OrderDetail orderDetail);
|
||||
|
||||
/**
|
||||
* 新增订单详情
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderDetail(OrderDetail orderDetail);
|
||||
|
||||
/**
|
||||
* 修改订单详情
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderDetail(OrderDetail orderDetail);
|
||||
|
||||
/**
|
||||
* 批量删除订单详情
|
||||
*
|
||||
* @param detailIds 需要删除的订单详情主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderDetailByDetailIds(List<Long> detailIds);
|
||||
|
||||
/**
|
||||
* 删除订单详情信息
|
||||
*
|
||||
* @param detailId 订单详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderDetailByDetailId(Long detailId);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.canteen.core.order.service;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface IOrderInfoService
|
||||
{
|
||||
/**
|
||||
* 查询订单
|
||||
*
|
||||
* @param orderId 订单主键
|
||||
* @return 订单
|
||||
*/
|
||||
public OrderInfo selectOrderInfoByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 订单集合
|
||||
*/
|
||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderInfo(OrderInfo orderInfo);
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param orderIds 需要删除的订单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByOrderIds(List<Long> orderIds);
|
||||
|
||||
/**
|
||||
* 删除订单信息
|
||||
*
|
||||
* @param orderId 订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderInfoByOrderId(Long orderId);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.canteen.core.order.service;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderShoppingCart;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单购物车Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
public interface IOrderShoppingCartService
|
||||
{
|
||||
/**
|
||||
* 查询订单购物车
|
||||
*
|
||||
* @param shoppingCartId 订单购物车主键
|
||||
* @return 订单购物车
|
||||
*/
|
||||
public OrderShoppingCart selectOrderShoppingCartByShoppingCartId(Long shoppingCartId);
|
||||
|
||||
/**
|
||||
* 查询订单购物车列表
|
||||
*
|
||||
* @param orderShoppingCart 订单购物车
|
||||
* @return 订单购物车集合
|
||||
*/
|
||||
public List<OrderShoppingCart> selectOrderShoppingCartList(OrderShoppingCart orderShoppingCart);
|
||||
|
||||
/**
|
||||
* 新增订单购物车
|
||||
*
|
||||
* @param orderShoppingCart 订单购物车
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrderShoppingCart(OrderShoppingCart orderShoppingCart);
|
||||
|
||||
/**
|
||||
* 修改订单购物车
|
||||
*
|
||||
* @param orderShoppingCart 订单购物车
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrderShoppingCart(OrderShoppingCart orderShoppingCart);
|
||||
|
||||
/**
|
||||
* 批量删除订单购物车
|
||||
*
|
||||
* @param shoppingCartIds 需要删除的订单购物车主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderShoppingCartByShoppingCartIds(List<Long> shoppingCartIds);
|
||||
|
||||
/**
|
||||
* 删除订单购物车信息
|
||||
*
|
||||
* @param shoppingCartId 订单购物车主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderShoppingCartByShoppingCartId(Long shoppingCartId);
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.bonus.canteen.core.order.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderDetail;
|
||||
import com.bonus.canteen.core.order.mapper.OrderDetailMapper;
|
||||
import com.bonus.canteen.core.order.service.IOrderDetailService;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 订单详情Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Service
|
||||
public class OrderDetailServiceImpl implements IOrderDetailService
|
||||
{
|
||||
@Autowired
|
||||
private OrderDetailMapper orderDetailMapper;
|
||||
|
||||
/**
|
||||
* 查询订单详情
|
||||
*
|
||||
* @param detailId 订单详情主键
|
||||
* @return 订单详情
|
||||
*/
|
||||
@Override
|
||||
public OrderDetail selectOrderDetailByDetailId(Long detailId)
|
||||
{
|
||||
return orderDetailMapper.selectOrderDetailByDetailId(detailId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单详情列表
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
* @return 订单详情
|
||||
*/
|
||||
@Override
|
||||
public List<OrderDetail> selectOrderDetailList(OrderDetail orderDetail)
|
||||
{
|
||||
return orderDetailMapper.selectOrderDetailList(orderDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单详情
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOrderDetail(OrderDetail orderDetail)
|
||||
{
|
||||
orderDetail.setCreateTime(DateUtils.getNowDate());
|
||||
return orderDetailMapper.insertOrderDetail(orderDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单详情
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOrderDetail(OrderDetail orderDetail)
|
||||
{
|
||||
orderDetail.setUpdateTime(DateUtils.getNowDate());
|
||||
return orderDetailMapper.updateOrderDetail(orderDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单详情
|
||||
*
|
||||
* @param detailIds 需要删除的订单详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderDetailByDetailIds(List<Long> detailIds)
|
||||
{
|
||||
return orderDetailMapper.deleteOrderDetailByDetailIds(detailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单详情信息
|
||||
*
|
||||
* @param detailId 订单详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderDetailByDetailId(Long detailId)
|
||||
{
|
||||
return orderDetailMapper.deleteOrderDetailByDetailId(detailId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.bonus.canteen.core.order.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderInfo;
|
||||
import com.bonus.canteen.core.order.mapper.OrderInfoMapper;
|
||||
import com.bonus.canteen.core.order.service.IOrderInfoService;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 订单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Service
|
||||
public class OrderInfoServiceImpl implements IOrderInfoService
|
||||
{
|
||||
@Autowired
|
||||
private OrderInfoMapper orderInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询订单
|
||||
*
|
||||
* @param orderId 订单主键
|
||||
* @return 订单
|
||||
*/
|
||||
@Override
|
||||
public OrderInfo selectOrderInfoByOrderId(Long orderId)
|
||||
{
|
||||
return orderInfoMapper.selectOrderInfoByOrderId(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 订单
|
||||
*/
|
||||
@Override
|
||||
public List<OrderInfo> selectOrderInfoList(OrderInfo orderInfo)
|
||||
{
|
||||
return orderInfoMapper.selectOrderInfoList(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOrderInfo(OrderInfo orderInfo)
|
||||
{
|
||||
orderInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return orderInfoMapper.insertOrderInfo(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param orderInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOrderInfo(OrderInfo orderInfo)
|
||||
{
|
||||
orderInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return orderInfoMapper.updateOrderInfo(orderInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param orderIds 需要删除的订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderInfoByOrderIds(List<Long> orderIds)
|
||||
{
|
||||
return orderInfoMapper.deleteOrderInfoByOrderIds(orderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单信息
|
||||
*
|
||||
* @param orderId 订单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderInfoByOrderId(Long orderId)
|
||||
{
|
||||
return orderInfoMapper.deleteOrderInfoByOrderId(orderId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.bonus.canteen.core.order.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.order.domain.OrderShoppingCart;
|
||||
import com.bonus.canteen.core.order.mapper.OrderShoppingCartMapper;
|
||||
import com.bonus.canteen.core.order.service.IOrderShoppingCartService;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 订单购物车Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Service
|
||||
public class OrderShoppingCartServiceImpl implements IOrderShoppingCartService
|
||||
{
|
||||
@Autowired
|
||||
private OrderShoppingCartMapper orderShoppingCartMapper;
|
||||
|
||||
/**
|
||||
* 查询订单购物车
|
||||
*
|
||||
* @param shoppingCartId 订单购物车主键
|
||||
* @return 订单购物车
|
||||
*/
|
||||
@Override
|
||||
public OrderShoppingCart selectOrderShoppingCartByShoppingCartId(Long shoppingCartId)
|
||||
{
|
||||
return orderShoppingCartMapper.selectOrderShoppingCartByShoppingCartId(shoppingCartId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单购物车列表
|
||||
*
|
||||
* @param orderShoppingCart 订单购物车
|
||||
* @return 订单购物车
|
||||
*/
|
||||
@Override
|
||||
public List<OrderShoppingCart> selectOrderShoppingCartList(OrderShoppingCart orderShoppingCart)
|
||||
{
|
||||
return orderShoppingCartMapper.selectOrderShoppingCartList(orderShoppingCart);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单购物车
|
||||
*
|
||||
* @param orderShoppingCart 订单购物车
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOrderShoppingCart(OrderShoppingCart orderShoppingCart)
|
||||
{
|
||||
orderShoppingCart.setCreateTime(DateUtils.getNowDate());
|
||||
return orderShoppingCartMapper.insertOrderShoppingCart(orderShoppingCart);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单购物车
|
||||
*
|
||||
* @param orderShoppingCart 订单购物车
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOrderShoppingCart(OrderShoppingCart orderShoppingCart)
|
||||
{
|
||||
orderShoppingCart.setUpdateTime(DateUtils.getNowDate());
|
||||
return orderShoppingCartMapper.updateOrderShoppingCart(orderShoppingCart);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单购物车
|
||||
*
|
||||
* @param shoppingCartIds 需要删除的订单购物车主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderShoppingCartByShoppingCartIds(List<Long> shoppingCartIds)
|
||||
{
|
||||
return orderShoppingCartMapper.deleteOrderShoppingCartByShoppingCartIds(shoppingCartIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单购物车信息
|
||||
*
|
||||
* @param shoppingCartId 订单购物车主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderShoppingCartByShoppingCartId(Long shoppingCartId)
|
||||
{
|
||||
return orderShoppingCartMapper.deleteOrderShoppingCartByShoppingCartId(shoppingCartId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.order.mapper.OrderDetailMapper">
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.order.domain.OrderDetail" id="OrderDetailResult">
|
||||
<result property="detailId" column="detail_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="orderDate" column="order_date" />
|
||||
<result property="goodsId" column="goods_id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsImgUrl" column="goods_img_url" />
|
||||
<result property="menuDetailId" column="menu_detail_id" />
|
||||
<result property="salePrice" column="sale_price" />
|
||||
<result property="discountPrice" column="discount_price" />
|
||||
<result property="finalPrice" column="final_price" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="salesMode" column="sales_mode" />
|
||||
<result property="detailType" column="detail_type" />
|
||||
<result property="totalAmount" column="total_amount" />
|
||||
<result property="calcTotalAmount" column="calc_total_amount" />
|
||||
<result property="realAmount" column="real_amount" />
|
||||
<result property="refundAmount" column="refund_amount" />
|
||||
<result property="detailState" column="detail_state" />
|
||||
<result property="refundNum" column="refund_num" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="serialNum" column="serial_num" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOrderDetailVo">
|
||||
select detail_id, order_id, order_date, goods_id, goods_name, goods_img_url, menu_detail_id, sale_price, discount_price, final_price, quantity, sales_mode, detail_type, total_amount, calc_total_amount, real_amount, refund_amount, detail_state, refund_num, device_sn, serial_num, create_by, create_time, update_by, update_time from order_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderDetailList" parameterType="com.bonus.canteen.core.order.domain.OrderDetail" resultMap="OrderDetailResult">
|
||||
<include refid="selectOrderDetailVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="orderDate != null "> and order_date = #{orderDate}</if>
|
||||
<if test="goodsId != null "> and goods_id = #{goodsId}</if>
|
||||
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
|
||||
<if test="goodsImgUrl != null and goodsImgUrl != ''"> and goods_img_url = #{goodsImgUrl}</if>
|
||||
<if test="menuDetailId != null "> and menu_detail_id = #{menuDetailId}</if>
|
||||
<if test="salePrice != null "> and sale_price = #{salePrice}</if>
|
||||
<if test="discountPrice != null "> and discount_price = #{discountPrice}</if>
|
||||
<if test="finalPrice != null "> and final_price = #{finalPrice}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="salesMode != null "> and sales_mode = #{salesMode}</if>
|
||||
<if test="detailType != null "> and detail_type = #{detailType}</if>
|
||||
<if test="totalAmount != null "> and total_amount = #{totalAmount}</if>
|
||||
<if test="calcTotalAmount != null "> and calc_total_amount = #{calcTotalAmount}</if>
|
||||
<if test="realAmount != null "> and real_amount = #{realAmount}</if>
|
||||
<if test="refundAmount != null "> and refund_amount = #{refundAmount}</if>
|
||||
<if test="detailState != null "> and detail_state = #{detailState}</if>
|
||||
<if test="refundNum != null "> and refund_num = #{refundNum}</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
||||
<if test="serialNum != null and serialNum != ''"> and serial_num = #{serialNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderDetailByDetailId" parameterType="Long" resultMap="OrderDetailResult">
|
||||
<include refid="selectOrderDetailVo"/>
|
||||
where detail_id = #{detailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOrderDetail" parameterType="com.bonus.canteen.core.order.domain.OrderDetail" useGeneratedKeys="true" keyProperty="detailId">
|
||||
insert into order_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="orderDate != null">order_date,</if>
|
||||
<if test="goodsId != null">goods_id,</if>
|
||||
<if test="goodsName != null and goodsName != ''">goods_name,</if>
|
||||
<if test="goodsImgUrl != null">goods_img_url,</if>
|
||||
<if test="menuDetailId != null">menu_detail_id,</if>
|
||||
<if test="salePrice != null">sale_price,</if>
|
||||
<if test="discountPrice != null">discount_price,</if>
|
||||
<if test="finalPrice != null">final_price,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="salesMode != null">sales_mode,</if>
|
||||
<if test="detailType != null">detail_type,</if>
|
||||
<if test="totalAmount != null">total_amount,</if>
|
||||
<if test="calcTotalAmount != null">calc_total_amount,</if>
|
||||
<if test="realAmount != null">real_amount,</if>
|
||||
<if test="refundAmount != null">refund_amount,</if>
|
||||
<if test="detailState != null">detail_state,</if>
|
||||
<if test="refundNum != null">refund_num,</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">device_sn,</if>
|
||||
<if test="serialNum != null and serialNum != ''">serial_num,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="orderDate != null">#{orderDate},</if>
|
||||
<if test="goodsId != null">#{goodsId},</if>
|
||||
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
|
||||
<if test="goodsImgUrl != null">#{goodsImgUrl},</if>
|
||||
<if test="menuDetailId != null">#{menuDetailId},</if>
|
||||
<if test="salePrice != null">#{salePrice},</if>
|
||||
<if test="discountPrice != null">#{discountPrice},</if>
|
||||
<if test="finalPrice != null">#{finalPrice},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="salesMode != null">#{salesMode},</if>
|
||||
<if test="detailType != null">#{detailType},</if>
|
||||
<if test="totalAmount != null">#{totalAmount},</if>
|
||||
<if test="calcTotalAmount != null">#{calcTotalAmount},</if>
|
||||
<if test="realAmount != null">#{realAmount},</if>
|
||||
<if test="refundAmount != null">#{refundAmount},</if>
|
||||
<if test="detailState != null">#{detailState},</if>
|
||||
<if test="refundNum != null">#{refundNum},</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">#{deviceSn},</if>
|
||||
<if test="serialNum != null and serialNum != ''">#{serialNum},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOrderDetail" parameterType="com.bonus.canteen.core.order.domain.OrderDetail">
|
||||
update order_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id = #{orderId},</if>
|
||||
<if test="orderDate != null">order_date = #{orderDate},</if>
|
||||
<if test="goodsId != null">goods_id = #{goodsId},</if>
|
||||
<if test="goodsName != null and goodsName != ''">goods_name = #{goodsName},</if>
|
||||
<if test="goodsImgUrl != null">goods_img_url = #{goodsImgUrl},</if>
|
||||
<if test="menuDetailId != null">menu_detail_id = #{menuDetailId},</if>
|
||||
<if test="salePrice != null">sale_price = #{salePrice},</if>
|
||||
<if test="discountPrice != null">discount_price = #{discountPrice},</if>
|
||||
<if test="finalPrice != null">final_price = #{finalPrice},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="salesMode != null">sales_mode = #{salesMode},</if>
|
||||
<if test="detailType != null">detail_type = #{detailType},</if>
|
||||
<if test="totalAmount != null">total_amount = #{totalAmount},</if>
|
||||
<if test="calcTotalAmount != null">calc_total_amount = #{calcTotalAmount},</if>
|
||||
<if test="realAmount != null">real_amount = #{realAmount},</if>
|
||||
<if test="refundAmount != null">refund_amount = #{refundAmount},</if>
|
||||
<if test="detailState != null">detail_state = #{detailState},</if>
|
||||
<if test="refundNum != null">refund_num = #{refundNum},</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">device_sn = #{deviceSn},</if>
|
||||
<if test="serialNum != null and serialNum != ''">serial_num = #{serialNum},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where detail_id = #{detailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOrderDetailByDetailId" parameterType="Long">
|
||||
delete from order_detail where detail_id = #{detailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderDetailByDetailIds" parameterType="String">
|
||||
delete from order_detail where detail_id in
|
||||
<foreach item="detailId" collection="array" open="(" separator="," close=")">
|
||||
#{detailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,234 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.order.mapper.OrderInfoMapper">
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.order.domain.OrderInfo" id="OrderInfoResult">
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="deviceOrderId" column="device_order_id" />
|
||||
<result property="deviceSn" column="device_sn" />
|
||||
<result property="deviceNum" column="device_num" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="identityVerification" column="identity_verification" />
|
||||
<result property="sourceType" column="source_type" />
|
||||
<result property="isOnline" column="is_online" />
|
||||
<result property="canteenId" column="canteen_id" />
|
||||
<result property="stallId" column="stall_id" />
|
||||
<result property="mealtimeType" column="mealtime_type" />
|
||||
<result property="mealtimeName" column="mealtime_name" />
|
||||
<result property="orderDate" column="order_date" />
|
||||
<result property="payableAmount" column="payable_amount" />
|
||||
<result property="discountsAmount" column="discounts_amount" />
|
||||
<result property="realAmount" column="real_amount" />
|
||||
<result property="accountPayAmount" column="account_pay_amount" />
|
||||
<result property="externalPayAmount" column="external_pay_amount" />
|
||||
<result property="refundAmount" column="refund_amount" />
|
||||
<result property="orderTime" column="order_time" />
|
||||
<result property="orderType" column="order_type" />
|
||||
<result property="orderState" column="order_state" />
|
||||
<result property="orderRefundState" column="order_refund_state" />
|
||||
<result property="deductionType" column="deduction_type" />
|
||||
<result property="payTime" column="pay_time" />
|
||||
<result property="payType" column="pay_type" />
|
||||
<result property="payChannel" column="pay_channel" />
|
||||
<result property="payState" column="pay_state" />
|
||||
<result property="payParam" column="pay_param" />
|
||||
<result property="deliveryAmount" column="delivery_amount" />
|
||||
<result property="packingAmount" column="packing_amount" />
|
||||
<result property="deliveryType" column="delivery_type" />
|
||||
<result property="commentState" column="comment_state" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOrderInfoVo">
|
||||
select order_id, device_order_id, device_sn, device_num, user_id, identity_verification, source_type, is_online, canteen_id, stall_id, mealtime_type, mealtime_name, order_date, payable_amount, discounts_amount, real_amount, account_pay_amount, external_pay_amount, refund_amount, order_time, order_type, order_state, order_refund_state, deduction_type, pay_time, pay_type, pay_channel, pay_state, pay_param, delivery_amount, packing_amount, delivery_type, comment_state, remark, create_by, create_time, update_by, update_time from order_info
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderInfoList" parameterType="com.bonus.canteen.core.order.domain.OrderInfo" resultMap="OrderInfoResult">
|
||||
<include refid="selectOrderInfoVo"/>
|
||||
<where>
|
||||
<if test="deviceOrderId != null and deviceOrderId != ''"> and device_order_id = #{deviceOrderId}</if>
|
||||
<if test="deviceSn != null and deviceSn != ''"> and device_sn = #{deviceSn}</if>
|
||||
<if test="deviceNum != null and deviceNum != ''"> and device_num = #{deviceNum}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="identityVerification != null "> and identity_verification = #{identityVerification}</if>
|
||||
<if test="sourceType != null "> and source_type = #{sourceType}</if>
|
||||
<if test="isOnline != null "> and is_online = #{isOnline}</if>
|
||||
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
|
||||
<if test="stallId != null "> and stall_id = #{stallId}</if>
|
||||
<if test="mealtimeType != null "> and mealtime_type = #{mealtimeType}</if>
|
||||
<if test="mealtimeName != null and mealtimeName != ''"> and mealtime_name like concat('%', #{mealtimeName}, '%')</if>
|
||||
<if test="orderDate != null "> and order_date = #{orderDate}</if>
|
||||
<if test="payableAmount != null "> and payable_amount = #{payableAmount}</if>
|
||||
<if test="discountsAmount != null "> and discounts_amount = #{discountsAmount}</if>
|
||||
<if test="realAmount != null "> and real_amount = #{realAmount}</if>
|
||||
<if test="accountPayAmount != null "> and account_pay_amount = #{accountPayAmount}</if>
|
||||
<if test="externalPayAmount != null "> and external_pay_amount = #{externalPayAmount}</if>
|
||||
<if test="refundAmount != null "> and refund_amount = #{refundAmount}</if>
|
||||
<if test="orderTime != null "> and order_time = #{orderTime}</if>
|
||||
<if test="orderType != null "> and order_type = #{orderType}</if>
|
||||
<if test="orderState != null "> and order_state = #{orderState}</if>
|
||||
<if test="orderRefundState != null "> and order_refund_state = #{orderRefundState}</if>
|
||||
<if test="deductionType != null "> and deduction_type = #{deductionType}</if>
|
||||
<if test="payTime != null "> and pay_time = #{payTime}</if>
|
||||
<if test="payType != null "> and pay_type = #{payType}</if>
|
||||
<if test="payChannel != null "> and pay_channel = #{payChannel}</if>
|
||||
<if test="payState != null "> and pay_state = #{payState}</if>
|
||||
<if test="payParam != null and payParam != ''"> and pay_param = #{payParam}</if>
|
||||
<if test="deliveryAmount != null "> and delivery_amount = #{deliveryAmount}</if>
|
||||
<if test="packingAmount != null "> and packing_amount = #{packingAmount}</if>
|
||||
<if test="deliveryType != null "> and delivery_type = #{deliveryType}</if>
|
||||
<if test="commentState != null "> and comment_state = #{commentState}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderInfoByOrderId" parameterType="Long" resultMap="OrderInfoResult">
|
||||
<include refid="selectOrderInfoVo"/>
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOrderInfo" parameterType="com.bonus.canteen.core.order.domain.OrderInfo">
|
||||
insert into order_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="deviceOrderId != null and deviceOrderId != ''">device_order_id,</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">device_sn,</if>
|
||||
<if test="deviceNum != null and deviceNum != ''">device_num,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="identityVerification != null">identity_verification,</if>
|
||||
<if test="sourceType != null">source_type,</if>
|
||||
<if test="isOnline != null">is_online,</if>
|
||||
<if test="canteenId != null">canteen_id,</if>
|
||||
<if test="stallId != null">stall_id,</if>
|
||||
<if test="mealtimeType != null">mealtime_type,</if>
|
||||
<if test="mealtimeName != null">mealtime_name,</if>
|
||||
<if test="orderDate != null">order_date,</if>
|
||||
<if test="payableAmount != null">payable_amount,</if>
|
||||
<if test="discountsAmount != null">discounts_amount,</if>
|
||||
<if test="realAmount != null">real_amount,</if>
|
||||
<if test="accountPayAmount != null">account_pay_amount,</if>
|
||||
<if test="externalPayAmount != null">external_pay_amount,</if>
|
||||
<if test="refundAmount != null">refund_amount,</if>
|
||||
<if test="orderTime != null">order_time,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
<if test="orderState != null">order_state,</if>
|
||||
<if test="orderRefundState != null">order_refund_state,</if>
|
||||
<if test="deductionType != null">deduction_type,</if>
|
||||
<if test="payTime != null">pay_time,</if>
|
||||
<if test="payType != null">pay_type,</if>
|
||||
<if test="payChannel != null">pay_channel,</if>
|
||||
<if test="payState != null">pay_state,</if>
|
||||
<if test="payParam != null">pay_param,</if>
|
||||
<if test="deliveryAmount != null">delivery_amount,</if>
|
||||
<if test="packingAmount != null">packing_amount,</if>
|
||||
<if test="deliveryType != null">delivery_type,</if>
|
||||
<if test="commentState != null">comment_state,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="deviceOrderId != null and deviceOrderId != ''">#{deviceOrderId},</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">#{deviceSn},</if>
|
||||
<if test="deviceNum != null and deviceNum != ''">#{deviceNum},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="identityVerification != null">#{identityVerification},</if>
|
||||
<if test="sourceType != null">#{sourceType},</if>
|
||||
<if test="isOnline != null">#{isOnline},</if>
|
||||
<if test="canteenId != null">#{canteenId},</if>
|
||||
<if test="stallId != null">#{stallId},</if>
|
||||
<if test="mealtimeType != null">#{mealtimeType},</if>
|
||||
<if test="mealtimeName != null">#{mealtimeName},</if>
|
||||
<if test="orderDate != null">#{orderDate},</if>
|
||||
<if test="payableAmount != null">#{payableAmount},</if>
|
||||
<if test="discountsAmount != null">#{discountsAmount},</if>
|
||||
<if test="realAmount != null">#{realAmount},</if>
|
||||
<if test="accountPayAmount != null">#{accountPayAmount},</if>
|
||||
<if test="externalPayAmount != null">#{externalPayAmount},</if>
|
||||
<if test="refundAmount != null">#{refundAmount},</if>
|
||||
<if test="orderTime != null">#{orderTime},</if>
|
||||
<if test="orderType != null">#{orderType},</if>
|
||||
<if test="orderState != null">#{orderState},</if>
|
||||
<if test="orderRefundState != null">#{orderRefundState},</if>
|
||||
<if test="deductionType != null">#{deductionType},</if>
|
||||
<if test="payTime != null">#{payTime},</if>
|
||||
<if test="payType != null">#{payType},</if>
|
||||
<if test="payChannel != null">#{payChannel},</if>
|
||||
<if test="payState != null">#{payState},</if>
|
||||
<if test="payParam != null">#{payParam},</if>
|
||||
<if test="deliveryAmount != null">#{deliveryAmount},</if>
|
||||
<if test="packingAmount != null">#{packingAmount},</if>
|
||||
<if test="deliveryType != null">#{deliveryType},</if>
|
||||
<if test="commentState != null">#{commentState},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOrderInfo" parameterType="com.bonus.canteen.core.order.domain.OrderInfo">
|
||||
update order_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deviceOrderId != null and deviceOrderId != ''">device_order_id = #{deviceOrderId},</if>
|
||||
<if test="deviceSn != null and deviceSn != ''">device_sn = #{deviceSn},</if>
|
||||
<if test="deviceNum != null and deviceNum != ''">device_num = #{deviceNum},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="identityVerification != null">identity_verification = #{identityVerification},</if>
|
||||
<if test="sourceType != null">source_type = #{sourceType},</if>
|
||||
<if test="isOnline != null">is_online = #{isOnline},</if>
|
||||
<if test="canteenId != null">canteen_id = #{canteenId},</if>
|
||||
<if test="stallId != null">stall_id = #{stallId},</if>
|
||||
<if test="mealtimeType != null">mealtime_type = #{mealtimeType},</if>
|
||||
<if test="mealtimeName != null">mealtime_name = #{mealtimeName},</if>
|
||||
<if test="orderDate != null">order_date = #{orderDate},</if>
|
||||
<if test="payableAmount != null">payable_amount = #{payableAmount},</if>
|
||||
<if test="discountsAmount != null">discounts_amount = #{discountsAmount},</if>
|
||||
<if test="realAmount != null">real_amount = #{realAmount},</if>
|
||||
<if test="accountPayAmount != null">account_pay_amount = #{accountPayAmount},</if>
|
||||
<if test="externalPayAmount != null">external_pay_amount = #{externalPayAmount},</if>
|
||||
<if test="refundAmount != null">refund_amount = #{refundAmount},</if>
|
||||
<if test="orderTime != null">order_time = #{orderTime},</if>
|
||||
<if test="orderType != null">order_type = #{orderType},</if>
|
||||
<if test="orderState != null">order_state = #{orderState},</if>
|
||||
<if test="orderRefundState != null">order_refund_state = #{orderRefundState},</if>
|
||||
<if test="deductionType != null">deduction_type = #{deductionType},</if>
|
||||
<if test="payTime != null">pay_time = #{payTime},</if>
|
||||
<if test="payType != null">pay_type = #{payType},</if>
|
||||
<if test="payChannel != null">pay_channel = #{payChannel},</if>
|
||||
<if test="payState != null">pay_state = #{payState},</if>
|
||||
<if test="payParam != null">pay_param = #{payParam},</if>
|
||||
<if test="deliveryAmount != null">delivery_amount = #{deliveryAmount},</if>
|
||||
<if test="packingAmount != null">packing_amount = #{packingAmount},</if>
|
||||
<if test="deliveryType != null">delivery_type = #{deliveryType},</if>
|
||||
<if test="commentState != null">comment_state = #{commentState},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOrderInfoByOrderId" parameterType="Long">
|
||||
delete from order_info where order_id = #{orderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderInfoByOrderIds" parameterType="String">
|
||||
delete from order_info where order_id in
|
||||
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.order.mapper.OrderShoppingCartMapper">
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.order.domain.OrderShoppingCart" id="OrderShoppingCartResult">
|
||||
<result property="shoppingCartId" column="shopping_cart_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="menuId" column="menu_id" />
|
||||
<result property="canteenId" column="canteen_id" />
|
||||
<result property="stallId" column="stall_id" />
|
||||
<result property="goodsId" column="goods_id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsImgUrl" column="goods_img_url" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="orderType" column="order_type" />
|
||||
<result property="detailType" column="detail_type" />
|
||||
<result property="orderDate" column="order_date" />
|
||||
<result property="mealtimeType" column="mealtime_type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOrderShoppingCartVo">
|
||||
select shopping_cart_id, user_id, menu_id, canteen_id, stall_id, goods_id, goods_name, goods_img_url, quantity, order_type, detail_type, order_date, mealtime_type, create_by, create_time, update_by, update_time from order_shopping_cart
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderShoppingCartList" parameterType="com.bonus.canteen.core.order.domain.OrderShoppingCart" resultMap="OrderShoppingCartResult">
|
||||
<include refid="selectOrderShoppingCartVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="menuId != null "> and menu_id = #{menuId}</if>
|
||||
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
|
||||
<if test="stallId != null "> and stall_id = #{stallId}</if>
|
||||
<if test="goodsId != null "> and goods_id = #{goodsId}</if>
|
||||
<if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
|
||||
<if test="goodsImgUrl != null and goodsImgUrl != ''"> and goods_img_url = #{goodsImgUrl}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="orderType != null "> and order_type = #{orderType}</if>
|
||||
<if test="detailType != null "> and detail_type = #{detailType}</if>
|
||||
<if test="orderDate != null "> and order_date = #{orderDate}</if>
|
||||
<if test="mealtimeType != null "> and mealtime_type = #{mealtimeType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderShoppingCartByShoppingCartId" parameterType="Long" resultMap="OrderShoppingCartResult">
|
||||
<include refid="selectOrderShoppingCartVo"/>
|
||||
where shopping_cart_id = #{shoppingCartId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOrderShoppingCart" parameterType="com.bonus.canteen.core.order.domain.OrderShoppingCart">
|
||||
insert into order_shopping_cart
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="shoppingCartId != null">shopping_cart_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="menuId != null">menu_id,</if>
|
||||
<if test="canteenId != null">canteen_id,</if>
|
||||
<if test="stallId != null">stall_id,</if>
|
||||
<if test="goodsId != null">goods_id,</if>
|
||||
<if test="goodsName != null and goodsName != ''">goods_name,</if>
|
||||
<if test="goodsImgUrl != null">goods_img_url,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
<if test="detailType != null">detail_type,</if>
|
||||
<if test="orderDate != null">order_date,</if>
|
||||
<if test="mealtimeType != null">mealtime_type,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="shoppingCartId != null">#{shoppingCartId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="menuId != null">#{menuId},</if>
|
||||
<if test="canteenId != null">#{canteenId},</if>
|
||||
<if test="stallId != null">#{stallId},</if>
|
||||
<if test="goodsId != null">#{goodsId},</if>
|
||||
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
|
||||
<if test="goodsImgUrl != null">#{goodsImgUrl},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="orderType != null">#{orderType},</if>
|
||||
<if test="detailType != null">#{detailType},</if>
|
||||
<if test="orderDate != null">#{orderDate},</if>
|
||||
<if test="mealtimeType != null">#{mealtimeType},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOrderShoppingCart" parameterType="com.bonus.canteen.core.order.domain.OrderShoppingCart">
|
||||
update order_shopping_cart
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="menuId != null">menu_id = #{menuId},</if>
|
||||
<if test="canteenId != null">canteen_id = #{canteenId},</if>
|
||||
<if test="stallId != null">stall_id = #{stallId},</if>
|
||||
<if test="goodsId != null">goods_id = #{goodsId},</if>
|
||||
<if test="goodsName != null and goodsName != ''">goods_name = #{goodsName},</if>
|
||||
<if test="goodsImgUrl != null">goods_img_url = #{goodsImgUrl},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="orderType != null">order_type = #{orderType},</if>
|
||||
<if test="detailType != null">detail_type = #{detailType},</if>
|
||||
<if test="orderDate != null">order_date = #{orderDate},</if>
|
||||
<if test="mealtimeType != null">mealtime_type = #{mealtimeType},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where shopping_cart_id = #{shoppingCartId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOrderShoppingCartByShoppingCartId" parameterType="Long">
|
||||
delete from order_shopping_cart where shopping_cart_id = #{shoppingCartId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderShoppingCartByShoppingCartIds" parameterType="String">
|
||||
delete from order_shopping_cart where shopping_cart_id in
|
||||
<foreach item="shoppingCartId" collection="array" open="(" separator="," close=")">
|
||||
#{shoppingCartId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue