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
f8b78a2f
Commit
f8b78a2f
authored
5 years ago
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmp套餐
parent
dd0aa026
master
…
0727_bugfix
1082_bugfix
1151_bugfix
1209_bugfix
1315_bugfix
1439_bugfix
1608_bugfix
1608_from_1619
1619_bugfix
1990_bugfix
2578_bugfix
2580_fix
32400_fix
32599_bugfix
649_bugfix
bigfix_20201028
bugfix_1608_new
bugfix_1760
bugfix_master_1760
change_double
develper
liushaowei
master_mv
mobvista_master
month_flow
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
138 additions
and
9 deletions
+138
-9
ADIAccountController.java
src/main/java/adi/controller/ADIAccountController.java
+30
-5
Contract.java
src/main/java/common/model/Contract.java
+0
-3
ContractRepository.java
src/main/java/common/repository/ContractRepository.java
+3
-0
AccountService.java
src/main/java/common/service/AccountService.java
+8
-0
AccountServiceImpl.java
src/main/java/common/service/impl/AccountServiceImpl.java
+45
-0
DmpAccountController.java
src/main/java/dmp/controller/DmpAccountController.java
+51
-0
IOAccountServiceImpl.java
src/main/java/userio/service/impl/IOAccountServiceImpl.java
+1
-1
No files found.
src/main/java/adi/controller/ADIAccountController.java
View file @
f8b78a2f
...
@@ -4,6 +4,7 @@ package adi.controller;
...
@@ -4,6 +4,7 @@ package adi.controller;
import
adi.model.ADIUser
;
import
adi.model.ADIUser
;
import
adi.service.ADIAccountService
;
import
adi.service.ADIAccountService
;
import
common.model.*
;
import
common.model.*
;
import
common.service.AccountService
;
import
dic.OperateObjectTypeEnum
;
import
dic.OperateObjectTypeEnum
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
...
@@ -15,6 +16,8 @@ import util.ResultStatus;
...
@@ -15,6 +16,8 @@ import util.ResultStatus;
import
util.UserLogThread
;
import
util.UserLogThread
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* Created by mxq on 2017/12/21.
* Created by mxq on 2017/12/21.
...
@@ -25,6 +28,9 @@ public class ADIAccountController {
...
@@ -25,6 +28,9 @@ public class ADIAccountController {
@Autowired
@Autowired
ADIAccountService
tkioAccountService
;
ADIAccountService
tkioAccountService
;
@Autowired
AccountService
accountService
;
//sale
//sale
@RequestMapping
(
value
=
"/findSale"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/findSale"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
...
@@ -61,11 +67,11 @@ public class ADIAccountController {
...
@@ -61,11 +67,11 @@ public class ADIAccountController {
@RequestMapping
(
value
=
"/findone"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/findone"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
ResultModel
findOne
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
email
)
{
public
ResultModel
findOne
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
email
)
{
ADIUser
account4Web
=
tkioAccountService
.
findOne
(
email
);
//
ADIUser account4Web = tkioAccountService.findOne(email);
if
(
null
==
account4Web
){
//
if(null == account4Web){
return
ResultModel
.
ERROR
(
ResultStatus
.
USER_EMPTY
);
//
return ResultModel.ERROR(ResultStatus.USER_EMPTY);
}
//
}
return
ResultModel
.
OK
(
account
4Web
);
return
ResultModel
.
OK
(
account
Service
.
findOne
(
"adi"
,
email
)
);
}
}
@RequestMapping
(
value
=
"/find/reminderlevel"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/find/reminderlevel"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
...
@@ -133,4 +139,23 @@ public class ADIAccountController {
...
@@ -133,4 +139,23 @@ public class ADIAccountController {
return
ResultModel
.
OK
(
tkioAccountService
.
findContractChange
(
email
,
startDate
,
endDate
));
return
ResultModel
.
OK
(
tkioAccountService
.
findContractChange
(
email
,
startDate
,
endDate
));
}
}
@RequestMapping
(
value
=
"/find/function/{accountId}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
findFunction
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
startDate
,
@RequestParam
String
endDate
,
@PathVariable
Long
accountId
)
{
//返回默认数据
Map
result
=
new
HashMap
();
result
.
put
(
"numAccount"
,
0
);
result
.
put
(
"numApp"
,
0
);
result
.
put
(
"numCampaign"
,
0
);
result
.
put
(
"numChannel"
,
0
);
result
.
put
(
"event_sum"
,
0
);
result
.
put
(
"click_sum"
,
0
);
return
ResultModel
.
OK
(
result
);
}
}
}
This diff is collapsed.
Click to expand it.
src/main/java/common/model/Contract.java
View file @
f8b78a2f
...
@@ -70,9 +70,6 @@ public class Contract {
...
@@ -70,9 +70,6 @@ public class Contract {
private
String
erroMessage
;
private
String
erroMessage
;
@Id
@Id
@GeneratedValue
@GeneratedValue
public
Long
getId
()
{
public
Long
getId
()
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/common/repository/ContractRepository.java
View file @
f8b78a2f
...
@@ -76,4 +76,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
...
@@ -76,4 +76,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query
(
value
=
"select * from contract where id = ?1 union all select * from contract where id = ?2"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from contract where id = ?1 union all select * from contract where id = ?2"
,
nativeQuery
=
true
)
List
<
Contract
>
findByTwoIds
(
Long
relationContract
,
Long
relationContract1
);
List
<
Contract
>
findByTwoIds
(
Long
relationContract
,
Long
relationContract1
);
@Query
(
value
=
"SELECT * from contract where platform =?1 and email = ?2 and (status <> 'end' or status <> 'cancel')"
,
nativeQuery
=
true
)
List
<
Contract
>
findByPlatformAndEmailStatus
(
String
platgorm
,
String
email
,
int
status
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/common/service/AccountService.java
0 → 100644
View file @
f8b78a2f
package
common
.
service
;
import
common.model.Account4Web
;
public
interface
AccountService
{
Account4Web
findOne
(
String
dmp
,
String
email
);
}
This diff is collapsed.
Click to expand it.
src/main/java/common/service/impl/AccountServiceImpl.java
0 → 100644
View file @
f8b78a2f
package
common
.
service
.
impl
;
import
common.model.Account4Web
;
import
common.model.Contract
;
import
common.model.PackageBase
;
import
common.repository.ContractRepository
;
import
common.repository.PackageBaseRepository
;
import
common.service.AccountService
;
import
office.model.BussinessMan
;
import
office.repository.BussinessManRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
AccountServiceImpl
implements
AccountService
{
@Autowired
ContractRepository
contractRepository
;
@Autowired
BussinessManRepository
bussinessManRepository
;
@Autowired
PackageBaseRepository
packageBaseRepository
;
@Override
public
Account4Web
findOne
(
String
platgorm
,
String
email
)
{
List
<
Contract
>
contract
=
contractRepository
.
findByPlatformAndEmailStatus
(
platgorm
,
email
,
1
);
Account4Web
account4Web
=
new
Account4Web
();
Contract
thecontract
=
contract
.
get
(
0
);
PackageBase
packageBase
=
packageBaseRepository
.
findOne
(
thecontract
.
getPriceLevel
());
account4Web
.
setPackageType
(
packageBase
.
getPackageName
());
BussinessMan
bussinessMan
=
bussinessManRepository
.
findOne
(
thecontract
.
getSale
());
account4Web
.
setSaleName
(
bussinessMan
.
getName
());
return
account4Web
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/dmp/controller/DmpAccountController.java
0 → 100644
View file @
f8b78a2f
package
dmp
.
controller
;
import
common.model.Account4Web
;
import
common.model.User
;
import
common.service.AccountService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
security.annotation.CurrentAccount
;
import
util.ResultModel
;
import
util.ResultStatus
;
import
java.util.HashMap
;
import
java.util.Map
;
@Controller
@RequestMapping
(
"dmp/marketing/accountmng"
)
public
class
DmpAccountController
{
@Autowired
AccountService
accountService
;
//功能使用查询
@RequestMapping
(
value
=
"/find/function/{accountId}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
findFunction
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
startDate
,
@RequestParam
String
endDate
,
@PathVariable
Long
accountId
)
{
//返回默认数据
Map
result
=
new
HashMap
();
result
.
put
(
"numAccount"
,
0
);
result
.
put
(
"numApp"
,
0
);
result
.
put
(
"numCampaign"
,
0
);
result
.
put
(
"numChannel"
,
0
);
result
.
put
(
"event_sum"
,
0
);
result
.
put
(
"click_sum"
,
0
);
return
ResultModel
.
OK
(
result
);
}
@RequestMapping
(
value
=
"/findone"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
findOne
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
email
)
{
return
ResultModel
.
OK
(
accountService
.
findOne
(
"dmp"
,
email
));
}
}
This diff is collapsed.
Click to expand it.
src/main/java/userio/service/impl/IOAccountServiceImpl.java
View file @
f8b78a2f
...
@@ -390,7 +390,7 @@ public class IOAccountServiceImpl implements IOAccountService {
...
@@ -390,7 +390,7 @@ public class IOAccountServiceImpl implements IOAccountService {
BigInteger
numAccount
=
accountRepository
.
countByRootParent
(
account
,
startDate
,
endDate
);
BigInteger
numAccount
=
accountRepository
.
countByRootParent
(
account
,
startDate
,
endDate
);
BigInteger
numApp
=
appRepository
.
countByAccount
(
idList
,
startDate
,
endDate
);
BigInteger
numApp
=
appRepository
.
countByAccount
(
idList
,
startDate
,
endDate
);
result
.
put
(
"numAccount"
,
numAccount
.
intValue
());
result
.
put
(
"numAccount"
,
numAccount
.
intValue
());
result
.
put
(
"numApp"
,
numApp
.
intValue
());
result
.
put
(
"numApp"
,
numApp
.
intValue
());
return
result
;
return
result
;
}
}
...
...
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