Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cxt104926
Stusystem
提交
23ac4cf2
S
Stusystem
项目概览
cxt104926
/
Stusystem
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Stusystem
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
23ac4cf2
编写于
3月 29, 2021
作者:
cxt104926
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优:分页/增:树形结构工具/改:班级表结构
上级
acb50b73
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
199 addition
and
102 deletion
+199
-102
pom.xml
pom.xml
+6
-1
src/main/java/com/stu/stusystem/common/OffsetPage.java
src/main/java/com/stu/stusystem/common/OffsetPage.java
+7
-7
src/main/java/com/stu/stusystem/controller/system/StuClassController.java
...m/stu/stusystem/controller/system/StuClassController.java
+4
-4
src/main/java/com/stu/stusystem/mapper/system/StuClassMapper.java
.../java/com/stu/stusystem/mapper/system/StuClassMapper.java
+11
-0
src/main/java/com/stu/stusystem/mapper/system/StuMapper.java
src/main/java/com/stu/stusystem/mapper/system/StuMapper.java
+0
-2
src/main/java/com/stu/stusystem/model/em/TreeModel.java
src/main/java/com/stu/stusystem/model/em/TreeModel.java
+23
-0
src/main/java/com/stu/stusystem/model/system/StuClass.java
src/main/java/com/stu/stusystem/model/system/StuClass.java
+9
-8
src/main/java/com/stu/stusystem/service/system/StuClassService.java
...ava/com/stu/stusystem/service/system/StuClassService.java
+12
-39
src/main/java/com/stu/stusystem/service/system/UserManagerService.java
.../com/stu/stusystem/service/system/UserManagerService.java
+1
-1
src/main/java/com/stu/stusystem/service/system/dto/StuClassDTO.java
...ava/com/stu/stusystem/service/system/dto/StuClassDTO.java
+10
-10
src/main/java/com/stu/stusystem/service/system/dto/StuClassQuery.java
...a/com/stu/stusystem/service/system/dto/StuClassQuery.java
+8
-3
src/main/java/com/stu/stusystem/service/system/vo/StuClassVO.java
.../java/com/stu/stusystem/service/system/vo/StuClassVO.java
+14
-10
src/main/java/com/stu/stusystem/util/CopyBeanUtil.java
src/main/java/com/stu/stusystem/util/CopyBeanUtil.java
+0
-1
src/main/java/com/stu/stusystem/util/TreeModelUtil.java
src/main/java/com/stu/stusystem/util/TreeModelUtil.java
+51
-0
src/main/resources/application.yml
src/main/resources/application.yml
+1
-1
src/main/resources/config/liquibase/20210323_creat_table_stuClass.xml
...ources/config/liquibase/20210323_creat_table_stuClass.xml
+8
-8
src/main/resources/mapper/StuMapper.xml
src/main/resources/mapper/StuMapper.xml
+9
-7
src/main/resources/mapper/system/StuClassMapper.xml
src/main/resources/mapper/system/StuClassMapper.xml
+25
-0
未找到文件。
pom.xml
浏览文件 @
23ac4cf2
...
...
@@ -71,7 +71,7 @@
<dependency>
<groupId>
org.mybatis.spring.boot
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
<version>
2.1.
3
</version>
<version>
2.1.
4
</version>
</dependency>
<!-- MyBatis分页支持jar -->
<dependency>
...
...
@@ -79,6 +79,11 @@
<artifactId>
pagehelper
</artifactId>
<version>
5.2.0
</version>
</dependency>
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<version>
1.3.0
</version>
</dependency>
<dependency>
<groupId>
javax.validation
</groupId>
...
...
src/main/java/com/stu/stusystem/common/OffsetPage.java
浏览文件 @
23ac4cf2
...
...
@@ -11,20 +11,20 @@ public class OffsetPage {
public
final
static
int
MAX_LIMIT
=
50
;
@ApiModelProperty
(
"当前页码"
)
private
Integer
page
Num
;
private
Integer
page
;
@ApiModelProperty
(
"当前页数量"
)
private
Integer
limit
;
public
Integer
getPage
Num
()
{
if
(
this
.
page
Num
==
null
){
this
.
page
Num
=
1
;
public
Integer
getPage
()
{
if
(
this
.
page
==
null
){
this
.
page
=
1
;
}
return
page
Num
;
return
page
;
}
public
void
setPage
Num
(
Integer
pageNum
)
{
this
.
page
Num
=
pageNum
;
public
void
setPage
(
Integer
page
)
{
this
.
page
=
page
;
}
public
Integer
getLimit
()
{
...
...
src/main/java/com/stu/stusystem/controller/system/StuClassController.java
浏览文件 @
23ac4cf2
...
...
@@ -10,7 +10,7 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.
HashMap
;
import
java.util.
List
;
/**
* @author: cxt
...
...
@@ -50,9 +50,9 @@ public class StuClassController {
}
@ApiOperation
(
"查询所有班级id、名字"
)
@GetMapping
(
"/get
All
"
)
public
HashMap
<
String
,
String
>
getStuClassAll
(){
return
this
.
stuClassService
.
getStuClass
All
();
@GetMapping
(
"/get
/treeData
"
)
public
List
<
Object
>
getStuClassTreeData
(){
return
this
.
stuClassService
.
getStuClass
TreeData
();
}
@Autowired
...
...
src/main/java/com/stu/stusystem/mapper/system/StuClassMapper.java
浏览文件 @
23ac4cf2
package
com.stu.stusystem.mapper.system
;
import
com.stu.stusystem.common.CommonMapper
;
import
com.stu.stusystem.model.em.TreeModel
;
import
com.stu.stusystem.model.system.StuClass
;
import
com.stu.stusystem.service.system.dto.StuClassQuery
;
import
com.stu.stusystem.service.system.vo.StuClassVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* @author cxt
* @date 2020/9/8
*/
public
interface
StuClassMapper
extends
CommonMapper
<
StuClass
>
{
List
<
StuClassVO
>
getStuClassPage
(
@Param
(
"query"
)
StuClassQuery
query
);
@Select
(
"select id,name,pid from stu_class"
)
List
<
TreeModel
>
treeSelect
();
}
src/main/java/com/stu/stusystem/mapper/system/StuMapper.java
浏览文件 @
23ac4cf2
...
...
@@ -5,7 +5,6 @@ import com.stu.stusystem.model.system.StuUser;
import
com.stu.stusystem.service.system.dto.UserManagerQuery
;
import
com.stu.stusystem.service.system.vo.StuUserVO
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
...
...
@@ -13,7 +12,6 @@ import java.util.List;
* @author cxt
* @date 2020/9/8
*/
@Repository
public
interface
StuMapper
extends
CommonMapper
<
StuUser
>
{
List
<
StuUserVO
>
getStuMangerPage
(
@Param
(
"query"
)
UserManagerQuery
query
);
}
src/main/java/com/stu/stusystem/model/em/TreeModel.java
0 → 100644
浏览文件 @
23ac4cf2
package
com.stu.stusystem.model.em
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author: cxt
* @time: 2021/3/29
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
TreeModel
{
private
String
id
;
private
String
name
;
private
String
pid
;
//
// @JsonInclude(JsonInclude.Include.NON_EMPTY)
// private List<TreeModel> child;
}
src/main/java/com/stu/stusystem/model/system/StuClass.java
浏览文件 @
23ac4cf2
...
...
@@ -18,18 +18,19 @@ public class StuClass extends BaseModel {
@Id
private
String
id
;
//
学院
名称
private
String
hospitalN
ame
;
// 名称
private
String
n
ame
;
// 系名称
private
String
departmentName
;
// 父id
private
String
pid
;
// 标志(1:学院;2:系;3:班级)
private
Integer
sign
;
// 年级
private
String
grade
;
// 班级名称
private
String
className
;
// 班主任id
// 管理者id
private
String
userId
;
}
\ No newline at end of file
src/main/java/com/stu/stusystem/service/system/StuClassService.java
浏览文件 @
23ac4cf2
package
com.stu.stusystem.service.system
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.stu.stusystem.common.ApiException
;
import
com.stu.stusystem.mapper.system.StuClassMapper
;
import
com.stu.stusystem.model.em.TreeModel
;
import
com.stu.stusystem.model.system.StuClass
;
import
com.stu.stusystem.model.system.StuUser
;
import
com.stu.stusystem.service.system.dto.StuClassDTO
;
import
com.stu.stusystem.service.system.dto.StuClassQuery
;
import
com.stu.stusystem.service.system.vo.StuClassVO
;
import
com.stu.stusystem.util.CopyBeanUtil
;
import
com.stu.stusystem.util.TreeModelUtil
;
import
com.stu.stusystem.util.UUIDUtil
;
import
org.apache.shiro.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -17,10 +20,7 @@ import org.springframework.stereotype.Service;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.*
;
/**
* @author cxt
...
...
@@ -35,21 +35,9 @@ public class StuClassService {
* 分页查询列表
*/
public
PageInfo
<
StuClassVO
>
getStuClassPage
(
StuClassQuery
query
)
{
PageHelper
.
startPage
(
query
.
getPageNum
(),
query
.
getLimit
());
Example
example
=
new
Example
(
StuClass
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
query
.
getClassName
()
!=
null
)
{
criteria
.
andEqualTo
(
"className"
,
query
.
getClassName
());
}
if
(
query
.
getUserId
()
!=
null
)
{
criteria
.
andEqualTo
(
"user_id"
,
query
.
getUserId
());
}
example
.
orderBy
(
"createTime"
).
desc
();
List
<
StuClass
>
stuCLasses
=
this
.
stuClassMapper
.
selectByExample
(
example
);
StuClassVO
stuClassVO
=
new
StuClassVO
();
List
<
StuClassVO
>
es
=
CopyBeanUtil
.
copyList
(
stuCLasses
,
stuClassVO
);
return
new
PageInfo
<>(
es
);
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
StuClassVO
>
stuClassPage
=
this
.
stuClassMapper
.
getStuClassPage
(
query
);
return
new
PageInfo
<>(
stuClassPage
);
}
/**
...
...
@@ -83,7 +71,7 @@ public class StuClassService {
*/
public
void
saveStuClass
(
StuClassDTO
dto
)
{
List
<
StuClass
>
stuClasses
=
this
.
stuClassMapper
.
selectByExample
(
new
Example
.
Builder
(
StuClass
.
class
)
.
where
(
WeekendSqls
.<
StuClass
>
custom
().
andEqualTo
(
StuClass:
:
get
ClassName
,
dto
.
getClass
Name
())).
build
());
.
where
(
WeekendSqls
.<
StuClass
>
custom
().
andEqualTo
(
StuClass:
:
get
Name
,
dto
.
get
Name
())).
build
());
if
(
stuClasses
.
size
()
!=
0
)
{
throw
new
ApiException
(
"您添加的班级已存在"
);
}
...
...
@@ -100,28 +88,13 @@ public class StuClassService {
}
/**
* 查询全部的班级
* 查询全部的班级
:树形结构
*/
public
HashMap
<
String
,
String
>
getStuClassAll
()
{
List
<
StuClass
>
stuClasses
=
this
.
stuClassMapper
.
selectAll
();
HashMap
<
String
,
String
>
map
=
new
HashMap
<>();
for
(
StuClass
sc
:
stuClasses
)
{
map
.
put
(
sc
.
getId
(),
sc
.
getClassName
());
}
return
map
;
public
List
<
Object
>
getStuClassTreeData
()
{
List
<
TreeModel
>
models
=
this
.
stuClassMapper
.
treeSelect
();
return
TreeModelUtil
.
buildTreeList
(
models
);
}
/**
* 流:并行,串行
* filter,通过条件过滤出元素
* distinct,去重
* limit,会返回一个不超过给定长度的流,取前几个
* skip,返回一个扔掉前 n 个元素的流,扔掉前几个
* map,对流中做统一处理(加前/后缀)
* flatMap,里面需要的参数是个流,流的扁平化处理,比如将字符串拆分成一个个的字母集合。层级深时候使用flatmap
* sorted,排序
*/
@Autowired
public
void
setStuClassMapper
(
StuClassMapper
stuClassMapper
)
{
this
.
stuClassMapper
=
stuClassMapper
;
...
...
src/main/java/com/stu/stusystem/service/system/UserManagerService.java
浏览文件 @
23ac4cf2
...
...
@@ -33,7 +33,7 @@ public class UserManagerService {
* 分页查询
*/
public
PageInfo
<
StuUserVO
>
getStuMangerPage
(
UserManagerQuery
query
)
{
PageHelper
.
startPage
(
query
.
getPage
Num
(),
query
.
getLimit
());
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
StuUserVO
>
stuMangerPage
=
this
.
stuMapper
.
getStuMangerPage
(
query
);
return
new
PageInfo
<>(
stuMangerPage
);
}
...
...
src/main/java/com/stu/stusystem/service/system/dto/StuClassDTO.java
浏览文件 @
23ac4cf2
...
...
@@ -18,18 +18,18 @@ public class StuClassDTO {
@Id
private
String
id
;
@ApiModelProperty
(
"
学院
名称"
)
private
String
hospitalN
ame
;
@ApiModelProperty
(
"名称"
)
private
String
n
ame
;
@ApiModelProperty
(
"
系名称
"
)
private
String
departmentName
;
@ApiModelProperty
(
"
父id
"
)
private
String
pid
;
@ApiModelProperty
(
"年级"
)
private
String
grade
;
@ApiModelProperty
(
"班级名称"
)
private
String
className
;
@ApiModelProperty
(
"标志(1:学院;2:系;3:班级)"
)
private
Integer
sign
;
@ApiModelProperty
(
"
班主任
id"
)
@ApiModelProperty
(
"
管理者
id"
)
private
String
userId
;
@ApiModelProperty
(
"年级"
)
private
String
grade
;
}
src/main/java/com/stu/stusystem/service/system/dto/StuClassQuery.java
浏览文件 @
23ac4cf2
...
...
@@ -14,9 +14,14 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
public
class
StuClassQuery
extends
OffsetPage
{
@ApiModelProperty
(
"班级名称"
)
private
String
className
;
private
String
id
;
@ApiModelProperty
(
"班主任id"
)
@ApiModelProperty
(
"父id"
)
private
String
pid
;
@ApiModelProperty
(
"名称"
)
private
String
name
;
@ApiModelProperty
(
"管理者id"
)
private
String
userId
;
}
src/main/java/com/stu/stusystem/service/system/vo/StuClassVO.java
浏览文件 @
23ac4cf2
package
com.stu.stusystem.service.system.vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -17,18 +18,21 @@ public class StuClassVO {
@Id
private
String
id
;
// 学院名称
private
String
hospitalN
ame
;
@ApiModelProperty
(
"名称"
)
private
String
n
ame
;
// 系名称
private
String
departmentName
;
@ApiModelProperty
(
"父id"
)
private
String
pid
;
// 年级
private
String
grade
;
// 班级名称
private
String
className
;
@ApiModelProperty
(
"标志(1:学院;2:系;3:班级)"
)
private
Integer
sign
;
// 班主任id
@ApiModelProperty
(
"管理者id"
)
private
String
userId
;
@ApiModelProperty
(
"姓名"
)
private
String
userName
;
@ApiModelProperty
(
"年级"
)
private
String
grade
;
}
src/main/java/com/stu/stusystem/util/CopyBeanUtil.java
浏览文件 @
23ac4cf2
...
...
@@ -54,7 +54,6 @@ public class CopyBeanUtil {
list
.
add
(
null
);
continue
;
}
// T e = ta.newInstance(); // 获取到拷贝目标类型
copy
(
t
,
ta
);
list
.
add
(
ta
);
}
...
...
src/main/java/com/stu/stusystem/util/TreeModelUtil.java
0 → 100644
浏览文件 @
23ac4cf2
package
com.stu.stusystem.util
;
import
com.stu.stusystem.model.em.TreeModel
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author: cxt
* @time: 2021/3/29
* 树形数据工具
*/
@Data
public
class
TreeModelUtil
{
public
static
List
<
Object
>
buildTreeList
(
List
<
TreeModel
>
tm
)
{
if
(
tm
.
size
()
==
0
)
{
return
null
;
}
List
<
Object
>
list
=
new
ArrayList
<>();
// 最后返回的数据
for
(
TreeModel
x
:
tm
)
{
Map
<
String
,
Object
>
mapArr
=
new
LinkedHashMap
<>();
if
(
x
.
getPid
().
equals
(
""
))
{
mapArr
.
put
(
"id"
,
x
.
getId
());
mapArr
.
put
(
"name"
,
x
.
getName
());
mapArr
.
put
(
"pid"
,
x
.
getPid
());
mapArr
.
put
(
"child"
,
getTreeList
(
x
.
getId
(),
tm
));
list
.
add
(
mapArr
);
}
}
return
list
;
}
public
static
List
<?>
getTreeList
(
String
id
,
List
<
TreeModel
>
treeModels
)
{
List
<
Object
>
lists
=
new
ArrayList
<>();
for
(
TreeModel
a
:
treeModels
)
{
Map
<
String
,
Object
>
childArray
=
new
LinkedHashMap
<>();
if
(
a
.
getPid
().
equals
(
id
))
{
childArray
.
put
(
"id"
,
a
.
getId
());
childArray
.
put
(
"name"
,
a
.
getName
());
childArray
.
put
(
"pid"
,
a
.
getPid
());
childArray
.
put
(
"child"
,
getTreeList
(
a
.
getId
(),
treeModels
));
// 递归调用本方法
lists
.
add
(
childArray
);
}
}
return
lists
;
}
}
src/main/resources/application.yml
浏览文件 @
23ac4cf2
...
...
@@ -35,7 +35,7 @@ spring:
# 配置myBatis
mybatis
:
mapper-locations
:
classpath:mapper/*.xml
mapper-locations
:
classpath:mapper/*
*/*
.xml
# 配置PageHelper方言
pagehelper
:
...
...
src/main/resources/config/liquibase/20210323_creat_table_stuClass.xml
浏览文件 @
23ac4cf2
...
...
@@ -17,24 +17,24 @@
<constraints
primaryKey=
"true"
nullable=
"false"
/>
</column>
<column
name=
"
hospital_name"
type=
"varchar(50)"
remarks=
"学院
名称"
>
<constraints
nullable=
"
tru
e"
/>
<column
name=
"
name"
type=
"varchar(50)"
remarks=
"
名称"
>
<constraints
nullable=
"
fals
e"
/>
</column>
<column
name=
"
department_name"
type=
"varchar(50)"
remarks=
"系名称
"
>
<column
name=
"
pid"
type=
"varchar(22)"
remarks=
"父级id
"
>
<constraints
nullable=
"true"
/>
</column>
<column
name=
"
grade"
type=
"varchar(15)"
remarks=
"年级
"
>
<constraints
nullable=
"
tru
e"
/>
<column
name=
"
sign"
type=
"tinyint(1)"
remarks=
"标志(1:学院;2:系;3:班级)
"
>
<constraints
nullable=
"
fals
e"
/>
</column>
<column
name=
"
class_name"
type=
"varchar(50)"
remarks=
"班级名称
"
>
<column
name=
"
user_id"
type=
"varchar(22)"
remarks=
"管理者id
"
>
<constraints
nullable=
"false"
/>
</column>
<column
name=
"
user_id"
type=
"varchar(22)"
remarks=
"班主任id
"
>
<constraints
nullable=
"
fals
e"
/>
<column
name=
"
grade"
type=
"varchar(15)"
remarks=
"年级
"
>
<constraints
nullable=
"
tru
e"
/>
</column>
<column
name=
"create_time"
type=
"time"
remarks=
"创建时间"
>
...
...
src/main/resources/mapper/StuMapper.xml
浏览文件 @
23ac4cf2
...
...
@@ -2,20 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.stu.stusystem.mapper.system.StuMapper"
>
<select
id=
"getStuMangerPage"
resultType=
"com.stu.stusystem.service.system.vo.StuUserVO"
>
SELECT id,name,account,
class_id AS classId ,
phone,id_card AS idCard
FROM stu_user
SELECT id,
name,
account,
class_id AS classId,
phone,
id_card AS idCard
FROM stu_user
<where>
<if
test=
"query.name != null and query.name != ''"
>
name like concat('%', #{query.name},'%')
name like concat('%', #{query.name},
'%')
</if>
<if
test=
"param1.classId != null and param1.classId != ''"
>
AND class_id = #{query.classId}
</if>
<if
test=
"query.phone != null and query.phone != ''"
>
AND phone = #{query.phone}
AND phone = #{query.phone}
</if>
</where>
</select>
...
...
src/main/resources/mapper/system/StuClassMapper.xml
0 → 100644
浏览文件 @
23ac4cf2
<?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.stu.stusystem.mapper.system.StuClassMapper"
>
<select
id=
"getStuClassPage"
resultType=
"com.stu.stusystem.service.system.vo.StuClassVO"
>
SELECT sc.id, sc.name, sc.pid, sc.sign, sc.grade, sc.user_id AS userId, su.name AS userName
FROM stu_class sc
LEFT JOIN stu_user su ON sc.user_id = su.id
<where>
<if
test=
"query.id != null and query.id != ''"
>
sc.id = #{query.id,jdbcType=VARCHAR}
</if>
<if
test=
"query.pid != null and query.pid != ''"
>
AND sc.pid = #{query.pid}
</if>
<if
test=
"query.name != null and query.name != ''"
>
AND sc.name like concat('%', #{query.name}, '%')
</if>
<if
test=
"query.userId != null and query.userId != ''"
>
AND sc.user_id = #{query.userId,jdbcType=VARCHAR}
</if>
</where>
order by sc.create_time desc
</select>
</mapper>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录