parent
d15741ce8f
commit
2080ad54d5
14 changed files with 673 additions and 6 deletions
@ -0,0 +1,9 @@ |
|||||||
|
package org.springblade.common.constant; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author liuqk |
||||||
|
* @version 1.0 |
||||||
|
* @date 2023-08-21 13:16 |
||||||
|
*/ |
||||||
|
public interface BusinessConstant { |
||||||
|
} |
||||||
@ -0,0 +1,54 @@ |
|||||||
|
package org.springblade.common.enums; |
||||||
|
|
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.Getter; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author liuqk |
||||||
|
* @version 1.0 |
||||||
|
* @date 2023-08-21 13:16 |
||||||
|
*/ |
||||||
|
@Getter |
||||||
|
@AllArgsConstructor |
||||||
|
public enum OrderStatusEnum { |
||||||
|
/** |
||||||
|
* 订单状态 |
||||||
|
* 0: 取消, 1: 待付款, 2: 待发货, 3: 待收货, 4: 已完成 |
||||||
|
*/ |
||||||
|
ORDER_STATUS_CANCEL(0, "已取消"), |
||||||
|
ORDER_STATUS_UNPAID(1, "待付款"), |
||||||
|
ORDER_STATUS_UNSEND(2, "待发货"), |
||||||
|
ORDER_STATUS_UNRECEIVED(3, "待收货"), |
||||||
|
ORDER_STATUS_FINISHED(4, "已完成"), |
||||||
|
; |
||||||
|
|
||||||
|
final Integer code; |
||||||
|
final String name; |
||||||
|
|
||||||
|
/** |
||||||
|
* 匹配枚举值 |
||||||
|
* |
||||||
|
* @param name 名称 |
||||||
|
* @return PillowHardnessEnum |
||||||
|
*/ |
||||||
|
public static SleepingPostureEnum of(String name) { |
||||||
|
if (name == null) { |
||||||
|
return null; |
||||||
|
} |
||||||
|
for (SleepingPostureEnum smsEnum : SleepingPostureEnum.values()) { |
||||||
|
if (smsEnum.name.equals(name)) { |
||||||
|
return smsEnum; |
||||||
|
} |
||||||
|
} |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
public static String getName(Integer code) { |
||||||
|
for (SleepingPostureEnum value : SleepingPostureEnum.values()) { |
||||||
|
if (value.getCode() == code) { |
||||||
|
return value.getName(); |
||||||
|
} |
||||||
|
} |
||||||
|
return ""; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,190 @@ |
|||||||
|
package org.springblade.modules.desk.controller; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.springblade.common.enums.*; |
||||||
|
import org.springblade.core.excel.util.ExcelUtil; |
||||||
|
import org.springblade.core.launch.constant.AppConstant; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.*; |
||||||
|
import org.springblade.modules.desk.entity.Order; |
||||||
|
import org.springblade.modules.desk.service.IOrderService; |
||||||
|
import org.springblade.modules.desk.vo.OrderExcelVO; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author liuqk |
||||||
|
* @version 1.0 |
||||||
|
* @date 2023-08-21 12:02 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@RequestMapping(AppConstant.APPLICATION_DESK_NAME + "/order") |
||||||
|
@AllArgsConstructor |
||||||
|
@CrossOrigin |
||||||
|
@Slf4j |
||||||
|
public class OrderController { |
||||||
|
|
||||||
|
private final IOrderService orderService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
public R<Order> detail(@RequestParam String id) { |
||||||
|
Order detail = orderService.getById(id); |
||||||
|
return R.data(detail); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页 |
||||||
|
*/ |
||||||
|
@GetMapping("/page") |
||||||
|
public R<IPage<Order>> page(Query query, String buyerName, String buyerPhone, String orderNo) { |
||||||
|
LambdaQueryWrapper<Order> wrapper = Wrappers.lambdaQuery(); |
||||||
|
if (Func.isNotEmpty(buyerName)) { |
||||||
|
wrapper.like(Order::getBuyerName, buyerName); |
||||||
|
} |
||||||
|
if (Func.isNotEmpty(buyerPhone)) { |
||||||
|
wrapper.like(Order::getBuyerPhone, buyerPhone); |
||||||
|
} |
||||||
|
if (Func.isNotEmpty(orderNo)) { |
||||||
|
wrapper.like(Order::getOrderNo, orderNo); |
||||||
|
} |
||||||
|
|
||||||
|
IPage<Order> pages = orderService.page(Condition.getPage(query), wrapper); |
||||||
|
return R.data(pages); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 导出 |
||||||
|
*/ |
||||||
|
@GetMapping("/export") |
||||||
|
public void export(HttpServletResponse response, String buyerName, String buyerPhone, String orderNo) { |
||||||
|
LambdaQueryWrapper<Order> wrapper = Wrappers.lambdaQuery(); |
||||||
|
if (Func.isNotEmpty(buyerName)) { |
||||||
|
wrapper.like(Order::getBuyerName, buyerName); |
||||||
|
} |
||||||
|
if (Func.isNotEmpty(buyerPhone)) { |
||||||
|
wrapper.like(Order::getBuyerPhone, buyerPhone); |
||||||
|
} |
||||||
|
if (Func.isNotEmpty(orderNo)) { |
||||||
|
wrapper.like(Order::getOrderNo, orderNo); |
||||||
|
} |
||||||
|
|
||||||
|
List<Order> dataList = orderService.list(wrapper); |
||||||
|
|
||||||
|
List<OrderExcelVO> vos = new ArrayList<>(); |
||||||
|
dataList.forEach(item -> { |
||||||
|
OrderExcelVO vo = BeanUtil.copy(item, OrderExcelVO.class); |
||||||
|
vo.setStatusName(OrderStatusEnum.getName(item.getStatus())); |
||||||
|
vos.add(vo); |
||||||
|
}); |
||||||
|
ExcelUtil.export(response, "订单" + DateUtil.time(), "订单表", vos, OrderExcelVO.class); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
public R save(@RequestBody Order info) { |
||||||
|
// 添加前, 若有未付款的, 不允许继续添加
|
||||||
|
Order orderCheck = orderService.getOne(Wrappers.<Order>lambdaQuery() |
||||||
|
.eq(Order::getBuyerPhone, info.getBuyerPhone()) |
||||||
|
.eq(Order::getStatus, OrderStatusEnum.ORDER_STATUS_UNPAID.getCode())); |
||||||
|
if (Func.isNotEmpty(orderCheck)) { |
||||||
|
return R.fail("您当前有未付款的清单, 请支付."); |
||||||
|
} |
||||||
|
|
||||||
|
return R.status(orderService.save(info)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改订单地址 |
||||||
|
* |
||||||
|
* @param consignee 收货人 |
||||||
|
* @param consigneePhone 收货人电话 |
||||||
|
* @param address 收货地址 |
||||||
|
*/ |
||||||
|
@PostMapping("/updateAddress") |
||||||
|
public R updateAddress(@RequestParam String id, @RequestParam String consignee, @RequestParam String consigneePhone, @RequestParam String address) { |
||||||
|
// 只允许修改待发货之前的状态
|
||||||
|
Order orderCheck = orderService.getById(id); |
||||||
|
if (orderCheck.getStatus() == OrderStatusEnum.ORDER_STATUS_UNPAID.getCode() || orderCheck.getStatus() == OrderStatusEnum.ORDER_STATUS_UNSEND.getCode()) { |
||||||
|
LambdaUpdateWrapper<Order> lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); |
||||||
|
lambdaUpdateWrapper |
||||||
|
.eq(Order::getId, id) |
||||||
|
.set(Order::getConsignee, consignee) |
||||||
|
.set(Order::getConsigneePhone, consigneePhone) |
||||||
|
.set(Order::getAddress, address) |
||||||
|
; |
||||||
|
|
||||||
|
return R.status(orderService.update(null, lambdaUpdateWrapper)); |
||||||
|
} else { |
||||||
|
return R.fail("只允许未付款和未发货状态的订单进行地址修改"); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 支付成功回调 |
||||||
|
*/ |
||||||
|
@PostMapping("/paySuccessCallback") |
||||||
|
public R paySuccessCallback(@RequestParam String id) { |
||||||
|
LambdaUpdateWrapper<Order> lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); |
||||||
|
lambdaUpdateWrapper |
||||||
|
.eq(Order::getId, id) |
||||||
|
.set(Order::getStatus, OrderStatusEnum.ORDER_STATUS_UNSEND.getCode()) |
||||||
|
.set(Order::getPaymentTime, DateUtil.now()) |
||||||
|
; |
||||||
|
|
||||||
|
return R.status(orderService.update(null, lambdaUpdateWrapper)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改订单物流单号 |
||||||
|
* |
||||||
|
* @param id |
||||||
|
* @param logisticsCompany 物流公司 |
||||||
|
* @param logisticsCompanyCode 物流公司编码 |
||||||
|
* @param logisticsNo 物流单号 |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
@PostMapping("/updateLogistics") |
||||||
|
public R updateLogistics(@RequestParam String id, @RequestParam String logisticsCompany, @RequestParam String logisticsCompanyCode, @RequestParam String logisticsNo) { |
||||||
|
LambdaUpdateWrapper<Order> lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); |
||||||
|
lambdaUpdateWrapper |
||||||
|
.eq(Order::getId, id) |
||||||
|
.set(Order::getLogisticsCompany, logisticsCompany) |
||||||
|
.set(Order::getLogisticsCompanyCode, logisticsCompanyCode) |
||||||
|
.set(Order::getLogisticsNo, logisticsNo) |
||||||
|
.set(Order::getStatus, OrderStatusEnum.ORDER_STATUS_UNRECEIVED.getCode()) |
||||||
|
.set(Order::getDeliveryTime, DateUtil.now()) |
||||||
|
; |
||||||
|
return R.status(orderService.update(null, lambdaUpdateWrapper)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 确认收货 |
||||||
|
*/ |
||||||
|
@PostMapping("/confirmReceive") |
||||||
|
public R confirmReceive(@RequestParam String id) { |
||||||
|
LambdaUpdateWrapper<Order> lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); |
||||||
|
lambdaUpdateWrapper |
||||||
|
.eq(Order::getId, id) |
||||||
|
.set(Order::getStatus, OrderStatusEnum.ORDER_STATUS_FINISHED.getCode()) |
||||||
|
.set(Order::getTransactionTime, DateUtil.now()) |
||||||
|
; |
||||||
|
|
||||||
|
return R.status(orderService.update(null, lambdaUpdateWrapper)); |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,126 @@ |
|||||||
|
package org.springblade.modules.desk.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author liuqk |
||||||
|
* @version 1.0 |
||||||
|
* @date 2023-08-21 9:35 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
@TableName("eh_order") |
||||||
|
public class Order extends BaseEntity { |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
/** |
||||||
|
* 订单编号 |
||||||
|
*/ |
||||||
|
private String orderNo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 商品名称 |
||||||
|
*/ |
||||||
|
private String goodsName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 购买件数 |
||||||
|
*/ |
||||||
|
private Integer goodsNum; |
||||||
|
|
||||||
|
/** |
||||||
|
* 商品价格 |
||||||
|
*/ |
||||||
|
private Double goodsPrice; |
||||||
|
|
||||||
|
/** |
||||||
|
* 购买人 |
||||||
|
*/ |
||||||
|
private Long buyerId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 购买人名称 |
||||||
|
*/ |
||||||
|
private String buyerName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 购买人电话 |
||||||
|
*/ |
||||||
|
private String buyerPhone; |
||||||
|
|
||||||
|
/** |
||||||
|
* 收获详细地址 |
||||||
|
*/ |
||||||
|
private String address; |
||||||
|
|
||||||
|
/** |
||||||
|
* 收货人 |
||||||
|
*/ |
||||||
|
private String consignee; |
||||||
|
|
||||||
|
/** |
||||||
|
* 收货人电话 |
||||||
|
*/ |
||||||
|
private String consigneePhone; |
||||||
|
|
||||||
|
/** |
||||||
|
* 物流公司 |
||||||
|
*/ |
||||||
|
private String logisticsCompany; |
||||||
|
|
||||||
|
/** |
||||||
|
* 物流公司编码 |
||||||
|
*/ |
||||||
|
private String logisticsCompanyCode; |
||||||
|
|
||||||
|
/** |
||||||
|
* 物流单号 |
||||||
|
*/ |
||||||
|
private String logisticsNo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 付款时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
private Date paymentTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 发货时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
private Date deliveryTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 成交时间, 点击确认收货时更新此状态 |
||||||
|
*/ |
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
private Date transactionTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 订单状态 |
||||||
|
* 待付款, 待发货, 待收货, 已完成 |
||||||
|
*/ |
||||||
|
private Integer status; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,33 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||||
|
* |
||||||
|
* Redistribution and use in source and binary forms, with or without |
||||||
|
* modification, are permitted provided that the following conditions are met: |
||||||
|
* |
||||||
|
* Redistributions of source code must retain the above copyright notice, |
||||||
|
* this list of conditions and the following disclaimer. |
||||||
|
* Redistributions in binary form must reproduce the above copyright |
||||||
|
* notice, this list of conditions and the following disclaimer in the |
||||||
|
* documentation and/or other materials provided with the distribution. |
||||||
|
* Neither the name of the dreamlu.net developer nor the names of its |
||||||
|
* contributors may be used to endorse or promote products derived from |
||||||
|
* this software without specific prior written permission. |
||||||
|
* Author: Chill 庄骞 (smallchill@163.com) |
||||||
|
*/ |
||||||
|
package org.springblade.modules.desk.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import org.springblade.modules.desk.entity.CustomMadeInfo; |
||||||
|
import org.springblade.modules.desk.entity.Order; |
||||||
|
|
||||||
|
/** |
||||||
|
* Mapper 接口 |
||||||
|
* |
||||||
|
* @author liuqk |
||||||
|
* @version 1.0 |
||||||
|
* @date 2023-07-25 17:47 |
||||||
|
*/ |
||||||
|
public interface OrderMapper extends BaseMapper<Order> { |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,32 @@ |
|||||||
|
<?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="org.springblade.modules.desk.mapper.OrderMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="noticeResultMap" type="org.springblade.modules.desk.entity.Order"> |
||||||
|
<result column="id" property="id"/> |
||||||
|
<result column="create_user" property="createUser"/> |
||||||
|
<result column="create_time" property="createTime"/> |
||||||
|
<result column="update_user" property="updateUser"/> |
||||||
|
<result column="update_time" property="updateTime"/> |
||||||
|
<result column="status" property="status"/> |
||||||
|
<result column="is_deleted" property="isDeleted"/> |
||||||
|
|
||||||
|
<result column="order_no" property="orderNo"/> |
||||||
|
<result column="goods_name" property="goodsName"/> |
||||||
|
<result column="goods_num" property="goodsNum"/> |
||||||
|
<result column="goods_price" property="goodsPrice"/> |
||||||
|
<result column="buyer_id" property="buyerId"/> |
||||||
|
<result column="buyer_name" property="buyerName"/> |
||||||
|
<result column="buyer_phone" property="buyerPhone"/> |
||||||
|
<result column="address" property="address"/> |
||||||
|
<result column="consignee" property="consignee"/> |
||||||
|
<result column="consignee_phone" property="consigneePhone"/> |
||||||
|
<result column="logistics_company" property="logisticsCompany"/> |
||||||
|
<result column="logistics_company_code" property="logisticsCompanyCode"/> |
||||||
|
<result column="logistics_no" property="logisticsNo"/> |
||||||
|
<result column="payment_time" property="paymentTime"/> |
||||||
|
<result column="delivery_time" property="deliveryTime"/> |
||||||
|
<result column="transaction_time" property="transactionTime"/> |
||||||
|
</resultMap> |
||||||
|
</mapper> |
||||||
@ -0,0 +1,32 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||||
|
* |
||||||
|
* Redistribution and use in source and binary forms, with or without |
||||||
|
* modification, are permitted provided that the following conditions are met: |
||||||
|
* |
||||||
|
* Redistributions of source code must retain the above copyright notice, |
||||||
|
* this list of conditions and the following disclaimer. |
||||||
|
* Redistributions in binary form must reproduce the above copyright |
||||||
|
* notice, this list of conditions and the following disclaimer in the |
||||||
|
* documentation and/or other materials provided with the distribution. |
||||||
|
* Neither the name of the dreamlu.net developer nor the names of its |
||||||
|
* contributors may be used to endorse or promote products derived from |
||||||
|
* this software without specific prior written permission. |
||||||
|
* Author: Chill 庄骞 (smallchill@163.com) |
||||||
|
*/ |
||||||
|
package org.springblade.modules.desk.service; |
||||||
|
|
||||||
|
import org.springblade.core.mp.base.BaseService; |
||||||
|
import org.springblade.modules.desk.entity.CustomMadeInfo; |
||||||
|
import org.springblade.modules.desk.entity.Order; |
||||||
|
|
||||||
|
/** |
||||||
|
* 服务类 |
||||||
|
* |
||||||
|
* @author liuqk |
||||||
|
* @version 1.0 |
||||||
|
* @date 2023-08-21 11:35 |
||||||
|
*/ |
||||||
|
public interface IOrderService extends BaseService<Order> { |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||||
|
* |
||||||
|
* Redistribution and use in source and binary forms, with or without |
||||||
|
* modification, are permitted provided that the following conditions are met: |
||||||
|
* |
||||||
|
* Redistributions of source code must retain the above copyright notice, |
||||||
|
* this list of conditions and the following disclaimer. |
||||||
|
* Redistributions in binary form must reproduce the above copyright |
||||||
|
* notice, this list of conditions and the following disclaimer in the |
||||||
|
* documentation and/or other materials provided with the distribution. |
||||||
|
* Neither the name of the dreamlu.net developer nor the names of its |
||||||
|
* contributors may be used to endorse or promote products derived from |
||||||
|
* this software without specific prior written permission. |
||||||
|
* Author: Chill 庄骞 (smallchill@163.com) |
||||||
|
*/ |
||||||
|
package org.springblade.modules.desk.service.impl; |
||||||
|
|
||||||
|
import org.springblade.core.mp.base.BaseServiceImpl; |
||||||
|
import org.springblade.modules.desk.entity.CustomMadeInfo; |
||||||
|
import org.springblade.modules.desk.entity.Order; |
||||||
|
import org.springblade.modules.desk.mapper.CustomMadeInfoMapper; |
||||||
|
import org.springblade.modules.desk.mapper.OrderMapper; |
||||||
|
import org.springblade.modules.desk.service.ICustomMadeInfoService; |
||||||
|
import org.springblade.modules.desk.service.IOrderService; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
/** |
||||||
|
* 服务实现类 |
||||||
|
* |
||||||
|
* @author liuqk |
||||||
|
* @version 1.0 |
||||||
|
* @date 2023-08-21 11:35 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implements IOrderService { |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,115 @@ |
|||||||
|
package org.springblade.modules.desk.vo; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||||
|
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||||
|
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||||
|
import lombok.Data; |
||||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* 定制信息表 |
||||||
|
* |
||||||
|
* @author liuqk |
||||||
|
* @version 1.0 |
||||||
|
* @date 2023-08-21 12:02 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@ColumnWidth(25) |
||||||
|
@HeadRowHeight(20) |
||||||
|
@ContentRowHeight(18) |
||||||
|
public class OrderExcelVO { |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
/** |
||||||
|
* 购买人名称 |
||||||
|
*/ |
||||||
|
@ExcelProperty("姓名") |
||||||
|
private String buyerName; |
||||||
|
|
||||||
|
/** |
||||||
|
* 购买人电话 |
||||||
|
*/ |
||||||
|
@ExcelProperty("手机") |
||||||
|
private String buyerPhone; |
||||||
|
|
||||||
|
/** |
||||||
|
* 订单编号 |
||||||
|
*/ |
||||||
|
@ExcelProperty("订单编号") |
||||||
|
private String orderNo; |
||||||
|
/** |
||||||
|
* 收获详细地址 |
||||||
|
*/ |
||||||
|
@ExcelProperty("地址") |
||||||
|
private String address; |
||||||
|
|
||||||
|
/** |
||||||
|
* 收货人 |
||||||
|
*/ |
||||||
|
@ExcelProperty("收货人") |
||||||
|
private String consignee; |
||||||
|
|
||||||
|
/** |
||||||
|
* 收货人电话 |
||||||
|
*/ |
||||||
|
@ExcelProperty("收货人电话") |
||||||
|
private String consigneePhone; |
||||||
|
|
||||||
|
/** |
||||||
|
* 物流公司 |
||||||
|
*/ |
||||||
|
@ExcelProperty("物流公司") |
||||||
|
private String logisticsCompany; |
||||||
|
|
||||||
|
/** |
||||||
|
* 物流单号 |
||||||
|
*/ |
||||||
|
@ExcelProperty("物流单号") |
||||||
|
private String logisticsNo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 付款时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@ExcelProperty("付款时间") |
||||||
|
private Date paymentTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 发货时间 |
||||||
|
*/ |
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@ExcelProperty("发货时间") |
||||||
|
private Date deliveryTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 成交时间, 点击确认收货时更新此状态 |
||||||
|
*/ |
||||||
|
@DateTimeFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@JsonFormat( |
||||||
|
pattern = "yyyy-MM-dd HH:mm:ss" |
||||||
|
) |
||||||
|
@ExcelProperty("成交时间") |
||||||
|
private Date transactionTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 订单状态 |
||||||
|
* 待付款, 待发货, 待收货, 已完成 |
||||||
|
*/ |
||||||
|
@ExcelProperty("订单状态") |
||||||
|
private String statusName; |
||||||
|
} |
||||||
Loading…
Reference in new issue