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
d837b831
Commit
d837b831
authored
May 23, 2019
by
kangxiaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
大后台
parent
a0f98c4c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
188 additions
and
9 deletions
+188
-9
workspace.xml
.idea/workspace.xml
+0
-0
ContractController.java
src/main/java/common/controller/ContractController.java
+21
-7
Contract.java
src/main/java/common/model/Contract.java
+1
-1
ContractChange.java
src/main/java/common/model/ContractChange.java
+9
-0
FlowChange.java
src/main/java/common/model/FlowChange.java
+140
-0
FlowChangeRepository.java
src/main/java/common/repository/FlowChangeRepository.java
+13
-0
ContractService.java
src/main/java/common/service/ContractService.java
+4
-1
ContractServiceImpl.java
src/main/java/common/service/impl/ContractServiceImpl.java
+0
-0
No files found.
.idea/workspace.xml
View file @
d837b831
This diff is collapsed.
Click to expand it.
src/main/java/common/controller/ContractController.java
View file @
d837b831
package
common
.
controller
;
import
common.model.Contract
;
import
common.model.ContractChange
;
import
common.model.ContractMoney
;
import
common.model.User
;
import
common.model.*
;
import
common.service.ContractService
;
import
common.task.ContractSendEmailThread
;
import
dic.ContractStatusEnum
;
...
...
@@ -200,7 +197,6 @@ public class ContractController {
Contract
contract1
=
service
.
create
(
loginAccount
,
contract
);
NewUserLogThread
userlog
=
new
NewUserLogThread
(
loginAccount
.
getEmail
(),
loginAccount
.
getName
(),
OperateObjectTypeEnum
.
CUSTOMER
.
getKey
(),
contract1
.
getContractCode
(),
"新建合同"
,
""
,
contract1
.
toString
(),
request
,
platform
);
userlog
.
start
();
//
// ContractSendEmailThread email = new ContractSendEmailThread(contract);
// email.start();
return
ResultModel
.
OK
(
contract1
);
...
...
@@ -226,13 +222,23 @@ public class ContractController {
@RequestMapping
(
value
=
"change"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
ResultModel
change
(
@CurrentAccount
User
loginAccount
,
@RequestBody
ContractChange
contract
,
HttpServletRequest
request
,
@PathVariable
String
platform
)
{
Contract
contract1
=
service
.
change
(
loginAccount
,
contract
);
public
ResultModel
change
(
@CurrentAccount
User
loginAccount
,
@RequestBody
FlowChange
flowChange
,
@RequestBody
ContractChange
contract
,
HttpServletRequest
request
,
@PathVariable
String
platform
)
{
Contract
contract1
=
service
.
change
(
loginAccount
,
contract
,
flowChange
);
NewUserLogThread
userlog
=
new
NewUserLogThread
(
loginAccount
.
getEmail
(),
loginAccount
.
getName
(),
OperateObjectTypeEnum
.
CUSTOMER
.
getKey
(),
contract1
.
getContractCode
(),
"修改套餐"
,
""
,
contract1
.
toString
(),
request
,
platform
);
userlog
.
start
();
return
ResultModel
.
OK
(
contract1
);
}
/**
*
* @param loginAccount
* @param startDate
* @param endDate
* @param code
* @return
*/
@RequestMapping
(
value
=
"find/pay"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
findPay
(
@CurrentAccount
User
loginAccount
,
@RequestParam
String
startDate
,
...
...
@@ -295,6 +301,14 @@ public class ContractController {
}
@RequestMapping
(
value
=
"codecheck"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ResultModel
codeCheck
(
@PathVariable
String
platform
,
String
contractCode
)
{
return
ResultModel
.
OK
(
service
.
contractCodeCheck
(
platform
,
contractCode
));
}
}
src/main/java/common/model/Contract.java
View file @
d837b831
...
...
@@ -43,7 +43,7 @@ public class Contract {
private
String
type
;
private
Long
priceName
;
private
Boolean
old
;
private
Long
extraFlow
;
private
Long
extraFlow
;
// 优惠流量
private
Long
modifyAccount
;
private
Long
createAccount
;
// 创建人id
...
...
src/main/java/common/model/ContractChange.java
View file @
d837b831
...
...
@@ -18,6 +18,7 @@ public class ContractChange {
private
String
ds
;
private
String
type
;
private
String
content
;
private
String
marke
;
//备注
private
Long
level
;
private
Long
money
;
private
Long
user
;
...
...
@@ -167,4 +168,12 @@ public class ContractChange {
public
void
setLevelName
(
String
levelName
)
{
this
.
levelName
=
levelName
;
}
public
String
getMarke
()
{
return
marke
;
}
public
void
setMarke
(
String
marke
)
{
this
.
marke
=
marke
;
}
}
src/main/java/common/model/FlowChange.java
0 → 100644
View file @
d837b831
package
common
.
model
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
java.util.Date
;
@Entity
public
class
FlowChange
{
private
Long
id
;
private
Long
discountTimeLong
;
// 优惠时长
private
Long
discountFlow
;
// 优惠时长
private
Long
modifyUser
;
private
String
modifyUname
;
private
String
addDate
;
private
Date
addTime
;
private
int
DelFlag
;
private
String
marke
;
//备注
private
String
contractCode
;
private
String
email
;
private
String
company
;
public
FlowChange
()
{
}
@Id
@GeneratedValue
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getDiscountTimeLong
()
{
return
discountTimeLong
;
}
public
void
setDiscountTimeLong
(
Long
discountTimeLong
)
{
this
.
discountTimeLong
=
discountTimeLong
;
}
public
Long
getDiscountFlow
()
{
return
discountFlow
;
}
public
void
setDiscountFlow
(
Long
discountFlow
)
{
this
.
discountFlow
=
discountFlow
;
}
public
Long
getModifyUser
()
{
return
modifyUser
;
}
public
void
setModifyUser
(
Long
modifyUser
)
{
this
.
modifyUser
=
modifyUser
;
}
public
String
getModifyUname
()
{
return
modifyUname
;
}
public
void
setModifyUname
(
String
modifyUname
)
{
this
.
modifyUname
=
modifyUname
;
}
public
String
getAddDate
()
{
return
addDate
;
}
public
void
setAddDate
(
String
addDate
)
{
this
.
addDate
=
addDate
;
}
public
Date
getAddTime
()
{
return
addTime
;
}
public
void
setAddTime
(
Date
addTime
)
{
this
.
addTime
=
addTime
;
}
public
int
getDelFlag
()
{
return
DelFlag
;
}
public
void
setDelFlag
(
int
delFlag
)
{
DelFlag
=
delFlag
;
}
public
String
getContractCode
()
{
return
contractCode
;
}
public
void
setContractCode
(
String
contractCode
)
{
this
.
contractCode
=
contractCode
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getCompany
()
{
return
company
;
}
public
void
setCompany
(
String
company
)
{
this
.
company
=
company
;
}
public
String
getMarke
()
{
return
marke
;
}
public
void
setMarke
(
String
marke
)
{
this
.
marke
=
marke
;
}
@Override
public
String
toString
()
{
return
"FlowChange{"
+
"id="
+
id
+
", discountTimeLong="
+
discountTimeLong
+
", discountFlow="
+
discountFlow
+
", modifyUser="
+
modifyUser
+
", modifyUname='"
+
modifyUname
+
'\''
+
", addDate='"
+
addDate
+
'\''
+
", addTime="
+
addTime
+
", DelFlag="
+
DelFlag
+
'}'
;
}
}
src/main/java/common/repository/FlowChangeRepository.java
0 → 100644
View file @
d837b831
package
common
.
repository
;
import
common.model.FlowChange
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
java.util.List
;
public
interface
FlowChangeRepository
extends
JpaRepository
<
FlowChange
,
Long
>
{
@Query
(
value
=
""
,
nativeQuery
=
true
)
List
<
FlowChange
>
findByDs
(
String
startDate
,
String
endDate
,
String
code
);
}
src/main/java/common/service/ContractService.java
View file @
d837b831
...
...
@@ -37,7 +37,7 @@ public interface ContractService {
ContractMoney
pay
(
User
loginUser
,
ContractMoney
resource
);
Contract
change
(
User
loginUser
,
ContractChange
resource
);
Contract
change
(
User
loginUser
,
ContractChange
resource
,
FlowChange
flowChange
);
List
<
ContractMoney
>
findPay
(
String
startDate
,
String
endDate
,
String
code
);
...
...
@@ -58,4 +58,6 @@ public interface ContractService {
// List<Contract> findAllContract(User loginAccount, String startDate, String endDate, String platform, String contractId);
Contract
contractStatusUpdate
(
String
platform
,
String
contractId
,
String
status
);
Map
contractCodeCheck
(
String
platform
,
String
contractCode
);
}
\ No newline at end of file
src/main/java/common/service/impl/ContractServiceImpl.java
View file @
d837b831
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