diff --git a/api-mapper/src/main/java/com/heyu/api/data/entity/vv/VvTradeOrderLineEntity.java b/api-mapper/src/main/java/com/heyu/api/data/entity/vv/VvTradeOrderLineEntity.java index 12a58e4..74c75ab 100644 --- a/api-mapper/src/main/java/com/heyu/api/data/entity/vv/VvTradeOrderLineEntity.java +++ b/api-mapper/src/main/java/com/heyu/api/data/entity/vv/VvTradeOrderLineEntity.java @@ -1,16 +1,16 @@ package com.heyu.api.data.entity.vv; + import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import com.lz.mybatis.plugin.annotations.AS; import java.math.BigDecimal; -import java.util.Date;import java.util.Date; +import java.util.Date; /** *购物车 * @author quyixiao -* @since 2025-10-15 +* @since 2025-10-22 */ @Data @@ -41,7 +41,7 @@ private static final long serialVersionUID = 1L; public final static String comment_id = CLASS_NAME + "comment_id"; // 评论 id public final static String gmt_down_order = CLASS_NAME + "gmt_down_order"; // 下单时间 public final static String gmt_pay = CLASS_NAME + "gmt_pay"; // 支付时间 - public final static String gmt_to_pack = CLASS_NAME + "gmt_to_pack"; // 打包时间 + public final static String gmt_to_shipping = CLASS_NAME + "gmt_to_shipping"; // 打包时间 public final static String gmt_delivered = CLASS_NAME + "gmt_delivered"; // 妥投时间 public final static String delivered_type = CLASS_NAME + "delivered_type"; // 1 买家手动确认收货, 2 系统自动确认收货 public final static String settle_status = CLASS_NAME + "settle_status"; // 0 未结算,1 已经结算 @@ -95,7 +95,7 @@ private static final long serialVersionUID = 1L; //商品主图 private String productMainImageUrl; //skuid - private Long skuId; + private Integer skuId; //sku图片 private String skuImageUrl; //评论 id @@ -105,7 +105,7 @@ private static final long serialVersionUID = 1L; //支付时间 private Date gmtPay; //打包时间 - private Date gmtToPack; + private Date gmtToShipping; //妥投时间 private Date gmtDelivered; //1 买家手动确认收货, 2 系统自动确认收货 @@ -377,14 +377,14 @@ private static final long serialVersionUID = 1L; * skuid * @return */ - public Long getSkuId() { + public Integer getSkuId() { return skuId; } /** * skuid * @param skuId */ - public void setSkuId(Long skuId) { + public void setSkuId(Integer skuId) { this.skuId = skuId; } @@ -452,15 +452,15 @@ private static final long serialVersionUID = 1L; * 打包时间 * @return */ - public Date getGmtToPack() { - return gmtToPack; + public Date getGmtToShipping() { + return gmtToShipping; } /** * 打包时间 - * @param gmtToPack + * @param gmtToShipping */ - public void setGmtToPack(Date gmtToPack) { - this.gmtToPack = gmtToPack; + public void setGmtToShipping(Date gmtToShipping) { + this.gmtToShipping = gmtToShipping; } /** @@ -801,7 +801,7 @@ private static final long serialVersionUID = 1L; ",commentId=" + commentId + ",gmtDownOrder=" + gmtDownOrder + ",gmtPay=" + gmtPay + - ",gmtToPack=" + gmtToPack + + ",gmtToShipping=" + gmtToShipping + ",gmtDelivered=" + gmtDelivered + ",deliveredType=" + deliveredType + ",settleStatus=" + settleStatus + diff --git a/api-mapper/src/test/java/com/test/xxx/MysqlMain_update.java b/api-mapper/src/test/java/com/test/xxx/MysqlMain_update.java index b194512..d28fb85 100644 --- a/api-mapper/src/test/java/com/test/xxx/MysqlMain_update.java +++ b/api-mapper/src/test/java/com/test/xxx/MysqlMain_update.java @@ -49,7 +49,7 @@ public class MysqlMain_update { List list = new ArrayList(); - String a = "vv_comment"; + String a = "vv_trade_order_line"; for (String s : a.split(",")) { list.add(new TablesBean(s)); } diff --git a/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminCategoryController.java b/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminCategoryController.java index 83ac4d5..cabde21 100644 --- a/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminCategoryController.java +++ b/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminCategoryController.java @@ -1,7 +1,6 @@ package com.heyu.api.controller.mm; -import com.heyu.api.alibaba.request.mm.VvAdminCategoryIndexSortRequest; import com.heyu.api.alibaba.request.mm.VvAdminCategoryRequest; import com.heyu.api.alibaba.request.mm.VvAdminCategorySortRequest; import com.heyu.api.data.dao.vv.VvAdminCategoryDao; @@ -111,16 +110,6 @@ public class AdminCategoryController { } - /*** - * 排序 - */ - @RequestMapping("/update/sort/index") - public R updateSortIndex(@RequestBody VvAdminCategoryIndexSortRequest vvCategorySortRequest) { - VvAdminCategoryEntity vvCategory = vvAdminCategoryDao.selectVvAdminCategoryById(vvCategorySortRequest.getAdminCategoryId()); - vvCategory.setDefaultSort(vvCategorySortRequest.getDefaultSort()); - vvAdminCategoryDao.insertOrUpdateVvAdminCategory(vvCategory); - return R.ok().setData("保存成功"); - } public boolean hasChild(VvAdminCategoryEntity vvCategoryEntity, List vvCategoryEntities) { for (VvAdminCategoryEntity categoryEntity : vvCategoryEntities) { diff --git a/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminCategoryPropertyController.java b/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminCategoryPropertyController.java index c9917cc..916a1bd 100644 --- a/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminCategoryPropertyController.java +++ b/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminCategoryPropertyController.java @@ -95,59 +95,6 @@ public class AdminCategoryPropertyController { } - public static void main(String[] args) { - VvPropertyInsertOrUpdateRequest vvCategoryPropertyEntity1 = new VvPropertyInsertOrUpdateRequest(); - - vvCategoryPropertyEntity1.setCategoryId(17L); - vvCategoryPropertyEntity1.setCategoryName("项圈"); - vvCategoryPropertyEntity1.setCategoryPropertyName("珍珠直径"); - vvCategoryPropertyEntity1.setDefaultSort(1); - - - VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity11 = new VvCategoryPropertyValueEntity(); - vvCategoryPropertyValueEntity11.setCategoryPropertyValue("5-5.5mm"); - - VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity12 = new VvCategoryPropertyValueEntity(); - vvCategoryPropertyValueEntity12.setCategoryPropertyValue("5.5-6mm"); - - - List vvCategoryPropertyValueEntities1 = new ArrayList<>(); - vvCategoryPropertyValueEntities1.add(vvCategoryPropertyValueEntity11); - vvCategoryPropertyValueEntities1.add(vvCategoryPropertyValueEntity12); - vvCategoryPropertyEntity1.setVvCategoryPropertyValueEntities(vvCategoryPropertyValueEntities1); - - - - - VvPropertyInsertOrUpdateRequest vvCategoryPropertyEntity2 = new VvPropertyInsertOrUpdateRequest(); - vvCategoryPropertyEntity2.setCategoryId(17L); - vvCategoryPropertyEntity2.setCategoryName("项圈"); - vvCategoryPropertyEntity2.setCategoryPropertyName("颜色分类"); - vvCategoryPropertyEntity2.setDefaultSort(2); - - - - VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity21 = new VvCategoryPropertyValueEntity(); - vvCategoryPropertyValueEntity21.setCategoryPropertyValue("【臻藏】极光镜面AKOYA/ S925银扣"); - - VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity22 = new VvCategoryPropertyValueEntity(); - vvCategoryPropertyValueEntity22.setCategoryPropertyValue("【臻品】GUILD极光大证 / 18K金扣"); - - List vvCategoryPropertyValueEntities2 = new ArrayList<>(); - vvCategoryPropertyValueEntities2.add(vvCategoryPropertyValueEntity21); - vvCategoryPropertyValueEntities2.add(vvCategoryPropertyValueEntity22); - - vvCategoryPropertyEntity2.setVvCategoryPropertyValueEntities(vvCategoryPropertyValueEntities2); - - - List vvPropertyInsertOrUpdateRequestList = new ArrayList<>(); - vvPropertyInsertOrUpdateRequestList.add(vvCategoryPropertyEntity1); - vvPropertyInsertOrUpdateRequestList.add(vvCategoryPropertyEntity2); - - System.out.println(JSON.toJSONString(vvPropertyInsertOrUpdateRequestList)); - - - } /*** * 排序 diff --git a/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminFrontManagerController.java b/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminFrontManagerController.java index 9debd5e..fdf3df0 100644 --- a/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminFrontManagerController.java +++ b/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminFrontManagerController.java @@ -1,7 +1,6 @@ package com.heyu.api.controller.mm; -import com.heyu.api.alibaba.request.mm.FrontManagerIndexSortRequest; import com.heyu.api.alibaba.request.mm.FrontManagerRequest; import com.heyu.api.alibaba.request.mm.FrontManagerSortRequest; import com.heyu.api.data.dao.vv.VvProductDao; @@ -51,17 +50,6 @@ public class AdminFrontManagerController { return R.ok().setData("保存成功"); } - /*** - * 排序 - */ - @RequestMapping("/update/sort/index") - public R updateSortIndex(@RequestBody FrontManagerIndexSortRequest frontManagerIndexSortRequest) { - VvProductEntity vvProduct = vvProductDao.selectVvProductById(frontManagerIndexSortRequest.getProductId()); - vvProduct.setDefaultSort(frontManagerIndexSortRequest.getDefaultSort()); - vvProductDao.updateVvProductById(vvProduct); - return R.ok().setData("保存成功"); - } - diff --git a/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminOrderController.java b/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminOrderController.java index a6594e7..7a892d9 100644 --- a/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminOrderController.java +++ b/api-web/api-interface/src/main/java/com/heyu/api/controller/mm/AdminOrderController.java @@ -23,10 +23,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; @Slf4j @RestController @@ -188,10 +185,10 @@ public class AdminOrderController { } /*** - * 订单打包 + * 订单发货 */ - @RequestMapping("/topack") - public R topack(@RequestBody VvToPackDTO vvOrderRequest) { + @RequestMapping("/toShipping") + public R toShipping(@RequestBody VvToPackDTO vvOrderRequest) { List vvTradeOrderLineEntityList = vvTradeOrderLineDao.selectVvTradeOrderLineByIds(vvOrderRequest.getTradeOrderLineIds()); for (VvTradeOrderLineEntity tradeOrderLineEntity : vvTradeOrderLineEntityList) { if(!OrderStatusEnums.wait_shipping.getStatus().equals(tradeOrderLineEntity.getStatus())){ @@ -209,12 +206,11 @@ public class AdminOrderController { vvPackageEntity.setShippingFrom(vvOrderRequest.getShippingFrom()); vvPackageEntity.setShippingTo(vvTradeOrderEntity.getContry() + vvTradeOrderEntity.getCity() + vvTradeOrderEntity.getDistrict() + vvTradeOrderEntity.getBuyerDetailAddress()); vvPackageEntity.setTrackNumber(vvPackageEntity.getTrackNumber()); - vvPackageEntity.setShippingAmount(vvPackageEntity.getShippingAmount()); - vvPackageDao.insertOrUpdateVvPackage(vvPackageEntity); for (VvTradeOrderLineEntity tradeOrderLineEntity : vvTradeOrderLineEntityList) { tradeOrderLineEntity.setTrackNumber(vvOrderRequest.getTrackNumber()); tradeOrderLineEntity.setStatus(OrderStatusEnums.shipping.getStatus()); // 已经发货 + tradeOrderLineEntity.setGmtToShipping(new Date()); vvTradeOrderLineDao.updateVvTradeOrderLineById(tradeOrderLineEntity); } return R.ok(); @@ -251,6 +247,7 @@ public class AdminOrderController { } for (VvTradeOrderLineEntity tradeOrderLineEntity : vvTradeOrderLineEntityList) { tradeOrderLineEntity.setStatus(OrderStatusEnums.delivered.getStatus()); + tradeOrderLineEntity.setGmtDelivered(new Date()); vvTradeOrderLineDao.updateVvTradeOrderLineById(tradeOrderLineEntity); } diff --git a/api-web/api-interface/src/test/java/com/api/test/AdminCaTest.java b/api-web/api-interface/src/test/java/com/api/test/AdminCaTest.java new file mode 100644 index 0000000..3e0817d --- /dev/null +++ b/api-web/api-interface/src/test/java/com/api/test/AdminCaTest.java @@ -0,0 +1,66 @@ +package com.api.test; + +import com.alibaba.fastjson.JSON; +import com.heyu.api.alibaba.request.mm.VvPropertyInsertOrUpdateRequest; +import com.heyu.api.data.entity.vv.VvCategoryPropertyValueEntity; + +import java.util.ArrayList; +import java.util.List; + +public class AdminCaTest { + + + public static void main(String[] args) { + VvPropertyInsertOrUpdateRequest vvCategoryPropertyEntity1 = new VvPropertyInsertOrUpdateRequest(); + + vvCategoryPropertyEntity1.setCategoryId(17L); + vvCategoryPropertyEntity1.setCategoryName("项圈"); + vvCategoryPropertyEntity1.setCategoryPropertyName("珍珠直径"); + vvCategoryPropertyEntity1.setDefaultSort(1); + + + VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity11 = new VvCategoryPropertyValueEntity(); + vvCategoryPropertyValueEntity11.setCategoryPropertyValue("5-5.5mm"); + + VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity12 = new VvCategoryPropertyValueEntity(); + vvCategoryPropertyValueEntity12.setCategoryPropertyValue("5.5-6mm"); + + + List vvCategoryPropertyValueEntities1 = new ArrayList<>(); + vvCategoryPropertyValueEntities1.add(vvCategoryPropertyValueEntity11); + vvCategoryPropertyValueEntities1.add(vvCategoryPropertyValueEntity12); + vvCategoryPropertyEntity1.setVvCategoryPropertyValueEntities(vvCategoryPropertyValueEntities1); + + + + + VvPropertyInsertOrUpdateRequest vvCategoryPropertyEntity2 = new VvPropertyInsertOrUpdateRequest(); + vvCategoryPropertyEntity2.setCategoryId(17L); + vvCategoryPropertyEntity2.setCategoryName("项圈"); + vvCategoryPropertyEntity2.setCategoryPropertyName("颜色分类"); + vvCategoryPropertyEntity2.setDefaultSort(2); + + + + VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity21 = new VvCategoryPropertyValueEntity(); + vvCategoryPropertyValueEntity21.setCategoryPropertyValue("【臻藏】极光镜面AKOYA/ S925银扣"); + + VvCategoryPropertyValueEntity vvCategoryPropertyValueEntity22 = new VvCategoryPropertyValueEntity(); + vvCategoryPropertyValueEntity22.setCategoryPropertyValue("【臻品】GUILD极光大证 / 18K金扣"); + + List vvCategoryPropertyValueEntities2 = new ArrayList<>(); + vvCategoryPropertyValueEntities2.add(vvCategoryPropertyValueEntity21); + vvCategoryPropertyValueEntities2.add(vvCategoryPropertyValueEntity22); + + vvCategoryPropertyEntity2.setVvCategoryPropertyValueEntities(vvCategoryPropertyValueEntities2); + + + List vvPropertyInsertOrUpdateRequestList = new ArrayList<>(); + vvPropertyInsertOrUpdateRequestList.add(vvCategoryPropertyEntity1); + vvPropertyInsertOrUpdateRequestList.add(vvCategoryPropertyEntity2); + + System.out.println(JSON.toJSONString(vvPropertyInsertOrUpdateRequestList)); + + + } +}