Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ximai
mes
Commits
cd58819d
Commit
cd58819d
authored
Nov 22, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
8532b5ba
f2635a8b
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
163 additions
and
8 deletions
+163
-8
SysUserController.java
...va/com/ximai/web/controller/system/SysUserController.java
+28
-0
CopyAllByUserIdRequest.java
...in/java/com/ximai/web/request/CopyAllByUserIdRequest.java
+11
-0
messages.properties
admin/src/main/resources/i18n/messages.properties
+4
-1
messages_en.properties
admin/src/main/resources/i18n/messages_en.properties
+4
-1
messages_th.properties
admin/src/main/resources/i18n/messages_th.properties
+3
-1
messages_zh_CN.properties
admin/src/main/resources/i18n/messages_zh_CN.properties
+4
-1
ProTaskServiceImpl.java
...m/ximai/mes/pro/service/impl/task/ProTaskServiceImpl.java
+2
-0
SysRoleMapper.java
.../src/main/java/com/ximai/system/mapper/SysRoleMapper.java
+5
-0
SysUserMapper.java
.../src/main/java/com/ximai/system/mapper/SysUserMapper.java
+6
-0
SysUserPostMapper.java
.../main/java/com/ximai/system/mapper/SysUserPostMapper.java
+3
-0
ISysUserService.java
...c/main/java/com/ximai/system/service/ISysUserService.java
+4
-0
SysUserServiceImpl.java
...ava/com/ximai/system/service/impl/SysUserServiceImpl.java
+40
-2
SysRoleMapper.xml
system/src/main/resources/mapper/system/SysRoleMapper.xml
+14
-1
SysUserMapper.xml
system/src/main/resources/mapper/system/SysUserMapper.xml
+31
-0
SysUserPostMapper.xml
...em/src/main/resources/mapper/system/SysUserPostMapper.xml
+4
-1
No files found.
admin/src/main/java/com/ximai/web/controller/system/SysUserController.java
View file @
cd58819d
...
...
@@ -12,12 +12,15 @@ import com.ximai.common.core.dto.SysUserExcelExport;
import
com.ximai.common.core.dto.SysUserExcelImport
;
import
com.ximai.common.core.page.TableDataInfo
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.common.utils.MessageUtils
;
import
com.ximai.common.utils.SecurityUtils
;
import
com.ximai.common.utils.data.ExceptionUtil
;
import
com.ximai.common.utils.data.StringUtils
;
import
com.ximai.common.utils.excel.ExcelWriter
;
import
com.ximai.system.service.ISysPostService
;
import
com.ximai.system.service.ISysRoleService
;
import
com.ximai.system.service.ISysUserService
;
import
com.ximai.web.request.CopyAllByUserIdRequest
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -203,4 +206,29 @@ public class SysUserController extends BaseController {
userService
.
insertUserAuth
(
userId
,
roleIds
);
return
success
();
}
/**
* 拷贝用户所有资源
*/
@PreAuthorize
(
"@ss.hasPermi('system:user:edit')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
GRANT
)
@PostMapping
(
"/checkCopyAllByUserId"
)
public
AjaxResult
checkCopyAllByUserId
(
@RequestBody
CopyAllByUserIdRequest
copyAllByUserIdRequest
)
{
userService
.
checkCopyAllByUserId
(
copyAllByUserIdRequest
.
getCopiedUserId
(),
copyAllByUserIdRequest
.
getUserIds
());
return
success
();
}
/**
* 拷贝用户所有资源
*/
@PreAuthorize
(
"@ss.hasPermi('system:user:edit')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
GRANT
)
@PostMapping
(
"/copyAllByUserId"
)
public
AjaxResult
copyAllByUserId
(
@RequestBody
CopyAllByUserIdRequest
copyAllByUserIdRequest
)
{
userService
.
copyAllByUserId
(
copyAllByUserIdRequest
.
getCopiedUserId
(),
copyAllByUserIdRequest
.
getUserIds
());
return
success
();
}
}
admin/src/main/java/com/ximai/web/request/CopyAllByUserIdRequest.java
0 → 100644
View file @
cd58819d
package
com
.
ximai
.
web
.
request
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
CopyAllByUserIdRequest
{
Long
copiedUserId
;
List
<
Long
>
userIds
;
}
admin/src/main/resources/i18n/messages.properties
View file @
cd58819d
...
...
@@ -226,4 +226,7 @@ rule.currentSerial.error= \u8BE5\u4EA7\u54C1\u5E8F\u5217\u53F7\u5269\u4F59:{0}\u
#
\u
5DE5
\u
4F5C
\u5355\u5143\u
7F16
\u
4E0D
\u
552F
\u
4E00
md.workUnit.error.workunitCode.unique =
\u
5DE5
\u5355\u5355\u5143\u
7F16
\u7801\u
5DF2
\u
5B58
\u5728
#被删除数据已被使用错误
delete.data.error.occupied =
\u
8be5
\u6570\u
636e
\u
5df2
\u
7ecf
\u
88ab
\u5173\u8054\u
4f7f
\u7528\u
ff0c
\u
65e0
\u
6cd5
\u5220\u9664
\ No newline at end of file
delete.data.error.occupied =
\u
8be5
\u6570\u
636e
\u
5df2
\u
7ecf
\u
88ab
\u5173\u8054\u
4f7f
\u7528\u
ff0c
\u
65e0
\u
6cd5
\u5220\u9664
#权限复制,复制用户和被复制用户重叠
user.copyuser.repeat =
\u
590d
\u5236\u7528\u6237\u
4e2d
\u
5b58
\u5728\u
60a8
\u
52fe
\u9009\u7684\u
88ab
\u
590d
\u5236\u7528\u6237\u
ff0c
\u7528\u6237\u
540d :{0}
user.lack.of.permissions =
\u
5c97
\u
4f4d
\u
8d44
\u
6e90
\u6216\u
89d2
\u8272\u
4e3a
\u
7a7a
\u
ff0c
\u
60a8
\u
786e
\u
5b9a
\u9700\u8981\u
590d
\u5236\u5417\u
ff1f
\ No newline at end of file
admin/src/main/resources/i18n/messages_en.properties
View file @
cd58819d
...
...
@@ -216,4 +216,7 @@ rule.currentSerial.error= The remaining quantity of the product serial number is
#工作单元编不唯一
md.workUnit.error.workunitCode.unique = unique workunitCode.
#被删除数据已被使用错误
delete.data.error.occupied = The data that needs to be deleted has been used
\ No newline at end of file
delete.data.error.occupied = The data that needs to be deleted has been used
user.copyuser.repeat = The employee with copied permission exists among the employees with copied permission :{0}
user.lack.of.permissions = Job resources or roles are empty, are you sure you need to copy them?
\ No newline at end of file
admin/src/main/resources/i18n/messages_th.properties
View file @
cd58819d
...
...
@@ -226,4 +226,6 @@ rule.currentSerial.error= \u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1C\u0E25
#\u5DE5\u4F5C\u5355\u5143\u7F16\u4E0D\u552F\u4E00
md.workUnit.error.workunitCode.unique
=
\u
0E2B
\u
0E21
\u
0E32
\u
0E22
\u
0E40
\u
0E25
\u
0E02
\u
0E17
\u
0E35
\u
0E48
\u
0E21
\u
0E35
\u
0E2D
\u
0E22
\u
0E39
\u
0E48
\u
0E41
\u
0E25
\u
0E49
\u
0E27
#被删除数据已被使用错误
delete.data.error.occupied
=
\u
0e02
\u
0e49
\u
0e2d
\u
0e21
\u
0e39
\u
0e25
\u
0e17
\u
0e35
\u
0e48
\u
0e15
\u
0e49
\u
0e2d
\u
0e07
\u
0e01
\u
0e32
\u
0e23
\u
0e25
\u
0e1a
\u
0e44
\u
0e14
\u
0e49
\u
0e16
\u
0e39
\u
0e01
\u
0e43
\u
0e0a
\u
0e49
\u
0e44
\u
0e1b
\u
0e41
\u
0e25
\u
0e49
\u
0e27
\ No newline at end of file
delete.data.error.occupied
=
\u
0e02
\u
0e49
\u
0e2d
\u
0e21
\u
0e39
\u
0e25
\u
0e17
\u
0e35
\u
0e48
\u
0e15
\u
0e49
\u
0e2d
\u
0e07
\u
0e01
\u
0e32
\u
0e23
\u
0e25
\u
0e1a
\u
0e44
\u
0e14
\u
0e49
\u
0e16
\u
0e39
\u
0e01
\u
0e43
\u
0e0a
\u
0e49
\u
0e44
\u
0e1b
\u
0e41
\u
0e25
\u
0e49
\u
0e27
user.copyuser.repeat
=
\u
0e1e
\u
0e19
\u
0e31
\u
0e01
\u
0e07
\u
0e32
\u
0e19
\u
0e17
\u
0e35
\u
0e48
\u
0e16
\u
0e39
\u
0e01
\u
0e04
\u
0e31
\u
0e14
\u
0e25
\u
0e2d
\u
0e01
\u
0e2a
\u
0e34
\u
0e17
\u
0e18
\u
0e34
\u
0e4c
\u
0e21
\u
0e35
\u
0e2d
\u
0e22
\u
0e39
\u
0e48
\u
0e43
\u
0e19
\u
0e1e
\u
0e19
\u
0e31
\u
0e01
\u
0e07
\u
0e32
\u
0e19
\u
0e17
\u
0e35
\u
0e48
\u
0e16
\u
0e39
\u
0e01
\u
0e04
\u
0e31
\u
0e14
\u
0e25
\u
0e2d
\u
0e01
\u
0e2a
\u
0e34
\u
0e17
\u
0e18
\u
0e34
\u
0e4c :{0}
user.lack.of.permissions
=
\u
0e17
\u
0e23
\u
0e31
\u
0e1e
\u
0e22
\u
0e32
\u
0e01
\u
0e23
\u
0e42
\u
0e1e
\u
0e2a
\u
0e15
\u
0e4c
\u
0e2b
\u
0e23
\u
0e37
\u
0e2d
\u
0e1a
\u
0e17
\u
0e1a
\u
0e32
\u
0e17
\u
0e27
\u
0e48
\u
0e32
\u
0e07
\u
0e40
\u
0e1b
\u
0e25
\u
0e48
\u
0e32
\u
0e04
\u
0e38
\u
0e13
\u
0e41
\u
0e19
\u
0e48
\u
0e43
\u
0e08
\u
0e2b
\u
0e23
\u
0e37
\u
0e2d
\u
0e44
\u
0e21
\u
0e48
\u
0e27
\u
0e48
\u
0e32
\u
0e04
\u
0e38
\u
0e13
\u
0e08
\u
0e33
\u
0e40
\u
0e1b
\u
0e47
\u
0e19
\u
0e15
\u
0e49
\u
0e2d
\u
0e07
\u
0e04
\u
0e31
\u
0e14
\u
0e25
\u
0e2d
\u
0e01
\u
003f
\ No newline at end of file
admin/src/main/resources/i18n/messages_zh_CN.properties
View file @
cd58819d
...
...
@@ -219,4 +219,7 @@ rule.currentSerial.error= \u8BE5\u4EA7\u54C1\u5E8F\u5217\u53F7\u5269\u4F59:{0}\u
#工作单元编不唯一
md.workUnit.error.workunitCode.unique =
\u
5de5
\u5355\u5355\u5143\u
7f16
\u7801\u
5df2
\u
5b58
\u5728
#被删除数据已被使用错误
delete.data.error.occupied =
\u
8be5
\u6570\u
636e
\u
5df2
\u
7ecf
\u
88ab
\u5173\u8054\u
4f7f
\u7528\u
ff0c
\u
65e0
\u
6cd5
\u5220\u9664
\ No newline at end of file
delete.data.error.occupied =
\u
8be5
\u6570\u
636e
\u
5df2
\u
7ecf
\u
88ab
\u5173\u8054\u
4f7f
\u7528\u
ff0c
\u
65e0
\u
6cd5
\u5220\u9664
user.copyuser.repeat =
\u
590d
\u5236\u7528\u6237\u
4e2d
\u
5b58
\u5728\u
60a8
\u
52fe
\u9009\u7684\u
88ab
\u
590d
\u5236\u7528\u6237\u
ff0c
\u7528\u6237\u
540d :{0}
user.lack.of.permissions =
\u
5c97
\u
4f4d
\u
8d44
\u
6e90
\u6216\u
89d2
\u8272\u
4e3a
\u
7a7a
\u
ff0c
\u
60a8
\u
786e
\u
5b9a
\u9700\u8981\u
590d
\u5236\u5417\u
ff1f
\ No newline at end of file
mes/src/main/java/com/ximai/mes/pro/service/impl/task/ProTaskServiceImpl.java
View file @
cd58819d
...
...
@@ -1359,6 +1359,7 @@ public class ProTaskServiceImpl implements IProTaskService {
query
.
eq
(
proTask
.
getOutsourced
()
!=
null
,
"ptw.outsourced"
,
proTask
.
getOutsourced
());
query
.
eq
(
StringUtils
.
isNotEmpty
(
proTask
.
getArrangeCode
()),
"t.arrange_code"
,
proTask
.
getArrangeCode
());
query
.
gt
(
proTask
.
getAllowProduce
()
!=
null
&&
proTask
.
getAllowProduce
()
==
1
,
"t.quantity_wait"
,
0
);
//query.le(proTask.getAllowProduce() != null && proTask.getAllowProduce() == 0, "t.quantity_wait", 0);
query
.
gt
(
"ptw.quantity"
,
0
);
query
.
orderByAsc
(
"statusIndex"
).
orderByAsc
(
"ptw.schedule_start_date"
);
//搜索条件为工单号查询相应任务ID作为查询条件
...
...
@@ -1388,6 +1389,7 @@ public class ProTaskServiceImpl implements IProTaskService {
query
.
eq
(
proTask
.
getOutsourced
()
!=
null
,
"ptw.outsourced"
,
proTask
.
getOutsourced
());
query
.
eq
(
StringUtils
.
isNotEmpty
(
proTask
.
getArrangeCode
()),
"t.task_code"
,
proTask
.
getArrangeCode
());
query
.
gt
(
proTask
.
getAllowProduce
()
!=
null
&&
proTask
.
getAllowProduce
()
==
1
,
"t.quantity_wait"
,
0
);
// query.le(proTask.getAllowProduce() != null && proTask.getAllowProduce() == 0, "t.quantity_wait", 0);
query
.
gt
(
"ptw.quantity"
,
0
);
query
.
orderByAsc
(
"statusIndex"
).
orderByAsc
(
"ptw.schedule_start_date"
);
list
=
this
.
selectProTaskJoinTaskWorkUnit
(
query
);
...
...
system/src/main/java/com/ximai/system/mapper/SysRoleMapper.java
View file @
cd58819d
...
...
@@ -2,6 +2,7 @@ package com.ximai.system.mapper;
import
java.util.List
;
import
com.ximai.common.core.domain.entity.SysRole
;
import
org.apache.ibatis.annotations.Param
;
/**
* 角色表 数据层
...
...
@@ -103,4 +104,8 @@ public interface SysRoleMapper
* @return 结果
*/
public
int
deleteRoleByIds
(
Long
[]
roleIds
);
void
inserAll
(
List
<
Long
>
roleList
,
List
<
Long
>
userIds
);
void
deleteByUserids
(
@Param
(
"userIds"
)
List
<
Long
>
userIds
);
}
system/src/main/java/com/ximai/system/mapper/SysUserMapper.java
View file @
cd58819d
...
...
@@ -135,4 +135,10 @@ public interface SysUserMapper {
@Select
(
value
=
"select * from sys_user ${ew.customSqlSegment}"
)
List
<
SysUser
>
selectListByQw
(
@Param
(
"ew"
)
QueryWrapper
<
SysUser
>
user
);
void
batchWorkunitWorker
(
@Param
(
"copiedUserId"
)
Long
copiedUserId
,
@Param
(
"userId"
)
Long
userId
,
@Param
(
"username"
)
String
username
);
void
deleteWorkunitWorkerByUserIds
(
@Param
(
"userIds"
)
List
<
Long
>
userIds
);
List
<
Long
>
selectWorkunitWorkerByUserIds
(
@Param
(
"copiedUserId"
)
Long
copiedUserId
);
}
system/src/main/java/com/ximai/system/mapper/SysUserPostMapper.java
View file @
cd58819d
...
...
@@ -2,6 +2,7 @@ package com.ximai.system.mapper;
import
java.util.List
;
import
com.ximai.system.domain.SysUserPost
;
import
org.apache.ibatis.annotations.Param
;
/**
* 用户与岗位关联表 数据层
...
...
@@ -40,4 +41,6 @@ public interface SysUserPostMapper
* @return 结果
*/
public
int
batchUserPost
(
List
<
SysUserPost
>
userPostList
);
List
<
Long
>
selectPostIdByUserId
(
@Param
(
"copiedUserId"
)
Long
copiedUserId
);
}
system/src/main/java/com/ximai/system/service/ISysUserService.java
View file @
cd58819d
...
...
@@ -228,4 +228,8 @@ public interface ISysUserService {
void
userCreate
(
List
<
PersonVo
>
personVos
);
void
copyAllByUserId
(
Long
copiedUserId
,
List
<
Long
>
userIds
);
void
checkCopyAllByUserId
(
Long
copiedUserId
,
List
<
Long
>
userIds
);
}
system/src/main/java/com/ximai/system/service/impl/SysUserServiceImpl.java
View file @
cd58819d
...
...
@@ -11,6 +11,7 @@ import com.ximai.common.exception.ServiceException;
import
com.ximai.common.utils.MessageUtils
;
import
com.ximai.common.utils.SecurityUtils
;
import
com.ximai.common.utils.data.DateUtils
;
import
com.ximai.common.utils.data.ExceptionUtil
;
import
com.ximai.common.utils.data.StringUtils
;
import
com.ximai.common.utils.bean.BeanValidators
;
import
com.ximai.common.utils.excel.ExcelReader
;
...
...
@@ -28,7 +29,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
javax.validation.Validator
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
...
...
@@ -65,7 +65,6 @@ public class SysUserServiceImpl implements ISysUserService {
@Autowired
protected
Validator
validator
;
/**
* 根据条件分页查询用户列表
*
...
...
@@ -577,4 +576,43 @@ public class SysUserServiceImpl implements ISysUserService {
}
}
@Override
@Transactional
public
void
copyAllByUserId
(
Long
copiedUserId
,
List
<
Long
>
userIds
)
{
SysUser
sysUser
=
userMapper
.
selectUserById
(
copiedUserId
);
ExceptionUtil
.
checkTrueThrowException
(
userIds
.
contains
(
copiedUserId
),
MessageUtils
.
message
(
"user.copyuser.repeat"
,
sysUser
.
getUserName
()));
List
<
Long
>
roleList
=
roleMapper
.
selectRoleListByUserId
(
copiedUserId
);
roleMapper
.
deleteByUserids
(
userIds
);
//批量增加关联角色
if
(
StringUtils
.
isNotNull
(
roleList
))
{
// 新增用户与角色管理
List
<
SysUserRole
>
list
=
new
ArrayList
<
SysUserRole
>();
for
(
Long
userId
:
userIds
){
for
(
Long
roleId
:
roleList
)
{
SysUserRole
ur
=
new
SysUserRole
();
ur
.
setUserId
(
userId
);
ur
.
setRoleId
(
roleId
);
list
.
add
(
ur
);
}
}
if
(
list
.
size
()
>
0
)
{
userRoleMapper
.
batchUserRole
(
list
);
}
}
//List<Long> postList = userPostMapper.selectPostIdByUserId(copiedUserId);
//批量插入岗位资源
userMapper
.
deleteWorkunitWorkerByUserIds
(
userIds
);
for
(
Long
userId
:
userIds
){
userMapper
.
batchWorkunitWorker
(
copiedUserId
,
userId
,
SecurityUtils
.
getUsername
());
}
}
@Override
public
void
checkCopyAllByUserId
(
Long
copiedUserId
,
List
<
Long
>
userIds
)
{
List
<
Long
>
roleList
=
roleMapper
.
selectRoleListByUserId
(
copiedUserId
);
List
<
Long
>
workunitIds
=
userMapper
.
selectWorkunitWorkerByUserIds
(
copiedUserId
);
SysUser
sysUser
=
userMapper
.
selectUserById
(
copiedUserId
);
ExceptionUtil
.
checkTrueThrowException
(
roleList
.
size
()
<
1
||
workunitIds
.
size
()
<
1
,
MessageUtils
.
message
(
"user.lack.of.permissions"
,
sysUser
.
getNickName
()));
}
}
system/src/main/resources/mapper/system/SysRoleMapper.xml
View file @
cd58819d
...
...
@@ -121,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</insert>
<update
id=
"updateRole"
parameterType=
"SysRole"
>
update sys_role
<set>
...
...
@@ -148,5 +149,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{roleId}
</foreach>
</delete>
<delete
id=
"deleteByUserids"
>
delete from sys_user_role where user_id in
<foreach
collection=
"userIds"
open=
"("
item=
"userId"
close=
")"
separator=
","
>
#{userId}
</foreach>
</delete>
<insert
id=
"inserAll"
>
insert sys_user_role (user_id,role_id)
values
<foreach
collection=
"userIds"
open=
"("
close=
")"
item=
"userId"
separator=
","
>
select #{userId} , role_id from sys_user_role where
</foreach>
</insert>
</mapper>
system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
cd58819d
...
...
@@ -189,6 +189,9 @@
from sys_user
where email = #{email} limit 1
</select>
<select
id=
"selectWorkunitWorkerByUserIds"
resultType=
"java.lang.Long"
>
select workunit_id from md_workunit_worker where user_id = #{copiedUserId}
</select>
<insert
id=
"insertUser"
parameterType=
"SysUser"
useGeneratedKeys=
"true"
keyProperty=
"userId"
>
insert into sys_user(
...
...
@@ -223,6 +226,28 @@
sysdate()
)
</insert>
<insert
id=
"batchWorkunitWorker"
>
insert into md_workunit_worker
(workunit_id,
post_id,
post_name,
user_id,
user_name,
nick_name,
remark,
create_by,
create_time)
select
workunit_id,
post_id ,
post_name,
#{userId},
user_name,
nick_name,
remark,
#{username},
now() from md_workunit_worker where user_id = #{copiedUserId}
</insert>
<update
id=
"updateUser"
parameterType=
"SysUser"
>
update sys_user
...
...
@@ -276,5 +301,11 @@
#{userId}
</foreach>
</delete>
<delete
id=
"deleteWorkunitWorkerByUserIds"
>
delete from md_workunit_worker where user_id in
<foreach
collection=
"userIds"
open=
"("
item=
"userId"
close=
")"
separator=
","
>
#{userId}
</foreach>
</delete>
</mapper>
system/src/main/resources/mapper/system/SysUserPostMapper.xml
View file @
cd58819d
...
...
@@ -16,8 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select
id=
"countUserPostById"
resultType=
"Integer"
>
select count(1) from sys_user_post where post_id=#{postId}
</select>
<select
id=
"selectPostIdByUserId"
resultType=
"java.lang.Long"
>
select post_id from sys_user_post where user_id = #{copiedUserId}
</select>
<delete
id=
"deleteUserPost"
parameterType=
"Long"
>
<delete
id=
"deleteUserPost"
parameterType=
"Long"
>
delete from sys_user_post where user_id in
<foreach
collection=
"array"
item=
"userId"
open=
"("
separator=
","
close=
")"
>
#{userId}
...
...
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