|
@@ -9,10 +9,7 @@ import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.rmi.ServerException;
|
|
|
import java.text.DecimalFormat;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.game.business.domain.*;
|
|
@@ -198,8 +195,23 @@ public class AppUserAgentServiceImpl extends ServiceImpl<AppUserAgentMapper, App
|
|
|
teamDto.setPid(SecurityUtils.getUserId());
|
|
|
}
|
|
|
if(StringUtils.isBlank(teamDto.getBeginTime()) || StringUtils.isBlank(teamDto.getEndTime())){
|
|
|
- teamDto.setBeginTime(DateUtil.format(DateUtil.beginOfMonth(DateUtils.getNowDate()), "yyyy-MM-dd"));
|
|
|
- teamDto.setEndTime(DateUtil.format(DateUtil.endOfMonth(DateUtils.getNowDate()), "yyyy-MM-dd"));
|
|
|
+
|
|
|
+ teamDto.setEndTime(DateUtil.format(DateUtil.endOfMonth(DateUtils.getNowDate()), "yyyy-MM-dd"));*/
|
|
|
+
|
|
|
+ Date now = DateUtils.getNowDate();
|
|
|
+ int curDay = Integer.parseInt(DateUtil.format(now,"dd"));
|
|
|
+
|
|
|
+ Date weekBegin = null;
|
|
|
+ Date weekend = null;
|
|
|
+ if(curDay <= 15){
|
|
|
+ weekBegin = DateUtil.beginOfMonth(now);
|
|
|
+ weekend = DateUtil.parse(DateUtil.format(now,"yyyy-MM-".concat("15").concat(" 23:59:59")),"yyyy-MM-dd HH:mm:ss");
|
|
|
+ }else{
|
|
|
+ weekBegin = DateUtil.parse(DateUtil.format(now,"yyyy-MM-".concat("15").concat(" 00:00:00")),"yyyy-MM-dd HH:mm:ss");
|
|
|
+ weekend = DateUtil.endOfMonth(now);
|
|
|
+ }
|
|
|
+ teamDto.setBeginTime(DateUtil.format(weekBegin,"yyyy-MM-dd"));
|
|
|
+ teamDto.setEndTime(DateUtil.format(weekend,"yyyy-MM-dd"));
|
|
|
}
|
|
|
List<AppAgentTeamVo> list = appUserAgentMapper.teamListNew(teamDto);
|
|
|
if(null != list && list.size() > 0){
|
|
@@ -212,7 +224,13 @@ public class AppUserAgentServiceImpl extends ServiceImpl<AppUserAgentMapper, App
|
|
|
collect(Collectors.groupingBy(j->String.valueOf(j.getUserId())));
|
|
|
list.forEach(e->{
|
|
|
if(null != map.get(String.valueOf(e.getUserId()))){
|
|
|
- e.setGameCommissionList(map.get(String.valueOf(e.getUserId())));
|
|
|
+ List<AppGameCommission> commissionList = map.get(String.valueOf(e.getUserId()));
|
|
|
+ commissionList.forEach(commission->{
|
|
|
+ if(null == commission.getPid()){
|
|
|
+ commission.setPid(e.getPid());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ e.setGameCommissionList(commissionList);
|
|
|
}else if(null != gameList && gameList.size() > 0){
|
|
|
e.setGameCommissionList(gameList.stream().map(j->{
|
|
|
AppGameCommission gameCommission = new AppGameCommission();
|