|
@@ -1158,7 +1158,7 @@ public class EnergyService {
|
|
|
// 3. 按比例分配
|
|
// 3. 按比例分配
|
|
|
Map<Long, Integer> allocations = calculateAllocations(totalAmount, dimRatios);
|
|
Map<Long, Integer> allocations = calculateAllocations(totalAmount, dimRatios);
|
|
|
// 4. 更新余额 + 写流水
|
|
// 4. 更新余额 + 写流水
|
|
|
- return executeAward(childId, sourceType, sourceId, description, daysToExpire, allocations);
|
|
|
|
|
|
|
+ return executeAward(childId, sourceType, sourceId, totalAmount, description, daysToExpire, allocations);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1299,7 +1299,7 @@ public class EnergyService {
|
|
|
for (int i = 0; i < arr.size(); i++) {
|
|
for (int i = 0; i < arr.size(); i++) {
|
|
|
com.alibaba.fastjson.JSONObject item = arr.getJSONObject(i);
|
|
com.alibaba.fastjson.JSONObject item = arr.getJSONObject(i);
|
|
|
String dimCode = item.getString("dim");
|
|
String dimCode = item.getString("dim");
|
|
|
- int ratio = item.getInt("ratio");
|
|
|
|
|
|
|
+ int ratio = item.getIntValue("ratio");
|
|
|
EnergyDimension dim = getDimByCode(dimCode);
|
|
EnergyDimension dim = getDimByCode(dimCode);
|
|
|
if (dim != null) {
|
|
if (dim != null) {
|
|
|
result.put(dim.getId(), ratio * 100); // 转为10000制
|
|
result.put(dim.getId(), ratio * 100); // 转为10000制
|