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
e96a2c3a
Commit
e96a2c3a
authored
May 08, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
失败原因配置
parent
8e6c42f7
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
306 additions
and
0 deletions
+306
-0
FailReasonConfig.java
...fu/cloud/plus/v1/yifu/social/entity/FailReasonConfig.java
+79
-0
FailReasonConfigController.java
...v1/yifu/social/controller/FailReasonConfigController.java
+92
-0
FailReasonConfigMapper.java
...ud/plus/v1/yifu/social/mapper/FailReasonConfigMapper.java
+24
-0
FailReasonConfigService.java
.../plus/v1/yifu/social/service/FailReasonConfigService.java
+21
-0
FailReasonConfigServiceImpl.java
...yifu/social/service/impl/FailReasonConfigServiceImpl.java
+31
-0
FailReasonConfigMapper.xml
...-biz/src/main/resources/mapper/FailReasonConfigMapper.xml
+59
-0
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/FailReasonConfig.java
0 → 100644
View file @
e96a2c3a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
@Data
@TableName
(
"fail_reason_config"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"失败原因配置"
)
public
class
FailReasonConfig
extends
BaseEntity
{
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"主键"
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 失败原因
*/
@ExcelAttribute
(
name
=
"失败原因"
,
isNotEmpty
=
true
,
errorInfo
=
"失败原因不能为空"
,
maxLength
=
200
)
@NotBlank
(
message
=
"失败原因不能为空"
)
@Length
(
max
=
200
,
message
=
"失败原因不能超过200个字符"
)
@ExcelProperty
(
"失败原因"
)
@Schema
(
description
=
"失败原因"
)
private
String
reason
;
/**
* 关键字
*/
@ExcelAttribute
(
name
=
"关键字"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"关键字不能超过20个字符"
)
@ExcelProperty
(
"关键字"
)
@Schema
(
description
=
"关键字"
)
private
String
key
;
/**
* 精简原因
*/
@ExcelAttribute
(
name
=
"精简原因"
,
isNotEmpty
=
true
,
errorInfo
=
"精简原因不能为空"
,
maxLength
=
200
)
@NotBlank
(
message
=
"精简原因不能为空"
)
@Length
(
max
=
200
,
message
=
"精简原因不能超过200个字符"
)
@ExcelProperty
(
"精简原因"
)
@Schema
(
description
=
"精简原因"
)
private
String
simpleReason
;
/**
* 重新办理动作 1 继续办理 2 中止办理 3 人工办理
*/
@ExcelAttribute
(
name
=
"重新办理动作"
,
isNotEmpty
=
true
,
errorInfo
=
"重新办理动作不能为空"
,
maxLength
=
1
)
@NotBlank
(
message
=
"重新办理动作不能为空"
)
@Length
(
max
=
1
,
message
=
"重新办理动作不能超过1个字符"
)
@ExcelProperty
(
"重新办理动作"
)
@Schema
(
description
=
"重新办理动作"
)
private
String
replay
;
/**
* 状态 0 正常 1 禁用
*/
@ExcelAttribute
(
name
=
"状态"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"状态不能超过1个字符"
)
@ExcelProperty
(
"状态"
)
@Schema
(
description
=
"状态"
)
private
String
status
;
}
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/FailReasonConfigController.java
0 → 100644
View file @
e96a2c3a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig
;
import
com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/failreasonconfig"
)
@Tag
(
name
=
"失败原因配置管理"
)
public
class
FailReasonConfigController
{
private
final
FailReasonConfigService
failReasonConfigService
;
/**
* 简单分页查询
* @param page 分页对象
* @param failReasonConfig 失败原因配置
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
FailReasonConfig
>>
getFailReasonConfigPage
(
Page
<
FailReasonConfig
>
page
,
FailReasonConfig
failReasonConfig
)
{
return
new
R
<>(
failReasonConfigService
.
getFailReasonConfigPage
(
page
,
failReasonConfig
));
}
/**
* 通过id查询失败原因配置
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('social_failreasonconfig_get')"
)
public
R
<
FailReasonConfig
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
failReasonConfigService
.
getById
(
id
));
}
/**
* 新增失败原因配置
* @param failReasonConfig 失败原因配置
* @return R
*/
@Operation
(
summary
=
"新增失败原因配置"
,
description
=
"新增失败原因配置:hasPermission('social_failreasonconfig_add')"
)
@SysLog
(
"新增失败原因配置"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('social_failreasonconfig_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
FailReasonConfig
failReasonConfig
)
{
return
R
.
ok
(
failReasonConfigService
.
save
(
failReasonConfig
));
}
/**
* 修改失败原因配置
* @param failReasonConfig 失败原因配置
* @return R
*/
@Operation
(
summary
=
"修改失败原因配置"
,
description
=
"修改失败原因配置:hasPermission('social_failreasonconfig_edit')"
)
@SysLog
(
"修改失败原因配置"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('social_failreasonconfig_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
FailReasonConfig
failReasonConfig
)
{
return
R
.
ok
(
failReasonConfigService
.
updateById
(
failReasonConfig
));
}
/**
* 通过id删除失败原因配置
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除失败原因配置"
,
description
=
"通过id删除失败原因配置:hasPermission('social_failreasonconfig_del')"
)
@SysLog
(
"通过id删除失败原因配置"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('social_failreasonconfig_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
failReasonConfigService
.
removeById
(
id
));
}
}
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/FailReasonConfigMapper.java
0 → 100644
View file @
e96a2c3a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
@Mapper
public
interface
FailReasonConfigMapper
extends
BaseMapper
<
FailReasonConfig
>
{
/**
* 失败原因配置简单分页查询
* @param failReasonConfig 失败原因配置
* @return
*/
IPage
<
FailReasonConfig
>
getFailReasonConfigPage
(
Page
<
FailReasonConfig
>
page
,
@Param
(
"failReasonConfig"
)
FailReasonConfig
failReasonConfig
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/FailReasonConfigService.java
0 → 100644
View file @
e96a2c3a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig
;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
public
interface
FailReasonConfigService
extends
IService
<
FailReasonConfig
>
{
/**
* 失败原因配置简单分页查询
* @param failReasonConfig 失败原因配置
* @return
*/
IPage
<
FailReasonConfig
>
getFailReasonConfigPage
(
Page
<
FailReasonConfig
>
page
,
FailReasonConfig
failReasonConfig
);
}
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/FailReasonConfigServiceImpl.java
0 → 100644
View file @
e96a2c3a
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.FailReasonConfigMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
@Log4j2
@Service
public
class
FailReasonConfigServiceImpl
extends
ServiceImpl
<
FailReasonConfigMapper
,
FailReasonConfig
>
implements
FailReasonConfigService
{
/**
* 失败原因配置简单分页查询
* @param failReasonConfig 失败原因配置
* @return
*/
@Override
public
IPage
<
FailReasonConfig
>
getFailReasonConfigPage
(
Page
<
FailReasonConfig
>
page
,
FailReasonConfig
failReasonConfig
){
return
baseMapper
.
getFailReasonConfigPage
(
page
,
failReasonConfig
);
}
}
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/resources/mapper/FailReasonConfigMapper.xml
0 → 100644
View file @
e96a2c3a
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.social.mapper.FailReasonConfigMapper"
>
<resultMap
id=
"failReasonConfigMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"reason"
column=
"REASON"
/>
<result
property=
"key"
column=
"KEY"
/>
<result
property=
"simpleReason"
column=
"SIMPLE_REASON"
/>
<result
property=
"replay"
column=
"REPLAY"
/>
<result
property=
"status"
column=
"STATUS"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.REASON,
a.KEY,
a.SIMPLE_REASON,
a.REPLAY,
a.STATUS,
a.CREATE_TIME,
a.CREATE_NAME,
a.UPDATE_TIME,
a.UPDATE_BY
</sql>
<sql
id=
"failReasonConfig_where"
>
<if
test=
"failReasonConfig != null"
>
<if
test=
"failReasonConfig.reason != null and failReasonConfig.reason.trim() != ''"
>
AND a.REASON LIKE concat('%',#{failReasonConfig.reason},'%')
</if>
<if
test=
"failReasonConfig.key != null and failReasonConfig.key.trim() != ''"
>
AND a.KEY = #{failReasonConfig.key}
</if>
<if
test=
"failReasonConfig.simpleReason != null and failReasonConfig.simpleReason.trim() != ''"
>
AND a.SIMPLE_REASON = #{failReasonConfig.simpleReason}
</if>
<if
test=
"failReasonConfig.replay != null and failReasonConfig.replay.trim() != ''"
>
AND a.REPLAY = #{failReasonConfig.replay}
</if>
<if
test=
"failReasonConfig.status != null and failReasonConfig.status.trim() != ''"
>
AND a.STATUS = #{failReasonConfig.status}
</if>
</if>
</sql>
<!--failReasonConfig简单分页查询-->
<select
id=
"getFailReasonConfigPage"
resultMap=
"failReasonConfigMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM fail_reason_config a
<where>
1=1
<include
refid=
"failReasonConfig_where"
/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
\ No newline at end of file
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