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
0f815c4e
Commit
0f815c4e
authored
Jan 30, 2024
by
W_Y
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.91isoft.com:90/wangfei/vehicle-quality-review
into wangdingyi
parents
9ebcd874
39825f8c
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1111 additions
and
13 deletions
+1111
-13
pom.xml
quality-review/pom.xml
+5
-1
Sample.java
quality-review/src/main/java/com/ruoyi/domain/Sample.java
+92
-0
UserPhotoStorage.java
...view/src/main/java/com/ruoyi/domain/UserPhotoStorage.java
+56
-0
AutomobileEnterpriseMapper.java
...ain/java/com/ruoyi/mapper/AutomobileEnterpriseMapper.java
+1
-2
SampleManagementMapper.java
...rc/main/java/com/ruoyi/mapper/SampleManagementMapper.java
+62
-0
UserPhotoStorageMapper.java
...rc/main/java/com/ruoyi/mapper/UserPhotoStorageMapper.java
+42
-0
SampleManagementService.java
.../main/java/com/ruoyi/service/SampleManagementService.java
+56
-0
UserPhotoStorageService.java
.../main/java/com/ruoyi/service/UserPhotoStorageService.java
+41
-0
SampleManagementServiceImpl.java
...a/com/ruoyi/service/impl/SampleManagementServiceImpl.java
+113
-0
UserPhotoStorageServiceImpl.java
...a/com/ruoyi/service/impl/UserPhotoStorageServiceImpl.java
+76
-0
SampleManagementController.java
...c/main/java/com/ruoyi/web/SampleManagementController.java
+103
-0
UserPhotoStorageController.java
...c/main/java/com/ruoyi/web/UserPhotoStorageController.java
+91
-0
SampleManagementGetInfoRequest.java
...com/ruoyi/web/request/SampleManagementGetInfoRequest.java
+13
-0
SampleManagementRequest.java
...n/java/com/ruoyi/web/request/SampleManagementRequest.java
+28
-0
UserPhotoStorageCreateRequest.java
.../com/ruoyi/web/request/UserPhotoStorageCreateRequest.java
+24
-0
UserPhotoStorageEditRequest.java
...va/com/ruoyi/web/request/UserPhotoStorageEditRequest.java
+27
-0
UserPhotoStorageListRequest.java
...va/com/ruoyi/web/request/UserPhotoStorageListRequest.java
+31
-0
UserPhotoStorageRemoveRequest.java
.../com/ruoyi/web/request/UserPhotoStorageRemoveRequest.java
+23
-0
SampleManagementMapper.xml
...view/src/main/resources/mapper/SampleManagementMapper.xml
+163
-0
UserPhotoStorageMapper.xml
...view/src/main/resources/mapper/UserPhotoStorageMapper.xml
+59
-0
pom.xml
ruoyi-framework/pom.xml
+1
-6
SecurityConfig.java
.../main/java/com/ruoyi/framework/config/SecurityConfig.java
+4
-4
No files found.
quality-review/pom.xml
View file @
0f815c4e
...
...
@@ -61,7 +61,11 @@
<artifactId>
itext-asian
</artifactId>
<version>
5.2.0
</version>
</dependency>
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
ruoyi-framework
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
</project>
quality-review/src/main/java/com/ruoyi/domain/Sample.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
domain
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 样品管理对象 t_sample_management
*
* @author ruoyi
* @date 2024-01-29
*/
@ApiModel
@TableName
(
value
=
"t_sample"
)
@Data
public
class
Sample
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键 */
@ApiModelProperty
(
"主键"
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
id
;
/** 车企ID 与车企信息表的id关联 */
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"关联车企的id"
)
private
Long
enterpriseId
;
/** 车辆识别码 */
@ApiModelProperty
(
"车辆识别码"
)
private
String
identificationCode
;
/** 样品编号 */
@ApiModelProperty
(
"样品编号"
)
private
String
sampleNumber
;
/** 样品名称 */
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
/** 送样着 */
@ApiModelProperty
(
"送样着"
)
private
String
sampleSender
;
/** 样品数量 */
@ApiModelProperty
(
"样品数量"
)
private
String
numberOfSamples
;
/** 送样日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
"送样日期"
)
private
Date
deliveryDate
;
/** 生产日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
"生产日期 "
)
private
Date
manufactureDate
;
/** 生产企业 */
@ApiModelProperty
(
"生产企业"
)
private
String
manufacturingEnterprise
;
/** 0:整车样品 1:零部件样品 */
@ApiModelProperty
(
"0:整车样品 1:零部件样品"
)
private
String
flag
;
/** 生产企业名称*/
@ApiModelProperty
(
"生产企业名称"
)
private
String
enterpriseName
;
/** 商标 */
@ApiModelProperty
(
"商标"
)
private
String
trademark
;
/** 备注 */
@ApiModelProperty
(
"备注"
)
private
String
remark
;
/** 样品照片 */
@ApiModelProperty
(
"样品照片"
)
private
String
samplePhotos
;
}
quality-review/src/main/java/com/ruoyi/domain/UserPhotoStorage.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
domain
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* 用户照片存储对象 t_user_photo_storage
*
* @author gxk
* @date 2024-01-29
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
value
=
"用户照片存储"
)
@TableName
(
value
=
"t_user_photo_storage"
)
public
class
UserPhotoStorage
{
/** 主键 */
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@ApiModelProperty
(
"ID"
)
private
Long
id
;
/** 用户id */
@ApiModelProperty
(
"用户ID"
)
private
Long
userId
;
/** 用户账号 */
@ApiModelProperty
(
"用户账号"
)
private
String
username
;
/** 图片路径 */
@ApiModelProperty
(
"图片路径"
)
private
String
path
;
/** 创建时间 */
@ApiModelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/** 逻辑删除标记 */
@ApiModelProperty
(
"逻辑删除标记(0-存在、1-删除)"
)
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Integer
deleted
;
}
quality-review/src/main/java/com/ruoyi/mapper/AutomobileEnterpriseMapper.java
View file @
0f815c4e
...
...
@@ -23,11 +23,10 @@ public interface AutomobileEnterpriseMapper extends BaseMapper<AutomobileEnterpr
* @return 车企信息
*/
public
AutomobileEnterprise
selectAutomobileEnterpriseById
(
Long
id
);
/**
* 查询车企信息列表
*
* @param
automobileEnterprise
车企信息
* @param
request
车企信息
* @return 车企信息集合
*/
public
List
<
AutomobileEnterprise
>
selectAutomobileEnterpriseList
(
AutomobileEnterpriseListRequest
request
);
...
...
quality-review/src/main/java/com/ruoyi/mapper/SampleManagementMapper.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.web.request.SampleManagementRequest
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
SampleManagementMapper
extends
BaseMapper
<
Sample
>
{
/**
* 查询样品管理
*
* @param id 样品管理主键
* @return 样品管理
*/
public
Sample
selectSampleManagementById
(
Long
id
);
/**
* 查询样品管理列表
*
* @param sampleManagementRequest 样品管理
* @return 样品管理集合
*/
public
List
<
Sample
>
selectSampleManagementList
(
SampleManagementRequest
sampleManagementRequest
);
/**
* 新增样品管理
*
* @param tSampleManagement 样品管理
* @return 结果
*/
public
int
insertSampleManagement
(
Sample
tSampleManagement
);
/**
* 修改样品管理
*
* @param tSampleManagement 样品管理
* @return 结果
*/
public
int
updateSampleManagement
(
Sample
tSampleManagement
);
/**
* 删除样品管理
*
* @param id 样品管理主键
* @return 结果
*/
public
int
deleteSampleManagementById
(
Long
id
);
/**
* 查询车辆识别码是否重复
* */
public
int
selectIdentificationCodeCount
(
Sample
sampleManagement
);
/**
* 查询样品编号是否重复
* */
public
int
selectSampleNumberCount
(
Sample
sampleManagement
);
}
quality-review/src/main/java/com/ruoyi/mapper/UserPhotoStorageMapper.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
mapper
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ruoyi.domain.UserPhotoStorage
;
import
com.ruoyi.web.request.UserPhotoStorageListRequest
;
import
org.springframework.stereotype.Repository
;
/**
* 用户照片存储Mapper接口
*
* @author gxk
* @date 2024-01-29
*/
@Repository
public
interface
UserPhotoStorageMapper
extends
BaseMapper
<
UserPhotoStorage
>
{
/**
* 查询用户照片存储列表
*
* @param request 用户照片存储
* @return 用户照片存储集合
*/
public
List
<
UserPhotoStorage
>
selectUserPhotoStorageList
(
UserPhotoStorageListRequest
request
);
/**
* 新增用户照片存储
*
* @param userPhotoStorage 用户照片存储
* @return 结果
*/
public
int
insertUserPhotoStorage
(
UserPhotoStorage
userPhotoStorage
);
/**
* 修改用户照片存储
*
* @param userPhotoStorage 用户照片存储
* @return 结果
*/
public
int
updateUserPhotoStorage
(
UserPhotoStorage
userPhotoStorage
);
}
quality-review/src/main/java/com/ruoyi/service/SampleManagementService.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
service
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.web.request.SampleManagementRequest
;
/**
* 样品管理Service接口
*
* @author ruoyi
* @date 2024-01-29
*/
public
interface
SampleManagementService
extends
IService
<
Sample
>
{
/**
* 查询样品管理
*
* @param id 样品管理主键
* @return 样品管理
*/
public
Sample
selectSampleManagementById
(
Long
id
);
/**
* 查询样品管理列表
*
* @param sampleManagementRequest 样品管理
* @return 样品管理集合
*/
public
List
<
Sample
>
selectSampleManagementList
(
SampleManagementRequest
sampleManagementRequest
);
/**
* 新增样品管理
*
* @param tSampleManagement 样品管理
* @return 结果
*/
public
int
insertSampleManagement
(
Sample
tSampleManagement
);
/**
* 修改样品管理
*
* @param tSampleManagement 样品管理
* @return 结果
*/
public
int
updateSampleManagement
(
Sample
tSampleManagement
);
/**
* 删除样品管理信息
*
* @param id 样品管理主键
* @return 结果
*/
public
int
deleteSampleManagementById
(
Long
id
);
}
quality-review/src/main/java/com/ruoyi/service/UserPhotoStorageService.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
service
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.ruoyi.domain.UserPhotoStorage
;
import
com.ruoyi.web.request.UserPhotoStorageCreateRequest
;
import
com.ruoyi.web.request.UserPhotoStorageListRequest
;
/**
* 用户照片存储Service接口
*
* @author gxk
* @date 2024-01-29
*/
public
interface
UserPhotoStorageService
extends
IService
<
UserPhotoStorage
>
{
/**
* 查询用户照片存储列表
*
* @param request 用户照片存储
* @return 用户照片存储集合
*/
public
List
<
UserPhotoStorage
>
selectUserPhotoStorageList
(
UserPhotoStorageListRequest
request
);
/**
* 新增用户照片存储
*
* @param request 用户照片存储
* @return 结果
*/
public
int
insertUserPhotoStorage
(
UserPhotoStorageCreateRequest
request
);
/**
* 修改用户照片存储
*
* @param userPhotoStorage 用户照片存储
* @return 结果
*/
public
int
updateUserPhotoStorage
(
UserPhotoStorage
userPhotoStorage
);
}
quality-review/src/main/java/com/ruoyi/service/impl/SampleManagementServiceImpl.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
service
.
impl
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.mapper.SampleManagementMapper
;
import
com.ruoyi.service.SampleManagementService
;
import
com.ruoyi.web.request.SampleManagementRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* 样品管理Service业务层处理
*
* @author ruoyi
* @date 2024-01-29
*/
@Service
@Transactional
public
class
SampleManagementServiceImpl
extends
ServiceImpl
<
SampleManagementMapper
,
Sample
>
implements
SampleManagementService
{
@Autowired
private
SampleManagementMapper
sampleManagementMapper
;
/**
* 查询样品管理
*
* @param id 样品管理主键
* @return 样品管理
*/
@Override
public
Sample
selectSampleManagementById
(
Long
id
)
{
return
sampleManagementMapper
.
selectSampleManagementById
(
id
);
}
/**
* 查询样品管理列表
*
* @param sampleManagementRequest 样品管理
* @return 样品管理
*/
@Override
public
List
<
Sample
>
selectSampleManagementList
(
SampleManagementRequest
sampleManagementRequest
)
{
return
sampleManagementMapper
.
selectSampleManagementList
(
sampleManagementRequest
);
}
/**
* 新增样品管理
*
* @param sampleManagement 样品管理
* @return 结果
*/
@Override
public
int
insertSampleManagement
(
Sample
sampleManagement
)
{
// 判断车辆识别码是否重复
int
dentificationCode
=
sampleManagementMapper
.
selectIdentificationCodeCount
(
sampleManagement
);
if
(
dentificationCode
>
0
){
throw
new
ServiceException
(
"车辆识别码已存在"
);
}
// 判断样品编号是否存在
int
sampleNumber
=
sampleManagementMapper
.
selectSampleNumberCount
(
sampleManagement
);
if
(
sampleNumber
>
0
){
throw
new
ServiceException
(
"样品编号已存在"
);
}
sampleManagement
.
setCreateBy
(
String
.
valueOf
(
SecurityUtils
.
getUserId
()));
sampleManagement
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
sampleManagementMapper
.
insertSampleManagement
(
sampleManagement
);
}
/**
* 修改样品管理
*
* @param sampleManagement 样品管理
* @return 结果
*/
@Override
public
int
updateSampleManagement
(
Sample
sampleManagement
)
{
// 判断车辆识别码是否重复
int
dentificationCode
=
sampleManagementMapper
.
selectIdentificationCodeCount
(
sampleManagement
);
if
(
dentificationCode
>
0
){
throw
new
ServiceException
(
"车辆识别码已存在"
);
}
// 判断样品编号是否存在
int
sampleNumber
=
sampleManagementMapper
.
selectSampleNumberCount
(
sampleManagement
);
if
(
sampleNumber
>
0
){
throw
new
ServiceException
(
"样品编号已存在"
);
}
sampleManagement
.
setUpdateBy
(
String
.
valueOf
(
SecurityUtils
.
getUserId
()));
sampleManagement
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
sampleManagementMapper
.
updateSampleManagement
(
sampleManagement
);
}
/**
* 删除样品管理信息
* @param id 样品管理主键
* @return 结果
*/
@Override
public
int
deleteSampleManagementById
(
Long
id
)
{
return
sampleManagementMapper
.
deleteSampleManagementById
(
id
);
}
}
quality-review/src/main/java/com/ruoyi/service/impl/UserPhotoStorageServiceImpl.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
service
.
impl
;
import
java.util.List
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.ruoyi.common.core.domain.model.LoginUser
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.framework.websocket.WebSocketUsers
;
import
com.ruoyi.service.UserPhotoStorageService
;
import
com.ruoyi.web.request.UserPhotoStorageCreateRequest
;
import
com.ruoyi.web.request.UserPhotoStorageListRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.mapper.UserPhotoStorageMapper
;
import
com.ruoyi.domain.UserPhotoStorage
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* 用户照片存储Service业务层处理
*
* @author gxk
* @date 2024-01-29
*/
@Service
@Transactional
public
class
UserPhotoStorageServiceImpl
extends
ServiceImpl
<
UserPhotoStorageMapper
,
UserPhotoStorage
>
implements
UserPhotoStorageService
{
@Autowired
private
UserPhotoStorageMapper
userPhotoStorageMapper
;
/**
* 查询用户照片存储列表
*
* @param request 用户照片存储
* @return 用户照片存储
*/
@Override
public
List
<
UserPhotoStorage
>
selectUserPhotoStorageList
(
UserPhotoStorageListRequest
request
)
{
return
userPhotoStorageMapper
.
selectUserPhotoStorageList
(
request
);
}
/**
* 新增用户照片存储
*
* @param request 用户照片存储
* @return 结果
*/
@Override
public
int
insertUserPhotoStorage
(
UserPhotoStorageCreateRequest
request
)
{
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
UserPhotoStorage
userPhotoStorage
=
UserPhotoStorage
.
builder
()
.
userId
(
loginUser
.
getUserId
())
.
username
(
loginUser
.
getUsername
())
.
path
(
request
.
getPath
())
.
createTime
(
DateUtils
.
getNowDate
())
.
build
();
WebSocketUsers
.
sendMessageToUserByUserId
(
loginUser
.
getUserId
(),
request
.
getPath
());
return
userPhotoStorageMapper
.
insert
(
userPhotoStorage
);
}
/**
* 修改用户照片存储
*
* @param userPhotoStorage 用户照片存储
* @return 结果
*/
@Override
public
int
updateUserPhotoStorage
(
UserPhotoStorage
userPhotoStorage
)
{
return
userPhotoStorageMapper
.
updateUserPhotoStorage
(
userPhotoStorage
);
}
}
quality-review/src/main/java/com/ruoyi/web/SampleManagementController.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
web
;
import
java.util.List
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.domain.Sample
;
import
com.ruoyi.service.SampleManagementService
;
import
com.ruoyi.web.request.SampleManagementGetInfoRequest
;
import
com.ruoyi.web.request.SampleManagementRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Trace
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.common.core.page.TableDataInfo
;
/**
* 样品管理Controller
*
* @author ruoyi
* @date 2024-01-29
*/
@Api
(
tags
=
"样品管理"
)
@RestController
@RequestMapping
(
"/sample/Management"
)
public
class
SampleManagementController
extends
BaseController
{
@Autowired
private
SampleManagementService
sampleManagementService
;
/**
* 查询样品管理列表
*/
@ApiOperation
(
"查询样品管理列表"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/list"
)
public
TableDataInfo
list
(
@Validated
@RequestBody
SampleManagementRequest
request
)
{
startPage
();
List
<
Sample
>
list
=
sampleManagementService
.
selectSampleManagementList
(
request
);
return
getDataTable
(
list
);
}
/**
* 获取样品管理详细信息
*/
@ApiOperation
(
"获取样品管理详细信息"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/getInfo"
)
public
R
<
Sample
>
getInfo
(
@Validated
@RequestBody
SampleManagementGetInfoRequest
request
)
{
return
R
.
ok
(
sampleManagementService
.
selectSampleManagementById
(
request
.
getId
()));
}
/**
* 新增样品管理
*/
@ApiOperation
(
"新增样品管理"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"样品管理"
,
businessType
=
BusinessType
.
INSERT
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/add"
)
public
R
<
Integer
>
add
(
@Validated
@RequestBody
Sample
tSampleManagement
)
{
return
R
.
ok
(
sampleManagementService
.
insertSampleManagement
(
tSampleManagement
));
}
/**
* 修改样品管理
*/
@ApiOperation
(
"修改样品管理"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"样品管理"
,
businessType
=
BusinessType
.
UPDATE
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/edit"
)
public
R
<
Integer
>
edit
(
@Validated
@RequestBody
Sample
tSampleManagement
)
{
return
R
.
ok
(
sampleManagementService
.
updateSampleManagement
(
tSampleManagement
));
}
/**
* 删除样品管理
*/
@ApiOperation
(
" 删除样品管理"
)
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"样品管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@Validated
@RequestBody
SampleManagementGetInfoRequest
request
)
{
return
toAjax
(
sampleManagementService
.
deleteSampleManagementById
(
request
.
getId
()));
}
}
quality-review/src/main/java/com/ruoyi/web/UserPhotoStorageController.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
web
;
import
java.util.Arrays
;
import
java.util.List
;
import
com.ruoyi.common.annotation.Anonymous
;
import
com.ruoyi.common.core.domain.R
;
import
com.ruoyi.service.UserPhotoStorageService
;
import
com.ruoyi.web.request.UserPhotoStorageCreateRequest
;
import
com.ruoyi.web.request.UserPhotoStorageEditRequest
;
import
com.ruoyi.web.request.UserPhotoStorageListRequest
;
import
com.ruoyi.web.request.UserPhotoStorageRemoveRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.ruoyi.common.annotation.Log
;
import
com.ruoyi.common.core.controller.BaseController
;
import
com.ruoyi.common.enums.BusinessType
;
import
com.ruoyi.domain.UserPhotoStorage
;
import
com.ruoyi.common.core.page.TableDataInfo
;
/**
* 用户照片存储Controller
*
* @author gxk
* @date 2024-01-29
*/
@Api
(
tags
=
"用户照片存储"
)
@RestController
@RequestMapping
(
"/review/storage"
)
public
class
UserPhotoStorageController
extends
BaseController
{
@Autowired
private
UserPhotoStorageService
userPhotoStorageService
;
/**
* 查询用户照片存储列表
*/
@Anonymous
@ApiOperation
(
"分页查询照片存储列表"
)
@PostMapping
(
"/list"
)
public
TableDataInfo
<
UserPhotoStorage
>
list
(
@Validated
@RequestBody
UserPhotoStorageListRequest
request
)
{
startPage
();
List
<
UserPhotoStorage
>
list
=
userPhotoStorageService
.
selectUserPhotoStorageList
(
request
);
return
getDataTable
(
list
);
}
/**
* 新增用户照片存储
*/
@Anonymous
@ApiOperation
(
"新增用户照片存储"
)
@Log
(
title
=
"用户照片存储"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/create"
)
public
R
<
Integer
>
create
(
@Validated
@RequestBody
UserPhotoStorageCreateRequest
request
)
{
return
R
.
ok
(
userPhotoStorageService
.
insertUserPhotoStorage
(
request
));
}
/**
* 修改用户照片存储
*/
@ApiOperation
(
"修改用户照片存储"
)
@Log
(
title
=
"用户照片存储"
,
businessType
=
BusinessType
.
UPDATE
)
@PostMapping
(
"/edit"
)
public
R
<
Boolean
>
edit
(
@Validated
@RequestBody
UserPhotoStorageEditRequest
request
)
{
UserPhotoStorage
userPhotoStorage
=
UserPhotoStorage
.
builder
()
.
id
(
request
.
getId
())
.
path
(
request
.
getPath
()).
build
();
return
R
.
ok
(
userPhotoStorageService
.
updateById
(
userPhotoStorage
));
}
/**
* 删除用户照片存储
*/
@ApiOperation
(
"批量删除用户照片存储"
)
@Log
(
title
=
"用户照片存储"
,
businessType
=
BusinessType
.
DELETE
)
@PostMapping
(
"/remove"
)
public
R
<
Boolean
>
remove
(
@Validated
@RequestBody
UserPhotoStorageRemoveRequest
request
)
{
return
R
.
ok
(
userPhotoStorageService
.
removeBatchByIds
(
Arrays
.
asList
(
request
.
getIds
())));
}
}
quality-review/src/main/java/com/ruoyi/web/request/SampleManagementGetInfoRequest.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
public
class
SampleManagementGetInfoRequest
{
@ApiModelProperty
(
"ID"
)
private
Long
id
;
}
quality-review/src/main/java/com/ruoyi/web/request/SampleManagementRequest.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
web
.
request
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
public
class
SampleManagementRequest
extends
PageDomain
{
/** 车辆识别码 */
@ApiModelProperty
(
"车辆识别码"
)
private
String
identificationCode
;
/** 样品编号 */
@ApiModelProperty
(
"样品编号"
)
private
String
sampleNumber
;
/** 样品名称 */
@ApiModelProperty
(
"样品名称"
)
private
String
sampleName
;
/** 0:整车样品 1:零部件样品 */
@ApiModelProperty
(
"0:整车样品 1:零部件样品"
)
private
String
flag
;
}
quality-review/src/main/java/com/ruoyi/web/request/UserPhotoStorageCreateRequest.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
/**
* 用户照片存储新增所需的对象
* @author gxk
*/
@Data
@ApiModel
public
class
UserPhotoStorageCreateRequest
{
/** 图片路径(以逗号分隔) */
@ApiModelProperty
(
"图片路径"
)
@NotEmpty
(
message
=
"图片路径不能为空"
)
@NotNull
(
message
=
"图片路径不能为空"
)
private
String
path
;
}
quality-review/src/main/java/com/ruoyi/web/request/UserPhotoStorageEditRequest.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
/**
* 用户照片存储修改所需的对象
* @author gxk
*/
@Data
@ApiModel
public
class
UserPhotoStorageEditRequest
{
@ApiModelProperty
(
"ID"
)
@NotNull
(
message
=
"ID不能为空"
)
private
Long
id
;
@ApiModelProperty
(
"图片路径"
)
@NotEmpty
(
message
=
"路径不能为空"
)
@NotNull
(
message
=
"路径不能为空"
)
private
String
path
;
}
quality-review/src/main/java/com/ruoyi/web/request/UserPhotoStorageListRequest.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
web
.
request
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.core.page.PageDomain
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 用户照片存储集合所需的对象
* @author gxk
*/
@Data
@ApiModel
public
class
UserPhotoStorageListRequest
extends
PageDomain
{
/** 用户id */
@ApiModelProperty
(
"用户ID"
)
private
Long
userId
;
/** 用户账号 */
@ApiModelProperty
(
"用户账号"
)
private
String
username
;
}
quality-review/src/main/java/com/ruoyi/web/request/UserPhotoStorageRemoveRequest.java
0 → 100644
View file @
0f815c4e
package
com
.
ruoyi
.
web
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
/**
* 用户照片存储删除所需的对象
* @author gxk
*/
@Data
@ApiModel
public
class
UserPhotoStorageRemoveRequest
{
@ApiModelProperty
(
"照片存储ID集合"
)
@NotEmpty
(
message
=
"照片存储ID集合不能为空"
)
@NotNull
(
message
=
"照片存储ID集合不能为空"
)
private
Long
[]
ids
;
}
quality-review/src/main/resources/mapper/SampleManagementMapper.xml
0 → 100644
View file @
0f815c4e
<?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.mapper.SampleManagementMapper"
>
<resultMap
type=
"com.ruoyi.domain.Sample"
id=
"SampleManagementResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"identificationCode"
column=
"identification_code"
/>
<result
property=
"sampleNumber"
column=
"sample_number"
/>
<result
property=
"sampleName"
column=
"sample_name"
/>
<result
property=
"sampleSender"
column=
"sample_sender"
/>
<result
property=
"numberOfSamples"
column=
"number_of_samples"
/>
<result
property=
"deliveryDate"
column=
"delivery_date"
/>
<result
property=
"manufactureDate"
column=
"manufacture_date"
/>
<result
property=
"manufacturingEnterprise"
column=
"manufacturing_enterprise"
/>
<result
property=
"flag"
column=
"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=
"deleted"
column=
"deleted"
/>
<result
property=
"enterpriseId"
column=
"enterprise_id"
/>
<result
property=
"enterpriseName"
column=
"enterprise_name"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"trademark"
column=
"trademark"
/>
<result
property=
"samplePhotos"
column=
"sample_photos"
/>
</resultMap>
<sql
id=
"selectTSampleManagementVo"
>
select sm.id,
sm.identification_code,
sm.sample_number,
sm.sample_name,
sm.sample_sender,
sm.number_of_samples,
sm.delivery_date,
sm.manufacture_date,
sm.manufacturing_enterprise,
sm.flag,
sm.create_by,
sm.create_time,
sm.update_by,
sm.update_time,
sm.deleted,
sm.enterprise_id,
sm.remark,
sm.trademark,
sm.sample_photos,
ae.enterprise_name
from t_sample sm
left join t_automobile_enterprise ae on ae.id = sm.enterprise_id
</sql>
<select
id=
"selectSampleManagementList"
parameterType=
"com.ruoyi.domain.Sample"
resultMap=
"SampleManagementResult"
>
<include
refid=
"selectTSampleManagementVo"
/>
<where>
sm.deleted = 0
<if
test=
"identificationCode != null and identificationCode != ''"
>
and sm.identification_code like concat('%', #{identificationCode}, '%')
</if>
<if
test=
"sampleNumber != null and sampleNumber != ''"
>
and sm.sample_number like concat('%', #{sampleNumber}, '%')
</if>
<if
test=
"sampleName != null and sampleName != ''"
>
and sm.sample_name like concat('%', #{sampleName}, '%')
</if>
<if
test=
"flag != null and flag != ''"
>
sm.flag = #{flag}
</if>
</where>
</select>
<select
id=
"selectSampleManagementById"
parameterType=
"Long"
resultMap=
"SampleManagementResult"
>
<include
refid=
"selectTSampleManagementVo"
/>
where sm.id = #{id}
</select>
<insert
id=
"insertSampleManagement"
parameterType=
"com.ruoyi.domain.Sample"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_sample
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"identificationCode != null"
>
identification_code,
</if>
<if
test=
"sampleNumber != null"
>
sample_number,
</if>
<if
test=
"sampleName != null"
>
sample_name,
</if>
<if
test=
"sampleSender != null"
>
sample_sender,
</if>
<if
test=
"numberOfSamples != null"
>
number_of_samples,
</if>
<if
test=
"deliveryDate != null"
>
delivery_date,
</if>
<if
test=
"manufactureDate != null"
>
manufacture_date,
</if>
<if
test=
"manufacturingEnterprise != null"
>
manufacturing_enterprise,
</if>
<if
test=
"flag != null"
>
flag,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"trademark != null"
>
trademark,
</if>
<if
test=
"samplePhotos != null"
>
sample_photos,
</if>
<if
test=
"deleted != null"
>
deleted,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"identificationCode != null"
>
#{identificationCode},
</if>
<if
test=
"sampleNumber != null"
>
#{sampleNumber},
</if>
<if
test=
"sampleName != null"
>
#{sampleName},
</if>
<if
test=
"sampleSender != null"
>
#{sampleSender},
</if>
<if
test=
"numberOfSamples != null"
>
#{numberOfSamples},
</if>
<if
test=
"deliveryDate != null"
>
#{deliveryDate},
</if>
<if
test=
"manufactureDate != null"
>
#{manufactureDate},
</if>
<if
test=
"manufacturingEnterprise != null"
>
#{manufacturingEnterprise},
</if>
<if
test=
"flag != null"
>
#{flag},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId}
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"trademark != null"
>
#{trademark},
</if>
<if
test=
"samplePhotos != null"
>
#{samplePhotos},
</if>
<if
test=
"deleted != null"
>
#{deleted},
</if>
</trim>
</insert>
<update
id=
"updateSampleManagement"
parameterType=
"com.ruoyi.domain.Sample"
>
update t_sample
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"identificationCode != null"
>
identification_code = #{identificationCode},
</if>
<if
test=
"sampleNumber != null"
>
sample_number = #{sampleNumber},
</if>
<if
test=
"sampleName != null"
>
sample_name = #{sampleName},
</if>
<if
test=
"sampleSender != null"
>
sample_sender = #{sampleSender},
</if>
<if
test=
"numberOfSamples != null"
>
number_of_samples = #{numberOfSamples},
</if>
<if
test=
"deliveryDate != null"
>
delivery_date = #{deliveryDate},
</if>
<if
test=
"manufactureDate != null"
>
manufacture_date = #{manufactureDate},
</if>
<if
test=
"manufacturingEnterprise != null"
>
manufacturing_enterprise = #{manufacturingEnterprise},
</if>
<if
test=
"flag != null"
>
flag = #{flag},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"trademark != null"
>
trademark = #{trademark},
</if>
<if
test=
"samplePhotos != null"
>
sample_photos = #{samplePhotos},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteSampleManagementById"
parameterType=
"Long"
>
update t_sample set deleted = 1,
where id = #{id}
</delete>
<select
id=
"selectIdentificationCodeCount"
parameterType=
"com.ruoyi.domain.Sample"
resultType=
"integer"
>
select count(id) from t_sample
<where>
deleted = 0
<if
test=
"flag != null and flag != ''"
>
and flag = #{flag}
</if>
<if
test=
"identificationCode != null and identificationCode != ''"
>
and identification_code = #{identificationCode}
</if>
<if
test=
"id != null and id != ''"
>
and id != #{id}
</if>
</where>
</select>
<select
id=
"selectSampleNumberCount"
parameterType=
"com.ruoyi.domain.Sample"
resultType=
"integer"
>
select count(id) from t_sample
<where>
deleted = 0
<if
test=
"flag != null and flag != ''"
>
and flag = #{flag}
</if>
<if
test=
"sampleNumber != null and sampleNumber != ''"
>
and sample_number = #{sampleNumber}
</if>
<if
test=
"id != null and id != ''"
>
and id != #{id}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
quality-review/src/main/resources/mapper/UserPhotoStorageMapper.xml
0 → 100644
View file @
0f815c4e
<?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.mapper.UserPhotoStorageMapper"
>
<resultMap
type=
"com.ruoyi.domain.UserPhotoStorage"
id=
"UserPhotoStorageResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"username"
column=
"username"
/>
<result
property=
"path"
column=
"path"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"deleted"
column=
"deleted"
/>
</resultMap>
<sql
id=
"selectUserPhotoStorageVo"
>
select id, user_id, username, path, create_time, deleted from t_user_photo_storage
</sql>
<select
id=
"selectUserPhotoStorageList"
parameterType=
"com.ruoyi.domain.UserPhotoStorage"
resultMap=
"UserPhotoStorageResult"
>
<include
refid=
"selectUserPhotoStorageVo"
/>
<where>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
<if
test=
"username != null and username != ''"
>
and username like concat('%', #{username}, '%')
</if>
</where>
</select>
<insert
id=
"insertUserPhotoStorage"
parameterType=
"com.ruoyi.domain.UserPhotoStorage"
>
insert into t_user_photo_storage
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"username != null"
>
username,
</if>
<if
test=
"path != null"
>
path,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"deleted != null"
>
deleted,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id},
</if>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"username != null"
>
#{username},
</if>
<if
test=
"path != null"
>
#{path},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"deleted != null"
>
#{deleted},
</if>
</trim>
</insert>
<update
id=
"updateUserPhotoStorage"
parameterType=
"com.ruoyi.domain.UserPhotoStorage"
>
update t_user_photo_storage
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"username != null"
>
username = #{username},
</if>
<if
test=
"path != null"
>
path = #{path},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"deleted != null"
>
deleted = #{deleted},
</if>
</trim>
where id = #{id}
</update>
</mapper>
ruoyi-framework/pom.xml
View file @
0f815c4e
...
...
@@ -59,11 +59,6 @@
<artifactId>
ruoyi-system
</artifactId>
</dependency>
<dependency>
<groupId>
com.ruoyi
</groupId>
<artifactId>
quality-review
</artifactId>
</dependency>
<!-- skywalking log -->
<dependency>
<groupId>
org.apache.skywalking
</groupId>
...
...
@@ -79,4 +74,4 @@
</dependencies>
</project>
\ No newline at end of file
</project>
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
View file @
0f815c4e
...
...
@@ -22,7 +22,7 @@ import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
/**
* spring security配置
*
*
* @author ruoyi
*/
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
,
securedEnabled
=
true
)
...
...
@@ -33,7 +33,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
*/
@Autowired
private
UserDetailsService
userDetailsService
;
/**
* 认证失败处理类
*/
...
...
@@ -51,7 +51,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
*/
@Autowired
private
JwtAuthenticationTokenFilter
authenticationTokenFilter
;
/**
* 跨域过滤器
*/
...
...
@@ -114,7 +114,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
).
permitAll
()
// 静态资源,可匿名访问
.
antMatchers
(
HttpMethod
.
GET
,
"/"
,
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/profile/**"
).
permitAll
()
.
antMatchers
(
"/swagger-ui.html"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/*/api-docs"
,
"/druid/**"
).
permitAll
()
.
antMatchers
(
"/swagger-ui.html"
,
"/
websocket/**"
,
"/
swagger-resources/**"
,
"/webjars/**"
,
"/*/api-docs"
,
"/druid/**"
).
permitAll
()
// 除上面外的所有请求全部需要鉴权认证
.
anyRequest
().
authenticated
()
.
and
()
...
...
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