1
This commit is contained in:
parent
3516465c9d
commit
a5eef57edb
@ -1,16 +1,14 @@
|
||||
package cn.iocoder.yudao.module.project.controller.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.project.entity.RepairProject;
|
||||
import cn.iocoder.yudao.module.project.service.RepairProjectService;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectPageReqVO;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectRespVO;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@ -19,12 +17,8 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 维修项目")
|
||||
@ -36,21 +30,46 @@ public class RepairProjectController {
|
||||
@Resource
|
||||
private RepairProjectService repairProjectService;
|
||||
|
||||
/**
|
||||
* 创建维修项目
|
||||
*
|
||||
* @param createReqVO RepairProjectSaveReqVO实体
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 14:56 2024/9/12
|
||||
**/
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建维修项目")
|
||||
@PreAuthorize("@ss.hasPermission('repair:project:create')")
|
||||
public CommonResult<String> createRepairProject(@Valid @RequestBody RepairProjectSaveReqVO createReqVO) {
|
||||
return success(repairProjectService.createRepairProject(createReqVO));
|
||||
public CommonResult<Boolean> createRepairProject(@Valid @RequestBody RepairProjectSaveReqVO createReqVO) {
|
||||
repairProjectService.saveRepairProject(createReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新维修项目
|
||||
*
|
||||
* @param updateReqVO RepairProjectSaveReqVO实体
|
||||
* @return cn.iocoder.yudao.framewor.k.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 14:56 2024/9/12
|
||||
**/
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新维修项目")
|
||||
@PreAuthorize("@ss.hasPermission('repair:project:update')")
|
||||
public CommonResult<Boolean> updateRepairProject(@Valid @RequestBody RepairProjectSaveReqVO updateReqVO) {
|
||||
repairProjectService.updateRepairProject(updateReqVO);
|
||||
repairProjectService.saveRepairProject(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除维修项目
|
||||
*
|
||||
* @param id 维修项目id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.lang.Boolean>
|
||||
* @author PQZ
|
||||
* @date 14:59 2024/9/12
|
||||
**/
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除维修项目")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@ -60,6 +79,14 @@ public class RepairProjectController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据维修项目id获取维修项目
|
||||
*
|
||||
* @param id 维修项目id
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.project.vo.RepairProjectRespVO>
|
||||
* @author PQZ
|
||||
* @date 14:59 2024/9/12
|
||||
**/
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得维修项目")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@ -69,25 +96,25 @@ public class RepairProjectController {
|
||||
return success(BeanUtils.toBean(repairProject, RepairProjectRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页获取维修项目分页
|
||||
*
|
||||
* @param pageReqVO RepairProjectPageReqVO
|
||||
* @param pageNo 分页参数
|
||||
* @param pageSize 分页参数
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.framework.common.pojo.PageResult < cn.iocoder.yudao.module.project.vo.RepairProjectRespVO>>
|
||||
* @author PQZ
|
||||
* @date 15:04 2024/9/12
|
||||
**/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得维修项目分页")
|
||||
@PreAuthorize("@ss.hasPermission('repair:project:query')")
|
||||
public CommonResult<PageResult<RepairProjectRespVO>> getRepairProjectPage(@Valid RepairProjectPageReqVO pageReqVO) {
|
||||
PageResult<RepairProject> pageResult = repairProjectService.getRepairProjectPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, RepairProjectRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出维修项目 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('repair:project:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportRepairProjectExcel(@Valid RepairProjectPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<RepairProject> list = repairProjectService.getRepairProjectPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "维修项目.xls", "数据", RepairProjectRespVO.class,
|
||||
BeanUtils.toBean(list, RepairProjectRespVO.class));
|
||||
public CommonResult<IPage<?>> getRepairProjectPage(RepairProjectPageReqVO pageReqVO,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<RepairProjectRespVO> page = new Page<>(pageNo, pageSize);
|
||||
return success(repairProjectService.queryListPage(pageReqVO,page));
|
||||
}
|
||||
|
||||
}
|
@ -58,6 +58,8 @@ public class RepairProject extends TenantBaseDO {
|
||||
* 工时
|
||||
*/
|
||||
private String manHour;
|
||||
/**供应商*/
|
||||
private String corpId;
|
||||
/**
|
||||
* 是否自助(0否1是)
|
||||
*/
|
||||
|
@ -1,8 +1,13 @@
|
||||
package cn.iocoder.yudao.module.project.mapper;
|
||||
|
||||
import cn.iocoder.yudao.module.project.entity.RepairProject;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectPageReqVO;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectRespVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 维修项目 Mapper
|
||||
@ -12,4 +17,15 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface RepairProjectMapper extends BaseMapper<RepairProject> {
|
||||
|
||||
/**
|
||||
* 分页查询维修项目信息
|
||||
*
|
||||
* @param pageReqVO RepairProjectPageReqVO实体
|
||||
* @param page 分页参数故
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.project.vo.RepairProjectRespVO>
|
||||
* @author PQZ
|
||||
* @date 15:13 2024/9/12
|
||||
**/
|
||||
IPage<RepairProjectRespVO> selectListPage(@Param("entity") RepairProjectPageReqVO pageReqVO, Page<RepairProjectRespVO> page);
|
||||
|
||||
}
|
@ -1,14 +1,14 @@
|
||||
package cn.iocoder.yudao.module.project.service;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.project.entity.RepairProject;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectPageReqVO;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectRespVO;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 维修项目 Service 接口
|
||||
*
|
||||
@ -17,41 +17,43 @@ import javax.validation.Valid;
|
||||
public interface RepairProjectService extends IService<RepairProject> {
|
||||
|
||||
/**
|
||||
* 创建维修项目
|
||||
* 保存维修项目
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createRepairProject(@Valid RepairProjectSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新维修项目
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateRepairProject(@Valid RepairProjectSaveReqVO updateReqVO);
|
||||
* @param saveReqVO RepairProjectSaveReqVO实体
|
||||
* @author PQZ
|
||||
* @date 14:51 2024/9/12
|
||||
**/
|
||||
void saveRepairProject(RepairProjectSaveReqVO saveReqVO);
|
||||
|
||||
/**
|
||||
* 删除维修项目
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
* @param id 维修项目id
|
||||
* @author PQZ
|
||||
* @date 15:08 2024/9/12
|
||||
**/
|
||||
void deleteRepairProject(String id);
|
||||
|
||||
/**
|
||||
* 获得维修项目
|
||||
* 根据id获取维修项目
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 维修项目
|
||||
*/
|
||||
* @param id 维修项目id
|
||||
* @return cn.iocoder.yudao.module.project.entity.RepairProject
|
||||
* @author PQZ
|
||||
* @date 15:08 2024/9/12
|
||||
**/
|
||||
RepairProject getRepairProject(String id);
|
||||
|
||||
/**
|
||||
* 获得维修项目分页
|
||||
* 分页查询维修项目
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 维修项目分页
|
||||
*/
|
||||
PageResult<RepairProject> getRepairProjectPage(RepairProjectPageReqVO pageReqVO);
|
||||
* @param pageReqVO RepairProjectPageReqVO实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.project.vo.RepairProjectRespVO>
|
||||
* @author PQZ
|
||||
* @date 15:08 2024/9/12
|
||||
**/
|
||||
IPage<RepairProjectRespVO> queryListPage(RepairProjectPageReqVO pageReqVO, Page<RepairProjectRespVO> page);
|
||||
|
||||
|
||||
}
|
@ -1,12 +1,14 @@
|
||||
package cn.iocoder.yudao.module.project.service.impl;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.project.entity.RepairProject;
|
||||
import cn.iocoder.yudao.module.project.mapper.RepairProjectMapper;
|
||||
import cn.iocoder.yudao.module.project.service.RepairProjectService;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectPageReqVO;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectRespVO;
|
||||
import cn.iocoder.yudao.module.project.vo.RepairProjectSaveReqVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -25,46 +27,59 @@ public class RepairProjectServiceImpl extends ServiceImpl<RepairProjectMapper, R
|
||||
@Resource
|
||||
private RepairProjectMapper repairProjectMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 保存维修项目
|
||||
*
|
||||
* @param saveReqVO RepairProjectSaveReqVO实体
|
||||
* @author PQZ
|
||||
* @date 14:51 2024/9/12
|
||||
**/
|
||||
@Override
|
||||
public String createRepairProject(RepairProjectSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
RepairProject repairProject = BeanUtils.toBean(createReqVO, RepairProject.class);
|
||||
repairProjectMapper.insert(repairProject);
|
||||
// 返回
|
||||
return repairProject.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateRepairProject(RepairProjectSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateRepairProjectExists(updateReqVO.getId());
|
||||
// 更新
|
||||
RepairProject updateObj = BeanUtils.toBean(updateReqVO, RepairProject.class);
|
||||
repairProjectMapper.updateById(updateObj);
|
||||
public void saveRepairProject(RepairProjectSaveReqVO saveReqVO) {
|
||||
RepairProject repairProject = BeanUtils.toBean(saveReqVO, RepairProject.class);
|
||||
saveOrUpdate(repairProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除维修项目
|
||||
*
|
||||
* @param id 维修项目id
|
||||
* @author PQZ
|
||||
* @date 15:08 2024/9/12
|
||||
**/
|
||||
@Override
|
||||
public void deleteRepairProject(String id) {
|
||||
// 校验存在
|
||||
validateRepairProjectExists(id);
|
||||
// 删除
|
||||
repairProjectMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateRepairProjectExists(String id) {
|
||||
if (repairProjectMapper.selectById(id) == null) {
|
||||
// throw exception();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id获取维修项目
|
||||
*
|
||||
* @param id 维修项目id
|
||||
* @return cn.iocoder.yudao.module.project.entity.RepairProject
|
||||
* @author PQZ
|
||||
* @date 15:08 2024/9/12
|
||||
**/
|
||||
@Override
|
||||
public RepairProject getRepairProject(String id) {
|
||||
return repairProjectMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询维修项目
|
||||
*
|
||||
* @param pageReqVO RepairProjectPageReqVO实体
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.project.vo.RepairProjectRespVO>
|
||||
* @author PQZ
|
||||
* @date 15:08 2024/9/12
|
||||
**/
|
||||
@Override
|
||||
public PageResult<RepairProject> getRepairProjectPage(RepairProjectPageReqVO pageReqVO) {
|
||||
return null;
|
||||
public IPage<RepairProjectRespVO> queryListPage(RepairProjectPageReqVO pageReqVO, Page<RepairProjectRespVO> page) {
|
||||
return repairProjectMapper.selectListPage(pageReqVO,page);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.project.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.project.entity.RepairProject;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@ -14,43 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class RepairProjectPageReqVO extends PageParam {
|
||||
public class RepairProjectPageReqVO extends RepairProject {
|
||||
|
||||
@Schema(description = "名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "成本")
|
||||
private Long cost;
|
||||
|
||||
@Schema(description = "规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "售价", example = "16985")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "分类", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "工时")
|
||||
private String manHour;
|
||||
|
||||
@Schema(description = "是否自助(0否1是)")
|
||||
private String isSelf;
|
||||
|
||||
@Schema(description = "是否允许分店公用此产品(0否1是)")
|
||||
private String isPublic;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -1,68 +1,23 @@
|
||||
package cn.iocoder.yudao.module.project.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.project.entity.RepairProject;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 维修项目 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class RepairProjectRespVO {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "2050")
|
||||
@ExcelProperty("主键标识")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "名称", example = "王五")
|
||||
@ExcelProperty("名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "成本")
|
||||
@ExcelProperty("成本")
|
||||
private Long cost;
|
||||
|
||||
@Schema(description = "规格")
|
||||
@ExcelProperty("规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "售价", example = "16985")
|
||||
@ExcelProperty("售价")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "编码")
|
||||
@ExcelProperty("编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "单位")
|
||||
@ExcelProperty("单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "分类", example = "1")
|
||||
@ExcelProperty("分类")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "工时")
|
||||
@ExcelProperty("工时")
|
||||
private String manHour;
|
||||
|
||||
@Schema(description = "是否自助(0否1是)")
|
||||
@ExcelProperty("是否自助(0否1是)")
|
||||
private String isSelf;
|
||||
|
||||
@Schema(description = "是否允许分店公用此产品(0否1是)")
|
||||
@ExcelProperty("是否允许分店公用此产品(0否1是)")
|
||||
private String isPublic;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
public class RepairProjectRespVO extends RepairProject {
|
||||
|
||||
/**所属分类*/
|
||||
private String typeName;
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.project.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.project.entity.RepairProject;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -8,42 +9,8 @@ import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 维修项目新增/修改 Request VO")
|
||||
@Data
|
||||
public class RepairProjectSaveReqVO {
|
||||
public class RepairProjectSaveReqVO extends RepairProject {
|
||||
|
||||
@Schema(description = "主键标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "2050")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "成本")
|
||||
private Long cost;
|
||||
|
||||
@Schema(description = "规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "售价", example = "16985")
|
||||
private BigDecimal price;
|
||||
|
||||
@Schema(description = "编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "分类", example = "1")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "工时")
|
||||
private String manHour;
|
||||
|
||||
@Schema(description = "是否自助(0否1是)")
|
||||
private String isSelf;
|
||||
|
||||
@Schema(description = "是否允许分店公用此产品(0否1是)")
|
||||
private String isPublic;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
}
|
@ -9,4 +9,28 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectListPage" resultType="cn.iocoder.yudao.module.project.vo.RepairProjectRespVO">
|
||||
SELECT
|
||||
drp.*,
|
||||
dbt.NAME AS typeName
|
||||
FROM
|
||||
dl_repair_project drp
|
||||
LEFT JOIN dl_base_type dbt ON drp.type = dbt.id
|
||||
AND dbt.deleted = 0
|
||||
<where>
|
||||
drp.deleted = 0
|
||||
<if test="entity.name != null and entity.name != ''">
|
||||
and drp.name like concat('%', #{entity.name}, '%')
|
||||
</if>
|
||||
<if test="entity.type != null and entity.type != ''">
|
||||
and drp.type = #{entity.type}
|
||||
</if>
|
||||
<if test="entity.corpId != null and entity.corpId != ''">
|
||||
and drp.corp_id like concat('%', #{entity.corpId}, '%')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
ORDER BY
|
||||
drp.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user