更新9.18

This commit is contained in:
许允枞 2024-09-18 09:45:09 +08:00
parent e0de005c1b
commit b1b134b4ae
4 changed files with 35 additions and 3 deletions

View File

@ -21,7 +21,7 @@
</div>
<div class="nbox" :class="pointerClass" @click="updateRedio('积分商城订单')">
<div class="fount-box" :style="{ color: radio1 === '积分商城订单' ? '#FF770F' : '#999999' }">积分兑换订单</div>
<div class="fount-box" :style="{ color: radio1 === '积分商城订单' ? '#FF770F' : '#999999' }">积分商城订单</div>
<div class="heng-box" v-if="radio1 == '积分商城订单'"></div>
<div class="heng-box" style="background-color: #FFFFFF" v-else></div>
</div>

View File

@ -19,4 +19,8 @@ public class IntegralOrdersDTO extends IntegralOrders {
private String coverImage;
private Long deptId;
private List<Long> storeIds;
/**
* 支付类型
*/
private String paymentType;
}

View File

@ -181,6 +181,8 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
}
List<allorderVOo> fenxiByDaili2 = allOrderInfoMapper.getFenxiByDaili2(allOrderInfo);
record.setPayMoney(convertPayMoneyToWanYuan(record.getPayMoney()));
record.setFenxiByDaili2(fenxiByDaili2);
}
return fenxiByDaili;
@ -1693,4 +1695,17 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
sysDept.setDailyAmount(meanAmountStr);
sysDept.setStrokesPerDay(meanStrokeCountStr);
}
/**
* 将支付金额转换为万圆
* @param payMoney
*/
public Double convertPayMoneyToWanYuan(Double payMoney) {
if (payMoney != null) {
BigDecimal payMoneyInYuan = BigDecimal.valueOf(payMoney);
BigDecimal payMoneyInWanYuan = payMoneyInYuan.divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP);
return payMoneyInWanYuan.doubleValue();
}
return null;
}
}

View File

@ -36,6 +36,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -145,8 +146,8 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
leiJiInfo.put("tongjMoney","0");
}
dataByZt.put("tongjMoney",ObjectUtil.isNotEmpty(leiJiInfo.get("tongjMoney"))?leiJiInfo.get("tongjMoney"):"0");
dataByZt.put("tongjXfMoney",ObjectUtil.isNotEmpty(leiJiInfo.get("tongjXfMoney"))?leiJiInfo.get("tongjXfMoney"):"0");
dataByZt.put("tongjMoney",ObjectUtil.isNotEmpty(leiJiInfo.get("tongjMoney"))?convertYuanToWanYuan((BigDecimal) leiJiInfo.get("tongjMoney")):"0");
dataByZt.put("tongjXfMoney",ObjectUtil.isNotEmpty(leiJiInfo.get("tongjXfMoney"))?convertYuanToWanYuan((BigDecimal) leiJiInfo.get("tongjXfMoney")):"0");
return dataByZt;
}
@ -361,4 +362,16 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
// 新增会员余额信息
return insertUserBalance(userBalanceAdd);
}
/**
* 将金额从元转换为万元
*
* @param amountInYuan 以元为单位的金额
* @return 以万元为单位的金额
*/
public static BigDecimal convertYuanToWanYuan(BigDecimal amountInYuan) {
// 将元转换为万元使用 BigDecimal 进行精确的数学运算
BigDecimal divisor = new BigDecimal("10000");
return amountInYuan.divide(divisor, 2, RoundingMode.HALF_UP);
}
}