Commit bb3d6fbf authored by unset's avatar unset

新增官网咨询和banner

parent c570cc68
...@@ -66,22 +66,21 @@ public class IntegralUserRecordBiz extends BaseBiz<IntegralUserRecordMapper, Int ...@@ -66,22 +66,21 @@ public class IntegralUserRecordBiz extends BaseBiz<IntegralUserRecordMapper, Int
if (integralUserRecord.getPoint() == null) { if (integralUserRecord.getPoint() == null) {
Integer point = 0; Integer point = 0;
if (oldValue.getPoint() == 0) {//没有基础分需要计算分数 if (oldValue.getPoint() == 0) {//没有基础分需要计算分数
Integer amount = Integer.parseInt(new BigDecimal(integralUserRecord.getAmount()).divide(new BigDecimal("100"), 0, BigDecimal.ROUND_DOWN).toString()); Integer amount = new BigDecimal(integralUserRecord.getAmount()).intValue();
//Integer amount = Integer.parseInt(integralUserRecord.getAmount()); //Integer amount = Integer.parseInt(integralUserRecord.getAmount());
JSONObject jsonObject = JSONObject.parseObject(oldValue.getOtherRule()); JSONObject jsonObject = JSONObject.parseObject(oldValue.getOtherRule());
log.info("查询的其他规则json信息:jsonObject = {}", jsonObject); log.info("查询的其他规则json信息:jsonObject = {}", jsonObject);
if (jsonObject == null) { if (jsonObject == null) {
point = ruleObjectRestResponse.getData().getPoint(); point = oldValue.getPoint();
} else { } else {
point = jsonObject.getInteger("rule") == null ? 0 * amount : jsonObject.getInteger("rule") * amount; point = jsonObject.getInteger("rule") == null ? 0 * amount : jsonObject.getInteger("rule") * amount;
} }
} else { } else {
point = ruleObjectRestResponse.getData().getPoint(); point = ruleObjectRestResponse.getData().getPoint();
} }
log.info("查询的其他规则积分数:point = {}", point); log.info("查询的其他规则积分数:point = {}", point);
//把规则表中的积分数设置到参数对象中,然后进行后续操作 //把规则表中的积分数设置到参数对象中,然后进行后续操作
integralUserRecord.setPoint(point); integralUserRecord.setPoint(point / 100);
} }
if (integralUserRecord.getType() == 0) {//获取积分 增加总积分表 if (integralUserRecord.getType() == 0) {//获取积分 增加总积分表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment