parent
644e4719fa
commit
7146fa69d6
@ -0,0 +1,94 @@
|
||||
package com.ruoyi.tc.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.tc.domain.AssetLc;
|
||||
import com.ruoyi.tc.domain.request.AssetLcRequest;
|
||||
import com.ruoyi.tc.service.AssetLcService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 任务流程(AssetLc)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-11-18 14:46:40
|
||||
*/
|
||||
@Api("任务流程")
|
||||
@RestController
|
||||
@RequestMapping("/unit/assetLc")
|
||||
public class AssetLcController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private AssetLcService assetLcService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param assetLc 筛选条件
|
||||
* @param req 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperation(value = "分页查询", response = AssetLc.class)
|
||||
public AjaxResult queryByPage(Page<AssetLc> assetLc, AssetLcRequest req) {
|
||||
return AjaxResult.success(this.assetLcService.queryByPage(assetLc, req));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条数据", response = AssetLc.class)
|
||||
@GetMapping("{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Integer id) {
|
||||
return AjaxResult.success(this.assetLcService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param assetLc 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增数据")
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody @Valid AssetLc assetLc) {
|
||||
return AjaxResult.success(this.assetLcService.insert(assetLc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param assetLc 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "新增数据")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody @Valid AssetLc assetLc) {
|
||||
return AjaxResult.success(this.assetLcService.update(assetLc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@PostMapping("/deleteById/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Integer id) {
|
||||
return AjaxResult.success(this.assetLcService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,85 @@
|
||||
package com.ruoyi.tc.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.tc.domain.AssetTask;
|
||||
import com.ruoyi.tc.service.AssetTaskService;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 任务主表(AssetTask)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-11-18 13:22:58
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/unit/assetTask")
|
||||
public class AssetTaskController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private AssetTaskService assetTaskService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param assetTask 筛选条件
|
||||
* @param pageRequest 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping
|
||||
public AjaxResult queryByPage(Page<AssetTask> assetTask, PageRequest pageRequest) {
|
||||
return AjaxResult.success(this.assetTaskService.queryByPage(assetTask, pageRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Integer id) {
|
||||
return AjaxResult.success(this.assetTaskService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param assetTask 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult add(AssetTask assetTask) {
|
||||
return AjaxResult.success(this.assetTaskService.insert(assetTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param assetTask 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public AjaxResult edit(AssetTask assetTask) {
|
||||
return AjaxResult.success(this.assetTaskService.update(assetTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public AjaxResult deleteById(Integer id) {
|
||||
return AjaxResult.success(this.assetTaskService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,124 @@
|
||||
package com.ruoyi.tc.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 任务流程(AssetLc)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-11-18 14:46:40
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("任务流程实体类")
|
||||
public class AssetLc implements Serializable {
|
||||
private static final long serialVersionUID = 660117917021496292L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty("主键id")
|
||||
private Integer id;
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@ApiModelProperty("任务id")
|
||||
private Integer taskId;
|
||||
/**
|
||||
* 管理员下发时间
|
||||
*/
|
||||
@ApiModelProperty("管理员下发时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime xfTime;
|
||||
/**
|
||||
* 单位核查完成提交时间
|
||||
*/
|
||||
@ApiModelProperty("单位核查完成提交时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime dwhcTime;
|
||||
/**
|
||||
* 管理员审核驳回时间
|
||||
*/
|
||||
@ApiModelProperty("管理员审核驳回时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime shbhTime;
|
||||
/**
|
||||
* 单位重新核查提交时间
|
||||
*/
|
||||
@ApiModelProperty("单位重新核查提交时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime dwcxhcTime;
|
||||
/**
|
||||
* 管理员审核通过时间
|
||||
*/
|
||||
@ApiModelProperty("管理员审核通过时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime shtgTime;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty("用户id")
|
||||
private Integer ueserId;
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
private Integer deptId;
|
||||
/**
|
||||
* 创建者id
|
||||
*/
|
||||
@ApiModelProperty("创建者id")
|
||||
private Integer createId;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty("创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 更新着id
|
||||
*/
|
||||
@ApiModelProperty("更新着id")
|
||||
private Integer updateId;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
@ApiModelProperty("更新者")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty("更新时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
@ApiModelProperty("版本")
|
||||
private String version;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,57 @@
|
||||
package com.ruoyi.tc.service;
|
||||
|
||||
import com.ruoyi.tc.domain.AssetLc;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.tc.domain.request.AssetLcRequest;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
/**
|
||||
* 任务流程(AssetLc)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-11-18 14:46:40
|
||||
*/
|
||||
public interface AssetLcService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
AssetLc queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param assetLc 筛选条件
|
||||
* @param pageRequest 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
Page<AssetLc> queryByPage(Page<AssetLc>assetLc, AssetLcRequest pageRequest);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param assetLc 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
AssetLc insert(AssetLc assetLc);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param assetLc 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
AssetLc update(AssetLc assetLc);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.ruoyi.tc.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.tc.domain.AssetTask;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
/**
|
||||
* 任务主表(AssetTask)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-11-18 13:23:09
|
||||
*/
|
||||
public interface AssetTaskService extends IService<AssetTask> {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
AssetTask queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param assetTask 筛选条件
|
||||
* @param pageRequest 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
Page<AssetTask> queryByPage(Page<AssetTask> assetTask, PageRequest pageRequest);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param assetTask 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
AssetTask insert(AssetTask assetTask);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param assetTask 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
AssetTask update(AssetTask assetTask);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.ruoyi.tc.service.impl;
|
||||
|
||||
import com.ruoyi.tc.domain.AssetLc;
|
||||
|
||||
import com.ruoyi.tc.domain.AssetTask;
|
||||
import com.ruoyi.tc.domain.request.AssetLcRequest;
|
||||
import com.ruoyi.tc.mapper.AssetLcMapper;
|
||||
import com.ruoyi.tc.service.AssetLcService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 任务流程(AssetLc)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-11-18 14:46:40
|
||||
*/
|
||||
@Service("assetLcService")
|
||||
public class AssetLcServiceImpl implements AssetLcService {
|
||||
@Resource
|
||||
private AssetLcMapper assetLcDao;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public AssetLc queryById(Integer id) {
|
||||
return this.assetLcDao.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param assetLc 筛选条件
|
||||
* @param pageRequest 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public Page<AssetLc> queryByPage(Page<AssetLc> assetLc, AssetLcRequest pageRequest) {
|
||||
return assetLcDao.queryByPage(assetLc, pageRequest);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param assetLc 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public AssetLc insert(AssetLc assetLc) {
|
||||
this.assetLcDao.insert(assetLc);
|
||||
return assetLc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param assetLc 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public AssetLc update(AssetLc assetLc) {
|
||||
this.assetLcDao.update(assetLc);
|
||||
return this.queryById(assetLc.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.assetLcDao.deleteById(id) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.ruoyi.tc.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.tc.domain.AssetTask;
|
||||
import com.ruoyi.tc.mapper.AssetTaskMapper;
|
||||
import com.ruoyi.tc.service.AssetTaskService;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 任务主表(AssetTask)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-11-18 13:23:09
|
||||
*/
|
||||
@Service("assetTaskService")
|
||||
public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask> implements AssetTaskService {
|
||||
@Resource
|
||||
private AssetTaskMapper assetTaskDao;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public AssetTask queryById(Integer id) {
|
||||
return this.assetTaskDao.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param assetTask 筛选条件
|
||||
* @param pageRequest 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public Page<AssetTask> queryByPage(Page<AssetTask> assetTask, PageRequest pageRequest) {
|
||||
return assetTaskDao.queryByPage(assetTask, pageRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param assetTask 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public AssetTask insert(AssetTask assetTask) {
|
||||
this.assetTaskDao.insert(assetTask);
|
||||
return assetTask;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param assetTask 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public AssetTask update(AssetTask assetTask) {
|
||||
this.assetTaskDao.update(assetTask);
|
||||
return this.queryById(assetTask.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Integer id) {
|
||||
return this.assetTaskDao.deleteById(id) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,262 @@
|
||||
<?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.ruoyi.tc.mapper.AssetLcMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.tc.domain.AssetLc" id="AssetLcMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="taskId" column="task_id" jdbcType="INTEGER"/>
|
||||
<result property="xfTime" column="xf_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="dwhcTime" column="dwhc_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="shbhTime" column="shbh_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="dwcxhcTime" column="dwcxhc_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="shtgTime" column="shtg_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="ueserId" column="ueser_id" jdbcType="INTEGER"/>
|
||||
<result property="deptId" column="dept_id" jdbcType="INTEGER"/>
|
||||
<result property="createId" column="create_id" jdbcType="INTEGER"/>
|
||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateId" column="update_id" jdbcType="INTEGER"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="version" column="version" jdbcType="VARCHAR"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="AssetLcMap">
|
||||
select id,
|
||||
task_id,
|
||||
xf_time,
|
||||
dwhc_time,
|
||||
shbh_time,
|
||||
dwcxhc_time,
|
||||
shtg_time,
|
||||
ueser_i,
|
||||
ddept_id,
|
||||
create_id,
|
||||
create_by,
|
||||
create_time,
|
||||
update_id,
|
||||
update_by,
|
||||
update_time,
|
||||
version,
|
||||
remark
|
||||
from asset_lc
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="AssetLcMap">
|
||||
select
|
||||
id,task_id,xf_time,dwhc_time,shbh_time,dwcxhc_time,shtg_time,ueser_i,ddept_id,create_id,create_by,create_time,update_id,update_by,update_time,version,remark
|
||||
from asset_lc
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="taskId != null">
|
||||
and task_id = #{taskId}
|
||||
</if>
|
||||
<if test="xfTime != null">
|
||||
and xf_time = #{xfTime}
|
||||
</if>
|
||||
<if test="dwhcTime != null">
|
||||
and dwhc_time = #{dwhcTime}
|
||||
</if>
|
||||
<if test="shbhTime != null">
|
||||
and shbh_time = #{shbhTime}
|
||||
</if>
|
||||
<if test="dwcxhcTime != null">
|
||||
and dwcxhc_time = #{dwcxhcTime}
|
||||
</if>
|
||||
<if test="shtgTime != null">
|
||||
and shtg_time = #{shtgTime}
|
||||
</if>
|
||||
<if test="ueserId != null">
|
||||
and ueser_id = #{ueserId}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="createId != null">
|
||||
and create_id = #{createId}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateId != null">
|
||||
and update_id = #{updateId}
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
and update_by = #{updateBy}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="version != null and version != ''">
|
||||
and version = #{version}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark = #{remark}
|
||||
</if>
|
||||
</where>
|
||||
limit #{pageable.offset}, #{pageable.pageSize}
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from asset_lc
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="taskId != null">
|
||||
and task_id = #{taskId}
|
||||
</if>
|
||||
<if test="xfTime != null">
|
||||
and xf_time = #{xfTime}
|
||||
</if>
|
||||
<if test="dwhcTime != null">
|
||||
and dwhc_time = #{dwhcTime}
|
||||
</if>
|
||||
<if test="shbhTime != null">
|
||||
and shbh_time = #{shbhTime}
|
||||
</if>
|
||||
<if test="dwcxhcTime != null">
|
||||
and dwcxhc_time = #{dwcxhcTime}
|
||||
</if>
|
||||
<if test="shtgTime != null">
|
||||
and shtg_time = #{shtgTime}
|
||||
</if>
|
||||
<if test="ueserId != null">
|
||||
and ueser_id = #{ueserId}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="createId != null">
|
||||
and create_id = #{createId}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateId != null">
|
||||
and update_id = #{updateId}
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
and update_by = #{updateBy}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="version != null and version != ''">
|
||||
and version = #{version}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark = #{remark}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into asset_lc(task_idxf_timedwhc_timeshbh_timedwcxhc_timeshtg_timeueser_iddept_idcreate_idcreate_bycreate_timeupdate_idupdate_byupdate_timeversionremark)
|
||||
values (#{taskId}#{xfTime}#{dwhcTime}#{shbhTime}#{dwcxhcTime}#{shtgTime}#{ueserId}#{deptId}#{createId}#{createBy}#{createTime}#{updateId}#{updateBy}#{updateTime}#{version}#{remark})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into
|
||||
asset_lc(task_idxf_timedwhc_timeshbh_timedwcxhc_timeshtg_timeueser_iddept_idcreate_idcreate_bycreate_timeupdate_idupdate_byupdate_timeversionremark)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.taskId}#{entity.xfTime}#{entity.dwhcTime}#{entity.shbhTime}#{entity.dwcxhcTime}#{entity.shtgTime}#{entity.ueserId}#{entity.deptId}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.version}#{entity.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into
|
||||
asset_lc(task_idxf_timedwhc_timeshbh_timedwcxhc_timeshtg_timeueser_iddept_idcreate_idcreate_bycreate_timeupdate_idupdate_byupdate_timeversionremark)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.taskId}#{entity.xfTime}#{entity.dwhcTime}#{entity.shbhTime}#{entity.dwcxhcTime}#{entity.shtgTime}#{entity.ueserId}#{entity.deptId}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.version}#{entity.remark})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
task_id = values(task_id)xf_time = values(xf_time)dwhc_time = values(dwhc_time)shbh_time =
|
||||
values(shbh_time)dwcxhc_time = values(dwcxhc_time)shtg_time = values(shtg_time)ueser_id =
|
||||
values(ueser_id)dept_id = values(dept_id)create_id = values(create_id)create_by = values(create_by)create_time =
|
||||
values(create_time)update_id = values(update_id)update_by = values(update_by)update_time =
|
||||
values(update_time)version = values(version)remark = values(remark)
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update asset_lc
|
||||
<set>
|
||||
<if test="taskId != null">
|
||||
task_id = #{taskId},
|
||||
</if>
|
||||
<if test="xfTime != null">
|
||||
xf_time = #{xfTime},
|
||||
</if>
|
||||
<if test="dwhcTime != null">
|
||||
dwhc_time = #{dwhcTime},
|
||||
</if>
|
||||
<if test="shbhTime != null">
|
||||
shbh_time = #{shbhTime},
|
||||
</if>
|
||||
<if test="dwcxhcTime != null">
|
||||
dwcxhc_time = #{dwcxhcTime},
|
||||
</if>
|
||||
<if test="shtgTime != null">
|
||||
shtg_time = #{shtgTime},
|
||||
</if>
|
||||
<if test="ueserId != null">
|
||||
ueser_id = #{ueserId},
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
dept_id = #{deptId},
|
||||
</if>
|
||||
<if test="createId != null">
|
||||
create_id = #{createId},
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
create_by = #{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateId != null">
|
||||
update_id = #{updateId},
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
update_by = #{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="version != null and version != ''">
|
||||
version = #{version},
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
remark = #{remark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from asset_lc
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
@ -0,0 +1,304 @@
|
||||
<?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.ruoyi.tc.mapper.AssetTaskMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.tc.domain.AssetTask" id="AssetTaskMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="taskId" column="task_id" jdbcType="VARCHAR"/>
|
||||
<result property="taskName" column="task_name" jdbcType="VARCHAR"/>
|
||||
<result property="taskTime" column="task_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="taskDeadline" column="task_deadline" jdbcType="VARCHAR"/>
|
||||
<result property="taskFinishTime" column="task_finish_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
|
||||
<result property="dwId" column="dw_id" jdbcType="INTEGER"/>
|
||||
<result property="createId" column="create_id" jdbcType="INTEGER"/>
|
||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateId" column="update_id" jdbcType="INTEGER"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="userId" column="user_id" jdbcType="INTEGER"/>
|
||||
<result property="deptId" column="dept_id" jdbcType="INTEGER"/>
|
||||
<result property="version" column="version" jdbcType="VARCHAR"/>
|
||||
<result property="reamark" column="reamark" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="AssetTaskMap">
|
||||
select id,
|
||||
task_id,
|
||||
task_name,
|
||||
task_time,
|
||||
task_deadline,
|
||||
task_finish_time,
|
||||
task_status,
|
||||
dw_id,
|
||||
create_id,
|
||||
create_by,
|
||||
create_time,
|
||||
update_id,
|
||||
update_by,
|
||||
update_time,
|
||||
user_id,
|
||||
dept_id,
|
||||
version,
|
||||
reamark
|
||||
from asset_task
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="AssetTaskMap">
|
||||
select
|
||||
id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark
|
||||
from asset_task
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="taskId != null and taskId != ''">
|
||||
and task_id = #{taskId}
|
||||
</if>
|
||||
<if test="taskName != null and taskName != ''">
|
||||
and task_name = #{taskName}
|
||||
</if>
|
||||
<if test="taskTime != null">
|
||||
and task_time = #{taskTime}
|
||||
</if>
|
||||
<if test="taskDeadline != null and taskDeadline != ''">
|
||||
and task_deadline = #{taskDeadline}
|
||||
</if>
|
||||
<if test="taskFinishTime != null">
|
||||
and task_finish_time = #{taskFinishTime}
|
||||
</if>
|
||||
<if test="taskStatus != null and taskStatus != ''">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="dwId != null">
|
||||
and dw_id = #{dwId}
|
||||
</if>
|
||||
<if test="createId != null">
|
||||
and create_id = #{createId}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateId != null">
|
||||
and update_id = #{updateId}
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
and update_by = #{updateBy}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="version != null and version != ''">
|
||||
and version = #{version}
|
||||
</if>
|
||||
<if test="reamark != null and reamark != ''">
|
||||
and reamark = #{reamark}
|
||||
</if>
|
||||
</where>
|
||||
limit #{pageable.offset}, #{pageable.pageSize}
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from asset_task
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="taskId != null and taskId != ''">
|
||||
and task_id = #{taskId}
|
||||
</if>
|
||||
<if test="taskName != null and taskName != ''">
|
||||
and task_name = #{taskName}
|
||||
</if>
|
||||
<if test="taskTime != null">
|
||||
and task_time = #{taskTime}
|
||||
</if>
|
||||
<if test="taskDeadline != null and taskDeadline != ''">
|
||||
and task_deadline = #{taskDeadline}
|
||||
</if>
|
||||
<if test="taskFinishTime != null">
|
||||
and task_finish_time = #{taskFinishTime}
|
||||
</if>
|
||||
<if test="taskStatus != null and taskStatus != ''">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="dwId != null">
|
||||
and dw_id = #{dwId}
|
||||
</if>
|
||||
<if test="createId != null">
|
||||
and create_id = #{createId}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateId != null">
|
||||
and update_id = #{updateId}
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
and update_by = #{updateBy}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
and dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="version != null and version != ''">
|
||||
and version = #{version}
|
||||
</if>
|
||||
<if test="reamark != null and reamark != ''">
|
||||
and reamark = #{reamark}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="queryByPage" resultType="com.ruoyi.tc.domain.AssetTask">
|
||||
select
|
||||
id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark
|
||||
from asset_task
|
||||
<where>
|
||||
<if test="taskName != null and taskName != ''">
|
||||
and task_name = #{taskName}
|
||||
</if>
|
||||
|
||||
<if test="taskFinishTime != null">
|
||||
and task_finish_time = #{taskFinishTime}
|
||||
</if>
|
||||
<if test="begainTime != null">
|
||||
and task_finish_time >= #{begainTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and task_finish_time <= #{endTime}
|
||||
</if>
|
||||
<if test="taskStatus != null and taskStatus != ''">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="taskId != null and taskId != ''">
|
||||
and task_id = #{taskId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into asset_task(task_id, task_name, task_time, task_deadline, task_finish_time, task_status, dw_id,
|
||||
create_id, create_by, create_time, update_id, update_by, update_time, user_id, dept_id,
|
||||
version, reamark)
|
||||
values (#{taskId}, #{taskName}, #{taskTime}, #{taskDeadline}, #{taskFinishTime}, #{taskStatus}, #{dwId},
|
||||
#{createId}, #{createBy}, #{createTime}, #{updateId}, #{updateBy}, #{updateTime}, #{userId}, #{deptId},
|
||||
#{version}, #{reamark})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into
|
||||
asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline},#{entity.taskFinishTime},#{entity.taskStatus},#{entity.dwId},#{entity.createId},#{entity.createBy},#{entity.createTime},#{entity.updateId},#{entity.updateBy},#{entity.updateTime},#{entity.userId},#{entity.deptId},#{entity.version},#{entity.reamark})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into
|
||||
asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline}#{entity.taskFinishTime}#{entity.taskStatus}#{entity.dwId}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.userId}#{entity.deptId}#{entity.version}#{entity.reamark})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
task_id = values(task_id)task_name = values(task_name)task_time = values(task_time)task_deadline =
|
||||
values(task_deadline)task_finish_time = values(task_finish_time)task_status = values(task_status)dw_id =
|
||||
values(dw_id)create_id = values(create_id)create_by = values(create_by)create_time =
|
||||
values(create_time)update_id = values(update_id)update_by = values(update_by)update_time =
|
||||
values(update_time)user_id = values(user_id)dept_id = values(dept_id)version = values(version)reamark =
|
||||
values(reamark)
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update asset_task
|
||||
<set>
|
||||
<if test="taskId != null and taskId != ''">
|
||||
task_id = #{taskId},
|
||||
</if>
|
||||
<if test="taskName != null and taskName != ''">
|
||||
task_name = #{taskName},
|
||||
</if>
|
||||
<if test="taskTime != null">
|
||||
task_time = #{taskTime},
|
||||
</if>
|
||||
<if test="taskDeadline != null and taskDeadline != ''">
|
||||
task_deadline = #{taskDeadline},
|
||||
</if>
|
||||
<if test="taskFinishTime != null">
|
||||
task_finish_time = #{taskFinishTime},
|
||||
</if>
|
||||
<if test="taskStatus != null and taskStatus != ''">
|
||||
task_status = #{taskStatus},
|
||||
</if>
|
||||
<if test="dwId != null">
|
||||
dw_id = #{dwId},
|
||||
</if>
|
||||
<if test="createId != null">
|
||||
create_id = #{createId},
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
create_by = #{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateId != null">
|
||||
update_id = #{updateId},
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
update_by = #{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId},
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
dept_id = #{deptId},
|
||||
</if>
|
||||
<if test="version != null and version != ''">
|
||||
version = #{version},
|
||||
</if>
|
||||
<if test="reamark != null and reamark != ''">
|
||||
reamark = #{reamark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete
|
||||
from asset_task
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
@ -1,105 +1,105 @@
|
||||
<?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.ruoyi.system.mapper.SysDictTypeMapper">
|
||||
|
||||
<resultMap type="SysDictType" id="SysDictTypeResult">
|
||||
<id property="dictId" column="dict_id" />
|
||||
<result property="dictName" column="dict_name" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictTypeVo">
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
|
||||
from sys_dict_type
|
||||
</sql>
|
||||
|
||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
<where>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
AND dict_name like concat('%', #{dictName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type like concat('%', #{dictType}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_id = #{dictId}
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType}
|
||||
</select>
|
||||
|
||||
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType} limit 1
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictTypeById" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id = #{dictId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictTypeByIds" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id in
|
||||
<foreach collection="array" item="dictId" open="(" separator="," close=")">
|
||||
#{dictId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictType" parameterType="SysDictType">
|
||||
update sys_dict_type
|
||||
<set>
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_id = #{dictId}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictType" parameterType="SysDictType">
|
||||
insert into sys_dict_type(
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="dictName != null and dictName != ''">#{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<?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.ruoyi.system.mapper.SysDictTypeMapper">
|
||||
|
||||
<resultMap type="SysDictType" id="SysDictTypeResult">
|
||||
<id property="dictId" column="dict_id" />
|
||||
<result property="dictName" column="dict_name" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictTypeVo">
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
|
||||
from sys_dict_type
|
||||
</sql>
|
||||
|
||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
<where>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
AND dict_name like concat('%', #{dictName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type like concat('%', #{dictType}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_id = #{dictId}
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType}
|
||||
</select>
|
||||
|
||||
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType} limit 1
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictTypeById" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id = #{dictId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictTypeByIds" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id in
|
||||
<foreach collection="array" item="dictId" open="(" separator="," close=")">
|
||||
#{dictId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictType" parameterType="SysDictType">
|
||||
update sys_dict_type
|
||||
<set>
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_id = #{dictId}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictType" parameterType="SysDictType">
|
||||
insert into sys_dict_type(
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="dictName != null and dictName != ''">#{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
Loading…
Reference in new issue