Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
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
王飞
vehicle-quality-review
Commits
8856858f
Commit
8856858f
authored
Feb 29, 2024
by
王飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'gaixiankang' into 'dev'
PDF - 检验报告模板 (一半)、通过角色名查询用户信息接口 See merge request
!109
parents
e8d94514
32023026
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
556 additions
and
106 deletions
+556
-106
InspectionReportPdfVO.java
.../main/java/com/ruoyi/domain/vo/InspectionReportPdfVO.java
+153
-0
PdfTemplateManagementService.java
.../java/com/ruoyi/service/PdfTemplateManagementService.java
+17
-0
BookServiceImpl.java
...src/main/java/com/ruoyi/service/impl/BookServiceImpl.java
+82
-82
PdfTemplateManagementServiceImpl.java
.../ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
+180
-0
PdfTemplateManagementController.java
...n/java/com/ruoyi/web/PdfTemplateManagementController.java
+42
-0
StandardController.java
...eview/src/main/java/com/ruoyi/web/StandardController.java
+1
-0
UserByRoleRequest.java
...rc/main/java/com/ruoyi/web/request/UserByRoleRequest.java
+29
-0
receipt_template_02_27.pdf
...ew/src/main/resources/template/receipt_template_02_27.pdf
+0
-0
SysUserController.java
...va/com/ruoyi/web/controller/system/SysUserController.java
+28
-1
ISysUserService.java
...c/main/java/com/ruoyi/system/service/ISysUserService.java
+24
-23
No files found.
quality-review/src/main/java/com/ruoyi/domain/vo/InspectionReportPdfVO.java
0 → 100644
View file @
8856858f
package
com
.
ruoyi
.
domain
.
vo
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 检验报告PDF VO类
* @author gxk
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
InspectionReportPdfVO
{
/**
* 报告编号
*/
private
String
reportNumber
;
/**
* 产品名称
*/
private
String
productName
;
/**
* 产品型号
*/
private
String
productModel
;
/**
* 委托单位
*/
private
String
entrustedUnit
;
/**
* 检验中心名称
*/
private
String
inspectionCenterName
;
/**
* 检验中心地址
*/
private
String
inspectionCenterAddress
;
/**
* 检验中心电话
*/
private
String
inspectionCenterTelephone
;
/**
* 检验中心邮编
*/
private
String
inspectionCenterPostcode
;
/**
* 委托单位地址
*/
private
String
clientAddress
;
/**
* 委托单位电话
*/
private
String
entrustedUnitTelephone
;
/**
* 委托单位邮编
*/
private
String
clientPostalCode
;
/**
* 样品名称
*/
private
String
sampleName
;
/**
* 型号规格
*/
private
String
typeSpecification
;
/**
* 生产企业
*/
private
String
productionEnterprise
;
/**
* 送样者
*/
private
String
sampleSender
;
/**
* 送样日期
*/
private
String
sampleDeliveryDate
;
/**
* 样品数量
*/
private
String
sampleQuantity
;
/**
* 生产日期
*/
private
String
productionDate
;
/**
* 检验项目
*/
private
String
inspectionItem
;
/**
* 检验结论
*/
private
String
testConclusion
;
/**
* 签发日期
*/
private
String
issueDate
;
/**
* 备注
*/
private
String
remark
;
/**
* 任务编号
*/
private
String
taskNumber
;
/**
*
*/
private
String
sampleSum
;
/**
* 车辆类型
*/
private
String
vehicleType
;
/**
* 车辆识别码
*/
private
String
vehicleIdentificationNumber
;
/**
* 样品编号汇总
*/
private
String
sampleNumberSummary
;
}
quality-review/src/main/java/com/ruoyi/service/PdfTemplateManagementService.java
0 → 100644
View file @
8856858f
package
com
.
ruoyi
.
service
;
import
javax.servlet.http.HttpServletResponse
;
/**
* PDF模板管理Service接口
* @author gxk
*/
public
interface
PdfTemplateManagementService
{
/**
* 检验报告PDF下载
* @param response
* @throws Exception
*/
void
generateInspectionReport
(
HttpServletResponse
response
)
throws
Exception
;
}
quality-review/src/main/java/com/ruoyi/service/impl/BookServiceImpl.java
View file @
8856858f
...
...
@@ -270,60 +270,60 @@ public class BookServiceImpl extends ServiceImpl<BookMapper, Book> implements Bo
@Override
public
void
generateTempPDF
(
HttpServletResponse
response
)
throws
Exception
{
PdfReader
reader
=
null
;
PdfStamper
ps
=
null
;
OutputStream
fos
=
null
;
ByteArrayOutputStream
bos
=
null
;
Base64
.
InputStream
fin
=
null
;
ServletOutputStream
out
=
null
;
try
{
// 模板绝对路径--服务器
String
fileName
=
"/template/receipt_template.pdf"
;
// 读取现有模板内容
reader
=
new
PdfReader
(
fileName
);
// 创建输出流
bos
=
new
ByteArrayOutputStream
();
// 实例化PdfStamper准备编辑pdf内容
ps
=
new
PdfStamper
(
reader
,
bos
);
// 获取表单所有元素
AcroFields
fields
=
ps
.
getAcroFields
();
// 设置具体字体格式的编码, 不设置的话中文可能不会显示
BaseFont
bf
=
BaseFont
.
createFont
(
"STSongStd-Light"
,
"UniGB-UCS2-H"
,
BaseFont
.
NOT_EMBEDDED
);
fields
.
addSubstitutionFont
(
bf
);
// 动态添加所需要的数据,key跟模板中对应文本域名称一致
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"code"
,
"1234567890fjdksjfdsfdsffdsjfdssssssttttttttttttttt"
);
map
.
put
(
"table_image"
,
"C:/Users/gxk/Pictures/Saved Pictures/nvm.png"
);
// 渲染
fillData
(
fields
,
map
,
ps
);
//必须要调用这个,否则文档不会生成的
ps
.
setFormFlattening
(
true
);
if
(
ps
!=
null
){
ps
.
close
();
}
//生成pdf路径存放的路径
fos
=
response
.
getOutputStream
();
fos
.
write
(
bos
.
toByteArray
());
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
finally
{
if
(
fos
!=
null
){
fos
.
flush
();
fos
.
close
();
}
if
(
bos
!=
null
){
bos
.
close
();
}
if
(
reader
!=
null
){
reader
.
close
();
}
}
//
PdfReader reader = null;
//
PdfStamper ps = null;
//
OutputStream fos = null;
//
ByteArrayOutputStream bos = null;
//
Base64.InputStream fin = null;
//
ServletOutputStream out = null;
//
try {
//
// 模板绝对路径--服务器
//
String fileName = "/template/receipt_template.pdf";
//
// 读取现有模板内容
//
reader = new PdfReader(fileName);
//
// 创建输出流
//
bos = new ByteArrayOutputStream();
//
// 实例化PdfStamper准备编辑pdf内容
//
ps = new PdfStamper(reader, bos);
//
//
// 获取表单所有元素
//
AcroFields fields = ps.getAcroFields();
//
//
// 设置具体字体格式的编码, 不设置的话中文可能不会显示
//
BaseFont bf = BaseFont.createFont("STSongStd-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
//
fields.addSubstitutionFont(bf);
//
//
// 动态添加所需要的数据,key跟模板中对应文本域名称一致
//
Map<String, String> map = new HashMap<>();
//
map.put("code", "1234567890fjdksjfdsfdsffdsjfdssssssttttttttttttttt");
//
map.put("table_image", "C:/Users/gxk/Pictures/Saved Pictures/nvm.png");
//
//
// 渲染
//
fillData(fields, map, ps);
//
//
//必须要调用这个,否则文档不会生成的
//
ps.setFormFlattening(true);
//
if(ps != null){
//
ps.close();
//
}
//
//生成pdf路径存放的路径
//
fos = response.getOutputStream();
//
fos.write(bos.toByteArray());
//
//
}catch (Exception e){
//
e.printStackTrace();
//
}finally {
//
if(fos!=null){
//
fos.flush();
//
fos.close();
//
}
//
if (bos != null){
//
bos.close();
//
}
//
if(reader != null){
//
reader.close();
//
}
//
}
}
/**
...
...
@@ -333,19 +333,19 @@ public class BookServiceImpl extends ServiceImpl<BookMapper, Book> implements Bo
* @param ps
*/
public
void
fillData
(
AcroFields
fields
,
Map
<
String
,
String
>
data
,
PdfStamper
ps
)
{
try
{
for
(
String
key
:
data
.
keySet
())
{
String
value
=
data
.
get
(
key
);
if
(
key
.
contains
(
"image"
))
{
addImageToPdf
(
key
,
fields
,
ps
,
value
);
continue
;
}
// 为字段赋值,注意字段名称是区分大小写的
fields
.
setField
(
key
,
value
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
//
try {
//
for (String key : data.keySet()) {
//
String value = data.get(key);
//
if (key.contains("image")) {
//
addImageToPdf(key, fields, ps, value);
//
continue;
//
}
//
// 为字段赋值,注意字段名称是区分大小写的
//
fields.setField(key, value);
//
}
//
} catch (Exception e) {
//
e.printStackTrace();
//
}
}
/**
...
...
@@ -360,21 +360,21 @@ public class BookServiceImpl extends ServiceImpl<BookMapper, Book> implements Bo
*/
private
static
void
addImageToPdf
(
String
key
,
AcroFields
form
,
PdfStamper
stamper
,
String
filePath
)
throws
DocumentException
,
IOException
,
IOException
{
// 通过图片域名获取所在页和坐标,左下角为起点
int
pageNo
=
form
.
getFieldPositions
(
key
).
get
(
0
).
page
;
Rectangle
signRect
=
form
.
getFieldPositions
(
key
).
get
(
0
).
position
;
float
x
=
signRect
.
getLeft
();
float
y
=
signRect
.
getBottom
();
// 读图片
Image
image
=
Image
.
getInstance
(
filePath
);
// 获取操作的页面
PdfContentByte
under
=
stamper
.
getOverContent
(
pageNo
);
// 根据域的大小缩放图片
image
.
scaleToFit
(
signRect
.
getWidth
()
*
2
,
signRect
.
getHeight
());
// 添加图片并设置位置(个人通过此设置使得图片垂直水平居中,可参考,具体情况已实际为准)
image
.
setAbsolutePosition
(
x
,
y
);
under
.
addImage
(
image
);
//
// 通过图片域名获取所在页和坐标,左下角为起点
//
int pageNo = form.getFieldPositions(key).get(0).page;
//
Rectangle signRect = form.getFieldPositions(key).get(0).position;
//
float x = signRect.getLeft();
//
float y = signRect.getBottom();
//
//
// 读图片
//
Image image = Image.getInstance(filePath);
//
// 获取操作的页面
//
PdfContentByte under = stamper.getOverContent(pageNo);
//
// 根据域的大小缩放图片
//
image.scaleToFit(signRect.getWidth() * 2, signRect.getHeight());
//
// 添加图片并设置位置(个人通过此设置使得图片垂直水平居中,可参考,具体情况已实际为准)
//
image.setAbsolutePosition(x, y);
//
under.addImage(image);
}
}
...
...
quality-review/src/main/java/com/ruoyi/service/impl/PdfTemplateManagementServiceImpl.java
0 → 100644
View file @
8856858f
package
com
.
ruoyi
.
service
.
impl
;
import
com.itextpdf.text.DocumentException
;
import
com.itextpdf.text.Image
;
import
com.itextpdf.text.Rectangle
;
import
com.itextpdf.text.pdf.*
;
import
com.ruoyi.domain.vo.PhotoStorageVO
;
import
com.ruoyi.service.PdfTemplateManagementService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.lang.reflect.Field
;
import
java.util.Map
;
/**
* PDF模板管理Service业务层处理
* @author gxk
*/
@Service
@Transactional
public
class
PdfTemplateManagementServiceImpl
implements
PdfTemplateManagementService
{
/**
* 检验报告PDF下载
* @param response
*/
@Override
public
void
generateInspectionReport
(
HttpServletResponse
response
)
throws
Exception
{
PdfReader
reader
=
null
;
PdfStamper
ps
=
null
;
OutputStream
fos
=
null
;
ByteArrayOutputStream
bos
=
null
;
try
{
// 模板绝对路径--服务器
String
fileName
=
"/template/receipt_template_02_27.pdf"
;
// 读取现有模板内容
reader
=
new
PdfReader
(
fileName
);
// 创建输出流
bos
=
new
ByteArrayOutputStream
();
// 实例化PdfStamper准备编辑pdf内容
ps
=
new
PdfStamper
(
reader
,
bos
);
// 获取表单所有元素
AcroFields
fields
=
ps
.
getAcroFields
();
// 设置具体字体格式的编码, 不设置的话中文可能不会显示
BaseFont
bf
=
BaseFont
.
createFont
(
"STSongStd-Light"
,
"UniGB-UCS2-H"
,
BaseFont
.
NOT_EMBEDDED
);
fields
.
addSubstitutionFont
(
bf
);
// 渲染
// fillData(fields, map, ps);
renderData
(
fields
);
PhotoStorageVO
photoStorageVO
=
new
PhotoStorageVO
();
Class
<?
extends
PhotoStorageVO
>
aClass
=
photoStorageVO
.
getClass
();
Field
[]
declaredFields
=
aClass
.
getDeclaredFields
();
for
(
Field
field
:
declaredFields
)
{
String
name
=
field
.
getName
();
System
.
out
.
println
(
name
);
}
//必须要调用这个,否则文档不会生成的
ps
.
setFormFlattening
(
true
);
if
(
ps
!=
null
){
ps
.
close
();
}
//生成pdf路径存放的路径
fos
=
response
.
getOutputStream
();
fos
.
write
(
bos
.
toByteArray
());
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
finally
{
if
(
fos
!=
null
){
fos
.
flush
();
fos
.
close
();
}
if
(
bos
!=
null
){
bos
.
close
();
}
if
(
reader
!=
null
){
reader
.
close
();
}
}
}
/**
* 渲染数据
* @param fields
*/
private
void
renderData
(
AcroFields
fields
)
{
}
/**
* 填充模板中的数据
* @param fields
* @param data 是一个Map<String,String> 主要存储 key 表单模板中的单元格名 value为想要赋的值,遍历
* @param ps
*/
public
void
fillData
(
AcroFields
fields
,
Map
<
String
,
String
>
data
,
PdfStamper
ps
)
{
try
{
for
(
String
key
:
data
.
keySet
())
{
String
value
=
data
.
get
(
key
);
if
(
key
.
contains
(
"image"
))
{
addImageToPdf
(
key
,
fields
,
ps
,
value
);
continue
;
}
// 为字段赋值,注意字段名称是区分大小写的
fields
.
setField
(
key
,
value
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* 添加图片
* @param key 应为模板名
* @param form 动态字段
* @param stamper
* @param filePath 本地图片路径
* @throws DocumentException
* @throws IOException
* @throws IOException
*/
private
static
void
addImageToPdf
(
String
key
,
AcroFields
form
,
PdfStamper
stamper
,
String
filePath
)
throws
DocumentException
,
IOException
,
IOException
{
// 通过图片域名获取所在页和坐标,左下角为起点
int
pageNo
=
form
.
getFieldPositions
(
key
).
get
(
0
).
page
;
Rectangle
signRect
=
form
.
getFieldPositions
(
key
).
get
(
0
).
position
;
float
x
=
signRect
.
getLeft
();
float
y
=
signRect
.
getBottom
();
// 读图片
Image
image
=
Image
.
getInstance
(
filePath
);
// 获取操作的页面
PdfContentByte
under
=
stamper
.
getOverContent
(
pageNo
);
// 根据域的大小缩放图片
image
.
scaleToFit
(
signRect
.
getWidth
()
*
2
,
signRect
.
getHeight
());
// 添加图片并设置位置(个人通过此设置使得图片垂直水平居中,可参考,具体情况已实际为准)
image
.
setAbsolutePosition
(
x
,
y
);
under
.
addImage
(
image
);
}
/**
* 通过属性名获取属性在对象里的值
* @param obj
* @param propertyName
* @return
* @param <T>
*/
public
static
<
T
>
T
getPropertyValue
(
Object
obj
,
String
propertyName
)
{
try
{
// 获取对象的类
Class
<?>
objClass
=
obj
.
getClass
();
// 获取类的指定属性
Field
field
=
objClass
.
getDeclaredField
(
propertyName
);
// 设置属性为可访问
field
.
setAccessible
(
true
);
// 获取属性的值
@SuppressWarnings
(
"unchecked"
)
T
value
=
(
T
)
field
.
get
(
obj
);
return
value
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
}
quality-review/src/main/java/com/ruoyi/web/PdfTemplateManagementController.java
0 → 100644
View file @
8856858f
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.annotation.Anonymous
;
import
com.ruoyi.service.PdfTemplateManagementService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletResponse
;
/**
* @author gxk
*/
@Api
(
tags
=
"PDF模板管理"
)
@RestController
@RequestMapping
(
"/pdf"
)
public
class
PdfTemplateManagementController
{
@Autowired
private
PdfTemplateManagementService
pdfTemplateManagementService
;
/**
* 检验报告PDF下载
* @param response
*/
@Anonymous
@ApiOperation
(
"检验报告PDF下载"
)
@GetMapping
(
value
=
"/inspectionReport"
,
produces
=
"application/json"
)
public
void
download
(
HttpServletResponse
response
)
{
response
.
setHeader
(
"content-disposition"
,
"attachment;fileName="
+
"ReceiptPrinter.pdf"
);
try
{
// demo-模板
pdfTemplateManagementService
.
generateInspectionReport
(
response
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
quality-review/src/main/java/com/ruoyi/web/StandardController.java
View file @
8856858f
package
com
.
ruoyi
.
web
;
import
com.ruoyi.common.annotation.Anonymous
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.R
;
...
...
quality-review/src/main/java/com/ruoyi/web/request/UserByRoleRequest.java
0 → 100644
View file @
8856858f
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
/**
* 通过角色查询用户信息DTO
* @author gxk
*/
@Data
@ApiModel
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
UserByRoleRequest
{
@ApiModelProperty
(
"角色名称"
)
@NotNull
(
message
=
"角色名称不能为空"
)
@NotEmpty
(
message
=
"角色名称不能为空"
)
private
String
roleName
;
}
quality-review/src/main/resources/template/receipt_template_02_27.pdf
0 → 100644
View file @
8856858f
File added
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
View file @
8856858f
...
...
@@ -3,6 +3,12 @@ package com.ruoyi.web.controller.system;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletResponse
;
import
cn.hutool.core.collection.CollUtil
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.web.request.UserByRoleRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
...
...
@@ -37,9 +43,10 @@ import com.ruoyi.system.service.ISysUserService;
/**
* 用户信息
*
*
* @author ruoyi
*/
@Api
(
tags
=
"用户信息"
)
@RestController
@RequestMapping
(
"/system/user"
)
public
class
SysUserController
extends
BaseController
...
...
@@ -70,6 +77,26 @@ public class SysUserController extends BaseController
return
getDataTable
(
list
);
}
/**
* 通过角色名获取用户信息
* @param request
* @return
*/
@ApiOperation
(
"通过角色名获取用户信息"
)
@PostMapping
(
"/getUserByRole"
)
public
R
<
List
<
SysUser
>>
getUserByRole
(
@Validated
@RequestBody
UserByRoleRequest
request
)
{
// 通过角色名获取角色信息
SysRole
role
=
new
SysRole
();
role
.
setRoleName
(
request
.
getRoleName
());
List
<
SysRole
>
roleList
=
roleService
.
selectRoleList
(
role
);
if
(
CollUtil
.
isNotEmpty
(
roleList
))
{
List
<
SysUser
>
list
=
userService
.
selectUserListByRoleId
(
roleList
.
get
(
0
).
getRoleId
());
return
R
.
ok
(
list
);
}
else
{
return
R
.
fail
(
"角色不存在"
);
}
}
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"param1"
,
value
=
"arg[1]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
EXPORT
)
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
View file @
8856858f
...
...
@@ -5,7 +5,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
/**
* 用户 业务层
*
*
* @author ruoyi
*/
public
interface
ISysUserService
...
...
@@ -20,7 +20,7 @@ public interface ISysUserService
/**
* 根据条件分页查询用户列表
*
*
* @param user 用户信息
* @return 用户信息集合信息
*/
...
...
@@ -28,7 +28,7 @@ public interface ISysUserService
/**
* 根据条件分页查询已分配用户角色列表
*
*
* @param user 用户信息
* @return 用户信息集合信息
*/
...
...
@@ -43,7 +43,7 @@ public interface ISysUserService
/**
* 根据条件分页查询未分配用户角色列表
*
*
* @param user 用户信息
* @return 用户信息集合信息
*/
...
...
@@ -51,7 +51,7 @@ public interface ISysUserService
/**
* 通过用户名查询用户
*
*
* @param userName 用户名
* @return 用户对象信息
*/
...
...
@@ -59,7 +59,7 @@ public interface ISysUserService
/**
* 通过用户ID查询用户
*
*
* @param userId 用户ID
* @return 用户对象信息
*/
...
...
@@ -67,7 +67,7 @@ public interface ISysUserService
/**
* 根据用户ID查询用户所属角色组
*
*
* @param userName 用户名
* @return 结果
*/
...
...
@@ -75,7 +75,7 @@ public interface ISysUserService
/**
* 根据用户ID查询用户所属岗位组
*
*
* @param userName 用户名
* @return 结果
*/
...
...
@@ -83,7 +83,7 @@ public interface ISysUserService
/**
* 校验用户名称是否唯一
*
*
* @param user 用户信息
* @return 结果
*/
...
...
@@ -107,21 +107,21 @@ public interface ISysUserService
/**
* 校验用户是否允许操作
*
*
* @param user 用户信息
*/
public
void
checkUserAllowed
(
SysUser
user
);
/**
* 校验用户是否有数据权限
*
*
* @param userId 用户id
*/
public
void
checkUserDataScope
(
Long
userId
);
/**
* 新增用户信息
*
*
* @param user 用户信息
* @return 结果
*/
...
...
@@ -129,7 +129,7 @@ public interface ISysUserService
/**
* 注册用户信息
*
*
* @param user 用户信息
* @return 结果
*/
...
...
@@ -137,7 +137,7 @@ public interface ISysUserService
/**
* 修改用户信息
*
*
* @param user 用户信息
* @return 结果
*/
...
...
@@ -145,7 +145,7 @@ public interface ISysUserService
/**
* 用户授权角色
*
*
* @param userId 用户ID
* @param roleIds 角色组
*/
...
...
@@ -153,7 +153,7 @@ public interface ISysUserService
/**
* 修改用户状态
*
*
* @param user 用户信息
* @return 结果
*/
...
...
@@ -161,7 +161,7 @@ public interface ISysUserService
/**
* 修改用户基本信息
*
*
* @param user 用户信息
* @return 结果
*/
...
...
@@ -169,7 +169,7 @@ public interface ISysUserService
/**
* 修改用户头像
*
*
* @param userName 用户名
* @param avatar 头像地址
* @return 结果
...
...
@@ -178,7 +178,7 @@ public interface ISysUserService
/**
* 重置用户密码
*
*
* @param user 用户信息
* @return 结果
*/
...
...
@@ -186,7 +186,7 @@ public interface ISysUserService
/**
* 重置用户密码
*
*
* @param userName 用户名
* @param password 密码
* @return 结果
...
...
@@ -195,7 +195,7 @@ public interface ISysUserService
/**
* 通过用户ID删除用户
*
*
* @param userId 用户ID
* @return 结果
*/
...
...
@@ -203,7 +203,7 @@ public interface ISysUserService
/**
* 批量删除用户信息
*
*
* @param userIds 需要删除的用户ID
* @return 结果
*/
...
...
@@ -211,11 +211,12 @@ public interface ISysUserService
/**
* 导入用户数据
*
*
* @param userList 用户数据列表
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
* @param operName 操作用户
* @return 结果
*/
public
String
importUser
(
List
<
SysUser
>
userList
,
Boolean
isUpdateSupport
,
String
operName
);
}
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