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
2f93ac1d
Commit
2f93ac1d
authored
Aug 05, 2021
by
技术总监-万宁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改获取订单类型
parent
8a7b1395
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
17 deletions
+95
-17
RuleConfigurationController.java
...lingxi/system/controller/RuleConfigurationController.java
+2
-11
RuleVO.java
...ain/java/com/ssy/lingxi/system/model/response/RuleVO.java
+63
-0
RuleConfigurationService.java
...m/ssy/lingxi/system/service/RuleConfigurationService.java
+7
-2
RuleConfigurationServiceImpl.java
...gxi/system/service/impl/RuleConfigurationServiceImpl.java
+23
-4
No files found.
system-service/src/main/java/com/ssy/lingxi/system/controller/RuleConfigurationController.java
View file @
2f93ac1d
...
...
@@ -3,7 +3,7 @@ package com.ssy.lingxi.system.controller;
import
com.ssy.lingxi.common.response.Wrapper
;
import
com.ssy.lingxi.system.dto.request.RuleConfigurationRequest
;
import
com.ssy.lingxi.system.dto.response.RuleConfigurationListResponse
;
import
com.ssy.lingxi.system.
entity.RuleConfiguration
;
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
;
...
...
@@ -42,16 +42,7 @@ public class RuleConfigurationController {
*售后订单类型查询
*/
@GetMapping
(
"/rule/getOrderType"
)
public
Wrapper
<
List
<
Rule
Configuration
>>
getOrderType
()
{
public
Wrapper
<
List
<
Rule
VO
>>
getOrderType
()
{
return
ruleConfigurationService
.
getOrderType
();
}
}
system-service/src/main/java/com/ssy/lingxi/system/model/response/RuleVO.java
0 → 100644
View file @
2f93ac1d
package
com
.
ssy
.
lingxi
.
system
.
model
.
response
;
import
java.io.Serializable
;
/**
* 获取平台规则配置返回
* @author 万宁
* @version 2.0.0
* @date 2021-08-05
*/
public
class
RuleVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
9084675120961709951L
;
private
Integer
id
;
private
Integer
platformType
;
private
String
platformWayName
;
private
Integer
isPitchOn
;
private
String
platformTypeName
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getPlatformType
()
{
return
platformType
;
}
public
void
setPlatformType
(
Integer
platformType
)
{
this
.
platformType
=
platformType
;
}
public
String
getPlatformWayName
()
{
return
platformWayName
;
}
public
void
setPlatformWayName
(
String
platformWayName
)
{
this
.
platformWayName
=
platformWayName
;
}
public
Integer
getIsPitchOn
()
{
return
isPitchOn
;
}
public
void
setIsPitchOn
(
Integer
isPitchOn
)
{
this
.
isPitchOn
=
isPitchOn
;
}
public
String
getPlatformTypeName
()
{
return
platformTypeName
;
}
public
void
setPlatformTypeName
(
String
platformTypeName
)
{
this
.
platformTypeName
=
platformTypeName
;
}
}
system-service/src/main/java/com/ssy/lingxi/system/service/RuleConfigurationService.java
View file @
2f93ac1d
...
...
@@ -3,7 +3,7 @@ package com.ssy.lingxi.system.service;
import
com.ssy.lingxi.common.response.Wrapper
;
import
com.ssy.lingxi.system.dto.request.RuleConfigurationRequest
;
import
com.ssy.lingxi.system.dto.response.RuleConfigurationListResponse
;
import
com.ssy.lingxi.system.
entity.RuleConfiguration
;
import
com.ssy.lingxi.system.
model.response.RuleVO
;
import
java.util.List
;
...
...
@@ -30,8 +30,13 @@ public interface RuleConfigurationService {
// /**
// *售后订单类型查询
// */
// Wrapper<List<RuleConfiguration>> getOrderType();
/**
*售后订单类型查询
*/
Wrapper
<
List
<
Rule
Configuration
>>
getOrderType
();
Wrapper
<
List
<
Rule
VO
>>
getOrderType
();
}
system-service/src/main/java/com/ssy/lingxi/system/service/impl/RuleConfigurationServiceImpl.java
View file @
2f93ac1d
...
...
@@ -12,6 +12,7 @@ import com.ssy.lingxi.system.dao.RuleConfigurationRepository;
import
com.ssy.lingxi.system.dto.request.RuleConfigurationRequest
;
import
com.ssy.lingxi.system.dto.response.RuleConfigurationListResponse
;
import
com.ssy.lingxi.system.entity.RuleConfiguration
;
import
com.ssy.lingxi.system.model.response.RuleVO
;
import
com.ssy.lingxi.system.service.RuleConfigurationService
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Service
;
...
...
@@ -108,17 +109,35 @@ public class RuleConfigurationServiceImpl implements RuleConfigurationService {
* 售后订单类型查询
*/
@Override
public
Wrapper
<
List
<
Rule
Configuration
>>
getOrderType
()
{
public
Wrapper
<
List
<
Rule
VO
>>
getOrderType
()
{
List
<
RuleConfiguration
>
allByPlatformType
=
ruleConfigurationRepository
.
findAllByPlatformTypeAndIsPitchOn
(
CommonConstant
.
Type
.
ORDER_TYPE
,
CommonConstant
.
State
.
STATE_START
,
Sort
.
by
(
"code"
).
descending
());
List
<
Rule
Configuration
>
collect
=
allByPlatformType
.
stream
().
map
(
temp
->
{
Rule
Configuration
ruleConfiguration
=
new
RuleConfiguration
();
List
<
Rule
VO
>
collect
=
allByPlatformType
.
stream
().
map
(
temp
->
{
Rule
VO
ruleConfiguration
=
new
RuleVO
();
ruleConfiguration
.
setIsPitchOn
(
temp
.
getIsPitchOn
());
ruleConfiguration
.
setPlatformType
(
temp
.
getPlatformType
());
ruleConfiguration
.
setPlatformTypeName
(
temp
.
getPlatformTypeName
());
ruleConfiguration
.
setPlatformWayName
(
temp
.
getPlatformWayName
());
ruleConfiguration
.
setId
(
Long
.
valueOf
(
temp
.
getCode
()
));
ruleConfiguration
.
setId
(
temp
.
getCode
(
));
return
ruleConfiguration
;
}).
collect
(
Collectors
.
toList
());
return
Wrapper
.
success
(
collect
);
}
// /**
// * 售后订单类型查询
// */
// @Override
// public Wrapper<List<RuleConfiguration>> getOrderType() {
// List<RuleConfiguration> allByPlatformType = ruleConfigurationRepository.findAllByPlatformTypeAndIsPitchOn(CommonConstant.Type.ORDER_TYPE,CommonConstant.State.STATE_START,Sort.by("code").descending());
// List<RuleConfiguration> collect = allByPlatformType.stream().map(temp -> {
// RuleConfiguration ruleConfiguration = new RuleConfiguration();
// ruleConfiguration.setIsPitchOn(temp.getIsPitchOn());
// ruleConfiguration.setPlatformType(temp.getPlatformType());
// ruleConfiguration.setPlatformTypeName(temp.getPlatformTypeName());
// ruleConfiguration.setPlatformWayName(temp.getPlatformWayName());
// ruleConfiguration.setId(Long.valueOf(temp.getCode()));
// return ruleConfiguration;
// }).collect(Collectors.toList());
// return Wrapper.success(collect);
// }
}
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