接收关系表
Showing
13 changed files
with
524 additions
and
1 deletions
| ... | @@ -71,7 +71,7 @@ public class CodeGenerator { | ... | @@ -71,7 +71,7 @@ public class CodeGenerator { |
| 71 | //4、策略配置 | 71 | //4、策略配置 |
| 72 | StrategyConfig strategy = new StrategyConfig(); | 72 | StrategyConfig strategy = new StrategyConfig(); |
| 73 | // 设置要映射的表名 | 73 | // 设置要映射的表名 |
| 74 | strategy.setInclude("DG_LEND_FILE"); | 74 | strategy.setInclude("DG_RECEIVE_RELATION"); |
| 75 | strategy.setNaming(NamingStrategy.underline_to_camel); | 75 | strategy.setNaming(NamingStrategy.underline_to_camel); |
| 76 | strategy.setColumnNaming(NamingStrategy.underline_to_camel); | 76 | strategy.setColumnNaming(NamingStrategy.underline_to_camel); |
| 77 | // 自动lombok; | 77 | // 自动lombok; | ... | ... |
| 1 | package com.pashanhoo.receiverelation.controller; | ||
| 2 | |||
| 3 | import com.pashanhoo.common.Result; | ||
| 4 | import com.pashanhoo.receiverelation.entity.vo.AddDgReceiveRelationRequest; | ||
| 5 | import com.pashanhoo.receiverelation.entity.vo.UpdateDgReceiveRelationRequest; | ||
| 6 | import com.pashanhoo.receiverelation.entity.vo.DgReceiveRelationSearchRequest; | ||
| 7 | import com.pashanhoo.receiverelation.service.DgReceiveRelationService; | ||
| 8 | import org.springframework.web.bind.annotation.RestController; | ||
| 9 | import org.springframework.web.bind.annotation.*; | ||
| 10 | import io.swagger.annotations.Api; | ||
| 11 | import io.swagger.annotations.ApiOperation; | ||
| 12 | import io.swagger.annotations.ApiParam; | ||
| 13 | import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | import java.util.List; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * <p> | ||
| 18 | * 档案接收关联表 前端控制器 | ||
| 19 | * </p> | ||
| 20 | * | ||
| 21 | * @author | ||
| 22 | * @since 2021-11-10 | ||
| 23 | */ | ||
| 24 | @RestController | ||
| 25 | @RequestMapping("/system/dgReceiveRelation/") | ||
| 26 | @Api(tags = "档案接收关联表接口") | ||
| 27 | public class DgReceiveRelationController { | ||
| 28 | @Autowired | ||
| 29 | private DgReceiveRelationService dgreceiverelationService; | ||
| 30 | |||
| 31 | @PostMapping("insertDgReceiveRelation") | ||
| 32 | @ApiOperation("新增档案接收关联表") | ||
| 33 | public Result insertDgReceiveRelation(@RequestBody AddDgReceiveRelationRequest request){ | ||
| 34 | if(dgreceiverelationService.insertDgReceiveRelation(request)){ | ||
| 35 | return Result.ok(); | ||
| 36 | } | ||
| 37 | return Result.error("新增失败"); | ||
| 38 | } | ||
| 39 | |||
| 40 | @DeleteMapping("deleteDgReceiveRelationByIds") | ||
| 41 | @ApiOperation(value = "批量删除档案接收关联表") | ||
| 42 | public Result deleteDgReceiveRelationByIds(@ApiParam("档案接收关联表ID列表") @RequestParam(value = "idList") List<String> idList) { | ||
| 43 | if(dgreceiverelationService.removeByIds(idList)) { | ||
| 44 | return Result.ok("删除成功"); | ||
| 45 | } | ||
| 46 | return Result.error("删除失败"); | ||
| 47 | } | ||
| 48 | |||
| 49 | @PutMapping("updateDgReceiveRelation") | ||
| 50 | @ApiOperation("修改档案接收关联表") | ||
| 51 | public Result updateDgReceiveRelation(@RequestBody UpdateDgReceiveRelationRequest request){ | ||
| 52 | if(dgreceiverelationService.updateDgReceiveRelation(request)) { | ||
| 53 | return Result.ok("修改成功"); | ||
| 54 | } | ||
| 55 | return Result.error("修改失败"); | ||
| 56 | } | ||
| 57 | |||
| 58 | @GetMapping("getDgReceiveRelationDetailById") | ||
| 59 | @ApiOperation(value = "读取明细") | ||
| 60 | public Result getDgReceiveRelationDetailById(@ApiParam("档案接收关联表ID") @RequestParam String id){ | ||
| 61 | return Result.ok(dgreceiverelationService.getDgReceiveRelationDetailById(id)); | ||
| 62 | } | ||
| 63 | |||
| 64 | @PostMapping("search") | ||
| 65 | @ApiOperation(value = "根据条件进行列表查询") | ||
| 66 | public Result searchDgReceiveRelationList(@RequestBody DgReceiveRelationSearchRequest request) { | ||
| 67 | //TODO 默认排序条件设置 | ||
| 68 | request.defaultFillPageProp("",""); | ||
| 69 | return Result.ok(dgreceiverelationService.searchDgReceiveRelationList(request)); | ||
| 70 | } | ||
| 71 | } |
| 1 | package com.pashanhoo.receiverelation.entity; | ||
| 2 | |||
| 3 | import java.util.List; | ||
| 4 | import com.pashanhoo.receiverelation.entity.vo.AddDgReceiveRelationRequest; | ||
| 5 | import com.pashanhoo.receiverelation.entity.vo.DgReceiveRelationDetailVO; | ||
| 6 | import com.pashanhoo.receiverelation.entity.vo.DgReceiveRelationListVO; | ||
| 7 | import com.pashanhoo.receiverelation.entity.vo.UpdateDgReceiveRelationRequest; | ||
| 8 | import org.mapstruct.Mapper; | ||
| 9 | |||
| 10 | /** | ||
| 11 | * @author | ||
| 12 | * @since 2021-11-10 | ||
| 13 | */ | ||
| 14 | @Mapper(componentModel = "spring") | ||
| 15 | public interface DgReceiveRelationConverter{ | ||
| 16 | DgReceiveRelationDO addRequest2DO(AddDgReceiveRelationRequest request); | ||
| 17 | |||
| 18 | DgReceiveRelationDetailVO do2DetailVO(DgReceiveRelationDO dgreceiverelationDO); | ||
| 19 | |||
| 20 | DgReceiveRelationDO updateRequest2DO(UpdateDgReceiveRelationRequest request); | ||
| 21 | |||
| 22 | DgReceiveRelationListVO do2ListVO(DgReceiveRelationDO dgreceiverelationDO); | ||
| 23 | |||
| 24 | List<DgReceiveRelationListVO> doList2ListVOList(List<DgReceiveRelationDO> dgreceiverelationDOList); | ||
| 25 | } |
| 1 | package com.pashanhoo.receiverelation.entity; | ||
| 2 | |||
| 3 | import com.baomidou.mybatisplus.annotation.TableName; | ||
| 4 | import com.baomidou.mybatisplus.annotation.TableField; | ||
| 5 | import java.io.Serializable; | ||
| 6 | import lombok.Data; | ||
| 7 | import lombok.EqualsAndHashCode; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * <p> | ||
| 11 | * 档案接收关联表 | ||
| 12 | * </p> | ||
| 13 | * | ||
| 14 | * @author | ||
| 15 | * @since 2021-11-10 | ||
| 16 | */ | ||
| 17 | @Data | ||
| 18 | @EqualsAndHashCode(callSuper = false) | ||
| 19 | @TableName("DG_RECEIVE_RELATION") | ||
| 20 | public class DgReceiveRelationDO implements Serializable { | ||
| 21 | |||
| 22 | private static final long serialVersionUID = 1L; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * 关联标识码 | ||
| 26 | */ | ||
| 27 | @TableField("BSM_RELATION") | ||
| 28 | private String bsmRelation; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * 档案标识码 | ||
| 32 | */ | ||
| 33 | @TableField("BSM_ARCHIVES") | ||
| 34 | private String bsmArchives; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * 接收标识码 | ||
| 38 | */ | ||
| 39 | @TableField("BMS_RECEIVE") | ||
| 40 | private String bmsReceive; | ||
| 41 | |||
| 42 | |||
| 43 | } |
| 1 | package com.pashanhoo.receiverelation.entity.vo; | ||
| 2 | |||
| 3 | import java.io.Serializable; | ||
| 4 | import io.swagger.annotations.ApiModel; | ||
| 5 | import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Data; | ||
| 7 | import lombok.EqualsAndHashCode; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * <p> | ||
| 11 | * 档案接收关联表新增请求实体 | ||
| 12 | * </p> | ||
| 13 | * | ||
| 14 | * @author | ||
| 15 | * @since 2021-11-10 | ||
| 16 | */ | ||
| 17 | @Data | ||
| 18 | @EqualsAndHashCode(callSuper = false) | ||
| 19 | @ApiModel(value="档案接收关联表新增请求实体") | ||
| 20 | public class AddDgReceiveRelationRequest implements Serializable { | ||
| 21 | |||
| 22 | private static final long serialVersionUID = 1L; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * 关联标识码 | ||
| 26 | */ | ||
| 27 | @ApiModelProperty(name = "bsmRelation", value = "关联标识码") | ||
| 28 | private String bsmRelation; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * 档案标识码 | ||
| 32 | */ | ||
| 33 | @ApiModelProperty(name = "bsmArchives", value = "档案标识码") | ||
| 34 | private String bsmArchives; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * 接收标识码 | ||
| 38 | */ | ||
| 39 | @ApiModelProperty(name = "bmsReceive", value = "接收标识码") | ||
| 40 | private String bmsReceive; | ||
| 41 | |||
| 42 | |||
| 43 | } |
| 1 | package com.pashanhoo.receiverelation.entity.vo; | ||
| 2 | |||
| 3 | import java.io.Serializable; | ||
| 4 | import io.swagger.annotations.ApiModel; | ||
| 5 | import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Data; | ||
| 7 | import lombok.EqualsAndHashCode; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * <p> | ||
| 11 | * 档案接收关联表明细实体 | ||
| 12 | * </p> | ||
| 13 | * | ||
| 14 | * @author | ||
| 15 | * @since 2021-11-10 | ||
| 16 | */ | ||
| 17 | @Data | ||
| 18 | @EqualsAndHashCode(callSuper = false) | ||
| 19 | @ApiModel(value="档案接收关联表明细实体") | ||
| 20 | public class DgReceiveRelationDetailVO implements Serializable { | ||
| 21 | |||
| 22 | private static final long serialVersionUID = 1L; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * 关联标识码 | ||
| 26 | */ | ||
| 27 | @ApiModelProperty(name = "bsmRelation", value = "关联标识码") | ||
| 28 | private String bsmRelation; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * 档案标识码 | ||
| 32 | */ | ||
| 33 | @ApiModelProperty(name = "bsmArchives", value = "档案标识码") | ||
| 34 | private String bsmArchives; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * 接收标识码 | ||
| 38 | */ | ||
| 39 | @ApiModelProperty(name = "bmsReceive", value = "接收标识码") | ||
| 40 | private String bmsReceive; | ||
| 41 | |||
| 42 | |||
| 43 | } |
| 1 | package com.pashanhoo.receiverelation.entity.vo; | ||
| 2 | |||
| 3 | import java.io.Serializable; | ||
| 4 | import io.swagger.annotations.ApiModel; | ||
| 5 | import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Data; | ||
| 7 | import lombok.EqualsAndHashCode; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * <p> | ||
| 11 | * 档案接收关联表列表VO | ||
| 12 | * </p> | ||
| 13 | * | ||
| 14 | * @author | ||
| 15 | * @since 2021-11-10 | ||
| 16 | */ | ||
| 17 | @Data | ||
| 18 | @EqualsAndHashCode(callSuper = false) | ||
| 19 | @ApiModel(value="档案接收关联表列表VO") | ||
| 20 | //TODO 该类属性暂时是完整的全部属性,需进行个性化的增删 | ||
| 21 | public class DgReceiveRelationListVO implements Serializable { | ||
| 22 | |||
| 23 | private static final long serialVersionUID = 1L; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * 关联标识码 | ||
| 27 | */ | ||
| 28 | @ApiModelProperty(name = "bsmRelation", value = "关联标识码") | ||
| 29 | private String bsmRelation; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * 档案标识码 | ||
| 33 | */ | ||
| 34 | @ApiModelProperty(name = "bsmArchives", value = "档案标识码") | ||
| 35 | private String bsmArchives; | ||
| 36 | |||
| 37 | /** | ||
| 38 | * 接收标识码 | ||
| 39 | */ | ||
| 40 | @ApiModelProperty(name = "bmsReceive", value = "接收标识码") | ||
| 41 | private String bmsReceive; | ||
| 42 | |||
| 43 | |||
| 44 | } |
src/main/java/com/pashanhoo/receiverelation/entity/vo/DgReceiveRelationSearchRequest.java
0 → 100644
| 1 | package com.pashanhoo.receiverelation.entity.vo; | ||
| 2 | |||
| 3 | import java.io.Serializable; | ||
| 4 | import io.swagger.annotations.ApiModel; | ||
| 5 | import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Data; | ||
| 7 | import lombok.EqualsAndHashCode; | ||
| 8 | import com.pashanhoo.common.PageInfo; | ||
| 9 | |||
| 10 | /** | ||
| 11 | * <p> | ||
| 12 | * 档案接收关联表列表查询请求实体 | ||
| 13 | * </p> | ||
| 14 | * | ||
| 15 | * @author | ||
| 16 | * @since 2021-11-10 | ||
| 17 | */ | ||
| 18 | @Data | ||
| 19 | @EqualsAndHashCode(callSuper = false) | ||
| 20 | @ApiModel(value="档案接收关联表列表查询请求实体") | ||
| 21 | //TODO 初始查询条件是全部,需要根据情况自行删减 | ||
| 22 | public class DgReceiveRelationSearchRequest extends PageInfo implements Serializable { | ||
| 23 | |||
| 24 | private static final long serialVersionUID = 1L; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * 关联标识码 | ||
| 28 | */ | ||
| 29 | @ApiModelProperty(name = "bsmRelation", value = "关联标识码") | ||
| 30 | private String bsmRelation; | ||
| 31 | |||
| 32 | /** | ||
| 33 | * 档案标识码 | ||
| 34 | */ | ||
| 35 | @ApiModelProperty(name = "bsmArchives", value = "档案标识码") | ||
| 36 | private String bsmArchives; | ||
| 37 | |||
| 38 | /** | ||
| 39 | * 接收标识码 | ||
| 40 | */ | ||
| 41 | @ApiModelProperty(name = "bmsReceive", value = "接收标识码") | ||
| 42 | private String bmsReceive; | ||
| 43 | |||
| 44 | |||
| 45 | } |
src/main/java/com/pashanhoo/receiverelation/entity/vo/UpdateDgReceiveRelationRequest.java
0 → 100644
| 1 | package com.pashanhoo.receiverelation.entity.vo; | ||
| 2 | |||
| 3 | import java.io.Serializable; | ||
| 4 | import io.swagger.annotations.ApiModel; | ||
| 5 | import io.swagger.annotations.ApiModelProperty; | ||
| 6 | import lombok.Data; | ||
| 7 | import lombok.EqualsAndHashCode; | ||
| 8 | |||
| 9 | /** | ||
| 10 | * <p> | ||
| 11 | * 档案接收关联表修改请求实体 | ||
| 12 | * </p> | ||
| 13 | * | ||
| 14 | * @author | ||
| 15 | * @since 2021-11-10 | ||
| 16 | */ | ||
| 17 | @Data | ||
| 18 | @EqualsAndHashCode(callSuper = false) | ||
| 19 | @ApiModel(value="档案接收关联表修改请求实体") | ||
| 20 | public class UpdateDgReceiveRelationRequest implements Serializable { | ||
| 21 | |||
| 22 | private static final long serialVersionUID = 1L; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * 关联标识码 | ||
| 26 | */ | ||
| 27 | @ApiModelProperty(name = "bsmRelation", value = "关联标识码") | ||
| 28 | private String bsmRelation; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * 档案标识码 | ||
| 32 | */ | ||
| 33 | @ApiModelProperty(name = "bsmArchives", value = "档案标识码") | ||
| 34 | private String bsmArchives; | ||
| 35 | |||
| 36 | /** | ||
| 37 | * 接收标识码 | ||
| 38 | */ | ||
| 39 | @ApiModelProperty(name = "bmsReceive", value = "接收标识码") | ||
| 40 | private String bmsReceive; | ||
| 41 | |||
| 42 | |||
| 43 | } |
| 1 | package com.pashanhoo.receiverelation.mapper; | ||
| 2 | |||
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 4 | import com.pashanhoo.receiverelation.entity.DgReceiveRelationDO; | ||
| 5 | |||
| 6 | /** | ||
| 7 | * <p> | ||
| 8 | * 档案接收关联表 Mapper 接口 | ||
| 9 | * </p> | ||
| 10 | * | ||
| 11 | * @author | ||
| 12 | * @since 2021-11-10 | ||
| 13 | */ | ||
| 14 | public interface DgReceiveRelationMapper extends BaseMapper<DgReceiveRelationDO> { | ||
| 15 | |||
| 16 | } |
| 1 | package com.pashanhoo.receiverelation.service; | ||
| 2 | |||
| 3 | import com.pashanhoo.receiverelation.entity.DgReceiveRelationDO; | ||
| 4 | import com.pashanhoo.receiverelation.entity.vo.AddDgReceiveRelationRequest; | ||
| 5 | import com.pashanhoo.receiverelation.entity.vo.DgReceiveRelationDetailVO; | ||
| 6 | import com.pashanhoo.receiverelation.entity.vo.UpdateDgReceiveRelationRequest; | ||
| 7 | import com.pashanhoo.receiverelation.entity.vo.DgReceiveRelationSearchRequest; | ||
| 8 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 9 | import com.baomidou.mybatisplus.extension.service.IService; | ||
| 10 | |||
| 11 | /** | ||
| 12 | * <p> | ||
| 13 | * 档案接收关联表 服务类 | ||
| 14 | * </p> | ||
| 15 | * | ||
| 16 | * @author | ||
| 17 | * @since 2021-11-10 | ||
| 18 | */ | ||
| 19 | public interface DgReceiveRelationService extends IService<DgReceiveRelationDO> { | ||
| 20 | /** | ||
| 21 | * 新增记录 | ||
| 22 | * @param request | ||
| 23 | * @return | ||
| 24 | */ | ||
| 25 | boolean insertDgReceiveRelation(AddDgReceiveRelationRequest request); | ||
| 26 | |||
| 27 | /** | ||
| 28 | * 根据主键查询记录详情 | ||
| 29 | * @param id | ||
| 30 | * @return | ||
| 31 | */ | ||
| 32 | DgReceiveRelationDetailVO getDgReceiveRelationDetailById(String id); | ||
| 33 | |||
| 34 | /** | ||
| 35 | * 修改单条记录 | ||
| 36 | * @param request | ||
| 37 | * @return | ||
| 38 | */ | ||
| 39 | boolean updateDgReceiveRelation(UpdateDgReceiveRelationRequest request); | ||
| 40 | |||
| 41 | /** | ||
| 42 | * 根据条件进行列表查询 | ||
| 43 | * @param request | ||
| 44 | * @return | ||
| 45 | */ | ||
| 46 | Page searchDgReceiveRelationList(DgReceiveRelationSearchRequest request); | ||
| 47 | } |
src/main/java/com/pashanhoo/receiverelation/service/impl/DgReceiveRelationServiceImpl.java
0 → 100644
| 1 | package com.pashanhoo.receiverelation.service.impl; | ||
| 2 | |||
| 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
| 4 | import com.pashanhoo.receiverelation.entity.DgReceiveRelationConverter; | ||
| 5 | import com.pashanhoo.receiverelation.entity.DgReceiveRelationDO; | ||
| 6 | import com.pashanhoo.receiverelation.entity.vo.AddDgReceiveRelationRequest; | ||
| 7 | import com.pashanhoo.receiverelation.entity.vo.DgReceiveRelationDetailVO; | ||
| 8 | import com.pashanhoo.receiverelation.entity.vo.UpdateDgReceiveRelationRequest; | ||
| 9 | import com.pashanhoo.receiverelation.entity.vo.DgReceiveRelationSearchRequest; | ||
| 10 | import com.pashanhoo.receiverelation.mapper.DgReceiveRelationMapper; | ||
| 11 | import com.pashanhoo.receiverelation.service.DgReceiveRelationService; | ||
| 12 | import org.springframework.beans.factory.annotation.Autowired; | ||
| 13 | import org.springframework.stereotype.Service; | ||
| 14 | |||
| 15 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 16 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
| 17 | |||
| 18 | /** | ||
| 19 | * <p> | ||
| 20 | * 档案接收关联表 服务实现类 | ||
| 21 | * </p> | ||
| 22 | * | ||
| 23 | * @author | ||
| 24 | * @since 2021-11-10 | ||
| 25 | */ | ||
| 26 | @Service | ||
| 27 | public class DgReceiveRelationServiceImpl extends ServiceImpl<DgReceiveRelationMapper, DgReceiveRelationDO> implements DgReceiveRelationService { | ||
| 28 | |||
| 29 | @Autowired | ||
| 30 | private DgReceiveRelationConverter dgreceiverelationConverter; | ||
| 31 | |||
| 32 | @Autowired | ||
| 33 | private DgReceiveRelationMapper dgreceiverelationMapper; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * 新增记录 | ||
| 37 | * @param request | ||
| 38 | * @return | ||
| 39 | */ | ||
| 40 | @Override | ||
| 41 | public boolean insertDgReceiveRelation(AddDgReceiveRelationRequest request) { | ||
| 42 | DgReceiveRelationDO dgreceiverelationDO = dgreceiverelationConverter.addRequest2DO(request); | ||
| 43 | return this.save(dgreceiverelationDO); | ||
| 44 | } | ||
| 45 | |||
| 46 | /** | ||
| 47 | * 根据主键查询记录详情 | ||
| 48 | * @param id | ||
| 49 | * @return | ||
| 50 | */ | ||
| 51 | @Override | ||
| 52 | public DgReceiveRelationDetailVO getDgReceiveRelationDetailById(String id) { | ||
| 53 | DgReceiveRelationDO dgreceiverelationDO = this.getById(id); | ||
| 54 | return dgreceiverelationConverter.do2DetailVO(dgreceiverelationDO); | ||
| 55 | } | ||
| 56 | |||
| 57 | /** | ||
| 58 | * 修改单条记录 | ||
| 59 | * @param request | ||
| 60 | * @return | ||
| 61 | */ | ||
| 62 | @Override | ||
| 63 | public boolean updateDgReceiveRelation(UpdateDgReceiveRelationRequest request) { | ||
| 64 | DgReceiveRelationDO dgreceiverelationDO = dgreceiverelationConverter.updateRequest2DO(request); | ||
| 65 | return this.updateById(dgreceiverelationDO); | ||
| 66 | } | ||
| 67 | |||
| 68 | /** | ||
| 69 | * 根据条件进行列表查询 | ||
| 70 | * @param request | ||
| 71 | * @return | ||
| 72 | */ | ||
| 73 | @Override | ||
| 74 | public Page searchDgReceiveRelationList(DgReceiveRelationSearchRequest request) { | ||
| 75 | Page<DgReceiveRelationDO> pageParam = new Page<DgReceiveRelationDO>(request.getCurrentPage(), request.getPageSize()); | ||
| 76 | QueryWrapper<DgReceiveRelationDO> wrapper = new QueryWrapper<>(); | ||
| 77 | //设置默认排序 | ||
| 78 | wrapper = "desc".equals(request.getSortOrder()) ? wrapper.orderByDesc(request.getSortField()) : wrapper.orderByAsc(request.getSortField()); | ||
| 79 | |||
| 80 | //TODO 根据当前情况设置wrapper条件 | ||
| 81 | |||
| 82 | Page page = this.page(pageParam, wrapper); | ||
| 83 | //将查询出来的DO List转为 ListVO List并重新设置到page对象中,并返回page对象 | ||
| 84 | return page.setRecords(dgreceiverelationConverter.doList2ListVOList(page.getRecords())); | ||
| 85 | } | ||
| 86 | |||
| 87 | } |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | <mapper namespace="com.pashanhoo.receiverelation.mapper.DgReceiveRelationMapper"> | ||
| 4 | |||
| 5 | <!-- 通用查询映射结果 --> | ||
| 6 | <resultMap id="BaseResultMap" type="com.pashanhoo.receiverelation.entity.DgReceiveRelationDO"> | ||
| 7 | <result column="BSM_RELATION" property="bsmRelation" /> | ||
| 8 | <result column="BSM_ARCHIVES" property="bsmArchives" /> | ||
| 9 | <result column="BMS_RECEIVE" property="bmsReceive" /> | ||
| 10 | </resultMap> | ||
| 11 | |||
| 12 | <!-- 通用查询结果列 --> | ||
| 13 | <sql id="Base_Column_List"> | ||
| 14 | BSM_RELATION, BSM_ARCHIVES, BMS_RECEIVE | ||
| 15 | </sql> | ||
| 16 | </mapper> |
-
Please register or sign in to post a comment