Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lingxi-lxy-yanshou
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
后端-黄柯铭
lingxi-lxy-yanshou
Commits
58bd47ff
Commit
58bd47ff
authored
Aug 06, 2021
by
技术总监-万宁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整代码
parent
2f93ac1d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
41 deletions
+40
-41
RuleConfigurationController.java
...lingxi/system/controller/RuleConfigurationController.java
+18
-11
RuleConfigurationService.java
...m/ssy/lingxi/system/service/RuleConfigurationService.java
+7
-11
RuleConfigurationServiceImpl.java
...gxi/system/service/impl/RuleConfigurationServiceImpl.java
+15
-19
No files found.
system-service/src/main/java/com/ssy/lingxi/system/controller/RuleConfigurationController.java
View file @
58bd47ff
...
...
@@ -6,14 +6,14 @@ import com.ssy.lingxi.system.dto.response.RuleConfigurationListResponse;
import
com.ssy.lingxi.system.model.response.RuleVO
;
import
com.ssy.lingxi.system.service.RuleConfigurationService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
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.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @menu 规则配置-平台规则配置
* @author wrc
...
...
@@ -22,26 +22,33 @@ import java.util.List;
@Api
(
tags
=
"规则配置平台规则配置"
)
@RestController
public
class
RuleConfigurationController
{
@Resource
RuleConfigurationService
ruleConfigurationService
;
@ApiOperation
(
value
=
" 规则配置平台规则配置列表查询"
)
@GetMapping
(
"/rule/configuration/list"
)
/**
* 查询平台规则配置
* @return 查询结果
*/
@RequestMapping
(
value
=
"/rule/configuration/list"
,
method
=
RequestMethod
.
GET
)
public
Wrapper
<
List
<
RuleConfigurationListResponse
>>
ruleConfigurationList
(
)
{
return
ruleConfigurationService
.
ruleConfigurationList
();
}
@ApiOperation
(
value
=
" 规则配置平台规则配置修改"
)
@PostMapping
(
"/rule/configuration/update"
)
public
Wrapper
ruleConfigurationUpdate
(
@RequestBody
RuleConfigurationRequest
request
){
/**
* 修改平台规则配置状态
* @param request 接口参数
* @return 修改结果
*/
@RequestMapping
(
value
=
"/rule/configuration/update"
,
method
=
RequestMethod
.
POST
)
public
Wrapper
<
Void
>
ruleConfigurationUpdate
(
@RequestBody
RuleConfigurationRequest
request
){
return
ruleConfigurationService
.
ruleConfigurationUpdate
(
request
);
}
/**
*售后订单类型查询
* 查询订单类型
* @return 查询结果
*/
@
GetMapping
(
"/rule/getOrderType"
)
@
RequestMapping
(
value
=
"/rule/getOrderType"
,
method
=
RequestMethod
.
GET
)
public
Wrapper
<
List
<
RuleVO
>>
getOrderType
()
{
return
ruleConfigurationService
.
getOrderType
();
}
...
...
system-service/src/main/java/com/ssy/lingxi/system/service/RuleConfigurationService.java
View file @
58bd47ff
...
...
@@ -14,20 +14,15 @@ import java.util.List;
*/
public
interface
RuleConfigurationService
{
/**
* 查询支付方式配置
* @author wrc
* @date 2020/6/11
*/
Wrapper
<
List
<
RuleConfigurationListResponse
>>
ruleConfigurationList
();
/**
* 修改
支付方式
* @
author wrc
* @
date 2020/7/13
* 修改
平台配置
* @
param request 接口参数
* @
return 修改结果
*/
Wrapper
ruleConfigurationUpdate
(
RuleConfigurationRequest
request
);
Wrapper
<
Void
>
ruleConfigurationUpdate
(
RuleConfigurationRequest
request
);
// /**
...
...
@@ -36,7 +31,8 @@ public interface RuleConfigurationService {
// Wrapper<List<RuleConfiguration>> getOrderType();
/**
*售后订单类型查询
* 查询订单类型
* @return 查询结果
*/
Wrapper
<
List
<
RuleVO
>>
getOrderType
();
}
system-service/src/main/java/com/ssy/lingxi/system/service/impl/RuleConfigurationServiceImpl.java
View file @
58bd47ff
...
...
@@ -42,9 +42,7 @@ public class RuleConfigurationServiceImpl implements RuleConfigurationService {
/**
* 查询平台规则配置
*
* @author wrc
* @date 2020/6/11
* @return 查询结果
*/
@Override
public
Wrapper
<
List
<
RuleConfigurationListResponse
>>
ruleConfigurationList
()
{
...
...
@@ -62,14 +60,13 @@ public class RuleConfigurationServiceImpl implements RuleConfigurationService {
}
/**
* 修改平台规则配置
* @param request
* @author wrc
* @date 2020/7/13
* 修改平台配置
* @param request 接口参数
* @return 修改结果
*/
@Transactional
@Override
public
Wrapper
ruleConfigurationUpdate
(
RuleConfigurationRequest
request
)
{
public
Wrapper
<
Void
>
ruleConfigurationUpdate
(
RuleConfigurationRequest
request
)
{
List
<
com
.
ssy
.
lingxi
.
platform
.
manage
.
api
.
vo
.
response
.
RuleConfigurationResponse
>
ruleConfigurations
=
new
ArrayList
<>();
request
.
getRuleConfigurations
().
forEach
(
ruleConfiguration
->
{
com
.
ssy
.
lingxi
.
platform
.
manage
.
api
.
vo
.
response
.
RuleConfigurationResponse
ruleConfigurationNew
=
new
RuleConfigurationResponse
();
...
...
@@ -110,17 +107,16 @@ public class RuleConfigurationServiceImpl implements RuleConfigurationService {
*/
@Override
public
Wrapper
<
List
<
RuleVO
>>
getOrderType
()
{
List
<
RuleConfiguration
>
allByPlatformType
=
ruleConfigurationRepository
.
findAllByPlatformTypeAndIsPitchOn
(
CommonConstant
.
Type
.
ORDER_TYPE
,
CommonConstant
.
State
.
STATE_START
,
Sort
.
by
(
"code"
).
descending
());
List
<
RuleVO
>
collect
=
allByPlatformType
.
stream
().
map
(
temp
->
{
RuleVO
ruleConfiguration
=
new
RuleVO
();
ruleConfiguration
.
setIsPitchOn
(
temp
.
getIsPitchOn
());
ruleConfiguration
.
setPlatformType
(
temp
.
getPlatformType
());
ruleConfiguration
.
setPlatformTypeName
(
temp
.
getPlatformTypeName
());
ruleConfiguration
.
setPlatformWayName
(
temp
.
getPlatformWayName
());
ruleConfiguration
.
setId
(
temp
.
getCode
());
return
ruleConfiguration
;
}).
collect
(
Collectors
.
toList
());
return
Wrapper
.
success
(
collect
);
List
<
RuleConfiguration
>
ruleConfigurations
=
ruleConfigurationRepository
.
findAllByPlatformTypeAndIsPitchOn
(
CommonConstant
.
Type
.
ORDER_TYPE
,
CommonConstant
.
State
.
STATE_START
,
Sort
.
by
(
"code"
).
descending
());
return
Wrapper
.
success
(
ruleConfigurations
.
stream
().
map
(
temp
->
{
RuleVO
ruleVO
=
new
RuleVO
();
ruleVO
.
setIsPitchOn
(
temp
.
getIsPitchOn
());
ruleVO
.
setPlatformType
(
temp
.
getPlatformType
());
ruleVO
.
setPlatformTypeName
(
temp
.
getPlatformTypeName
());
ruleVO
.
setPlatformWayName
(
temp
.
getPlatformWayName
());
ruleVO
.
setId
(
temp
.
getCode
());
return
ruleVO
;
}).
collect
(
Collectors
.
toList
()));
}
// /**
...
...
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