Kaynağa Gözat

Merge branch 'package' of GameCenter/game-center into dev

zhimo 1 yıl önce
ebeveyn
işleme
bd7ed49b18

+ 14 - 15
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameDataServiceImpl.java

@@ -5293,10 +5293,6 @@ public class GameDataServiceImpl implements IGameDataService {
 
         //获取总消耗
         Double costCount = getCostCount(dto);
-        if(costCount==null || costCount==0){
-            return new Page<>(list, pager);
-        }
-
         //计算回收率  充值金额/总消耗
         for (FlowMonitorVO vo : list) {
             DecimalFormat df = new DecimalFormat("#.####");
@@ -5304,18 +5300,21 @@ public class GameDataServiceImpl implements IGameDataService {
             vo.setCostCount(costCount);
             vo.setCostBeginDate(dto.getCostBeginDate());
             vo.setCostEndDate(dto.getCostEndDate());
-            if (vo.getTenAmount() != null && vo.getTenAmount() > 0) {
-                vo.setTenRecovery(Double.parseDouble(df.format(vo.getTenAmount() / costCount))*100);
-            }
-            if (vo.getFourteenAmount()!=null && vo.getFourteenAmount()>0){
-                vo.setFourteenRecovery(Double.parseDouble(df.format(vo.getFourteenAmount()/costCount))*100);
-            }
-            if (vo.getSeventeenAmount()!=null && vo.getSeventeenAmount()>0){
-                vo.setSeventeenRecovery(Double.parseDouble(df.format(vo.getSeventeenAmount()/costCount))*100);
-            }
-            if(vo.getTwentyfourAmount()!=null && vo.getTwentyfourAmount()>0){
-                vo.setTwentyfourRecovery(Double.parseDouble(df.format(vo.getTwentyfourAmount()/costCount))*100);
+            if(costCount!=null && costCount>0){
+                if (vo.getTenAmount() != null && vo.getTenAmount() > 0) {
+                    vo.setTenRecovery(Double.parseDouble(df.format(vo.getTenAmount() / costCount))*100);
+                }
+                if (vo.getFourteenAmount()!=null && vo.getFourteenAmount()>0){
+                    vo.setFourteenRecovery(Double.parseDouble(df.format(vo.getFourteenAmount()/costCount))*100);
+                }
+                if (vo.getSeventeenAmount()!=null && vo.getSeventeenAmount()>0){
+                    vo.setSeventeenRecovery(Double.parseDouble(df.format(vo.getSeventeenAmount()/costCount))*100);
+                }
+                if(vo.getTwentyfourAmount()!=null && vo.getTwentyfourAmount()>0){
+                    vo.setTwentyfourRecovery(Double.parseDouble(df.format(vo.getTwentyfourAmount()/costCount))*100);
+                }
             }
+
         }
         return new Page<>(list, pager);
 

+ 1 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/ManageApplication.java

@@ -23,7 +23,7 @@ public class ManageApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功 <调试修改02> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 <调试修改03> ( ´・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 10 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/controller/ChoiceController.java

@@ -1,6 +1,7 @@
 package com.zanxiang.game.module.manage.controller;
 
 import com.zanxiang.erp.security.annotation.PreAuthorize;
+import com.zanxiang.erp.security.util.SecurityUtil;
 import com.zanxiang.game.module.base.pojo.enums.GameCategoryEnum;
 import com.zanxiang.game.module.base.pojo.enums.OsEnum;
 import com.zanxiang.game.module.base.pojo.enums.PayApplicationTypeEnum;
@@ -10,6 +11,7 @@ import com.zanxiang.game.module.manage.pojo.vo.*;
 import com.zanxiang.game.module.manage.service.*;
 import com.zanxiang.module.util.bean.BeanUtil;
 import com.zanxiang.module.util.pojo.ResultVO;
+import com.zanxiang.module.web.util.IpUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiResponse;
@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -106,7 +109,13 @@ public class ChoiceController {
     @GetMapping(value = "/game/category/list")
     @PreAuthorize(permissionKey = "manage:gameCategoryChoice:list")
     @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = GameCategoryChoiceVO.class, responseContainer = "list")})
-    public ResultVO<List<GameCategoryChoiceVO>> gameCategoryChoiceList() {
+    public ResultVO<List<GameCategoryChoiceVO>> gameCategoryChoiceList(HttpServletRequest request) {
+
+        if (SecurityUtil.getUserId() == 413) {
+            log.error("----------------> 2222222222222222222, ip : {}, ua : {}",
+                    IpUtil.getRealIp(request), request.getHeader("User-Agent"));
+        }
+
         return ResultVO.ok(Arrays.stream(GameCategoryEnum.values())
                 .map(gameCategoryEnum -> BeanUtil.copy(gameCategoryEnum, GameCategoryChoiceVO.class))
                 .collect(Collectors.toList()));