Compare commits
2 Commits
088d8a5e90
...
e8d8233ba0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e8d8233ba0 | ||
![]() |
51cd27db40 |
@ -56,4 +56,6 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode NUMBERS_NOT_EXISTS = new ErrorCode(1_011_022_000, "收发文编号不存在");
|
||||
// ========== 发文管理 1_011_023_000==========
|
||||
ErrorCode FWGL_NOT_EXISTS = new ErrorCode(1_011_023_000, "发文管理不存在");
|
||||
// ========== 委托 1_011_024_000 ==========
|
||||
ErrorCode WTGL_NOT_EXISTS = new ErrorCode(1_011_024_000, "委托不存在");
|
||||
}
|
||||
|
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.home.controller.admin.wtgl;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.home.controller.admin.wtgl.vo.*;
|
||||
import cn.iocoder.yudao.module.home.dal.dataobject.wtgl.WtglDO;
|
||||
import cn.iocoder.yudao.module.home.service.wtgl.WtglService;
|
||||
|
||||
@Tag(name = "管理后台 - 委托")
|
||||
@RestController
|
||||
@RequestMapping("/home/wtgl")
|
||||
@Validated
|
||||
public class WtglController {
|
||||
|
||||
@Resource
|
||||
private WtglService wtglService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建委托")
|
||||
@PreAuthorize("@ss.hasPermission('home:wtgl:create')")
|
||||
public CommonResult<Long> createWtgl(@Valid @RequestBody WtglSaveReqVO createReqVO) {
|
||||
return success(wtglService.createWtgl(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新委托")
|
||||
@PreAuthorize("@ss.hasPermission('home:wtgl:update')")
|
||||
public CommonResult<Boolean> updateWtgl(@Valid @RequestBody WtglSaveReqVO updateReqVO) {
|
||||
wtglService.updateWtgl(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除委托")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('home:wtgl:delete')")
|
||||
public CommonResult<Boolean> deleteWtgl(@RequestParam("id") Long id) {
|
||||
wtglService.deleteWtgl(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得委托")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('home:wtgl:query')")
|
||||
public CommonResult<WtglRespVO> getWtgl(@RequestParam("id") Long id) {
|
||||
WtglDO wtgl = wtglService.getWtgl(id);
|
||||
return success(BeanUtils.toBean(wtgl, WtglRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得委托分页")
|
||||
@PreAuthorize("@ss.hasPermission('home:wtgl:query')")
|
||||
public CommonResult<PageResult<WtglRespVO>> getWtglPage(@Valid WtglPageReqVO pageReqVO) {
|
||||
PageResult<WtglDO> pageResult = wtglService.getWtglPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, WtglRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出委托 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('home:wtgl:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportWtglExcel(@Valid WtglPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<WtglDO> list = wtglService.getWtglPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "委托.xls", "数据", WtglRespVO.class,
|
||||
BeanUtils.toBean(list, WtglRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package cn.iocoder.yudao.module.home.controller.admin.wtgl.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 委托分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class WtglPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "id", example = "26152")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "委托人id", example = "14947")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "委托人姓名", example = "王五")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "被委托人id", example = "4045")
|
||||
private Long delegateId;
|
||||
|
||||
@Schema(description = "被委托人名字", example = "王五")
|
||||
private String delegateName;
|
||||
|
||||
@Schema(description = "委托开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] statTime;
|
||||
|
||||
@Schema(description = "委托结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "委托总时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Integer[] date;
|
||||
|
||||
@Schema(description = "创建表单")
|
||||
private String createPath;
|
||||
|
||||
@Schema(description = "详情表单")
|
||||
private String detailPath;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "test1")
|
||||
private String test1;
|
||||
|
||||
@Schema(description = "test2")
|
||||
private String test2;
|
||||
|
||||
@Schema(description = "test3")
|
||||
private String test3;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.home.controller.admin.wtgl.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 委托 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WtglRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26152")
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "委托人id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14947")
|
||||
@ExcelProperty("委托人id")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "委托人姓名", example = "王五")
|
||||
@ExcelProperty("委托人姓名")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "被委托人id", requiredMode = Schema.RequiredMode.REQUIRED, example = "4045")
|
||||
@ExcelProperty("被委托人id")
|
||||
private Long delegateId;
|
||||
|
||||
@Schema(description = "被委托人名字", example = "王五")
|
||||
@ExcelProperty("被委托人名字")
|
||||
private String delegateName;
|
||||
|
||||
@Schema(description = "委托开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("委托开始时间")
|
||||
private LocalDateTime statTime;
|
||||
|
||||
@Schema(description = "委托结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("委托结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "委托总时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("委托总时间")
|
||||
private Integer date;
|
||||
|
||||
@Schema(description = "创建表单")
|
||||
@ExcelProperty("委托表单")
|
||||
private String createPath;
|
||||
|
||||
@Schema(description = "详情表单")
|
||||
@ExcelProperty("委托流程")
|
||||
private String detailPath;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "test1")
|
||||
@ExcelProperty("test1")
|
||||
private String test1;
|
||||
|
||||
@Schema(description = "test2")
|
||||
@ExcelProperty("test2")
|
||||
private String test2;
|
||||
|
||||
@Schema(description = "test3")
|
||||
@ExcelProperty("test3")
|
||||
private String test3;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package cn.iocoder.yudao.module.home.controller.admin.wtgl.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 委托新增/修改 Request VO")
|
||||
@Data
|
||||
public class WtglSaveReqVO {
|
||||
|
||||
@AssertTrue(message = "开始时间,需要在结束时间之后")
|
||||
public boolean isEndTimeValid() {
|
||||
return !getEndTime().isBefore(getStatTime());
|
||||
}
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26152")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "委托人id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14947")
|
||||
@NotNull(message = "委托人id不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "委托人姓名", example = "王五")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "被委托人id", requiredMode = Schema.RequiredMode.REQUIRED, example = "4045")
|
||||
@NotNull(message = "被委托人id不能为空")
|
||||
private Long delegateId;
|
||||
|
||||
@Schema(description = "被委托人名字", example = "王五")
|
||||
private String delegateName;
|
||||
|
||||
@Schema(description = "委托开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "委托开始时间不能为空")
|
||||
private LocalDateTime statTime;
|
||||
|
||||
@Schema(description = "委托结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "委托结束时间不能为空")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "委托总时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "委托总时间不能为空")
|
||||
private Integer date;
|
||||
|
||||
@Schema(description = "创建表单")
|
||||
private String createPath;
|
||||
|
||||
@Schema(description = "详情表单")
|
||||
private String detailPath;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "test1")
|
||||
private String test1;
|
||||
|
||||
@Schema(description = "test2")
|
||||
private String test2;
|
||||
|
||||
@Schema(description = "test3")
|
||||
private String test3;
|
||||
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package cn.iocoder.yudao.module.home.dal.dataobject.wtgl;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 委托 DO
|
||||
*
|
||||
* @author 君风
|
||||
*/
|
||||
@TableName("oa_wtgl")
|
||||
@KeySequence("oa_wtgl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WtglDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 委托人id
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 委托人姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 被委托人id
|
||||
*/
|
||||
private Long delegateId;
|
||||
/**
|
||||
* 被委托人名字
|
||||
*/
|
||||
private String delegateName;
|
||||
/**
|
||||
* 委托开始时间
|
||||
*/
|
||||
private LocalDateTime statTime;
|
||||
/**
|
||||
* 委托结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
/**
|
||||
* 委托总时间
|
||||
*/
|
||||
private Integer date;
|
||||
/**
|
||||
* 创建表单
|
||||
*/
|
||||
private String createPath;
|
||||
/**
|
||||
* 详情表单
|
||||
*/
|
||||
private String detailPath;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* test1
|
||||
*/
|
||||
private String test1;
|
||||
/**
|
||||
* test2
|
||||
*/
|
||||
private String test2;
|
||||
/**
|
||||
* test3
|
||||
*/
|
||||
private String test3;
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.home.dal.mysql.wtgl;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.home.dal.dataobject.wtgl.WtglDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.home.controller.admin.wtgl.vo.*;
|
||||
|
||||
/**
|
||||
* 委托 Mapper
|
||||
*
|
||||
* @author 君风
|
||||
*/
|
||||
@Mapper
|
||||
public interface WtglMapper extends BaseMapperX<WtglDO> {
|
||||
|
||||
default PageResult<WtglDO> selectPage(WtglPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<WtglDO>()
|
||||
.eqIfPresent(WtglDO::getId, reqVO.getId())
|
||||
.eqIfPresent(WtglDO::getUserId, reqVO.getUserId())
|
||||
.likeIfPresent(WtglDO::getUserName, reqVO.getUserName())
|
||||
.eqIfPresent(WtglDO::getDelegateId, reqVO.getDelegateId())
|
||||
.likeIfPresent(WtglDO::getDelegateName, reqVO.getDelegateName())
|
||||
.betweenIfPresent(WtglDO::getStatTime, reqVO.getStatTime())
|
||||
.betweenIfPresent(WtglDO::getEndTime, reqVO.getEndTime())
|
||||
.betweenIfPresent(WtglDO::getDate, reqVO.getDate())
|
||||
.eqIfPresent(WtglDO::getCreatePath, reqVO.getCreatePath())
|
||||
.eqIfPresent(WtglDO::getDetailPath, reqVO.getDetailPath())
|
||||
.eqIfPresent(WtglDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(WtglDO::getTest1, reqVO.getTest1())
|
||||
.eqIfPresent(WtglDO::getTest2, reqVO.getTest2())
|
||||
.eqIfPresent(WtglDO::getTest3, reqVO.getTest3())
|
||||
.betweenIfPresent(WtglDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(WtglDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.home.service.wtgl;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.home.controller.admin.wtgl.vo.*;
|
||||
import cn.iocoder.yudao.module.home.dal.dataobject.wtgl.WtglDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 委托 Service 接口
|
||||
*
|
||||
* @author 君风
|
||||
*/
|
||||
public interface WtglService {
|
||||
|
||||
/**
|
||||
* 创建委托
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createWtgl(@Valid WtglSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新委托
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateWtgl(@Valid WtglSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除委托
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteWtgl(Long id);
|
||||
|
||||
/**
|
||||
* 获得委托
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 委托
|
||||
*/
|
||||
WtglDO getWtgl(Long id);
|
||||
|
||||
/**
|
||||
* 获得委托分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 委托分页
|
||||
*/
|
||||
PageResult<WtglDO> getWtglPage(WtglPageReqVO pageReqVO);
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.home.service.wtgl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.home.controller.admin.wtgl.vo.*;
|
||||
import cn.iocoder.yudao.module.home.dal.dataobject.wtgl.WtglDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.home.dal.mysql.wtgl.WtglMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.home.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 委托 Service 实现类
|
||||
*
|
||||
* @author 君风
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class WtglServiceImpl implements WtglService {
|
||||
|
||||
@Resource
|
||||
private WtglMapper wtglMapper;
|
||||
|
||||
@Override
|
||||
public Long createWtgl(WtglSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
WtglDO wtgl = BeanUtils.toBean(createReqVO, WtglDO.class);
|
||||
wtglMapper.insert(wtgl);
|
||||
// 返回
|
||||
return wtgl.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateWtgl(WtglSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateWtglExists(updateReqVO.getId());
|
||||
// 更新
|
||||
WtglDO updateObj = BeanUtils.toBean(updateReqVO, WtglDO.class);
|
||||
wtglMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteWtgl(Long id) {
|
||||
// 校验存在
|
||||
validateWtglExists(id);
|
||||
// 删除
|
||||
wtglMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateWtglExists(Long id) {
|
||||
if (wtglMapper.selectById(id) == null) {
|
||||
throw exception(WTGL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WtglDO getWtgl(Long id) {
|
||||
return wtglMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<WtglDO> getWtglPage(WtglPageReqVO pageReqVO) {
|
||||
return wtglMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?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="cn.iocoder.yudao.module.home.dal.mysql.wtgl.WtglMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -15,3 +15,4 @@ DELETE FROM "oa_items";
|
||||
DELETE FROM "oa_calendar";
|
||||
DELETE FROM "oa_njgl";
|
||||
DELETE FROM "oa_xjgl";
|
||||
DELETE FROM "oa_wtgl";
|
||||
|
@ -359,3 +359,26 @@ CREATE TABLE IF NOT EXISTS "oa_xjgl" (
|
||||
"test4" varchar,
|
||||
PRIMARY KEY ("id")
|
||||
) COMMENT '销假管理表';
|
||||
CREATE TABLE IF NOT EXISTS "oa_wtgl" (
|
||||
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||
"user_id" bigint NOT NULL,
|
||||
"user_name" varchar,
|
||||
"delegate_id" bigint NOT NULL,
|
||||
"delegate_name" varchar,
|
||||
"stat_time" varchar NOT NULL,
|
||||
"end_time" varchar NOT NULL,
|
||||
"date" int NOT NULL,
|
||||
"form" varchar,
|
||||
"model" varchar,
|
||||
"remark" varchar,
|
||||
"test1" varchar,
|
||||
"test2" varchar,
|
||||
"test3" varchar,
|
||||
"creator" varchar DEFAULT '',
|
||||
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updater" varchar DEFAULT '',
|
||||
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||
"tenant_id" bigint NOT NULL,
|
||||
PRIMARY KEY ("id")
|
||||
) COMMENT '委托';
|
||||
|
Loading…
Reference in New Issue
Block a user