Commit dbead0b4 authored by 周健威's avatar 周健威

修改bug

parent 3eb7635a
......@@ -145,4 +145,7 @@ public class VehicleModel implements Serializable {
@ApiModelProperty(value = "购买价格")
private BigDecimal buyPrice;
@Column(name = "status")
@ApiModelProperty(value = "状态 0--下架;1--上架")
private Integer status;
}
......@@ -26,6 +26,8 @@ public class VehicleModelQueryCondition {
private String takeALieTheNumber;
@ApiModelProperty(value = "是否删除")
private Integer isDel;
@ApiModelProperty(value = "状态")
private Integer status;
@ApiModelProperty("分类逗号分割")
String catasStr;
@ApiModelProperty(value = "分类列表", hidden = true)
......
......@@ -46,6 +46,8 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TRUE;
@RestController
@RequestMapping("vehicleModel")
@Api(value = "车型controller", tags = {"车型操作接口"})
......@@ -112,6 +114,10 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
vmqc.setIsDel(0);
}
if (vmqc.getStatus()==null) {
vmqc.setStatus(SYS_TRUE);
}
if (vmqc == null || vmqc.getPage() == null || vmqc.getLimit() == null || vmqc.getPage() < 0 || vmqc.getLimit() <= 0) {
return ObjectRestResponse.createDefaultFail();
}
......@@ -125,7 +131,6 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
}
/**
* 添加车型
*
......@@ -307,27 +312,4 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
return baseBiz.goodList(page,limit);
}
/**
* 车型列表查
*
* @param vmqc 条件
* @return
*/
@ApiOperation("车型列表")
@PostMapping(value = "/app/findVehicleModelPage")
public ObjectRestResponse<VehicleModelVo> findVehicleModelPage(
@RequestBody @ApiParam("查询条件") VehicleModelQueryCondition vmqc ) {
if (vmqc.getIsDel()==null) {
vmqc.setIsDel(0);
}
if (vmqc == null || vmqc.getPage() == null || vmqc.getLimit() == null || vmqc.getPage() < 0 || vmqc.getLimit() <= 0) {
return ObjectRestResponse.createDefaultFail();
}
return vehicleModelBiz.findVehicleModelPage(vmqc);
}
}
\ No newline at end of file
......@@ -382,6 +382,7 @@
<include refid="searchUsableSql"/>
and vm.id is not null
and vm.status = 1
and bc.id is not null
GROUP BY model_id, company_id
<if test="lon != null and lat != null">, distance</if>
......
......@@ -17,6 +17,9 @@
<if test="isDel !=null ">
and isdel=#{isDel}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="vehicleName !=null and vehicleName !=''">
AND vmqc.name LIKE CONCAT('%',#{vehicleName},'%')
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment