Commit 8423133e authored by yf's avatar yf

修改巡查管理相关接口

parent 944d8c92
......@@ -31,15 +31,14 @@ import com.ruoyi.common.core.page.TableDataInfo;
/**
* 现状风险巡查用户请假Controller
*
*
* @author ruoyi
* @date 2023-12-05
*/
@RestController
@AllArgsConstructor
@RequestMapping(value = {"/risk/currentRiskHoliday","/app-api/risk/currentRiskHoliday"})
public class CurrentRiskUserHolidayController extends BaseController
{
@RequestMapping(value = {"/risk/currentRiskHoliday", "/app-api/risk/currentRiskHoliday"})
public class CurrentRiskUserHolidayController extends BaseController {
private ICurrentRiskUserHolidayService currentRiskUserHolidayService;
private ISysUserService sysUserService;
......@@ -47,32 +46,32 @@ public class CurrentRiskUserHolidayController extends BaseController
* 查询现状风险巡查用户请假列表
*/
@GetMapping("/list")
public TableDataInfo list(CurrentRiskUserHoliday currentRiskUserHoliday)
{
public TableDataInfo list(CurrentRiskUserHoliday currentRiskUserHoliday) {
startPage();
QueryWrapper<CurrentRiskUserHoliday> queryWrapper = new QueryWrapper<>();
if("0".equals(currentRiskUserHoliday.getType())){
if ("0".equals(currentRiskUserHoliday.getType())) {
//申请人
queryWrapper.eq("apply_user_id",getUserId());
}else{
queryWrapper.eq("apply_user_id", getUserId());
} else {
//审批人
queryWrapper.in("apply_user_id",currentRiskUserHolidayService.memberUserIds(getUserId()));
queryWrapper.in("apply_user_id", currentRiskUserHolidayService.memberUserIds(getUserId()));
}
if(!StringUtils.isEmpty(currentRiskUserHoliday.getStatus())){
queryWrapper.eq("status",currentRiskUserHoliday.getStatus());
if (!StringUtils.isEmpty(currentRiskUserHoliday.getStatus())) {
queryWrapper.eq("status", currentRiskUserHoliday.getStatus());
}
queryWrapper.orderByAsc(" status");
queryWrapper.orderByDesc("holiday_time");
List<CurrentRiskUserHoliday> list = currentRiskUserHolidayService.list(queryWrapper);
if(!CollectionUtils.isEmpty(list)){
list.forEach(holiday ->{
if("0".equals(currentRiskUserHoliday.getType())){
holiday.setApplyUserName(getUsername());
}else{
SysUser sysUser = sysUserService.selectUserById(holiday.getApplyUserId());
holiday.setApplyUserName(sysUser.getNickName());
if (!CollectionUtils.isEmpty(list)) {
list.forEach(holiday -> {
if ("0".equals(currentRiskUserHoliday.getType())) {
SysUser sysUser = sysUserService.selectUserById(getUserId());
holiday.setApplyUserName(sysUser.getNickName());
} else {
SysUser sysUser = sysUserService.selectUserById(holiday.getApplyUserId());
holiday.setApplyUserName(sysUser.getNickName());
}
if(holiday.getApproveUserId() != null){
if (holiday.getApproveUserId() != null) {
SysUser sysUser = sysUserService.selectUserById(holiday.getApproveUserId());
holiday.setApproveUserName(sysUser.getNickName());
}
......@@ -87,8 +86,7 @@ public class CurrentRiskUserHolidayController extends BaseController
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:export')")
@Log(title = "现状风险巡查用户请假", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CurrentRiskUserHoliday currentRiskUserHoliday)
{
public void export(HttpServletResponse response, CurrentRiskUserHoliday currentRiskUserHoliday) {
List<CurrentRiskUserHoliday> list = currentRiskUserHolidayService.selectCurrentRiskUserHolidayList(currentRiskUserHoliday);
ExcelUtil<CurrentRiskUserHoliday> util = new ExcelUtil<CurrentRiskUserHoliday>(CurrentRiskUserHoliday.class);
util.exportExcel(response, list, "现状风险巡查用户请假数据");
......@@ -99,8 +97,7 @@ public class CurrentRiskUserHolidayController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(currentRiskUserHolidayService.selectCurrentRiskUserHolidayById(id));
}
......@@ -110,15 +107,14 @@ public class CurrentRiskUserHolidayController extends BaseController
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:add')")
@Log(title = "现状风险巡查用户请假", businessType = BusinessType.INSERT)
@PostMapping("/save")
public AjaxResult add(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday)
{
if(null == currentRiskUserHoliday.getId()){
public AjaxResult add(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday) {
if (null == currentRiskUserHoliday.getId()) {
currentRiskUserHoliday.setApplyUserId(getUserId());
currentRiskUserHoliday.setApplyTime(new Date());
currentRiskUserHoliday.setStatus("0");
//TODO 查询上级项目经理 改为已知晓,不做逻辑处理
currentRiskUserHolidayService.insertCurrentRiskUserHoliday(currentRiskUserHoliday);
}else{
} else {
currentRiskUserHoliday.setApproveTime(new Date());
currentRiskUserHoliday.setApproveUserId(getUserId());
currentRiskUserHolidayService.updateCurrentRiskUserHoliday(currentRiskUserHoliday);
......@@ -132,8 +128,7 @@ public class CurrentRiskUserHolidayController extends BaseController
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:edit')")
@Log(title = "现状风险巡查用户请假", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday)
{
public AjaxResult edit(@RequestBody CurrentRiskUserHoliday currentRiskUserHoliday) {
return toAjax(currentRiskUserHolidayService.updateCurrentRiskUserHoliday(currentRiskUserHoliday));
}
......@@ -142,9 +137,8 @@ public class CurrentRiskUserHolidayController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('risk:currentRiskHoliday:remove')")
@Log(title = "现状风险巡查用户请假", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(currentRiskUserHolidayService.deleteCurrentRiskUserHolidayByIds(ids));
}
}
......@@ -2,6 +2,9 @@ package com.censoft.censoftrongtong.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.censoft.censoftrongtong.domain.LedgerProject;
import com.censoft.censoftrongtong.service.ILedgerProjectService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -23,23 +26,28 @@ import com.ruoyi.common.core.page.TableDataInfo;
/**
* 巡查执行管理Controller
*
*
* @author baode
* @date 2023-12-05
*/
@RestController
@RequestMapping(value={"/risk/riskUserPatrol","/app-api/risk/riskUserPatrol"})
public class CurrentRiskUserPatrolController extends BaseController
{
@RequestMapping(value = {"/risk/riskUserPatrol", "/app-api/risk/riskUserPatrol"})
public class CurrentRiskUserPatrolController extends BaseController {
@Autowired
private ICurrentRiskUserPatrolService currentRiskUserPatrolService;
@GetMapping("/getPatrolProjectList")
private List<LedgerProject> getPatrolProjectList() {
List<LedgerProject> list = currentRiskUserPatrolService.getPatrolProjectList(getUserId());
return list;
}
/**
* 查询巡查执行管理列表
*/
@GetMapping("/list")
public TableDataInfo list(CurrentRiskUserPatrol currentRiskUserPatrol)
{
public TableDataInfo list(CurrentRiskUserPatrol currentRiskUserPatrol) {
startPage();
List<CurrentRiskUserPatrol> list = currentRiskUserPatrolService.selectCurrentRiskUserPatrolList(currentRiskUserPatrol);
return getDataTable(list);
......@@ -51,8 +59,7 @@ public class CurrentRiskUserPatrolController extends BaseController
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:export')")
@Log(title = "巡查执行管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, CurrentRiskUserPatrol currentRiskUserPatrol)
{
public void export(HttpServletResponse response, CurrentRiskUserPatrol currentRiskUserPatrol) {
List<CurrentRiskUserPatrol> list = currentRiskUserPatrolService.selectCurrentRiskUserPatrolList(currentRiskUserPatrol);
ExcelUtil<CurrentRiskUserPatrol> util = new ExcelUtil<CurrentRiskUserPatrol>(CurrentRiskUserPatrol.class);
util.exportExcel(response, list, "巡查执行管理数据");
......@@ -63,8 +70,7 @@ public class CurrentRiskUserPatrolController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(currentRiskUserPatrolService.selectCurrentRiskUserPatrolById(id));
}
......@@ -74,8 +80,7 @@ public class CurrentRiskUserPatrolController extends BaseController
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:add')")
@Log(title = "巡查执行管理", businessType = BusinessType.INSERT)
@PostMapping("save")
public AjaxResult add(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol)
{
public AjaxResult add(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol) {
return toAjax(currentRiskUserPatrolService.insertCurrentRiskUserPatrol(currentRiskUserPatrol));
}
......@@ -85,8 +90,7 @@ public class CurrentRiskUserPatrolController extends BaseController
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:edit')")
@Log(title = "巡查执行管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol)
{
public AjaxResult edit(@RequestBody CurrentRiskUserPatrol currentRiskUserPatrol) {
return toAjax(currentRiskUserPatrolService.updateCurrentRiskUserPatrol(currentRiskUserPatrol));
}
......@@ -95,9 +99,8 @@ public class CurrentRiskUserPatrolController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('risk:riskUserPatrol:remove')")
@Log(title = "巡查执行管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(currentRiskUserPatrolService.deleteCurrentRiskUserPatrolByIds(ids));
}
}
......@@ -64,11 +64,11 @@ public class CurrentRiskUserPatrolDetailController extends BaseController
* 查询现状风险用户巡查明细列表
*/
@GetMapping("/detailList")
public TableDataInfo detailList(CurrentRiskUserPatrolDetail currentRiskUserPatrolDetail)
public TableDataInfo detailList(RiskExistingListPatrolVO query)
{
startPage();
String patrolId = String.valueOf(currentRiskUserPatrolDetail.getPatrolId());
List<RiskExistingListPatrolVO> list = currentRiskUserPatrolDetailService.riskExistingLists(patrolId);
query.setUserId(getUserId());
List<RiskExistingListPatrolVO> list = currentRiskUserPatrolDetailService.riskExistingLists(query);
return getDataTable(list);
}
......
......@@ -10,4 +10,6 @@ public class RiskExistingListPatrolVO extends RiskPlanExistingList{
private String patrolId;
private String patrolStatus;
private Long projectId;
}
......@@ -62,5 +62,5 @@ public interface CurrentRiskUserPatrolDetailMapper extends MPJBaseMapper<Curren
*/
public int deleteCurrentRiskUserPatrolDetailByIds(Long[] ids);
List<RiskExistingListPatrolVO> riskExistingLists(@Param("patrolId") String patrolId);
List<RiskExistingListPatrolVO> riskExistingLists(RiskExistingListPatrolVO model);
}
......@@ -2,6 +2,7 @@ package com.censoft.censoftrongtong.mapper;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.censoft.censoftrongtong.domain.LedgerProject;
import com.github.yulichang.base.MPJBaseMapper;
/**
......@@ -20,6 +21,15 @@ public interface CurrentRiskUserPatrolMapper extends MPJBaseMapper<CurrentRiskU
*/
public CurrentRiskUserPatrol selectCurrentRiskUserPatrolById(Long id);
/**
* 根据用户id获取巡检项目
* @param userId
* @return
*/
public List<LedgerProject> getPatrolProjectList(Long userId);
/**
* 查询巡查执行管理列表
*
......
......@@ -60,5 +60,5 @@ public interface ICurrentRiskUserPatrolDetailService extends MPJBaseService<Cur
*/
public int deleteCurrentRiskUserPatrolDetailById(Long id);
List<RiskExistingListPatrolVO> riskExistingLists(String patrolId);
List<RiskExistingListPatrolVO> riskExistingLists(RiskExistingListPatrolVO model);
}
......@@ -2,6 +2,7 @@ package com.censoft.censoftrongtong.service;
import java.util.List;
import com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol;
import com.censoft.censoftrongtong.domain.LedgerProject;
import com.github.yulichang.base.MPJBaseService;
/**
* 巡查执行管理Service接口
......@@ -27,6 +28,12 @@ public interface ICurrentRiskUserPatrolService extends MPJBaseService<CurrentRi
*/
public List<CurrentRiskUserPatrol> selectCurrentRiskUserPatrolList(CurrentRiskUserPatrol currentRiskUserPatrol);
/**
* 根据用户id查询巡检项目列表
* @param userId
* @return
*/
public List<LedgerProject> getPatrolProjectList(Long userId);
/**
* 新增巡查执行管理
*
......
......@@ -97,7 +97,7 @@ public class CurrentRiskUserPatrolDetailServiceImpl extends MPJBaseServiceImpl<C
}
@Override
public List<RiskExistingListPatrolVO> riskExistingLists(String patrolId) {
return currentRiskUserPatrolDetailMapper.riskExistingLists(patrolId);
public List<RiskExistingListPatrolVO> riskExistingLists(RiskExistingListPatrolVO model) {
return currentRiskUserPatrolDetailMapper.riskExistingLists(model);
}
}
package com.censoft.censoftrongtong.service.impl;
import java.util.List;
import com.censoft.censoftrongtong.domain.LedgerProject;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -44,6 +46,18 @@ public class CurrentRiskUserPatrolServiceImpl extends MPJBaseServiceImpl<Current
return currentRiskUserPatrolMapper.selectCurrentRiskUserPatrolList(currentRiskUserPatrol);
}
/**
* 根据用户id获取巡检项目
* @param userId
* @return
*/
@Override
public List<LedgerProject> getPatrolProjectList(Long userId)
{
return currentRiskUserPatrolMapper.getPatrolProjectList(userId);
}
/**
* 新增巡查执行管理
*
......
......@@ -167,17 +167,44 @@
<result property="patrolStatus" column="patrolStatus"/>
</resultMap>
<select id="riskExistingLists" resultMap="RiskPlanExistingListResult" parameterType="java.lang.String">
select b.id,b.user_id,b.inherent_id,
b.plan_id,b.room_id,b.name,b.factor,b.type,
b.level,b.presence_location,b.picture_file_ids,b.measures_project,b.measures_project_file_ids,
b.measures_administration,b.measures_dept_name,b.measures_user_name,b.measures_user_phone,
b.measures_administration_file_ids,b.measures_emergency,
b.measures_emergency_file_ids,b.reference_basis,b.del_flag,b.create_by,
b.create_time,b.update_by,b.update_time,b.remark,b.factor_items,
a.id patrolDetailId,a.patrol_id patrolId,a.STATUS patrolStatus
from current_risk_user_patrol_detail a
INNER JOIN risk_plan_existing_list b ON a.current_risk_id = b.id
where a.patrol_id = #{patrolId}
<select id="riskExistingLists" resultMap="RiskPlanExistingListResult">
SELECT
b.project_id,
b.user_id,
c.id,
c.inherent_id,
c.plan_id,
c.room_id,
c.NAME,
c.factor,
c.type,
c.LEVEL,
c.presence_location,
c.picture_file_ids,
c.measures_project,
c.measures_project_file_ids,
c.measures_administration,
c.measures_dept_name,
c.measures_user_name,
c.measures_user_phone,
c.measures_administration_file_ids,
c.measures_emergency,
c.measures_emergency_file_ids,
c.reference_basis,
c.del_flag,
c.create_by,
c.create_time,
c.update_by,
c.update_time,
c.remark,
c.factor_items,
a.id patrolDetailId,
a.patrol_id patrolId,
a.STATUS patrolStatus
FROM
current_risk_user_patrol_detail a
INNER JOIN current_risk_user_patrol b ON a.patrol_id = b.id
INNER JOIN risk_plan_existing_list c ON a.current_risk_id = c.id
where b.project_id=#{projectId} and b.user_id=#{userId}
</select>
</mapper>
\ No newline at end of file
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.censoft.censoftrongtong.mapper.CurrentRiskUserPatrolMapper">
<resultMap type="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol" id="CurrentRiskUserPatrolResult">
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="projectId" column="project_id" />
<result property="riskPostId" column="risk_post_id" />
<result property="patrolType" column="patrol_type" />
<result property="status" column="status" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="sortNum" column="sort_num" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="riskPostName" column="risk_post_name" />
<result property="nickName" column="nick_name" />
<result property="validityTime" column="validity_time" />
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="projectId" column="project_id"/>
<result property="riskPostId" column="risk_post_id"/>
<result property="patrolType" column="patrol_type"/>
<result property="status" column="status"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="sortNum" column="sort_num"/>
<result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="riskPostName" column="risk_post_name"/>
<result property="nickName" column="nick_name"/>
<result property="validityTime" column="validity_time"/>
</resultMap>
<sql id="selectCurrentRiskUserPatrolVo">
select a.id, user_id, project_id, risk_post_id, patrol_type, status, start_time, end_time, sort_num, a.validity_time,
del_flag, create_by, create_time, update_by, update_time, remark from current_risk_user_patrol a
select a.id,
user_id,
project_id,
risk_post_id,
patrol_type,
status,
start_time,
end_time,
sort_num,
a.validity_time,
del_flag,
create_by,
create_time,
update_by,
update_time,
remark
from current_risk_user_patrol a
</sql>
<select id="selectCurrentRiskUserPatrolList" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol" resultMap="CurrentRiskUserPatrolResult">
<select id="selectCurrentRiskUserPatrolList"
parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
resultMap="CurrentRiskUserPatrolResult">
SELECT
a.id,
a.user_id,
a.project_id,
a.risk_post_id,
a.patrol_type,
a.STATUS,
a.start_time,
a.end_time,
a.sort_num,
a.del_flag,
a.create_by,
a.create_time,
a.validity_time,
a.update_by,
a.update_time,
a.remark,
b.risk_post_name,
c.nick_name
a.id,
a.user_id,
a.project_id,
a.risk_post_id,
a.patrol_type,
a.STATUS,
a.start_time,
a.end_time,
a.sort_num,
a.del_flag,
a.create_by,
a.create_time,
a.validity_time,
a.update_by,
a.update_time,
a.remark,
b.risk_post_name,
c.nick_name
FROM
current_risk_user_patrol a
LEFT JOIN current_risk_post b on a.risk_post_id = b.id
LEFT JOIN sys_user c on a.user_id = c.user_id
<where>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="projectId != null "> and a.project_id = #{projectId}</if>
<if test="riskPostId != null "> and a.risk_post_id = #{riskPostId}</if>
<if test="patrolType != null "> and a.patrol_type = #{patrolType}</if>
<if test="status != null and status != ''"> and a.status = #{status}</if>
<if test="startTime != null "> and a.start_time = #{startTime}</if>
<if test="endTime != null "> and a.end_time = #{endTime}</if>
<if test="sortNum != null "> and a.sort_num = #{sortNum}</if>
<where>
<if test="userId != null ">and a.user_id = #{userId}</if>
<if test="projectId != null ">and a.project_id = #{projectId}</if>
<if test="riskPostId != null ">and a.risk_post_id = #{riskPostId}</if>
<if test="patrolType != null ">and a.patrol_type = #{patrolType}</if>
<if test="status != null and status != ''">and a.status = #{status}</if>
<if test="startTime != null ">and a.start_time = #{startTime}</if>
<if test="endTime != null ">and a.end_time = #{endTime}</if>
<if test="sortNum != null ">and a.sort_num = #{sortNum}</if>
</where>
</select>
<select id="getPatrolProjectList" resultType="com.censoft.censoftrongtong.domain.LedgerProject">
select b.id,b.name.b.type,b.business,b.address from current_risk_user_patrol a LEFT JOIN ledger_project b on
a.project_id=b.id
<where>
and del_flage=0
<if test="userId != null ">and a.user_id = #{userId}</if>
</where>
</select>
<select id="selectCurrentRiskUserPatrolById" parameterType="Long" resultMap="CurrentRiskUserPatrolResult">
<include refid="selectCurrentRiskUserPatrolVo"/>
where id = #{id}
</select>
<insert id="insertCurrentRiskUserPatrol" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol" useGeneratedKeys="true" keyProperty="id">
<insert id="insertCurrentRiskUserPatrol" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol"
useGeneratedKeys="true" keyProperty="id">
insert into current_risk_user_patrol
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
......@@ -89,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="validityTime != null">validity_time,</if>
<if test="remark != null">remark,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="projectId != null">#{projectId},</if>
......@@ -106,7 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="validityTime != null">#{validityTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</trim>
</insert>
<update id="updateCurrentRiskUserPatrol" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskUserPatrol">
......@@ -131,11 +159,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteCurrentRiskUserPatrolById" parameterType="Long">
delete from current_risk_user_patrol where id = #{id}
delete
from current_risk_user_patrol
where id = #{id}
</delete>
<delete id="deleteCurrentRiskUserPatrolByIds" parameterType="String">
delete from current_risk_user_patrol where id in
delete from current_risk_user_patrol where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment