mybatis-plus sum求和

获取合同包下所有合同的总金额之和

var contract_wrapper = QueryWrapper<GfCardEmployee>()
.eq("employee_id", employeeId);
.select("COALESCE(sum(percentage),0.00) as total");
.`in`("order_id",list)
var map = this.getMap(contract_wrapper)

var package_total_amount = map.get("total") as BigDecimal

return package_total_amount.toBigDecmil

你可能感兴趣的:(kotlin,java,spring)