Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
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
reyun
manager
Commits
45a65f1c
Commit
45a65f1c
authored
6 years ago
by
manxiaoqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpu
parent
c5c1e13d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
99 additions
and
6 deletions
+99
-6
workspace.xml
.idea/workspace.xml
+0
-0
ContractController.java
src/main/java/common/controller/ContractController.java
+2
-2
BPUContract.java
src/main/java/common/model/BPUContract.java
+59
-0
BPUContractRepository.java
src/main/java/common/repository/BPUContractRepository.java
+15
-0
ContractService.java
src/main/java/common/service/ContractService.java
+1
-1
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+18
-3
TkioAccountServiceImpl.java
src/main/java/tkio/service/impl/TkioAccountServiceImpl.java
+4
-0
No files found.
.idea/workspace.xml
View file @
45a65f1c
This diff is collapsed.
Click to expand it.
src/main/java/common/controller/ContractController.java
View file @
45a65f1c
...
@@ -167,8 +167,8 @@ public class ContractController {
...
@@ -167,8 +167,8 @@ public class ContractController {
@RequestMapping
(
value
=
"find/pricelevel"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"find/pricelevel"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
ResultModel
findPricelevel
(
@CurrentAccount
User
loginAccount
)
{
public
ResultModel
findPricelevel
(
@CurrentAccount
User
loginAccount
,
@PathVariable
String
platform
)
{
return
ResultModel
.
OK
(
service
.
findSetmeal
());
return
ResultModel
.
OK
(
service
.
findSetmeal
(
platform
));
}
}
@RequestMapping
(
value
=
"find/increment"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"find/increment"
,
method
=
RequestMethod
.
GET
)
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/model/BPUContract.java
0 → 100644
View file @
45a65f1c
package
common
.
model
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
/**
* Created by mxq on 2018/1/17.
*/
@Entity
public
class
BPUContract
{
private
Long
id
;
private
String
packageName
;
private
String
code
;
private
String
type
;
private
String
product
;
public
String
getProduct
()
{
return
product
;
}
public
void
setProduct
(
String
product
)
{
this
.
product
=
product
;
}
@Id
@GeneratedValue
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getPackageName
()
{
return
packageName
;
}
public
void
setPackageName
(
String
packageName
)
{
this
.
packageName
=
packageName
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/common/repository/BPUContractRepository.java
0 → 100644
View file @
45a65f1c
package
common
.
repository
;
import
common.model.BPUContract
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
@Transactional
public
interface
BPUContractRepository
extends
JpaRepository
<
BPUContract
,
Long
>
{
@Query
(
value
=
"SELECT * from bpucontract where product = ?1"
,
nativeQuery
=
true
)
List
<
BPUContract
>
findByProduct
(
String
code
);
}
This diff is collapsed.
Click to expand it.
src/main/java/common/service/ContractService.java
View file @
45a65f1c
...
@@ -19,7 +19,7 @@ public interface ContractService {
...
@@ -19,7 +19,7 @@ public interface ContractService {
String
getContractCode
(
String
code
);
String
getContractCode
(
String
code
);
List
findSetmeal
();
List
findSetmeal
(
String
platform
);
//增值服务
//增值服务
List
<
ContractIncrement
>
findIncrement
();
List
<
ContractIncrement
>
findIncrement
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
45a65f1c
...
@@ -70,6 +70,8 @@ public class ContractServiceImpl implements ContractService{
...
@@ -70,6 +70,8 @@ public class ContractServiceImpl implements ContractService{
UserService
userService
;
UserService
userService
;
@Autowired
@Autowired
IncrementFlowRepository
incrementFlowRepository
;
IncrementFlowRepository
incrementFlowRepository
;
@Autowired
BPUContractRepository
bpuContractRepository
;
@Override
@Override
public
Map
<
String
,
Object
>
checkAccount
(
String
email
,
String
platfrom
)
{
public
Map
<
String
,
Object
>
checkAccount
(
String
email
,
String
platfrom
)
{
...
@@ -147,16 +149,20 @@ public class ContractServiceImpl implements ContractService{
...
@@ -147,16 +149,20 @@ public class ContractServiceImpl implements ContractService{
}
}
@Override
@Override
public
List
findSetmeal
()
{
public
List
findSetmeal
(
String
platform
)
{
List
list
=
new
ArrayList
();
List
list
=
new
ArrayList
();
if
(
"tkio"
.
equals
(
platform
)
||
"io"
.
equals
(
platform
)){
List
<
PackageType
>
packageTypeList
=
packageTypeRepository
.
findAll
();
List
<
PackageType
>
packageTypeList
=
packageTypeRepository
.
findAll
();
for
(
PackageType
p
:
packageTypeList
){
for
(
PackageType
p
:
packageTypeList
){
p
.
setType
(
"main"
);
p
.
setType
(
"main"
);
list
.
add
(
p
);
list
.
add
(
p
);
}
}
List
<
ContractIncrement
>
increments
=
contractIncrementRepository
.
findAll
();
List
<
ContractIncrement
>
increments
=
contractIncrementRepository
.
findAll
();
list
.
addAll
(
increments
);
list
.
addAll
(
increments
);
}
else
if
(
"userdesk"
.
equals
(
platform
)
||
"dmp"
.
equals
(
platform
)
||
"fake"
.
equals
(
platform
))
{
list
=
bpuContractRepository
.
findByProduct
(
platform
);
}
return
list
;
return
list
;
}
}
...
@@ -397,6 +403,13 @@ public class ContractServiceImpl implements ContractService{
...
@@ -397,6 +403,13 @@ public class ContractServiceImpl implements ContractService{
incremenMap
.
put
(
s
.
getId
(),
s
.
getPackageName
());
incremenMap
.
put
(
s
.
getId
(),
s
.
getPackageName
());
}
}
}
}
List
<
BPUContract
>
bpuContractList
=
bpuContractRepository
.
findAll
();
Map
<
Long
,
String
>
bpuMap
=
new
HashMap
<>();
if
(
ValidateUtil
.
isValid
(
bpuContractList
)){
for
(
BPUContract
s:
bpuContractList
){
bpuMap
.
put
(
s
.
getId
(),
s
.
getPackageName
());
}
}
List
<
Contract
>
contractList
=
null
;
List
<
Contract
>
contractList
=
null
;
if
(
loginAccount
.
getRole
().
equals
(
RoleEnum
.
SOUTH_BUSSINUSS
.
getKey
())
||
loginAccount
.
getRole
().
equals
(
RoleEnum
.
NORTH_BUSSINUSS
.
getKey
())){
if
(
loginAccount
.
getRole
().
equals
(
RoleEnum
.
SOUTH_BUSSINUSS
.
getKey
())
||
loginAccount
.
getRole
().
equals
(
RoleEnum
.
NORTH_BUSSINUSS
.
getKey
())){
...
@@ -415,8 +428,10 @@ public class ContractServiceImpl implements ContractService{
...
@@ -415,8 +428,10 @@ public class ContractServiceImpl implements ContractService{
if
(
ValidateUtil
.
isValid
(
contractList
)){
if
(
ValidateUtil
.
isValid
(
contractList
)){
for
(
Contract
c
:
contractList
){
for
(
Contract
c
:
contractList
){
c
.
setSaleName
(
saleMap
.
containsKey
(
c
.
getSale
())
?
saleMap
.
get
(
c
.
getSale
())
:
""
);
c
.
setSaleName
(
saleMap
.
containsKey
(
c
.
getSale
())
?
saleMap
.
get
(
c
.
getSale
())
:
""
);
if
(
c
.
getType
().
equals
(
ContractTypeEnum
.
MAIN
.
getKey
())){
if
(
c
.
getType
().
equals
(
ContractTypeEnum
.
MAIN
.
getKey
())
&&
platfrom
.
contains
(
"io"
)
){
c
.
setPriceLevelName
(
typeMap
.
containsKey
(
c
.
getPriceLevel
())
?
typeMap
.
get
(
c
.
getPriceLevel
())
:
""
);
c
.
setPriceLevelName
(
typeMap
.
containsKey
(
c
.
getPriceLevel
())
?
typeMap
.
get
(
c
.
getPriceLevel
())
:
""
);
}
else
if
(
c
.
getType
().
equals
(
ContractTypeEnum
.
MAIN
.
getKey
())){
c
.
setPriceLevelName
(
bpuMap
.
containsKey
(
c
.
getPriceLevel
())
?
bpuMap
.
get
(
c
.
getPriceLevel
())
:
""
);
}
else
{
}
else
{
c
.
setPriceLevelName
(
incremenMap
.
containsKey
(
c
.
getPriceLevel
())
?
incremenMap
.
get
(
c
.
getPriceLevel
())
:
""
);
c
.
setPriceLevelName
(
incremenMap
.
containsKey
(
c
.
getPriceLevel
())
?
incremenMap
.
get
(
c
.
getPriceLevel
())
:
""
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/tkio/service/impl/TkioAccountServiceImpl.java
View file @
45a65f1c
...
@@ -599,6 +599,10 @@ public class TkioAccountServiceImpl implements TkioAccountService {
...
@@ -599,6 +599,10 @@ public class TkioAccountServiceImpl implements TkioAccountService {
Contract
contract
=
contractRepository
.
findByCode
(
resource
.
getContractCode
());
Contract
contract
=
contractRepository
.
findByCode
(
resource
.
getContractCode
());
//增值服务
//增值服务
if
(
contract
.
getType
().
equals
(
ContractTypeEnum
.
INCREMENT
.
getKey
())){
if
(
contract
.
getType
().
equals
(
ContractTypeEnum
.
INCREMENT
.
getKey
())){
//回本分析不作操作
if
(
contract
.
getPriceLevel
().
longValue
()
==
3L
){
return
;
}
Crowd
crowd
=
crowdRepository
.
findOne
(
resource
.
getContractCode
());
Crowd
crowd
=
crowdRepository
.
findOne
(
resource
.
getContractCode
());
if
(
null
!=
crowd
){
if
(
null
!=
crowd
){
crowd
.
setPayment
(
1
);
crowd
.
setPayment
(
1
);
...
...
This diff is collapsed.
Click to expand it.
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