Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
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
base_platform_enterprise
gic-platform-enterprise
Commits
c0ac5a17
Commit
c0ac5a17
authored
Jul 16, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实付配置调整
parent
bb749aa4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
146 additions
and
1 deletions
+146
-1
DataActuallyPaidConfig.java
...a/com/gic/enterprise/dto/data/DataActuallyPaidConfig.java
+58
-0
DataConfigApiService.java
...java/com/gic/enterprise/service/DataConfigApiService.java
+23
-1
DataConfigApiServiceImpl.java
...terprise/service/outer/impl/DataConfigApiServiceImpl.java
+50
-0
DataConfigController.java
...m/gic/enterprise/web/controller/DataConfigController.java
+15
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/data/DataActuallyPaidConfig.java
0 → 100644
View file @
c0ac5a17
package
com
.
gic
.
enterprise
.
dto
.
data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 实付配置
* @ClassName: DataActuallyPaidConfigDTO
* @Description:
* @author guojuxing
* @date 2020/4/17 10:27 AM
*/
public
class
DataActuallyPaidConfig
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
5443298335953111361L
;
/**
*
*/
private
Integer
enterpriseId
;
/**
* 会员业务
*/
private
Integer
memberBusiness
;
/**
* 业绩统计
*/
private
Integer
performanceCount
;
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
DataActuallyPaidConfig
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
return
this
;
}
public
Integer
getMemberBusiness
()
{
return
memberBusiness
;
}
public
DataActuallyPaidConfig
setMemberBusiness
(
Integer
memberBusiness
)
{
this
.
memberBusiness
=
memberBusiness
;
return
this
;
}
public
Integer
getPerformanceCount
()
{
return
performanceCount
;
}
public
DataActuallyPaidConfig
setPerformanceCount
(
Integer
performanceCount
)
{
this
.
performanceCount
=
performanceCount
;
return
this
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/DataConfigApiService.java
View file @
c0ac5a17
...
...
@@ -37,7 +37,7 @@ public interface DataConfigApiService {
ServiceResponse
<
Void
>
initMemberConsumeConfig
(
Integer
enterpriseId
);
/**
* 新增
* 新增
实付配置
* @Title: configActuallyPaid
* @Description:
* @author guojuxing
...
...
@@ -47,6 +47,18 @@ public interface DataConfigApiService {
ServiceResponse
<
Void
>
configActuallyPaid
(
List
<
DataActuallyPaidConfigDTO
>
dtoList
);
/**
* 新增实付配置
* @Title: configActuallyPaid
* @Description:
* @author guojuxing
* @param enterpriseId
* @param memberBusiness 会员业务 1:开启
* @param performanceCount 业绩统计 1:开启
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
configActuallyPaid
(
Integer
enterpriseId
,
Integer
memberBusiness
,
Integer
performanceCount
);
/**
* 实付配置信息
* @Title: listActuallyPaidConfig
* @Description:
...
...
@@ -57,6 +69,16 @@ public interface DataConfigApiService {
ServiceResponse
<
List
<
DataActuallyPaidConfigDTO
>>
listActuallyPaidConfig
(
Integer
enterpriseId
);
/**
* 获取实付配置信息
* @Title: getDataActuallyPaidConfig
* @Description:
* @author guojuxing
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<com.gic.enterprise.dto.data.DataActuallyPaidConfig>
*/
ServiceResponse
<
DataActuallyPaidConfig
>
getDataActuallyPaidConfig
(
Integer
enterpriseId
);
/**
* 新增商户的时候设置实付配置默认数据
* @Title: initActuallyPaidData
* @Description:
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/DataConfigApiServiceImpl.java
View file @
c0ac5a17
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
...
...
@@ -82,6 +84,38 @@ public class DataConfigApiServiceImpl implements DataConfigApiService {
}
@Override
public
ServiceResponse
<
Void
>
configActuallyPaid
(
Integer
enterpriseId
,
Integer
memberBusiness
,
Integer
performanceCount
)
{
if
(
memberBusiness
==
null
)
{
memberBusiness
=
0
;
}
if
(
performanceCount
==
null
)
{
performanceCount
=
0
;
}
List
<
DataActuallyPaidConfigDTO
>
list
=
new
ArrayList
<>(
5
);
list
.
add
(
new
DataActuallyPaidConfigDTO
()
.
setEnterpriseId
(
enterpriseId
)
.
setClassify
(
1
)
.
setConfigStatus
(
memberBusiness
));
list
.
add
(
new
DataActuallyPaidConfigDTO
()
.
setEnterpriseId
(
enterpriseId
)
.
setClassify
(
2
)
.
setConfigStatus
(
memberBusiness
));
list
.
add
(
new
DataActuallyPaidConfigDTO
()
.
setEnterpriseId
(
enterpriseId
)
.
setClassify
(
3
)
.
setConfigStatus
(
performanceCount
));
list
.
add
(
new
DataActuallyPaidConfigDTO
()
.
setEnterpriseId
(
enterpriseId
)
.
setClassify
(
4
)
.
setConfigStatus
(
performanceCount
));
list
.
add
(
new
DataActuallyPaidConfigDTO
()
.
setEnterpriseId
(
enterpriseId
)
.
setClassify
(
5
)
.
setConfigStatus
(
performanceCount
));
return
configActuallyPaid
(
list
);
}
@Override
public
ServiceResponse
<
List
<
DataActuallyPaidConfigDTO
>>
listActuallyPaidConfig
(
Integer
enterpriseId
)
{
List
<
TabDataActuallyPaidConfig
>
list
=
dataActuallyPaidConfigService
.
listByEnterpriseId
(
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
...
...
@@ -93,6 +127,22 @@ public class DataConfigApiServiceImpl implements DataConfigApiService {
}
@Override
public
ServiceResponse
<
DataActuallyPaidConfig
>
getDataActuallyPaidConfig
(
Integer
enterpriseId
)
{
List
<
TabDataActuallyPaidConfig
>
list
=
dataActuallyPaidConfigService
.
listByEnterpriseId
(
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Integer
>
map
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
e
->
e
.
getClassify
().
toString
(),
e
->
e
.
getConfigStatus
()));
//如果没有配置,默认数据
Integer
memberBusiness
=
map
.
get
(
"1"
);
Integer
performanceCount
=
map
.
get
(
"3"
);
return
ServiceResponse
.
success
(
new
DataActuallyPaidConfig
()
.
setEnterpriseId
(
enterpriseId
)
.
setMemberBusiness
(
memberBusiness
)
.
setPerformanceCount
(
performanceCount
));
}
return
ServiceResponse
.
success
(
new
DataActuallyPaidConfig
().
setEnterpriseId
(
enterpriseId
).
setMemberBusiness
(
0
).
setPerformanceCount
(
0
));
}
@Override
public
ServiceResponse
<
Void
>
initActuallyPaidData
(
Integer
enterpriseId
)
{
List
<
TabDataActuallyPaidConfig
>
list
=
dataActuallyPaidConfigService
.
listByEnterpriseId
(-
1
);
list
=
list
.
stream
().
map
(
e
->
e
.
setEnterpriseId
(
enterpriseId
)).
map
(
e
->
e
.
setActuallyPaidConfigId
(
null
))
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/DataConfigController.java
View file @
c0ac5a17
...
...
@@ -56,6 +56,14 @@ public class DataConfigController {
UserDetailUtils
.
getUserDetail
().
getEnterpriseInfo
().
getEnterpriseName
());
}
@RequestMapping
(
"/config-actually-paid-new"
)
public
RestResponse
configActuallyPaidNew
(
Integer
memberBusiness
,
Integer
performanceCount
)
{
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
return
OperationResultUtils
.
operationResult
(
dataConfigApiService
.
configActuallyPaid
(
enterpriseId
,
memberBusiness
,
performanceCount
),
OperationResultUtils
.
LOG_EDIT
+
"数据统计配置-实付配置"
,
UserDetailUtils
.
getUserDetail
().
getEnterpriseInfo
().
getEnterpriseName
());
}
@RequestMapping
(
"/get-actually-paid-config"
)
public
RestResponse
getActuallyPaidConfig
()
{
return
ResultControllerUtils
.
commonResult
(
...
...
@@ -63,6 +71,13 @@ public class DataConfigController {
ActuallyPaidConfigVO
.
class
);
}
@RequestMapping
(
"/get-actually-paid-config-new"
)
public
RestResponse
getActuallyPaidConfigNew
()
{
return
ResultControllerUtils
.
commonResult
(
dataConfigApiService
.
getDataActuallyPaidConfig
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
()),
ActuallyPaidConfigVO
.
class
);
}
@RequestMapping
(
"/config-single-effect"
)
public
RestResponse
configSingleEffect
(
String
jsonArr
)
{
if
(
StringUtil
.
isBlank
(
jsonArr
))
{
...
...
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