Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
b895beab
Commit
b895beab
authored
May 14, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
失败原因配置
parent
96e6236d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
2 deletions
+32
-2
FailReasonConfig.java
...fu/cloud/plus/v1/yifu/social/entity/FailReasonConfig.java
+8
-0
FailReasonConfigController.java
...v1/yifu/social/controller/FailReasonConfigController.java
+21
-1
FailReasonConfigMapper.xml
...-biz/src/main/resources/mapper/FailReasonConfigMapper.xml
+3
-1
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/FailReasonConfig.java
View file @
b895beab
...
@@ -75,5 +75,13 @@ public class FailReasonConfig extends BaseEntity {
...
@@ -75,5 +75,13 @@ public class FailReasonConfig extends BaseEntity {
@ExcelProperty
(
"状态"
)
@ExcelProperty
(
"状态"
)
@Schema
(
description
=
"状态"
)
@Schema
(
description
=
"状态"
)
private
String
status
;
private
String
status
;
/**
* 更新人
*/
@ExcelAttribute
(
name
=
"更新人"
)
@ExcelProperty
(
"更新人"
)
@Schema
(
description
=
"更新人"
)
private
String
updateName
;
}
}
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/FailReasonConfigController.java
View file @
b895beab
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig
;
import
com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Optional
;
/**
/**
* 失败原因配置
* 失败原因配置
*
*
...
@@ -58,6 +64,16 @@ public class FailReasonConfigController {
...
@@ -58,6 +64,16 @@ public class FailReasonConfigController {
@SysLog
(
"新增失败原因配置"
)
@SysLog
(
"新增失败原因配置"
)
@PostMapping
@PostMapping
public
R
<
Boolean
>
save
(
@RequestBody
FailReasonConfig
failReasonConfig
)
{
public
R
<
Boolean
>
save
(
@RequestBody
FailReasonConfig
failReasonConfig
)
{
FailReasonConfig
failReasonCount
=
failReasonConfigService
.
getOne
(
Wrappers
.<
FailReasonConfig
>
query
().
lambda
()
.
eq
(
FailReasonConfig:
:
getReasonKey
,
failReasonConfig
.
getReasonKey
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
failReasonCount
).
isPresent
())
{
return
R
.
failed
(
"已存在对应的关键字的失败原因配置!"
);
}
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isNotNull
(
user
))
{
failReasonConfig
.
setUpdateName
(
user
.
getNickname
());
}
return
R
.
ok
(
failReasonConfigService
.
save
(
failReasonConfig
));
return
R
.
ok
(
failReasonConfigService
.
save
(
failReasonConfig
));
}
}
...
@@ -70,6 +86,10 @@ public class FailReasonConfigController {
...
@@ -70,6 +86,10 @@ public class FailReasonConfigController {
@SysLog
(
"修改失败原因配置"
)
@SysLog
(
"修改失败原因配置"
)
@PutMapping
@PutMapping
public
R
<
Boolean
>
updateById
(
@RequestBody
FailReasonConfig
failReasonConfig
)
{
public
R
<
Boolean
>
updateById
(
@RequestBody
FailReasonConfig
failReasonConfig
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isNotNull
(
user
))
{
failReasonConfig
.
setUpdateName
(
user
.
getNickname
());
}
return
R
.
ok
(
failReasonConfigService
.
updateById
(
failReasonConfig
));
return
R
.
ok
(
failReasonConfigService
.
updateById
(
failReasonConfig
));
}
}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/FailReasonConfigMapper.xml
View file @
b895beab
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateName"
column=
"UPDATE_NAME"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
...
@@ -25,7 +26,8 @@
...
@@ -25,7 +26,8 @@
a.CREATE_NAME,
a.CREATE_NAME,
a.CREATE_BY,
a.CREATE_BY,
a.UPDATE_TIME,
a.UPDATE_TIME,
a.UPDATE_BY
a.UPDATE_BY,
a.UPDATE_NAME
</sql>
</sql>
<sql
id=
"failReasonConfig_where"
>
<sql
id=
"failReasonConfig_where"
>
<if
test=
"failReasonConfig != null"
>
<if
test=
"failReasonConfig != null"
>
...
...
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