18 changed files with 781 additions and 33 deletions
@ -0,0 +1,75 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import lombok.Data; |
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import java.util.Date; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.tenant.mp.TenantEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 实体类 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("logpm_basicdata_vehicle_photo") |
||||||
|
@ApiModel(value = "BasicdataVehiclePhoto对象", description = "车辆照片信息表") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class BasicdataVehiclePhotoEntity extends TenantEntity { |
||||||
|
|
||||||
|
/** |
||||||
|
* 关联车辆信息表主键id |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "关联车辆信息表主键id") |
||||||
|
private Long masterId; |
||||||
|
/** |
||||||
|
* 车辆历史照片 |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "车辆历史照片") |
||||||
|
private String photoUrl; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "") |
||||||
|
private String reserve1; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "") |
||||||
|
private String reserve2; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "") |
||||||
|
private String reserve3; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "") |
||||||
|
private String reserve4; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ApiModelProperty(value = "") |
||||||
|
private String reserve5; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,50 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.feign; |
||||||
|
|
||||||
|
import org.springblade.common.constant.LauncherConstant; |
||||||
|
import org.springblade.core.mp.support.BladePage; |
||||||
|
import com.logpm.basicdata.entity.BasicdataVehiclePhotoEntity; |
||||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 Feign接口类 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
@FeignClient( |
||||||
|
value = LauncherConstant.APPLICATION_BASICDATA_NAME |
||||||
|
) |
||||||
|
public interface IBasicdataVehiclePhotoClient { |
||||||
|
|
||||||
|
String API_PREFIX = "vehiclephoto/client"; |
||||||
|
String TOP = API_PREFIX + "/top"; |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取车辆照片信息表列表 |
||||||
|
* |
||||||
|
* @param current 页号 |
||||||
|
* @param size 页数 |
||||||
|
* @return BladePage |
||||||
|
*/ |
||||||
|
@GetMapping(TOP) |
||||||
|
BladePage<BasicdataVehiclePhotoEntity> top(@RequestParam("current") Integer current, @RequestParam("size") Integer size); |
||||||
|
|
||||||
|
} |
@ -0,0 +1,35 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.vo; |
||||||
|
|
||||||
|
import com.logpm.basicdata.entity.BasicdataVehiclePhotoEntity; |
||||||
|
import org.springblade.core.tool.node.INode; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 视图实体类 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class BasicdataVehiclePhotoVO extends BasicdataVehiclePhotoEntity { |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,150 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.controller; |
||||||
|
|
||||||
|
import io.swagger.annotations.Api; |
||||||
|
import io.swagger.annotations.ApiOperation; |
||||||
|
import io.swagger.annotations.ApiParam; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import javax.validation.Valid; |
||||||
|
|
||||||
|
import org.springblade.core.secure.BladeUser; |
||||||
|
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.Func; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.logpm.basicdata.entity.BasicdataVehiclePhotoEntity; |
||||||
|
import com.logpm.basicdata.vo.BasicdataVehiclePhotoVO; |
||||||
|
import com.logpm.basicdata.excel.BasicdataVehiclePhotoExcel; |
||||||
|
import com.logpm.basicdata.service.IBasicdataVehiclePhotoService; |
||||||
|
import org.springblade.core.boot.ctrl.BladeController; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.core.excel.util.ExcelUtil; |
||||||
|
import org.springblade.core.tool.constant.BladeConstant; |
||||||
|
import springfox.documentation.annotations.ApiIgnore; |
||||||
|
import java.util.Map; |
||||||
|
import java.util.List; |
||||||
|
import javax.servlet.http.HttpServletResponse; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 控制器 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("blade-basicdataVehiclePhoto/basicdataVehiclePhoto") |
||||||
|
@Api(value = "车辆照片信息表", tags = "车辆照片信息表接口") |
||||||
|
public class BasicdataVehiclePhotoController extends BladeController { |
||||||
|
|
||||||
|
private final IBasicdataVehiclePhotoService basicdataVehiclePhotoService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@ApiOperation(value = "详情", notes = "传入basicdataVehiclePhoto") |
||||||
|
public R<BasicdataVehiclePhotoEntity> detail(BasicdataVehiclePhotoEntity basicdataVehiclePhoto) { |
||||||
|
BasicdataVehiclePhotoEntity detail = basicdataVehiclePhotoService.getOne(Condition.getQueryWrapper(basicdataVehiclePhoto)); |
||||||
|
return R.data(detail); |
||||||
|
} |
||||||
|
/** |
||||||
|
* 车辆照片信息表 分页 |
||||||
|
*/ |
||||||
|
@GetMapping("/list") |
||||||
|
@ApiOperationSupport(order = 2) |
||||||
|
@ApiOperation(value = "分页", notes = "传入basicdataVehiclePhoto") |
||||||
|
public R<IPage<BasicdataVehiclePhotoEntity>> list(@ApiIgnore @RequestParam Map<String, Object> basicdataVehiclePhoto, Query query) { |
||||||
|
IPage<BasicdataVehiclePhotoEntity> pages = basicdataVehiclePhotoService.page(Condition.getPage(query), Condition.getQueryWrapper(basicdataVehiclePhoto, BasicdataVehiclePhotoEntity.class)); |
||||||
|
return R.data(pages); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 自定义分页 |
||||||
|
*/ |
||||||
|
@GetMapping("/page") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@ApiOperation(value = "分页", notes = "传入basicdataVehiclePhoto") |
||||||
|
public R<IPage<BasicdataVehiclePhotoVO>> page(BasicdataVehiclePhotoVO basicdataVehiclePhoto, Query query) { |
||||||
|
IPage<BasicdataVehiclePhotoVO> pages = basicdataVehiclePhotoService.selectBasicdataVehiclePhotoPage(Condition.getPage(query), basicdataVehiclePhoto); |
||||||
|
return R.data(pages); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 新增 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 4) |
||||||
|
@ApiOperation(value = "新增", notes = "传入basicdataVehiclePhoto") |
||||||
|
public R save(@Valid @RequestBody BasicdataVehiclePhotoEntity basicdataVehiclePhoto) { |
||||||
|
return R.status(basicdataVehiclePhotoService.save(basicdataVehiclePhoto)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/update") |
||||||
|
@ApiOperationSupport(order = 5) |
||||||
|
@ApiOperation(value = "修改", notes = "传入basicdataVehiclePhoto") |
||||||
|
public R update(@Valid @RequestBody BasicdataVehiclePhotoEntity basicdataVehiclePhoto) { |
||||||
|
return R.status(basicdataVehiclePhotoService.updateById(basicdataVehiclePhoto)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 新增或修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@ApiOperation(value = "新增或修改", notes = "传入basicdataVehiclePhoto") |
||||||
|
public R submit(@Valid @RequestBody BasicdataVehiclePhotoEntity basicdataVehiclePhoto) { |
||||||
|
return R.status(basicdataVehiclePhotoService.saveOrUpdate(basicdataVehiclePhoto)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 删除 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||||
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(basicdataVehiclePhotoService.deleteLogic(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
*/ |
||||||
|
@GetMapping("/export-basicdataVehiclePhoto") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@ApiOperation(value = "导出数据", notes = "传入basicdataVehiclePhoto") |
||||||
|
public void exportBasicdataVehiclePhoto(@ApiIgnore @RequestParam Map<String, Object> basicdataVehiclePhoto, BladeUser bladeUser, HttpServletResponse response) { |
||||||
|
QueryWrapper<BasicdataVehiclePhotoEntity> queryWrapper = Condition.getQueryWrapper(basicdataVehiclePhoto, BasicdataVehiclePhotoEntity.class); |
||||||
|
//if (!AuthUtil.isAdministrator()) {
|
||||||
|
// queryWrapper.lambda().eq(BasicdataVehiclePhoto::getTenantId, bladeUser.getTenantId());
|
||||||
|
//}
|
||||||
|
queryWrapper.lambda().eq(BasicdataVehiclePhotoEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); |
||||||
|
List<BasicdataVehiclePhotoExcel> list = basicdataVehiclePhotoService.exportBasicdataVehiclePhoto(queryWrapper); |
||||||
|
ExcelUtil.export(response, "车辆照片信息表数据" + DateUtil.time(), "车辆照片信息表数据表", list, BasicdataVehiclePhotoExcel.class); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,34 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.dto; |
||||||
|
|
||||||
|
import com.logpm.basicdata.entity.BasicdataVehiclePhotoEntity; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 数据传输对象实体类 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class BasicdataVehiclePhotoDTO extends BasicdataVehiclePhotoEntity { |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,99 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.excel; |
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
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 java.io.Serializable; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 Excel实体类 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@ColumnWidth(25) |
||||||
|
@HeadRowHeight(20) |
||||||
|
@ContentRowHeight(18) |
||||||
|
public class BasicdataVehiclePhotoExcel implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 租户号 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("租户号") |
||||||
|
private String tenantId; |
||||||
|
/** |
||||||
|
* 是否已删除;1-未删除,2-已删除 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("是否已删除;1-未删除,2-已删除") |
||||||
|
private Integer isDeleted; |
||||||
|
/** |
||||||
|
* 关联车辆信息表主键id |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("关联车辆信息表主键id") |
||||||
|
private String masterId; |
||||||
|
/** |
||||||
|
* 车辆历史照片 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("车辆历史照片") |
||||||
|
private String photoUrl; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("") |
||||||
|
private String reserve1; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("") |
||||||
|
private String reserve2; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("") |
||||||
|
private String reserve3; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("") |
||||||
|
private String reserve4; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("") |
||||||
|
private String reserve5; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,53 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.feign; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import com.logpm.basicdata.entity.BasicdataVehiclePhotoEntity; |
||||||
|
import com.logpm.basicdata.service.IBasicdataVehiclePhotoService; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import org.springblade.core.mp.support.BladePage; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
import org.springframework.web.bind.annotation.RestController; |
||||||
|
import springfox.documentation.annotations.ApiIgnore; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 Feign实现类 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
@ApiIgnore() |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
public class BasicdataVehiclePhotoClient implements IBasicdataVehiclePhotoClient { |
||||||
|
|
||||||
|
private final IBasicdataVehiclePhotoService basicdataVehiclePhotoService; |
||||||
|
|
||||||
|
@Override |
||||||
|
@GetMapping(TOP) |
||||||
|
public BladePage<BasicdataVehiclePhotoEntity> top(Integer current, Integer size) { |
||||||
|
Query query = new Query(); |
||||||
|
query.setCurrent(current); |
||||||
|
query.setSize(size); |
||||||
|
IPage<BasicdataVehiclePhotoEntity> page = basicdataVehiclePhotoService.page(Condition.getPage(query)); |
||||||
|
return BladePage.of(page); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,54 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.mapper; |
||||||
|
|
||||||
|
import com.logpm.basicdata.entity.BasicdataVehiclePhotoEntity; |
||||||
|
import com.logpm.basicdata.vo.BasicdataVehiclePhotoVO; |
||||||
|
import com.logpm.basicdata.excel.BasicdataVehiclePhotoExcel; |
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 Mapper 接口 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
public interface BasicdataVehiclePhotoMapper extends BaseMapper<BasicdataVehiclePhotoEntity> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page |
||||||
|
* @param basicdataVehiclePhoto |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
List<BasicdataVehiclePhotoVO> selectBasicdataVehiclePhotoPage(IPage page, BasicdataVehiclePhotoVO basicdataVehiclePhoto); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
List<BasicdataVehiclePhotoExcel> exportBasicdataVehiclePhoto(@Param("ew") Wrapper<BasicdataVehiclePhotoEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
@ -0,0 +1,35 @@ |
|||||||
|
<?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="com.logpm.basicdata.mapper.BasicdataVehiclePhotoMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="basicdataVehiclePhotoResultMap" type="com.logpm.basicdata.entity.BasicdataVehiclePhotoEntity"> |
||||||
|
<result column="id" property="id"/> |
||||||
|
<result column="tenant_id" property="tenantId"/> |
||||||
|
<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="create_dept" property="createDept"/> |
||||||
|
<result column="master_id" property="masterId"/> |
||||||
|
<result column="photo_url" property="photoUrl"/> |
||||||
|
<result column="reserve1" property="reserve1"/> |
||||||
|
<result column="reserve2" property="reserve2"/> |
||||||
|
<result column="reserve3" property="reserve3"/> |
||||||
|
<result column="reserve4" property="reserve4"/> |
||||||
|
<result column="reserve5" property="reserve5"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
|
||||||
|
<select id="selectBasicdataVehiclePhotoPage" resultMap="basicdataVehiclePhotoResultMap"> |
||||||
|
select * from logpm_basicdata_vehicle_photo where is_deleted = 0 |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
<select id="exportBasicdataVehiclePhoto" resultType="com.logpm.basicdata.excel.BasicdataVehiclePhotoExcel"> |
||||||
|
SELECT * FROM logpm_basicdata_vehicle_photo ${ew.customSqlSegment} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
@ -0,0 +1,52 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.logpm.basicdata.entity.BasicdataVehiclePhotoEntity; |
||||||
|
import com.logpm.basicdata.vo.BasicdataVehiclePhotoVO; |
||||||
|
import com.logpm.basicdata.excel.BasicdataVehiclePhotoExcel; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseService; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 服务类 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
public interface IBasicdataVehiclePhotoService extends BaseService<BasicdataVehiclePhotoEntity> { |
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page |
||||||
|
* @param basicdataVehiclePhoto |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
IPage<BasicdataVehiclePhotoVO> selectBasicdataVehiclePhotoPage(IPage<BasicdataVehiclePhotoVO> page, BasicdataVehiclePhotoVO basicdataVehiclePhoto); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
List<BasicdataVehiclePhotoExcel> exportBasicdataVehiclePhoto(Wrapper<BasicdataVehiclePhotoEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
@ -0,0 +1,54 @@ |
|||||||
|
/* |
||||||
|
* 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 com.logpm.basicdata.service.impl; |
||||||
|
|
||||||
|
import com.logpm.basicdata.entity.BasicdataVehiclePhotoEntity; |
||||||
|
import com.logpm.basicdata.vo.BasicdataVehiclePhotoVO; |
||||||
|
import com.logpm.basicdata.excel.BasicdataVehiclePhotoExcel; |
||||||
|
import com.logpm.basicdata.mapper.BasicdataVehiclePhotoMapper; |
||||||
|
import com.logpm.basicdata.service.IBasicdataVehiclePhotoService; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseServiceImpl; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 车辆照片信息表 服务实现类 |
||||||
|
* |
||||||
|
* @author lmy |
||||||
|
* @since 2023-05-19 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class BasicdataVehiclePhotoServiceImpl extends BaseServiceImpl<BasicdataVehiclePhotoMapper, BasicdataVehiclePhotoEntity> implements IBasicdataVehiclePhotoService { |
||||||
|
|
||||||
|
@Override |
||||||
|
public IPage<BasicdataVehiclePhotoVO> selectBasicdataVehiclePhotoPage(IPage<BasicdataVehiclePhotoVO> page, BasicdataVehiclePhotoVO basicdataVehiclePhoto) { |
||||||
|
return page.setRecords(baseMapper.selectBasicdataVehiclePhotoPage(page, basicdataVehiclePhoto)); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public List<BasicdataVehiclePhotoExcel> exportBasicdataVehiclePhoto(Wrapper<BasicdataVehiclePhotoEntity> queryWrapper) { |
||||||
|
List<BasicdataVehiclePhotoExcel> basicdataVehiclePhotoList = baseMapper.exportBasicdataVehiclePhoto(queryWrapper); |
||||||
|
//basicdataVehiclePhotoList.forEach(basicdataVehiclePhoto -> {
|
||||||
|
// basicdataVehiclePhoto.setTypeName(DictCache.getValue(DictEnum.YES_NO, BasicdataVehiclePhoto.getType()));
|
||||||
|
//});
|
||||||
|
return basicdataVehiclePhotoList; |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue