浏览代码

解决订单显示问题

JensionDzero 1 年之前
父节点
当前提交
f02c698015

+ 2 - 5
ruoyi-demo/src/main/java/com/ruoyi/demo/entity/DlUser.java

@@ -61,14 +61,11 @@ public class DlUser {
         this.startEquipmentId = s.getEquipmentId();
         this.startEquipmentName = s.getEquipmentName();
         this.startEquipmentCode = s.getEquipmentCode();
-        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        dateTimeFormatter = dateTimeFormatter.withZone(ZoneId.of("Asia/Shanghai"));
-        LocalDateTime parse = LocalDateTime.parse(s.getTime(), dateTimeFormatter);
-        this.startTime = parse;
+        this.startTime = s.getTime();
         this.endEquipmentId = s.getEquipmentId();
         this.endEquipmentName = s.getEquipmentName();
         this.endEquipmentCode = s.getEquipmentCode();
-        this.endTime = parse;
+        this.endTime = s.getTime();
         this.totalPrice = s.getDealToolPrice();
     }
 }

+ 10 - 9
ruoyi-demo/src/main/java/com/ruoyi/demo/entity/Order.java

@@ -43,10 +43,10 @@ public class Order {
     private String userName;
     @TableField("user_telephone")
     private String userTelephone;
-    @TableField("commercial_id")
-    private String commercialId;
-    @TableField("commercial_name")
-    private String commercialName;
+//    @TableField("commercial_id")
+//    private String commercialId;
+//    @TableField("commercial_name")
+//    private String commercialName;
     @TableField("appkey")
     private String appkey;
     @TableField("app_name")
@@ -73,12 +73,13 @@ public class Order {
         this.userId = bo.getUserId();
         this.userName = bo.getUserName();
         this.userTelephone = bo.getUserTelephone();
-        this.commercialId = bo.getCommercialId();
-        this.commercialName = bo.getCommercialName();
+//        this.commercialId = bo.getCommercialId();
+//        this.commercialName = bo.getCommercialName();
         this.appkey = bo.getAppkey();
         this.appName = bo.getAppName();
-        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        dateTimeFormatter.withZone(ZoneId.of("Asia/Shanghai"));
-        this.createTime = LocalDateTime.parse(bo.getCreateTime(), dateTimeFormatter);
+        this.createTime = bo.getCreateTime();
+    }
+
+    public Order() {
     }
 }

+ 1 - 4
ruoyi-demo/src/main/java/com/ruoyi/demo/entity/Statistics.java

@@ -80,9 +80,6 @@ public class Statistics {
         this.userName = bo.getUserName();
         this.userTelephone = bo.getUserTelephone();
         this.behavior = bo.getBehavior();
-        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        dateTimeFormatter.withZone(ZoneId.of("Asia/Shanghai"));
-        LocalDateTime parse = LocalDateTime.parse(bo.getTime(), dateTimeFormatter);
-        this.time = parse;
+        this.time = bo.getTime();
     }
 }

+ 4 - 4
ruoyi-demo/src/main/java/com/ruoyi/demo/entity/bo/OrderAddBo.java

@@ -35,10 +35,10 @@ public class OrderAddBo {
     private String userName;
     @NotBlank(groups = {AddGroup.class},message = "客户联系方式不能为空")
     private String userTelephone;
-    @NotBlank(groups = {AddGroup.class},message = "商户Id不能为空")
-    private String commercialId;
-    @NotBlank(groups = {AddGroup.class},message = "商户名称不能为空")
-    private String commercialName;
+//    @NotBlank(groups = {AddGroup.class},message = "商户Id不能为空")
+//    private String commercialId;
+//    @NotBlank(groups = {AddGroup.class},message = "商户名称不能为空")
+//    private String commercialName;
     @NotBlank(groups = {AddGroup.class},message = "appkey不能为空")
     private String appkey;
     @NotBlank(groups = {AddGroup.class},message = "小程序名称不能为空")

+ 2 - 2
ruoyi-demo/src/main/java/com/ruoyi/demo/entity/bo/StatisticsAddBo.java

@@ -26,9 +26,9 @@ public class StatisticsAddBo {
     @NotBlank(groups = {AddGroup.class},message = "地址信息不能为空")
     private String addrInfo;
 
-    @NotBlank(groups = {AddGroup.class},message = "商品Id不能为空")
+//    @NotBlank(groups = {AddGroup.class},message = "商品Id不能为空")
     private String goodsId;
-    @NotBlank(groups = {AddGroup.class},message = "商品名称不能为空")
+//    @NotBlank(groups = {AddGroup.class},message = "商品名称不能为空")
     private String goodsName;
     @NotNull(groups = {AddGroup.class},message = "交易总数不能为空")
     private Integer dealToolCount;

+ 7 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/entity/bo/StoreBo.java

@@ -9,6 +9,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 import org.springframework.boot.actuate.endpoint.web.Link;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 @Data
@@ -23,6 +24,9 @@ public class StoreBo{
     private String principalTelephone;
 
     private Integer count;
+    private BigDecimal lat;
+    private BigDecimal lng;
+    private String point;
     List<Equipment> equipmentList;
 
     public StoreBo(Store store) {
@@ -33,5 +37,8 @@ public class StoreBo{
         this.addrCodeInfo = store.getAddrCodeInfo();
         this.principalName = store.getPrincipalName();
         this.principalTelephone = store.getPrincipalTelephone();
+        this.lat = store.getLat();
+        this.lng = store.getLng();
+        this.point = store.getPoint();
     }
 }

+ 5 - 5
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/OrderServiceImpl.java

@@ -37,8 +37,8 @@ public class OrderServiceImpl implements OrderService {
         Map<String,Object> params = Dict.create()
             .set("appName",bo.getAppName())
             .set("appkey",bo.getAppkey())
-            .set("commercialId",bo.getCommercialId())
-            .set("commercialName",bo.getCommercialName())
+//            .set("commercialId",bo.getCommercialId())
+//            .set("commercialName",bo.getCommercialName())
             .set("createTime",bo.getCreateTime())
             .set("goodsId",bo.getGoodsId())
             .set("goodsName",bo.getGoodsName())
@@ -66,8 +66,8 @@ public class OrderServiceImpl implements OrderService {
         Map<String,Object> params = Dict.create()
             .set("appName",bo.getAppName())
             .set("appkey",bo.getAppkey())
-            .set("commercialId",bo.getCommercialId())
-            .set("commercialName",bo.getCommercialName())
+//            .set("commercialId",bo.getCommercialId())
+//            .set("commercialName",bo.getCommercialName())
             .set("createTime",bo.getCreateTime())
             .set("goodsId",bo.getGoodsId())
             .set("goodsName",bo.getGoodsName())
@@ -98,7 +98,7 @@ public class OrderServiceImpl implements OrderService {
                 .or()
                 .like("user_name",bo.getText())
                 .or()
-                .like("commercial_name",bo.getText());
+                .like("vendor_name",bo.getText());
         if (bo.getStartTime() != null)
             queryWrapper.apply("create_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime());
         if (bo.getEndTime() != null)

+ 1 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/PlanServiceImpl.java

@@ -248,6 +248,7 @@ public class PlanServiceImpl implements PlanService {
             planQueryWrapper.apply("plan_start_time <= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
             planQueryWrapper.apply("plan_end_time > STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
             planQueryWrapper.eq("state",1);
+            planQueryWrapper.eq("on_state",0);
             planQueryWrapper.eq("deleted","0");
             Plan plan = planMapper.selectOne(planQueryWrapper);
             if (plan != null)