Ver Fonte

fix(test): 部分bug修复

高家顺 há 3 anos atrás
pai
commit
8409fab18b

+ 4 - 4
src/main/java/com/macro/mall/tiny/modules/business/controller/KrBLineController.java

@@ -58,8 +58,8 @@ public class KrBLineController {
     @RequestMapping(value = "/findByKey", method = RequestMethod.GET)
     @ResponseBody
     public CommonResult<List<KrBLine>> findByKey(@RequestParam @PathParam(value = "key") String key,
-                                                 @RequestParam @PathParam(value = "provinceId") String provinceId,
-                                                 @RequestParam @PathParam(value = "cityId") String cityId) {
+                                                 @RequestParam(required = false) @PathParam(value = "provinceId") String provinceId,
+                                                 @RequestParam(required = false) @PathParam(value = "cityId") String cityId) {
         List<KrBLine> lineList = krBLineService.findByKey(key, provinceId, cityId);
         return CommonResult.success(lineList);
     }
@@ -68,8 +68,8 @@ public class KrBLineController {
     @RequestMapping(value = "/findByKeySimple", method = RequestMethod.GET)
     @ResponseBody
     public CommonResult<List<KrBLine>> findByKeySimple(@RequestParam @PathParam(value = "key") String key,
-                                                 @RequestParam @PathParam(value = "provinceId") String provinceId,
-                                                 @RequestParam @PathParam(value = "cityId") String cityId) {
+                                                 @RequestParam(required = false) @PathParam(value = "provinceId") String provinceId,
+                                                 @RequestParam(required = false) @PathParam(value = "cityId") String cityId) {
         List<KrBLine> lineList = krBLineService.findByKeySimple(key, provinceId, cityId);
         return CommonResult.success(lineList);
     }

+ 0 - 63
src/main/java/com/macro/mall/tiny/modules/business/model/BLine.java

@@ -1,63 +0,0 @@
-//package com.macro.mall.tiny.modules.business.model;
-//
-//import com.baomidou.mybatisplus.annotation.TableField;
-//import com.baomidou.mybatisplus.annotation.TableName;
-//import com.baomidou.mybatisplus.annotation.IdType;
-//import com.baomidou.mybatisplus.annotation.TableId;
-//import java.io.Serializable;
-//import java.util.Date;
-//import java.util.List;
-//import java.util.Set;
-//
-//import com.fasterxml.jackson.annotation.JsonFormat;
-//import io.swagger.annotations.ApiModel;
-//import io.swagger.annotations.ApiModelProperty;
-//import lombok.Data;
-//import lombok.EqualsAndHashCode;
-//
-///**
-// * <p>
-// * 线路表
-// * </p>
-// *
-// * @author macro
-// * @since 2021-03-24
-// */
-//@Data
-//@EqualsAndHashCode(callSuper = false)
-//@TableName("b_line")
-//@ApiModel(value="BLine对象", description="线路表")
-//public class BLine implements Serializable {
-//
-//    private static final long serialVersionUID=1L;
-//
-//    @ApiModelProperty(value = "线路ID")
-//    @TableId(value = "id", type = IdType.AUTO)
-//    private Long id;
-//
-//    @ApiModelProperty(value = "线路名称")
-//    private String name;
-//
-//    @ApiModelProperty(value = "线路所属省份")
-//    private Long provinceId;
-//
-//    @ApiModelProperty(value = "所属省份")
-//    @TableField(exist = false)
-//    private String province;
-//
-//    @ApiModelProperty(value = "创建者ID")
-//    private Long creatorId;
-//
-//
-//    @ApiModelProperty(value = "包含铁塔")
-//    @TableField(exist = false)
-//    private List<BTower> towerList;
-//
-//    @ApiModelProperty(value = "匹配塔形关键字")
-//    @TableField(exist = false)
-//    private Set<String> matchShapeList;
-//
-//    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-//    @ApiModelProperty(value = "创建时间")
-//    private Date createTime;
-//}

+ 0 - 35
src/main/java/com/macro/mall/tiny/modules/business/model/BProvince.java

@@ -1,35 +0,0 @@
-//package com.macro.mall.tiny.modules.business.model;
-//
-//import com.baomidou.mybatisplus.annotation.TableName;
-//import com.baomidou.mybatisplus.annotation.IdType;
-//import com.baomidou.mybatisplus.annotation.TableId;
-//import java.io.Serializable;
-//import io.swagger.annotations.ApiModel;
-//import io.swagger.annotations.ApiModelProperty;
-//import lombok.Data;
-//import lombok.EqualsAndHashCode;
-//
-///**
-// * <p>
-// * 后台角色资源关系表
-// * </p>
-// *
-// * @author macro
-// * @since 2021-03-19
-// */
-//@Data
-//@EqualsAndHashCode(callSuper = false)
-//@TableName("b_province")
-//@ApiModel(value="BProvince对象", description="后台角色资源关系表")
-//public class BProvince implements Serializable {
-//
-//    private static final long serialVersionUID=1L;
-//
-//    @TableId(value = "id", type = IdType.AUTO)
-//    private Long id;
-//
-//    @ApiModelProperty(value = "省份名称")
-//    private String province;
-//
-//
-//}

+ 0 - 72
src/main/java/com/macro/mall/tiny/modules/business/model/BTower.java

@@ -1,72 +0,0 @@
-//package com.macro.mall.tiny.modules.business.model;
-//
-//import com.baomidou.mybatisplus.annotation.IdType;
-//import com.baomidou.mybatisplus.annotation.TableId;
-//import com.baomidou.mybatisplus.annotation.TableName;
-//import com.fasterxml.jackson.annotation.JsonFormat;
-//import io.swagger.annotations.ApiModel;
-//import io.swagger.annotations.ApiModelProperty;
-//import lombok.Data;
-//
-//import java.io.Serializable;
-//import java.math.BigDecimal;
-//import java.util.Date;
-//
-///**
-// * <p>
-// * 塔表
-// * </p>
-// *
-// * @author macro
-// * @since 2021-03-24
-// */
-//@Data
-//@TableName("b_tower")
-//@ApiModel(value="BTower对象", description="塔表")
-//public class BTower implements Serializable {
-//
-//    private static final long serialVersionUID=1L;
-//
-//    @ApiModelProperty(value = "杆塔表")
-//    @TableId(value = "id", type = IdType.AUTO)
-//    private Long id;
-//
-//    @ApiModelProperty(value = "序号")
-//    private Integer sort;
-//
-//    @ApiModelProperty(value = "杆塔号")
-//    private String name;
-//
-//    @ApiModelProperty(value = "塔形")
-//    private String shape;
-//
-//    @ApiModelProperty(value = "金具串型号")
-//    private String hardwareType;
-//
-//    @ApiModelProperty(value = "线路ID")
-//    private Long lineId;
-//
-//    @ApiModelProperty(value = "经度")
-//    private BigDecimal lon;
-//
-//    @ApiModelProperty(value = "纬度")
-//    private BigDecimal lat;
-//
-//    @ApiModelProperty(value = "是否含有资料")
-//    private Integer hasFile;
-//
-//    @Override
-//    public boolean equals(Object obj){
-//        BTower tower = (BTower) obj;
-//        return this.name.equals(tower.name) && this.lineId.equals(tower.lineId);
-//    }
-//
-//    @Override
-//    public int hashCode(){
-//        return this.name.hashCode() + this.lineId.intValue();
-//    }
-//
-//    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-//    @ApiModelProperty(value = "创建时间")
-//    private Date createTime;
-//}

+ 1 - 0
src/main/java/com/macro/mall/tiny/modules/business/model/KrBLine.java

@@ -58,6 +58,7 @@ public class KrBLine implements Serializable {
     @ApiModelProperty(value = "线路状态:在运,停运")
     private String lineStatus;
 
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "投运时间")
     private Date serviceBegintime;
 

+ 1 - 0
src/main/java/com/macro/mall/tiny/modules/business/model/KrBTower.java

@@ -80,6 +80,7 @@ public class KrBTower implements Serializable {
     @ApiModelProperty(value = "档距")
     private Double span;
 
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "投运时间")
     private Date serviceBegintime;
 

+ 1 - 1
src/main/resources/mapper/business/KrBLineMapper.xml

@@ -152,7 +152,7 @@
         l.begin_tower,
         l.end_tower,
         l.creator_id,
-        l.create_time,
+        l.create_time
         FROM kr_b_line l
         LEFT JOIN kr_b_region_province p ON l.province_id = p.province_id
         LEFT JOIN kr_b_region_city c ON l.city_id = c.city_id