Parcourir la source

列表展示,修改预算为小数不生效

yangzian il y a 4 ans
Parent
commit
eac7203818

+ 1 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/entity/AiBytedanceAdvertiserStrategy.java

@@ -54,7 +54,7 @@ public class AiBytedanceAdvertiserStrategy{
 	/**账户预算类型*/
 	private String accountBudgetMode;
 	/**账户预算*/
-	private Integer accountBudget;
+	private BigDecimal accountBudget;
 	/**组预算类型*/
 	private String campaignBudgetMode;
 	/**组预算*/

+ 2 - 2
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/report/service/impl/BytedanceAdvertiserHourlyReportServiceImpl.java

@@ -93,7 +93,7 @@ public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<Byte
         strategyQueryWrapper.last("limit 1");
         AiBytedanceAdvertiserStrategy strategy = aiBytedanceAdvertiserStrategyMapper.selectOne(strategyQueryWrapper);
         //没有预算则使用上阶段花费
-        double accountBudget = Check.isNull(strategy) ? lastCost : strategy.getAccountBudget();
+        double accountBudget = Check.isNull(strategy) ? lastCost : strategy.getAccountBudget().doubleValue();
         //花费占比
         double costShare = nowCost / accountBudget;
         resultMap.put("costShare", df.format(costShare));
@@ -194,7 +194,7 @@ public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<Byte
         strategyQueryWrapper.eq("status",0);
         strategyQueryWrapper.last("limit 1");
         AiBytedanceAdvertiserStrategy strategy = aiBytedanceAdvertiserStrategyMapper.selectOne(strategyQueryWrapper);
-        double accountBudget = Check.isNull(strategy) ? 0 : strategy.getAccountBudget();
+        double accountBudget = Check.isNull(strategy) ? 0 : strategy.getAccountBudget().doubleValue();
         resultMap.put("accountMap", accountMap);
         resultMap.put("accountBudget", accountBudget);