Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dizhen
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
dizhen
Commits
38c7dfea
Commit
38c7dfea
authored
Oct 31, 2025
by
wangqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单文件权限管理
parent
cf047448
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
687 additions
and
0 deletions
+687
-0
src/main/java/com/ruoyi/project/ys/controller/YscgFileRoleController.java
+104
-0
src/main/java/com/ruoyi/project/ys/domain/YscgFileRole.java
+207
-0
src/main/java/com/ruoyi/project/ys/mapper/YscgFileRoleMapper.java
+69
-0
src/main/java/com/ruoyi/project/ys/service/IYscgFileRoleService.java
+63
-0
src/main/java/com/ruoyi/project/ys/service/impl/YscgFileRoleServiceImpl.java
+119
-0
src/main/resources/mybatis/yscgFileRole/YscgFileRoleMapper.xml
+125
-0
No files found.
src/main/java/com/ruoyi/project/ys/controller/YscgFileRoleController.java
0 → 100644
View file @
38c7dfea
package
com
.
ruoyi
.
project
.
ys
.
controller
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.framework.aspectj.lang.annotation.Log
;
import
com.ruoyi.framework.aspectj.lang.enums.BusinessType
;
import
com.ruoyi.project.ys.domain.YscgFileRole
;
import
com.ruoyi.project.ys.service.IYscgFileRoleService
;
import
com.ruoyi.framework.web.controller.BaseController
;
import
com.ruoyi.framework.web.domain.AjaxResult
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.web.page.TableDataInfo
;
/**
* 成果单文件权限管理Controller
*
* @author ruoyi
* @date 2025-10-31
*/
@RestController
@RequestMapping
(
"/yscgFileRole/filerole"
)
public
class
YscgFileRoleController
extends
BaseController
{
@Autowired
private
IYscgFileRoleService
yscgFileRoleService
;
/**
* 查询成果单文件权限管理列表
*/
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
YscgFileRole
yscgFileRole
)
{
startPage
();
List
<
YscgFileRole
>
list
=
yscgFileRoleService
.
selectYscgFileRoleList
(
yscgFileRole
);
return
getDataTable
(
list
);
}
/**
* 导出成果单文件权限管理列表
*/
@Log
(
title
=
"成果单文件权限管理"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
YscgFileRole
yscgFileRole
)
{
List
<
YscgFileRole
>
list
=
yscgFileRoleService
.
selectYscgFileRoleList
(
yscgFileRole
);
ExcelUtil
<
YscgFileRole
>
util
=
new
ExcelUtil
<
YscgFileRole
>(
YscgFileRole
.
class
);
util
.
exportExcel
(
response
,
list
,
"成果单文件权限管理数据"
);
}
/**
* 获取成果单文件权限管理详细信息
*/
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
yscgFileRoleService
.
selectYscgFileRoleById
(
id
));
}
/**
* 新增成果单文件权限管理
*/
@Log
(
title
=
"成果单文件权限管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
YscgFileRole
yscgFileRole
)
{
return
toAjax
(
yscgFileRoleService
.
insertYscgFileRole
(
yscgFileRole
));
}
/**
* 修改成果单文件权限管理
*/
@Log
(
title
=
"成果单文件权限管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
YscgFileRole
yscgFileRole
)
{
return
toAjax
(
yscgFileRoleService
.
updateYscgFileRole
(
yscgFileRole
));
}
/**
* 删除成果单文件权限管理
*/
@Log
(
title
=
"成果单文件权限管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
yscgFileRoleService
.
deleteYscgFileRoleByIds
(
ids
));
}
@PutMapping
(
"/batchYscgFileRole"
)
public
AjaxResult
batchYscgFileRole
(
Long
fileid
,
Long
[]
userIds
)
{
return
toAjax
(
yscgFileRoleService
.
batchYscgFileRole
(
fileid
,
userIds
));
}
}
src/main/java/com/ruoyi/project/ys/domain/YscgFileRole.java
0 → 100644
View file @
38c7dfea
package
com
.
ruoyi
.
project
.
ys
.
domain
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.framework.aspectj.lang.annotation.Excel
;
import
com.ruoyi.framework.web.domain.BaseEntity
;
/**
* 成果单文件权限管理对象 yscg_file_role
*
* @author ruoyi
* @date 2025-10-31
*/
public
class
YscgFileRole
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
private
Long
id
;
/** 项目文件的主键 */
@Excel
(
name
=
"项目文件的主键"
)
private
Long
fileid
;
/** 用户ID */
@Excel
(
name
=
"用户ID"
)
private
Long
userId
;
/** 用户姓名 */
@Excel
(
name
=
"用户姓名"
)
private
String
nickName
;
/** 查看权限 */
@Excel
(
name
=
"查看权限"
)
private
String
isshow
;
/** 编辑权限 */
@Excel
(
name
=
"编辑权限"
)
private
String
isedit
;
/** 删除权限 */
@Excel
(
name
=
"删除权限"
)
private
String
isdel
;
/** 创建人 */
@Excel
(
name
=
"创建人"
)
private
String
createdBy
;
/** 创建时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"创建时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
createdTime
;
/** 备用1 */
@Excel
(
name
=
"备用1"
)
private
String
ext1
;
/** 备用2 */
@Excel
(
name
=
"备用2"
)
private
String
ext2
;
/** 备用3 */
@Excel
(
name
=
"备用3"
)
private
String
ext3
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setFileid
(
Long
fileid
)
{
this
.
fileid
=
fileid
;
}
public
Long
getFileid
()
{
return
fileid
;
}
public
void
setUserId
(
Long
userId
)
{
this
.
userId
=
userId
;
}
public
Long
getUserId
()
{
return
userId
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
String
getNickName
()
{
return
nickName
;
}
public
void
setIsshow
(
String
isshow
)
{
this
.
isshow
=
isshow
;
}
public
String
getIsshow
()
{
return
isshow
;
}
public
void
setIsedit
(
String
isedit
)
{
this
.
isedit
=
isedit
;
}
public
String
getIsedit
()
{
return
isedit
;
}
public
void
setIsdel
(
String
isdel
)
{
this
.
isdel
=
isdel
;
}
public
String
getIsdel
()
{
return
isdel
;
}
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
String
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedTime
(
Date
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
public
Date
getCreatedTime
()
{
return
createdTime
;
}
public
void
setExt1
(
String
ext1
)
{
this
.
ext1
=
ext1
;
}
public
String
getExt1
()
{
return
ext1
;
}
public
void
setExt2
(
String
ext2
)
{
this
.
ext2
=
ext2
;
}
public
String
getExt2
()
{
return
ext2
;
}
public
void
setExt3
(
String
ext3
)
{
this
.
ext3
=
ext3
;
}
public
String
getExt3
()
{
return
ext3
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"fileid"
,
getFileid
())
.
append
(
"userId"
,
getUserId
())
.
append
(
"nickName"
,
getNickName
())
.
append
(
"isshow"
,
getIsshow
())
.
append
(
"isedit"
,
getIsedit
())
.
append
(
"isdel"
,
getIsdel
())
.
append
(
"createdBy"
,
getCreatedBy
())
.
append
(
"createdTime"
,
getCreatedTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"ext1"
,
getExt1
())
.
append
(
"ext2"
,
getExt2
())
.
append
(
"ext3"
,
getExt3
())
.
toString
();
}
}
src/main/java/com/ruoyi/project/ys/mapper/YscgFileRoleMapper.java
0 → 100644
View file @
38c7dfea
package
com
.
ruoyi
.
project
.
ys
.
mapper
;
import
java.util.List
;
import
com.ruoyi.project.ys.domain.YscgFileRole
;
/**
* 成果单文件权限管理Mapper接口
*
* @author ruoyi
* @date 2025-10-31
*/
public
interface
YscgFileRoleMapper
{
/**
* 查询成果单文件权限管理
*
* @param id 成果单文件权限管理主键
* @return 成果单文件权限管理
*/
public
YscgFileRole
selectYscgFileRoleById
(
Long
id
);
/**
* 查询成果单文件权限管理列表
*
* @param yscgFileRole 成果单文件权限管理
* @return 成果单文件权限管理集合
*/
public
List
<
YscgFileRole
>
selectYscgFileRoleList
(
YscgFileRole
yscgFileRole
);
/**
* 新增成果单文件权限管理
*
* @param yscgFileRole 成果单文件权限管理
* @return 结果
*/
public
int
insertYscgFileRole
(
YscgFileRole
yscgFileRole
);
/**
* 修改成果单文件权限管理
*
* @param yscgFileRole 成果单文件权限管理
* @return 结果
*/
public
int
updateYscgFileRole
(
YscgFileRole
yscgFileRole
);
/**
* 删除成果单文件权限管理
*
* @param id 成果单文件权限管理主键
* @return 结果
*/
public
int
deleteYscgFileRoleById
(
Long
id
);
/**
* 批量删除成果单文件权限管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteYscgFileRoleByIds
(
Long
[]
ids
);
/**
* 批量新增成果单文件权限管理
*
* @param yscgFileRoleList 成果单文件权限管理列表
* @return 结果
*/
public
int
batchYscgFileRole
(
List
<
YscgFileRole
>
yscgFileRoleList
);
}
src/main/java/com/ruoyi/project/ys/service/IYscgFileRoleService.java
0 → 100644
View file @
38c7dfea
package
com
.
ruoyi
.
project
.
ys
.
service
;
import
java.util.List
;
import
com.ruoyi.project.ys.domain.YscgFileRole
;
/**
* 成果单文件权限管理Service接口
*
* @author ruoyi
* @date 2025-10-31
*/
public
interface
IYscgFileRoleService
{
/**
* 查询成果单文件权限管理
*
* @param id 成果单文件权限管理主键
* @return 成果单文件权限管理
*/
public
YscgFileRole
selectYscgFileRoleById
(
Long
id
);
/**
* 查询成果单文件权限管理列表
*
* @param yscgFileRole 成果单文件权限管理
* @return 成果单文件权限管理集合
*/
public
List
<
YscgFileRole
>
selectYscgFileRoleList
(
YscgFileRole
yscgFileRole
);
/**
* 新增成果单文件权限管理
*
* @param yscgFileRole 成果单文件权限管理
* @return 结果
*/
public
int
insertYscgFileRole
(
YscgFileRole
yscgFileRole
);
/**
* 修改成果单文件权限管理
*
* @param yscgFileRole 成果单文件权限管理
* @return 结果
*/
public
int
updateYscgFileRole
(
YscgFileRole
yscgFileRole
);
/**
* 批量删除成果单文件权限管理
*
* @param ids 需要删除的成果单文件权限管理主键集合
* @return 结果
*/
public
int
deleteYscgFileRoleByIds
(
Long
[]
ids
);
/**
* 删除成果单文件权限管理信息
*
* @param id 成果单文件权限管理主键
* @return 结果
*/
public
int
deleteYscgFileRoleById
(
Long
id
);
public
int
batchYscgFileRole
(
Long
fileid
,
Long
[]
userIds
);
}
src/main/java/com/ruoyi/project/ys/service/impl/YscgFileRoleServiceImpl.java
0 → 100644
View file @
38c7dfea
package
com
.
ruoyi
.
project
.
ys
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.ruoyi.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.project.ys.mapper.YscgFileRoleMapper
;
import
com.ruoyi.project.ys.domain.YscgFileRole
;
import
com.ruoyi.project.ys.service.IYscgFileRoleService
;
import
static
com
.
ruoyi
.
common
.
utils
.
SecurityUtils
.
getUserId
;
/**
* 成果单文件权限管理Service业务层处理
*
* @author ruoyi
* @date 2025-10-31
*/
@Service
public
class
YscgFileRoleServiceImpl
implements
IYscgFileRoleService
{
@Autowired
private
YscgFileRoleMapper
yscgFileRoleMapper
;
/**
* 查询成果单文件权限管理
*
* @param id 成果单文件权限管理主键
* @return 成果单文件权限管理
*/
@Override
public
YscgFileRole
selectYscgFileRoleById
(
Long
id
)
{
return
yscgFileRoleMapper
.
selectYscgFileRoleById
(
id
);
}
/**
* 查询成果单文件权限管理列表
*
* @param yscgFileRole 成果单文件权限管理
* @return 成果单文件权限管理
*/
@Override
public
List
<
YscgFileRole
>
selectYscgFileRoleList
(
YscgFileRole
yscgFileRole
)
{
return
yscgFileRoleMapper
.
selectYscgFileRoleList
(
yscgFileRole
);
}
/**
* 新增成果单文件权限管理
*
* @param yscgFileRole 成果单文件权限管理
* @return 结果
*/
@Override
public
int
insertYscgFileRole
(
YscgFileRole
yscgFileRole
)
{
yscgFileRole
.
setCreatedBy
(
getUserId
()+
""
);
yscgFileRole
.
setCreatedTime
(
DateUtils
.
getNowDate
());
return
yscgFileRoleMapper
.
insertYscgFileRole
(
yscgFileRole
);
}
/**
* 修改成果单文件权限管理
*
* @param yscgFileRole 成果单文件权限管理
* @return 结果
*/
@Override
public
int
updateYscgFileRole
(
YscgFileRole
yscgFileRole
)
{
yscgFileRole
.
setUpdateBy
(
getUserId
()+
""
);
yscgFileRole
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
yscgFileRoleMapper
.
updateYscgFileRole
(
yscgFileRole
);
}
/**
* 批量删除成果单文件权限管理
*
* @param ids 需要删除的成果单文件权限管理主键
* @return 结果
*/
@Override
public
int
deleteYscgFileRoleByIds
(
Long
[]
ids
)
{
return
yscgFileRoleMapper
.
deleteYscgFileRoleByIds
(
ids
);
}
/**
* 删除成果单文件权限管理信息
*
* @param id 成果单文件权限管理主键
* @return 结果
*/
@Override
public
int
deleteYscgFileRoleById
(
Long
id
)
{
return
yscgFileRoleMapper
.
deleteYscgFileRoleById
(
id
);
}
@Override
public
int
batchYscgFileRole
(
Long
fileid
,
Long
[]
userIds
)
{
// 新增用户与角色管理
List
<
YscgFileRole
>
list
=
new
ArrayList
<
YscgFileRole
>();
for
(
Long
userId
:
userIds
)
{
YscgFileRole
ur
=
new
YscgFileRole
();
ur
.
setUserId
(
userId
);
ur
.
setFileid
(
fileid
);
ur
.
setIsshow
(
"Y"
);
ur
.
setCreatedBy
(
getUserId
()+
""
);
ur
.
setCreatedTime
(
DateUtils
.
getNowDate
());
list
.
add
(
ur
);
}
return
yscgFileRoleMapper
.
batchYscgFileRole
(
list
);
}
}
src/main/resources/mybatis/yscgFileRole/YscgFileRoleMapper.xml
0 → 100644
View file @
38c7dfea
<?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.project.ys.mapper.YscgFileRoleMapper"
>
<resultMap
type=
"YscgFileRole"
id=
"YscgFileRoleResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"fileid"
column=
"fileid"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
<result
property=
"isshow"
column=
"isshow"
/>
<result
property=
"isedit"
column=
"isedit"
/>
<result
property=
"isdel"
column=
"isdel"
/>
<result
property=
"createdBy"
column=
"created_by"
/>
<result
property=
"createdTime"
column=
"created_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"ext1"
column=
"ext1"
/>
<result
property=
"ext2"
column=
"ext2"
/>
<result
property=
"ext3"
column=
"ext3"
/>
</resultMap>
<sql
id=
"selectYscgFileRoleVo"
>
select a.id, a.fileid, a.user_id, s.nick_name, a.isshow, a.isedit, a.isdel, a.created_by, a.created_time, a.update_by, a.update_time, a.ext1, a.ext2, a.ext3 from yscg_file_role a
left join sys_user s on a.user_id = s.user_id
</sql>
<select
id=
"selectYscgFileRoleList"
parameterType=
"YscgFileRole"
resultMap=
"YscgFileRoleResult"
>
<include
refid=
"selectYscgFileRoleVo"
/>
<where>
<if
test=
"id != null "
>
and a.id = #{id}
</if>
<if
test=
"fileid != null "
>
and a.fileid = #{fileid}
</if>
<if
test=
"userId != null "
>
and a.user_id = #{userId}
</if>
<if
test=
"nickName != null and nickName != ''"
>
and s.nick_name like concat('%', #{nickName}, '%')
</if>
<if
test=
"isshow != null and isshow != ''"
>
and a.isshow = #{isshow}
</if>
<if
test=
"isedit != null and isedit != ''"
>
and a.isedit = #{isedit}
</if>
<if
test=
"isdel != null and isdel != ''"
>
and a.isdel = #{isdel}
</if>
<if
test=
"createdBy != null and createdBy != ''"
>
and a.created_by = #{createdBy}
</if>
<if
test=
"createdTime != null "
>
and a.created_time = #{createdTime}
</if>
<if
test=
"ext1 != null and ext1 != ''"
>
and a.ext1 = #{ext1}
</if>
<if
test=
"ext2 != null and ext2 != ''"
>
and a.ext2 = #{ext2}
</if>
<if
test=
"ext3 != null and ext3 != ''"
>
and a.ext3 = #{ext3}
</if>
</where>
</select>
<select
id=
"selectYscgFileRoleById"
parameterType=
"Long"
resultMap=
"YscgFileRoleResult"
>
<include
refid=
"selectYscgFileRoleVo"
/>
where a.id = #{id}
</select>
<insert
id=
"insertYscgFileRole"
parameterType=
"YscgFileRole"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into yscg_file_role
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fileid != null"
>
fileid,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"nickName != null"
>
nick_name,
</if>
<if
test=
"isshow != null"
>
isshow,
</if>
<if
test=
"isedit != null"
>
isedit,
</if>
<if
test=
"isdel != null"
>
isdel,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
<if
test=
"createdTime != null"
>
created_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"ext1 != null"
>
ext1,
</if>
<if
test=
"ext2 != null"
>
ext2,
</if>
<if
test=
"ext3 != null"
>
ext3,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fileid != null"
>
#{fileid},
</if>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"nickName != null"
>
#{nickName},
</if>
<if
test=
"isshow != null"
>
#{isshow},
</if>
<if
test=
"isedit != null"
>
#{isedit},
</if>
<if
test=
"isdel != null"
>
#{isdel},
</if>
<if
test=
"createdBy != null"
>
#{createdBy},
</if>
<if
test=
"createdTime != null"
>
#{createdTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"ext1 != null"
>
#{ext1},
</if>
<if
test=
"ext2 != null"
>
#{ext2},
</if>
<if
test=
"ext3 != null"
>
#{ext3},
</if>
</trim>
</insert>
<update
id=
"updateYscgFileRole"
parameterType=
"YscgFileRole"
>
update yscg_file_role
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"fileid != null"
>
fileid = #{fileid},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"nickName != null"
>
nick_name = #{nickName},
</if>
<if
test=
"isshow != null"
>
isshow = #{isshow},
</if>
<if
test=
"isedit != null"
>
isedit = #{isedit},
</if>
<if
test=
"isdel != null"
>
isdel = #{isdel},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy},
</if>
<if
test=
"createdTime != null"
>
created_time = #{createdTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"ext1 != null"
>
ext1 = #{ext1},
</if>
<if
test=
"ext2 != null"
>
ext2 = #{ext2},
</if>
<if
test=
"ext3 != null"
>
ext3 = #{ext3},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteYscgFileRoleById"
parameterType=
"Long"
>
delete from yscg_file_role where id = #{id}
</delete>
<delete
id=
"deleteYscgFileRoleByIds"
parameterType=
"String"
>
delete from yscg_file_role where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
<insert
id=
"batchYscgFileRole"
>
insert into yscg_file_role(fileid, user_id,isshow,created_by, created_time) values
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
","
>
(#{item.fileid},#{item.userId},#{item.isshow},#{item.createdBy},#{item.createdTime})
</foreach>
</insert>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment