Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
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
licc
data-server
Commits
d96d8b6a
Commit
d96d8b6a
authored
Mar 26, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增定时任务打印日志
parent
ce536156
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
204 additions
and
138 deletions
+204
-138
AccountManager.java
...ain/java/cn/wisenergy/service/Manager/AccountManager.java
+47
-2
DayTaskService.java
...rc/main/java/cn/wisenergy/service/app/DayTaskService.java
+1
-1
MonthTaskService.java
.../main/java/cn/wisenergy/service/app/MonthTaskService.java
+7
-0
TradeRecordService.java
...ain/java/cn/wisenergy/service/app/TradeRecordService.java
+0
-7
MonthTaskServiceImpl.java
...a/cn/wisenergy/service/app/impl/MonthTaskServiceImpl.java
+99
-2
TradeRecordServiceImpl.java
...cn/wisenergy/service/app/impl/TradeRecordServiceImpl.java
+0
-92
AccountController.java
...wisenergy/web/admin/controller/app/AccountController.java
+0
-25
DayTaskController.java
...wisenergy/web/admin/controller/app/DayTaskController.java
+43
-0
MonthTaskController.java
...senergy/web/admin/controller/app/MonthTaskController.java
+7
-0
SettingController.java
...wisenergy/web/admin/controller/app/SettingController.java
+0
-1
TradeRecordController.java
...nergy/web/admin/controller/app/TradeRecordController.java
+0
-8
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/Manager/AccountManager.java
View file @
d96d8b6a
...
@@ -77,6 +77,8 @@ public class AccountManager {
...
@@ -77,6 +77,8 @@ public class AccountManager {
orderInfo
.
setRebateStatus
(
RebateStatusEnum
.
ALREADY_REBATE
.
getCode
());
orderInfo
.
setRebateStatus
(
RebateStatusEnum
.
ALREADY_REBATE
.
getCode
());
orderMapper
.
updateById
(
orderInfo
);
orderMapper
.
updateById
(
orderInfo
);
String
time
=
DateUtil
.
convertDateToStr
(
new
Date
(),
"yyyy-MM-dd hh:mm:ss"
);
log
.
info
(
"订单"
+
orderInfo
.
getTid
()
+
"在"
+
time
+
"时返佣:"
+
bigDecimal
);
//3、更新账户可用金额
//3、更新账户可用金额
accountMapper
.
edit
(
accountInfo
);
accountMapper
.
edit
(
accountInfo
);
...
@@ -100,6 +102,7 @@ public class AccountManager {
...
@@ -100,6 +102,7 @@ public class AccountManager {
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
false
;
}
}
log
.
info
(
"月度肥料新增用户"
+
teamPerformance
.
getUserId
()
+
"团队绩效:"
+
teamPerformance
.
getMonthTeamPerformance
());
}
}
}
}
...
@@ -110,6 +113,7 @@ public class AccountManager {
...
@@ -110,6 +113,7 @@ public class AccountManager {
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
false
;
}
}
log
.
info
(
"月度肥料更新用户"
+
teamPerformance
.
getUserId
()
+
"团队绩效为:"
+
teamPerformance
.
getMonthTeamPerformance
());
}
}
}
}
return
true
;
return
true
;
...
@@ -181,6 +185,7 @@ public class AccountManager {
...
@@ -181,6 +185,7 @@ public class AccountManager {
List
<
ProgressPrize
>
deleteList
=
new
ArrayList
<>(
prizes
);
List
<
ProgressPrize
>
deleteList
=
new
ArrayList
<>(
prizes
);
for
(
ProgressPrize
updatePrize
:
updateList
)
{
for
(
ProgressPrize
updatePrize
:
updateList
)
{
int
count
=
progressPrizeMapper
.
edit
(
updatePrize
);
int
count
=
progressPrizeMapper
.
edit
(
updatePrize
);
log
.
info
(
"更新最大进步奖用户"
+
updatePrize
.
getUserId
()
+
"奖金为:"
+
updatePrize
.
getAwardMoney
());
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
false
;
}
}
...
@@ -188,6 +193,7 @@ public class AccountManager {
...
@@ -188,6 +193,7 @@ public class AccountManager {
for
(
ProgressPrize
addPrize
:
addList
)
{
for
(
ProgressPrize
addPrize
:
addList
)
{
int
count
=
progressPrizeMapper
.
add
(
addPrize
);
int
count
=
progressPrizeMapper
.
add
(
addPrize
);
log
.
info
(
"新增最大进步奖用户"
+
addPrize
.
getUserId
()
+
"奖金:"
+
addPrize
.
getAwardMoney
());
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
false
;
}
}
...
@@ -204,6 +210,7 @@ public class AccountManager {
...
@@ -204,6 +210,7 @@ public class AccountManager {
//3、添加账户获得的收益
//3、添加账户获得的收益
for
(
AccountInfo
accountInfo
:
accountInfoList
)
{
for
(
AccountInfo
accountInfo
:
accountInfoList
)
{
accountMapper
.
edit
(
accountInfo
);
accountMapper
.
edit
(
accountInfo
);
log
.
info
(
"最大进步奖更新用户"
+
accountInfo
.
getUserId
()
+
"月收益:"
+
accountInfo
.
getEarningsMonth
());
//添加交易流水记录
//添加交易流水记录
TradeRecord
tradeRecord
=
new
TradeRecord
();
TradeRecord
tradeRecord
=
new
TradeRecord
();
...
@@ -240,6 +247,40 @@ public class AccountManager {
...
@@ -240,6 +247,40 @@ public class AccountManager {
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
false
;
}
}
log
.
info
(
"月度肥料更新用户"
+
accountInfo
.
getUserId
()
+
"月收益"
+
accountInfo
.
getEarningsMonth
());
}
}
//新增交易流水记录
if
(!
CollectionUtils
.
isEmpty
(
recordList
))
{
for
(
TradeRecord
tradeRecord
:
recordList
)
{
int
count
=
tradeRecordMapper
.
add
(
tradeRecord
);
if
(
count
==
0
)
{
return
false
;
}
}
}
return
true
;
}
/**
* 运营中心更新账户信息和保存交易流水记录
*
* @param accountInfoList 账户列表
* @param recordList 交易流水信息
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
runCenterUpdateAccountAddRecord
(
List
<
AccountInfo
>
accountInfoList
,
List
<
TradeRecord
>
recordList
)
{
//更新月收益
if
(!
CollectionUtils
.
isEmpty
(
accountInfoList
))
{
for
(
AccountInfo
accountInfo
:
accountInfoList
)
{
int
count
=
accountMapper
.
edit
(
accountInfo
);
if
(
count
==
0
)
{
return
false
;
}
log
.
info
(
"运营中心更新用户"
+
accountInfo
.
getUserId
()
+
"月收益"
+
accountInfo
.
getEarningsMonth
());
}
}
}
}
...
@@ -263,7 +304,7 @@ public class AccountManager {
...
@@ -263,7 +304,7 @@ public class AccountManager {
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
updateAccountAddRecordAddPrize
(
List
<
AccountInfo
>
accountInfoList
,
List
<
TradeRecord
>
recordList
,
public
Boolean
updateAccountAddRecordAddPrize
(
List
<
AccountInfo
>
accountInfoList
,
List
<
TradeRecord
>
recordList
,
List
<
ProgressPrize
>
addPrizeList
,
List
<
ProgressPrize
>
updatePrizeList
)
{
List
<
ProgressPrize
>
addPrizeList
,
List
<
ProgressPrize
>
updatePrizeList
)
{
//更新月收益
//更新月收益
if
(!
CollectionUtils
.
isEmpty
(
accountInfoList
))
{
if
(!
CollectionUtils
.
isEmpty
(
accountInfoList
))
{
...
@@ -272,6 +313,7 @@ public class AccountManager {
...
@@ -272,6 +313,7 @@ public class AccountManager {
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
false
;
}
}
log
.
info
(
"最大进步奖更新用户"
+
accountInfo
.
getUserId
()
+
"月收益"
+
accountInfo
.
getEarningsMonth
());
}
}
}
}
...
@@ -292,6 +334,7 @@ public class AccountManager {
...
@@ -292,6 +334,7 @@ public class AccountManager {
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
false
;
}
}
log
.
info
(
"用户"
+
progressPrize
.
getUserId
()
+
"新增最大进步奖奖金:"
+
progressPrize
.
getAwardMoney
());
}
}
}
}
...
@@ -302,6 +345,7 @@ public class AccountManager {
...
@@ -302,6 +345,7 @@ public class AccountManager {
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
false
;
}
}
log
.
info
(
"用户"
+
progressPrize
.
getUserId
()
+
"更新最大进步奖奖金为:"
+
progressPrize
.
getAwardMoney
());
}
}
}
}
return
true
;
return
true
;
...
@@ -325,6 +369,7 @@ public class AccountManager {
...
@@ -325,6 +369,7 @@ public class AccountManager {
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
false
;
return
false
;
}
}
log
.
info
(
"月定时任务月度肥料更新用户"
+
accountInfo
.
getUserId
()
+
"月收益:"
+
accountInfo
.
getEarningsMonth
());
}
}
}
}
...
@@ -338,7 +383,7 @@ public class AccountManager {
...
@@ -338,7 +383,7 @@ public class AccountManager {
}
}
}
}
//判断是否存在月度肥料奖金信息
//判断是否存在月度肥料
剩余
奖金信息
if
(
null
==
monthManure
)
{
if
(
null
==
monthManure
)
{
//新增上月剩余月度肥料奖金
//新增上月剩余月度肥料奖金
int
count
=
monthManureMapper
.
add
(
manure
);
int
count
=
monthManureMapper
.
add
(
manure
);
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/DayTaskService.java
View file @
d96d8b6a
...
@@ -25,7 +25,7 @@ public interface DayTaskService {
...
@@ -25,7 +25,7 @@ public interface DayTaskService {
R
<
Boolean
>
performanceCount
();
R
<
Boolean
>
performanceCount
();
/**
/**
* 获取用户的
商机
信息
* 获取用户的
上级
信息
*
*
* @param userId 用户id
* @param userId 用户id
* @return 用户商机列表
* @return 用户商机列表
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/MonthTaskService.java
View file @
d96d8b6a
...
@@ -36,4 +36,11 @@ public interface MonthTaskService {
...
@@ -36,4 +36,11 @@ public interface MonthTaskService {
* @return true or false
* @return true or false
*/
*/
R
<
Boolean
>
runCenterSubsidy
();
R
<
Boolean
>
runCenterSubsidy
();
/**
* 月度奖金统计- 数据写入月度奖金实体类
*
* @return true or false
*/
R
<
Boolean
>
monthAwardCount
();
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/TradeRecordService.java
View file @
d96d8b6a
...
@@ -11,13 +11,6 @@ import java.util.List;
...
@@ -11,13 +11,6 @@ import java.util.List;
* @author 86187
* @author 86187
*/
*/
public
interface
TradeRecordService
{
public
interface
TradeRecordService
{
/**
* 月度奖金统计- 数据写入月度奖金实体类
*
* @return true or false
*/
R
<
Boolean
>
monthAwardCount
();
/**
/**
* 交易流水列表查询
* 交易流水列表查询
*
*
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/MonthTaskServiceImpl.java
View file @
d96d8b6a
...
@@ -11,7 +11,6 @@ import cn.wisenergy.model.enums.UserLevelEnum;
...
@@ -11,7 +11,6 @@ import cn.wisenergy.model.enums.UserLevelEnum;
import
cn.wisenergy.model.vo.TeamPerformanceSortVo
;
import
cn.wisenergy.model.vo.TeamPerformanceSortVo
;
import
cn.wisenergy.service.Manager.AccountManager
;
import
cn.wisenergy.service.Manager.AccountManager
;
import
cn.wisenergy.service.Manager.PublicManager
;
import
cn.wisenergy.service.Manager.PublicManager
;
import
cn.wisenergy.service.app.AccountService
;
import
cn.wisenergy.service.app.DayTaskService
;
import
cn.wisenergy.service.app.DayTaskService
;
import
cn.wisenergy.service.app.MonthTaskService
;
import
cn.wisenergy.service.app.MonthTaskService
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
...
@@ -64,6 +63,9 @@ public class MonthTaskServiceImpl implements MonthTaskService {
...
@@ -64,6 +63,9 @@ public class MonthTaskServiceImpl implements MonthTaskService {
@Autowired
@Autowired
private
MonthManureMapper
monthManureMapper
;
private
MonthManureMapper
monthManureMapper
;
@Autowired
private
MonthAwardMapper
monthAwardMapper
;
@Autowired
@Autowired
private
OrderMapper
orderMapper
;
private
OrderMapper
orderMapper
;
...
@@ -324,6 +326,7 @@ public class MonthTaskServiceImpl implements MonthTaskService {
...
@@ -324,6 +326,7 @@ public class MonthTaskServiceImpl implements MonthTaskService {
lastAccountMapper
.
deleteTable
(
"month_account_image"
);
lastAccountMapper
.
deleteTable
(
"month_account_image"
);
}
}
@XxlJob
(
value
=
"runCenterSubsidyMonthTask"
)
@Override
@Override
public
R
<
Boolean
>
runCenterSubsidy
()
{
public
R
<
Boolean
>
runCenterSubsidy
()
{
log
.
info
(
"shop-mall[]MonthTaskServiceImpl[]runCenterSubsidy[]input.method"
);
log
.
info
(
"shop-mall[]MonthTaskServiceImpl[]runCenterSubsidy[]input.method"
);
...
@@ -383,13 +386,107 @@ public class MonthTaskServiceImpl implements MonthTaskService {
...
@@ -383,13 +386,107 @@ public class MonthTaskServiceImpl implements MonthTaskService {
}
}
//修改账户信息和保存交易记录
//修改账户信息和保存交易记录
boolean
bool
=
accountManager
.
u
pdateAccountAddRecord
(
accountInfoList
,
tradeRecordList
);
boolean
bool
=
accountManager
.
runCenterU
pdateAccountAddRecord
(
accountInfoList
,
tradeRecordList
);
if
(!
bool
)
{
if
(!
bool
)
{
return
R
.
ok
(
1
,
false
);
return
R
.
ok
(
1
,
false
);
}
}
return
R
.
ok
(
0
,
true
);
return
R
.
ok
(
0
,
true
);
}
}
@XxlJob
(
value
=
"monthAwardCountTask"
)
@Override
public
R
<
Boolean
>
monthAwardCount
()
{
MonthAward
result
=
new
MonthAward
();
//1、获取本月新增奖金
Double
monthGrow
=
tradeRecordMapper
.
queryMonthGrow
(
new
Date
());
result
.
setMonthIncreased
(
monthGrow
);
//2、获取历史奖金金额
Double
awardTotal
=
tradeRecordMapper
.
queryAllAward
(
new
Date
());
result
.
setAwardTotal
(
awardTotal
);
//3、本月累计奖金 =本月新增奖金+上月剩余月度肥料奖金
//获取上月剩余月度肥料奖金
Double
monthAwardTotal
;
Date
date
=
DateUtil
.
getLastMonth
(
new
Date
());
String
yearMonth
=
DateUtil
.
convertDateToStr
(
date
,
"yyyy-MM"
);
MonthManure
monthManure
=
monthManureMapper
.
queryByTime
(
yearMonth
);
if
(
null
==
monthManure
)
{
monthAwardTotal
=
monthGrow
;
}
else
{
monthAwardTotal
=
monthGrow
+
monthManure
.
getManureAward
();
}
result
.
setMonthAwardTotal
(
monthAwardTotal
);
//4、较上月增长奖金 本月累计奖金-上月累计奖金
//本月
String
currentMonth
=
DateUtil
.
convertDateToStr
(
new
Date
(),
"yyyy-MM"
);
Date
lastDate
=
DateUtil
.
getLastMonth
(
new
Date
());
String
lastMonth
=
DateUtil
.
convertDateToStr
(
lastDate
,
"yyyy-MM"
);
Double
growthAward
;
//获取上月 累计奖金
MonthAward
monthAward
=
monthAwardMapper
.
getByTime
(
lastMonth
);
if
(
null
==
monthAward
)
{
growthAward
=
monthAwardTotal
;
}
else
{
growthAward
=
monthAwardTotal
-
monthAward
.
getMonthAwardTotal
();
}
result
.
setGrowthAward
(
growthAward
);
//5、获取黄金树本月奖金
Double
goldAward
=
tradeRecordMapper
.
queryByUserLevel
(
UserLevelEnum
.
GOLD_TREE
.
getCode
(),
new
Date
());
if
(
null
==
goldAward
)
{
result
.
setGoldAward
(
0.00
);
}
else
{
result
.
setGoldAward
(
goldAward
);
}
//6、获取农场主本月奖金
Double
farmerAward
=
tradeRecordMapper
.
queryByUserLevel
(
UserLevelEnum
.
FARMER
.
getCode
(),
new
Date
());
if
(
null
==
farmerAward
)
{
result
.
setFarmerAward
(
0.00
);
}
else
{
result
.
setFarmerAward
(
farmerAward
);
}
//7、森林之星月奖金
Double
startAward
=
tradeRecordMapper
.
queryByUserLevel
(
UserLevelEnum
.
FOREST_START
.
getCode
(),
new
Date
());
if
(
null
==
startAward
)
{
result
.
setForestStartAward
(
0.00
);
}
else
{
result
.
setForestStartAward
(
startAward
);
}
//8、森田合伙人月奖金
Double
partnerAward
=
tradeRecordMapper
.
queryByUserLevel
(
UserLevelEnum
.
PARTNER
.
getCode
(),
new
Date
());
if
(
null
==
partnerAward
)
{
result
.
setPartnerAward
(
0.00
);
}
else
{
result
.
setPartnerAward
(
partnerAward
);
}
//9、 判断是否有本月奖金这条数据,没有,新增,有更新值
MonthAward
currentMonthAward
=
monthAwardMapper
.
getByTime
(
currentMonth
);
if
(
null
==
currentMonthAward
)
{
int
count
=
monthAwardMapper
.
add
(
result
);
log
.
info
(
result
.
getYearMonth
()
+
"插入一条月度奖励数据!"
);
if
(
count
==
0
)
{
return
R
.
ok
(
1
,
false
);
}
}
else
{
result
.
setId
(
currentMonthAward
.
getId
());
int
count
=
monthAwardMapper
.
edit
(
result
);
log
.
info
(
"更新"
+
result
.
getYearMonth
()
+
"月度奖励数据!"
);
if
(
count
==
0
)
{
return
R
.
ok
(
1
,
false
);
}
}
return
R
.
ok
(
0
,
true
);
}
/**
/**
* 如果会员等级是黄金以上,计算月度收益
* 如果会员等级是黄金以上,计算月度收益
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/TradeRecordServiceImpl.java
View file @
d96d8b6a
...
@@ -39,98 +39,6 @@ public class TradeRecordServiceImpl extends ServiceImpl<TradeRecordMapper, Trade
...
@@ -39,98 +39,6 @@ public class TradeRecordServiceImpl extends ServiceImpl<TradeRecordMapper, Trade
@Autowired
@Autowired
private
TradeRecordMapper
tradeRecordMapper
;
private
TradeRecordMapper
tradeRecordMapper
;
@XxlJob
(
value
=
"monthAwardCountTask"
)
@Override
public
R
<
Boolean
>
monthAwardCount
()
{
MonthAward
result
=
new
MonthAward
();
//1、获取本月新增奖金
Double
monthGrow
=
baseMapper
.
queryMonthGrow
(
new
Date
());
result
.
setMonthIncreased
(
monthGrow
);
//2、获取历史奖金金额
Double
awardTotal
=
baseMapper
.
queryAllAward
(
new
Date
());
result
.
setAwardTotal
(
awardTotal
);
//3、本月累计奖金 =本月新增奖金+上月剩余月度肥料奖金
//获取上月剩余月度肥料奖金
Double
monthAwardTotal
;
Date
date
=
DateUtil
.
getLastMonth
(
new
Date
());
String
yearMonth
=
DateUtil
.
convertDateToStr
(
date
,
"yyyy-MM"
);
MonthManure
monthManure
=
monthManureMapper
.
queryByTime
(
yearMonth
);
if
(
null
==
monthManure
)
{
monthAwardTotal
=
monthGrow
;
}
else
{
monthAwardTotal
=
monthGrow
+
monthManure
.
getManureAward
();
}
result
.
setMonthAwardTotal
(
monthAwardTotal
);
//4、较上月增长奖金 本月累计奖金-上月累计奖金
//本月
String
currentMonth
=
DateUtil
.
convertDateToStr
(
new
Date
(),
"yyyy-MM"
);
Date
lastDate
=
DateUtil
.
getLastMonth
(
new
Date
());
String
lastMonth
=
DateUtil
.
convertDateToStr
(
lastDate
,
"yyyy-MM"
);
Double
growthAward
;
//获取上月 累计奖金
MonthAward
monthAward
=
monthAwardMapper
.
getByTime
(
lastMonth
);
if
(
null
==
monthAward
)
{
growthAward
=
monthAwardTotal
;
}
else
{
growthAward
=
monthAwardTotal
-
monthAward
.
getMonthAwardTotal
();
}
result
.
setGrowthAward
(
growthAward
);
//5、获取黄金树本月奖金
Double
goldAward
=
baseMapper
.
queryByUserLevel
(
UserLevelEnum
.
GOLD_TREE
.
getCode
(),
new
Date
());
if
(
null
==
goldAward
)
{
result
.
setGoldAward
(
0.00
);
}
else
{
result
.
setGoldAward
(
goldAward
);
}
//6、获取农场主本月奖金
Double
farmerAward
=
baseMapper
.
queryByUserLevel
(
UserLevelEnum
.
FARMER
.
getCode
(),
new
Date
());
if
(
null
==
farmerAward
)
{
result
.
setFarmerAward
(
0.00
);
}
else
{
result
.
setFarmerAward
(
farmerAward
);
}
//7、森林之星月奖金
Double
startAward
=
baseMapper
.
queryByUserLevel
(
UserLevelEnum
.
FOREST_START
.
getCode
(),
new
Date
());
if
(
null
==
startAward
)
{
result
.
setForestStartAward
(
0.00
);
}
else
{
result
.
setForestStartAward
(
startAward
);
}
//8、森田合伙人月奖金
Double
partnerAward
=
baseMapper
.
queryByUserLevel
(
UserLevelEnum
.
PARTNER
.
getCode
(),
new
Date
());
if
(
null
==
partnerAward
)
{
result
.
setPartnerAward
(
0.00
);
}
else
{
result
.
setPartnerAward
(
partnerAward
);
}
//9、 判断是否有本月奖金这条数据,没有,新增,有更新值
MonthAward
currentMonthAward
=
monthAwardMapper
.
getByTime
(
currentMonth
);
if
(
null
==
currentMonthAward
)
{
int
count
=
monthAwardMapper
.
add
(
result
);
if
(
count
==
0
)
{
return
R
.
ok
(
1
,
false
);
}
}
else
{
result
.
setId
(
currentMonthAward
.
getId
());
int
count
=
monthAwardMapper
.
edit
(
result
);
if
(
count
==
0
)
{
return
R
.
ok
(
1
,
false
);
}
}
return
R
.
ok
(
0
,
true
);
}
@Override
@Override
public
R
<
PageInfo
<
TradeRecord
>>
queryList
(
TradeRecordQuery
query
)
{
public
R
<
PageInfo
<
TradeRecord
>>
queryList
(
TradeRecordQuery
query
)
{
log
.
info
(
"shop-mall[]TradeRecordServiceImpl[]queryList[]input.param.query:"
+
query
);
log
.
info
(
"shop-mall[]TradeRecordServiceImpl[]queryList[]input.param.query:"
+
query
);
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/AccountController.java
View file @
d96d8b6a
...
@@ -4,7 +4,6 @@ import cn.wisenergy.common.utils.R;
...
@@ -4,7 +4,6 @@ import cn.wisenergy.common.utils.R;
import
cn.wisenergy.model.app.AccountInfo
;
import
cn.wisenergy.model.app.AccountInfo
;
import
cn.wisenergy.model.dto.AccountInfoQuery
;
import
cn.wisenergy.model.dto.AccountInfoQuery
;
import
cn.wisenergy.service.app.AccountService
;
import
cn.wisenergy.service.app.AccountService
;
import
cn.wisenergy.service.app.DayTaskService
;
import
cn.wisenergy.web.common.BaseController
;
import
cn.wisenergy.web.common.BaseController
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -27,9 +26,6 @@ public class AccountController extends BaseController {
...
@@ -27,9 +26,6 @@ public class AccountController extends BaseController {
@Autowired
@Autowired
private
AccountService
accountService
;
private
AccountService
accountService
;
@Autowired
private
DayTaskService
dayTaskService
;
@ApiOperation
(
value
=
"获取账户信息"
,
notes
=
"获取账户信息"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"获取账户信息"
,
notes
=
"获取账户信息"
,
httpMethod
=
"GET"
)
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"String"
)
@GetMapping
(
"/getByUserId"
)
@GetMapping
(
"/getByUserId"
)
...
@@ -44,25 +40,4 @@ public class AccountController extends BaseController {
...
@@ -44,25 +40,4 @@ public class AccountController extends BaseController {
public
R
<
PageInfo
<
AccountInfo
>>
getList
(
AccountInfoQuery
query
)
{
public
R
<
PageInfo
<
AccountInfo
>>
getList
(
AccountInfoQuery
query
)
{
return
accountService
.
getList
(
query
);
return
accountService
.
getList
(
query
);
}
}
/***********************************************测试日定时任务***************************/
@ApiOperation
(
value
=
"订单佣金"
,
notes
=
"订单佣金"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/orderRebate"
)
public
R
<
Boolean
>
orderRebate
()
{
return
dayTaskService
.
orderRebate
();
}
@ApiOperation
(
value
=
"月度肥料"
,
notes
=
"月度肥料"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/monthManure"
)
public
R
<
Boolean
>
monthManure
()
{
return
dayTaskService
.
performanceCount
();
}
@ApiOperation
(
value
=
"最大进步奖"
,
notes
=
"最大进步奖"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/growAward"
)
public
R
<
Boolean
>
growAward
()
{
return
dayTaskService
.
progressPrizeCount
();
}
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/DayTaskController.java
0 → 100644
View file @
d96d8b6a
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.service.app.DayTaskService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author 86187
*/
@Api
(
tags
=
"日定时任务管理"
)
@RestController
@RequestMapping
(
"/day"
)
@Slf4j
public
class
DayTaskController
{
@Autowired
private
DayTaskService
dayTaskService
;
@ApiOperation
(
value
=
"订单佣金"
,
notes
=
"订单佣金"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/orderRebate"
)
public
R
<
Boolean
>
orderRebate
()
{
return
dayTaskService
.
orderRebate
();
}
@ApiOperation
(
value
=
"月度肥料"
,
notes
=
"月度肥料"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/monthManure"
)
public
R
<
Boolean
>
monthManure
()
{
return
dayTaskService
.
performanceCount
();
}
@ApiOperation
(
value
=
"最大进步奖"
,
notes
=
"最大进步奖"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/growAward"
)
public
R
<
Boolean
>
growAward
()
{
return
dayTaskService
.
progressPrizeCount
();
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/MonthTaskController.java
View file @
d96d8b6a
...
@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -47,4 +48,10 @@ public class MonthTaskController {
...
@@ -47,4 +48,10 @@ public class MonthTaskController {
return
monthTaskService
.
runCenterSubsidy
();
return
monthTaskService
.
runCenterSubsidy
();
}
}
@ApiOperation
(
value
=
"统计月度奖金"
,
notes
=
"统计月度奖金"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/monthAwardCount"
)
public
R
<
Boolean
>
monthAwardCount
()
{
log
.
info
(
"shop-mall[]TradeRecordController[]monthAwardCount[]input.method"
);
return
monthTaskService
.
monthAwardCount
();
}
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/SettingController.java
View file @
d96d8b6a
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.app.BankInfo
;
import
cn.wisenergy.model.vo.SetMemberPercentVo
;
import
cn.wisenergy.model.vo.SetMemberPercentVo
;
import
cn.wisenergy.service.app.MemberPercentService
;
import
cn.wisenergy.service.app.MemberPercentService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/TradeRecordController.java
View file @
d96d8b6a
...
@@ -33,12 +33,4 @@ public class TradeRecordController {
...
@@ -33,12 +33,4 @@ public class TradeRecordController {
log
.
info
(
"shop-mall[]TradeRecordController[]queryList[]input.param.query:"
+
query
);
log
.
info
(
"shop-mall[]TradeRecordController[]queryList[]input.param.query:"
+
query
);
return
tradeRecordService
.
queryList
(
query
);
return
tradeRecordService
.
queryList
(
query
);
}
}
@ApiOperation
(
value
=
"统计月度奖金"
,
notes
=
"统计月度奖金"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/monthAwardCount"
)
public
R
<
Boolean
>
monthAwardCount
()
{
log
.
info
(
"shop-mall[]TradeRecordController[]monthAwardCount[]input.method"
);
return
tradeRecordService
.
monthAwardCount
();
}
}
}
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