Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
browser-backend
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
Administrator
browser-backend
Commits
1091834e
Commit
1091834e
authored
Mar 13, 2020
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分配店铺接口
子用户接口
parent
e49a4064
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
248 additions
and
41 deletions
+248
-41
AccountController.java
.../browserbackend/account/controller/AccountController.java
+0
-26
AdminController.java
...ec/browserbackend/account/controller/AdminController.java
+55
-0
Account.java
...java/com/edgec/browserbackend/account/domain/Account.java
+20
-0
SubUserPageResultDto.java
...dgec/browserbackend/account/dto/SubUserPageResultDto.java
+32
-0
SubUsersDto.java
...ava/com/edgec/browserbackend/account/dto/SubUsersDto.java
+54
-0
SubUsersRequestDto.java
.../edgec/browserbackend/account/dto/SubUsersRequestDto.java
+77
-0
AccountRepository.java
.../browserbackend/account/repository/AccountRepository.java
+1
-1
AccountService.java
.../edgec/browserbackend/account/service/AccountService.java
+7
-12
AccountServiceImpl.java
...owserbackend/account/service/impl/AccountServiceImpl.java
+0
-0
ShopServiceImpl.java
.../browserbackend/browser/service/Impl/ShopServiceImpl.java
+2
-2
No files found.
src/main/java/com/edgec/browserbackend/account/controller/AccountController.java
View file @
1091834e
...
@@ -49,11 +49,6 @@ public class AccountController {
...
@@ -49,11 +49,6 @@ public class AccountController {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AccountController
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AccountController
.
class
);
@RequestMapping
(
path
=
"/precharge/{name}"
,
method
=
RequestMethod
.
POST
)
public
IpChargeResultDto
preCharge
(
@PathVariable
String
name
,
@RequestBody
IpChargeRequestDto
requestDto
)
{
return
accountService
.
preCharge
(
name
,
requestDto
);
}
@RequestMapping
(
path
=
"/prechargeIp/{name}/{amount}/{money}"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
path
=
"/prechargeIp/{name}/{amount}/{money}"
,
method
=
RequestMethod
.
POST
)
public
IpChargeResultDto
preChargeIp
(
@PathVariable
String
name
,
@PathVariable
int
amount
,
@PathVariable
double
money
)
{
public
IpChargeResultDto
preChargeIp
(
@PathVariable
String
name
,
@PathVariable
int
amount
,
@PathVariable
double
money
)
{
return
accountService
.
preChargeIp
(
name
,
amount
,
money
);
return
accountService
.
preChargeIp
(
name
,
amount
,
money
);
...
@@ -64,11 +59,6 @@ public class AccountController {
...
@@ -64,11 +59,6 @@ public class AccountController {
return
accountService
.
preChargeByMoney
(
name
,
money
);
return
accountService
.
preChargeByMoney
(
name
,
money
);
}
}
@RequestMapping
(
path
=
"/charge/{name}"
,
method
=
RequestMethod
.
PUT
)
public
IpChargeResultDto
charge
(
@PathVariable
String
name
,
@RequestBody
IpChargeRequestDto
requestDto
)
{
return
accountService
.
charge
(
name
,
requestDto
);
}
@RequestMapping
(
path
=
"/charge/money"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
path
=
"/charge/money"
,
method
=
RequestMethod
.
PUT
)
public
IpChargeResultDto
chargeByMoney
(
@RequestParam
(
"accountId"
)
String
name
,
@RequestParam
(
"money"
)
double
money
,
@RequestBody
IpChargeRequestDto
requestDto
)
{
public
IpChargeResultDto
chargeByMoney
(
@RequestParam
(
"accountId"
)
String
name
,
@RequestParam
(
"money"
)
double
money
,
@RequestBody
IpChargeRequestDto
requestDto
)
{
return
accountService
.
chargeByMoney
(
name
,
money
,
requestDto
);
return
accountService
.
chargeByMoney
(
name
,
money
,
requestDto
);
...
@@ -344,17 +334,6 @@ public class AccountController {
...
@@ -344,17 +334,6 @@ public class AccountController {
return
accountService
.
getAccountByCellphone
(
cellphone
);
return
accountService
.
getAccountByCellphone
(
cellphone
);
}
}
@RequestMapping
(
path
=
"/fee/{region}/{instanceSpecKey}/{chargeType}"
,
method
=
RequestMethod
.
GET
)
@Deprecated
public
String
queryVpsRate
(
@PathVariable
String
region
,
@PathVariable
String
instanceSpecKey
,
@PathVariable
String
chargeType
)
{
return
accountService
.
queryVpsRate
(
region
,
instanceSpecKey
,
chargeType
);
}
@RequestMapping
(
path
=
"/charge/rate/{username}"
,
method
=
RequestMethod
.
POST
)
public
String
queryUserChargeRate
(
@PathVariable
String
username
,
@RequestBody
IpChargeRequestDto
requestDto
)
{
return
accountService
.
queryUserChargeRate
(
username
,
requestDto
);
}
@RequestMapping
(
path
=
"/fee/userprepaidbilling"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
path
=
"/fee/userprepaidbilling"
,
method
=
RequestMethod
.
GET
)
public
Page
<
UserPrePaidBilling
>
queryPerPaid
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"0"
)
int
page
,
public
Page
<
UserPrePaidBilling
>
queryPerPaid
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
value
=
"size"
,
defaultValue
=
"10"
)
int
size
,
@RequestParam
(
value
=
"size"
,
defaultValue
=
"10"
)
int
size
,
...
@@ -408,11 +387,6 @@ public class AccountController {
...
@@ -408,11 +387,6 @@ public class AccountController {
return
accountService
.
listAccountBySingupDate
(
pageable
,
beginDate
,
endDate
);
return
accountService
.
listAccountBySingupDate
(
pageable
,
beginDate
,
endDate
);
}
}
@RequestMapping
(
path
=
"/preorder/{userName}"
,
method
=
RequestMethod
.
POST
)
public
IpChargeResultDto
preOrderOption
(
@PathVariable
String
userName
,
@RequestBody
IpChargeRequestDto
requestDto
)
{
return
accountService
.
preOrder
(
userName
,
requestDto
);
}
@RequestMapping
(
path
=
"/preorder/delete/{username}"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
path
=
"/preorder/delete/{username}"
,
method
=
RequestMethod
.
POST
)
public
String
deletePreOrder
(
@PathVariable
(
"username"
)
String
username
)
{
public
String
deletePreOrder
(
@PathVariable
(
"username"
)
String
username
)
{
return
accountService
.
deletePreOrder
(
username
);
return
accountService
.
deletePreOrder
(
username
);
...
...
src/main/java/com/edgec/browserbackend/account/controller/AdminController.java
View file @
1091834e
...
@@ -3,7 +3,9 @@ package com.edgec.browserbackend.account.controller;
...
@@ -3,7 +3,9 @@ package com.edgec.browserbackend.account.controller;
import
com.edgec.browserbackend.account.domain.Account
;
import
com.edgec.browserbackend.account.domain.Account
;
import
com.edgec.browserbackend.account.domain.AccountDto
;
import
com.edgec.browserbackend.account.domain.AccountDto
;
import
com.edgec.browserbackend.account.dto.ResultDto
;
import
com.edgec.browserbackend.account.dto.ResultDto
;
import
com.edgec.browserbackend.account.dto.SubUsersRequestDto
;
import
com.edgec.browserbackend.account.service.AccountService
;
import
com.edgec.browserbackend.account.service.AccountService
;
import
com.edgec.browserbackend.browser.dto.ShopRequestDto
;
import
com.edgec.browserbackend.common.commons.error.ClientRequestException
;
import
com.edgec.browserbackend.common.commons.error.ClientRequestException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -38,6 +40,23 @@ public class AdminController {
...
@@ -38,6 +40,23 @@ public class AdminController {
return
resultDto
;
return
resultDto
;
}
}
@RequestMapping
(
path
=
"/subuser/add"
,
method
=
RequestMethod
.
POST
)
public
ResultDto
createSubUsers
(
Principal
principal
,
@RequestBody
SubUsersRequestDto
subUsersRequestDto
)
{
ResultDto
resultDto
=
new
ResultDto
();
try
{
LimitedUsers
.
filterIfLimitedUser
(
principal
);
accountService
.
createSubUsers
(
principal
.
getName
(),
subUsersRequestDto
);
resultDto
.
setStatus
(
0
);
}
catch
(
ClientRequestException
e
)
{
resultDto
.
setStatus
(-
1
);
Map
<
String
,
Object
>
statusInfo
=
new
HashMap
<>();
statusInfo
.
put
(
"code"
,
e
.
getErrorCode
());
statusInfo
.
put
(
"message"
,
e
.
getMessage
());
resultDto
.
setStatusInfo
(
statusInfo
);
}
return
resultDto
;
}
@RequestMapping
(
path
=
"/subuser/updateone"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
path
=
"/subuser/updateone"
,
method
=
RequestMethod
.
PUT
)
public
ResultDto
saveSubAccount
(
Principal
principal
,
@PathVariable
String
child
,
@Valid
@RequestBody
AccountDto
user
)
{
public
ResultDto
saveSubAccount
(
Principal
principal
,
@PathVariable
String
child
,
@Valid
@RequestBody
AccountDto
user
)
{
ResultDto
resultDto
=
new
ResultDto
();
ResultDto
resultDto
=
new
ResultDto
();
...
@@ -56,6 +75,23 @@ public class AdminController {
...
@@ -56,6 +75,23 @@ public class AdminController {
return
resultDto
;
return
resultDto
;
}
}
@RequestMapping
(
path
=
"/subuser/update"
,
method
=
RequestMethod
.
POST
)
public
ResultDto
saveSubUsers
(
Principal
principal
,
@RequestBody
SubUsersRequestDto
subUsersRequestDto
)
{
ResultDto
resultDto
=
new
ResultDto
();
try
{
LimitedUsers
.
filterIfLimitedUser
(
principal
);
accountService
.
saveSubUsers
(
principal
.
getName
(),
subUsersRequestDto
);
resultDto
.
setStatus
(
0
);
}
catch
(
ClientRequestException
e
)
{
resultDto
.
setStatus
(-
1
);
Map
<
String
,
Object
>
statusInfo
=
new
HashMap
<>();
statusInfo
.
put
(
"code"
,
e
.
getErrorCode
());
statusInfo
.
put
(
"message"
,
e
.
getMessage
());
resultDto
.
setStatusInfo
(
statusInfo
);
}
return
resultDto
;
}
@RequestMapping
(
path
=
"/subuser/del"
,
method
=
RequestMethod
.
DELETE
)
@RequestMapping
(
path
=
"/subuser/del"
,
method
=
RequestMethod
.
DELETE
)
public
ResultDto
deleteSubAccount
(
Principal
principal
,
@PathVariable
String
child
)
{
public
ResultDto
deleteSubAccount
(
Principal
principal
,
@PathVariable
String
child
)
{
ResultDto
resultDto
=
new
ResultDto
();
ResultDto
resultDto
=
new
ResultDto
();
...
@@ -73,4 +109,23 @@ public class AdminController {
...
@@ -73,4 +109,23 @@ public class AdminController {
return
resultDto
;
return
resultDto
;
}
}
@RequestMapping
(
path
=
"/subuser/list"
,
method
=
RequestMethod
.
POST
)
public
ResultDto
getSubUserList
(
Principal
principal
,
@RequestBody
ShopRequestDto
shopRequestDto
)
{
ResultDto
resultDto
=
new
ResultDto
();
try
{
LimitedUsers
.
filterIfLimitedUser
(
principal
);
resultDto
.
setData
(
accountService
.
getSubUserList
(
principal
.
getName
(),
shopRequestDto
.
getPage
(),
shopRequestDto
.
getAmount
()));
resultDto
.
setStatus
(
0
);
}
catch
(
ClientRequestException
e
)
{
resultDto
.
setStatus
(-
1
);
Map
<
String
,
Object
>
statusInfo
=
new
HashMap
<>();
statusInfo
.
put
(
"code"
,
e
.
getErrorCode
());
statusInfo
.
put
(
"message"
,
e
.
getMessage
());
resultDto
.
setStatusInfo
(
statusInfo
);
}
return
resultDto
;
}
}
}
src/main/java/com/edgec/browserbackend/account/domain/Account.java
View file @
1091834e
...
@@ -23,6 +23,8 @@ public class Account {
...
@@ -23,6 +23,8 @@ public class Account {
private
Date
signupDate
=
new
Date
();
private
Date
signupDate
=
new
Date
();
private
String
nickname
;
private
String
email
;
private
String
email
;
private
String
companyName
;
private
String
companyName
;
...
@@ -43,6 +45,8 @@ public class Account {
...
@@ -43,6 +45,8 @@ public class Account {
private
Promotion
promotion
;
private
Promotion
promotion
;
private
String
comment
;
private
List
<
String
>
whiteList
=
Arrays
.
asList
(
private
List
<
String
>
whiteList
=
Arrays
.
asList
(
"amazon.com"
,
"amazon.com"
,
"amazon.jp"
,
"amazon.jp"
,
...
@@ -272,4 +276,20 @@ public class Account {
...
@@ -272,4 +276,20 @@ public class Account {
public
void
setPromotion
(
Promotion
promotion
)
{
public
void
setPromotion
(
Promotion
promotion
)
{
this
.
promotion
=
promotion
;
this
.
promotion
=
promotion
;
}
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
String
getComment
()
{
return
comment
;
}
public
void
setComment
(
String
comment
)
{
this
.
comment
=
comment
;
}
}
}
src/main/java/com/edgec/browserbackend/account/dto/SubUserPageResultDto.java
0 → 100644
View file @
1091834e
package
com
.
edgec
.
browserbackend
.
account
.
dto
;
import
com.edgec.browserbackend.browser.dto.PageInfo
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @Desc
* @Author jason
* @CreateTime 2020/3/13 5:44 下午
**/
public
class
SubUserPageResultDto
{
List
<
SubUsersDto
>
userList
=
new
ArrayList
<>();
PageInfo
userPage
=
new
PageInfo
();
public
List
<
SubUsersDto
>
getUserList
()
{
return
userList
;
}
public
void
setUserList
(
List
<
SubUsersDto
>
userList
)
{
this
.
userList
=
userList
;
}
public
PageInfo
getUserPage
()
{
return
userPage
;
}
public
void
setUserPage
(
PageInfo
userPage
)
{
this
.
userPage
=
userPage
;
}
}
src/main/java/com/edgec/browserbackend/account/dto/SubUsersDto.java
0 → 100644
View file @
1091834e
package
com
.
edgec
.
browserbackend
.
account
.
dto
;
import
com.edgec.browserbackend.account.domain.Account
;
/**
* @Desc
* @Author jason
* @CreateTime 2020/3/13 5:37 下午
**/
public
class
SubUsersDto
{
private
String
username
;
private
String
nickname
;
private
int
permission
;
private
String
comment
;
public
SubUsersDto
(
Account
account
)
{
this
.
permission
=
account
.
getPermission
();
this
.
nickname
=
account
.
getNickname
();
this
.
username
=
account
.
getName
();
this
.
comment
=
account
.
getComment
();
}
public
String
getComment
()
{
return
comment
;
}
public
void
setComment
(
String
comment
)
{
this
.
comment
=
comment
;
}
public
int
getPermission
()
{
return
permission
;
}
public
void
setPermission
(
int
permission
)
{
this
.
permission
=
permission
;
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
}
src/main/java/com/edgec/browserbackend/account/dto/SubUsersRequestDto.java
0 → 100644
View file @
1091834e
package
com
.
edgec
.
browserbackend
.
account
.
dto
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
java.util.List
;
/**
* @Desc
* @Author jason
* @CreateTime 2020/3/13 2:37 下午
**/
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
SubUsersRequestDto
{
private
int
amount
;
private
String
password
;
private
int
permission
;
private
String
nickname
;
private
int
permisson
;
private
String
comment
;
private
List
<
String
>
usernames
;
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
int
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
int
amount
)
{
this
.
amount
=
amount
;
}
public
int
getPermission
()
{
return
permission
;
}
public
void
setPermission
(
int
permission
)
{
this
.
permission
=
permission
;
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
int
getPermisson
()
{
return
permisson
;
}
public
void
setPermisson
(
int
permisson
)
{
this
.
permisson
=
permisson
;
}
public
List
<
String
>
getUsernames
()
{
return
usernames
;
}
public
void
setUsernames
(
List
<
String
>
usernames
)
{
this
.
usernames
=
usernames
;
}
public
String
getComment
()
{
return
comment
;
}
public
void
setComment
(
String
comment
)
{
this
.
comment
=
comment
;
}
}
src/main/java/com/edgec/browserbackend/account/repository/AccountRepository.java
View file @
1091834e
...
@@ -20,7 +20,7 @@ public interface AccountRepository extends MongoRepository<Account, String>, Acc
...
@@ -20,7 +20,7 @@ public interface AccountRepository extends MongoRepository<Account, String>, Acc
List
<
Account
>
findByParent
(
String
parent
);
List
<
Account
>
findByParent
(
String
parent
);
Page
<
Account
>
findByParent
IsNull
(
Pageable
request
);
Page
<
Account
>
findByParent
(
String
parent
,
Pageable
pageable
);
Page
<
Account
>
findAllBySignupDateBetween
(
Pageable
pageable
,
Date
startDate
,
Date
endDate
);
Page
<
Account
>
findAllBySignupDateBetween
(
Pageable
pageable
,
Date
startDate
,
Date
endDate
);
...
...
src/main/java/com/edgec/browserbackend/account/service/AccountService.java
View file @
1091834e
package
com
.
edgec
.
browserbackend
.
account
.
service
;
package
com
.
edgec
.
browserbackend
.
account
.
service
;
import
com.edgec.browserbackend.account.domain.*
;
import
com.edgec.browserbackend.account.domain.*
;
import
com.edgec.browserbackend.account.dto.ResultDto
;
import
com.edgec.browserbackend.account.dto.*
;
import
com.edgec.browserbackend.account.dto.BillQueryCriteriaDto
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
...
@@ -47,6 +46,8 @@ public interface AccountService {
...
@@ -47,6 +46,8 @@ public interface AccountService {
Account
createSub
(
String
name
,
AccountDto
user
);
Account
createSub
(
String
name
,
AccountDto
user
);
void
createSubUsers
(
String
name
,
SubUsersRequestDto
subUsersRequestDto
);
void
deleteSub
(
String
parent
,
String
child
);
void
deleteSub
(
String
parent
,
String
child
);
void
deleteByName
(
String
name
);
void
deleteByName
(
String
name
);
...
@@ -55,22 +56,22 @@ public interface AccountService {
...
@@ -55,22 +56,22 @@ public interface AccountService {
Account
saveSub
(
String
name
,
AccountDto
user
);
Account
saveSub
(
String
name
,
AccountDto
user
);
void
saveSubUsers
(
String
name
,
SubUsersRequestDto
subUsersRequestDto
);
List
<
UserDto
>
getAllDesendentUsers
(
String
name
,
int
level
);
List
<
UserDto
>
getAllDesendentUsers
(
String
name
,
int
level
);
SubUserPageResultDto
getSubUserList
(
String
name
,
int
page
,
int
amount
);
List
<
UserBillList
>
getUserBills0
(
String
name
);
List
<
UserBillList
>
getUserBills0
(
String
name
);
List
<
UserBillList
>
getUserBills
(
String
name
,
Services
services
);
List
<
UserBillList
>
getUserBills
(
String
name
,
Services
services
);
void
resetPasswordWithOtp
(
UserDto
user
);
void
resetPasswordWithOtp
(
UserDto
user
);
IpChargeResultDto
preCharge
(
String
name
,
IpChargeRequestDto
requestDto
);
IpChargeResultDto
preChargeByMoney
(
String
name
,
double
money
);
IpChargeResultDto
preChargeByMoney
(
String
name
,
double
money
);
IpChargeResultDto
preChargeIp
(
String
name
,
int
amount
,
double
money
);
IpChargeResultDto
preChargeIp
(
String
name
,
int
amount
,
double
money
);
IpChargeResultDto
charge
(
String
name
,
IpChargeRequestDto
requestDto
);
IpChargeResultDto
chargeByMoney
(
String
name
,
double
money
,
IpChargeRequestDto
requestDto
);
IpChargeResultDto
chargeByMoney
(
String
name
,
double
money
,
IpChargeRequestDto
requestDto
);
Page
<
UserPayment
>
getUserPayment
(
Pageable
pageable
,
String
username
);
Page
<
UserPayment
>
getUserPayment
(
Pageable
pageable
,
String
username
);
...
@@ -79,10 +80,6 @@ public interface AccountService {
...
@@ -79,10 +80,6 @@ public interface AccountService {
AccountDto
getAccountByCellphone
(
String
cellphone
);
AccountDto
getAccountByCellphone
(
String
cellphone
);
String
queryVpsRate
(
String
region
,
String
instanceSpecKey
,
String
chargeType
);
String
queryUserChargeRate
(
String
username
,
IpChargeRequestDto
requestDto
);
Page
<
UserPrePaidBilling
>
listPrepaid
(
Pageable
pageable
,
String
username
,
String
[]
chargeType
,
int
year
,
int
month
,
int
day
,
String
zoneId
);
Page
<
UserPrePaidBilling
>
listPrepaid
(
Pageable
pageable
,
String
username
,
String
[]
chargeType
,
int
year
,
int
month
,
int
day
,
String
zoneId
);
Page
<
UserPrePaidBilling
>
listBills
(
Pageable
pageable
,
String
username
,
BillQueryCriteriaDto
billQueryCriteriaDto
,
String
dateFrom
,
String
dateTo
,
String
zoneId
);
Page
<
UserPrePaidBilling
>
listBills
(
Pageable
pageable
,
String
username
,
BillQueryCriteriaDto
billQueryCriteriaDto
,
String
dateFrom
,
String
dateTo
,
String
zoneId
);
...
@@ -91,8 +88,6 @@ public interface AccountService {
...
@@ -91,8 +88,6 @@ public interface AccountService {
List
<
UserBillList
>
findOverviewByYearAndMonth
(
String
username
,
int
year
,
int
mont
,
String
zoneId
,
Services
service
);
List
<
UserBillList
>
findOverviewByYearAndMonth
(
String
username
,
int
year
,
int
mont
,
String
zoneId
,
Services
service
);
IpChargeResultDto
preOrder
(
String
userName
,
IpChargeRequestDto
requestDto
);
String
deletePreOrder
(
String
userName
);
String
deletePreOrder
(
String
userName
);
List
<
Invoice
>
findByUsername
(
String
username
);
List
<
Invoice
>
findByUsername
(
String
username
);
...
...
src/main/java/com/edgec/browserbackend/account/service/impl/AccountServiceImpl.java
View file @
1091834e
This diff is collapsed.
Click to expand it.
src/main/java/com/edgec/browserbackend/browser/service/Impl/ShopServiceImpl.java
View file @
1091834e
...
@@ -267,7 +267,7 @@ public class ShopServiceImpl implements ShopService {
...
@@ -267,7 +267,7 @@ public class ShopServiceImpl implements ShopService {
if
(
shops
==
null
||
shops
.
size
()
<
1
)
if
(
shops
==
null
||
shops
.
size
()
<
1
)
throw
new
ClientRequestException
(
BrowserErrorCode
.
SHOPNOTEXIST
);
throw
new
ClientRequestException
(
BrowserErrorCode
.
SHOPNOTEXIST
);
List
<
Account
>
accounts
=
accountRepository
.
findByNameIn
(
users
);
List
<
Account
>
accounts
=
accountRepository
.
findByNameIn
(
users
);
if
(
accounts
!
=
null
||
accounts
.
size
()
!=
users
.
size
())
if
(
accounts
=
=
null
||
accounts
.
size
()
!=
users
.
size
())
throw
new
ClientRequestException
(
AccountErrorCode
.
NAMENOTEXIST
);
throw
new
ClientRequestException
(
AccountErrorCode
.
NAMENOTEXIST
);
accounts
.
stream
().
forEach
(
x
->
{
accounts
.
stream
().
forEach
(
x
->
{
try
{
try
{
...
@@ -301,7 +301,7 @@ public class ShopServiceImpl implements ShopService {
...
@@ -301,7 +301,7 @@ public class ShopServiceImpl implements ShopService {
group
=
groupRepository
.
findById
(
groupId
).
orElse
(
null
);
group
=
groupRepository
.
findById
(
groupId
).
orElse
(
null
);
if
(
group
==
null
)
if
(
group
==
null
)
throw
new
ClientRequestException
(
BrowserErrorCode
.
GROUPNOTEXIST
);
throw
new
ClientRequestException
(
BrowserErrorCode
.
GROUPNOTEXIST
);
if
(
account
.
getPermission
()
<
8
||
(
group
!=
null
&&
group
.
getOwner
()
!=
null
&&
!
group
.
getOwner
().
equals
(
username
)
))
{
if
(
group
!=
null
&&
group
.
getOwner
()
!=
null
&&
!
group
.
getOwner
().
equals
(
username
))
{
throw
new
ClientRequestException
(
AccountErrorCode
.
NOPERMISSION
);
throw
new
ClientRequestException
(
AccountErrorCode
.
NOPERMISSION
);
}
}
List
<
String
>
shopIds
=
new
ArrayList
<>();
List
<
String
>
shopIds
=
new
ArrayList
<>();
...
...
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