加入价格系统

This commit is contained in:
2026-01-14 18:39:39 +08:00
parent 39ff1bca75
commit 3be9803dba
5 changed files with 187 additions and 46 deletions
@@ -1044,7 +1044,17 @@ public class EvaluationServiceImpl implements EvaluationService {
if(sqmetreRent!=null){
long totalPrice = evaluationRateService.evaluationRent(sqmetreRent.getAvgPrice().intValue(), evaluation);
if(null!= evaluation && StringUtils.isNotBlank(evaluation.getFromUserId())){
ApiUserCfg apiUserCfg = apiUserCfgService.findByUserId(Long.valueOf(evaluation.getFromUserId()), ApiUserCfg.ApiUserCfgKey.EVALUATE_RATE);
if(apiUserCfg != null && apiUserCfg.getCfgValue() != null && apiUserCfg.getCfgValue() instanceof Double){
Double rate = (Double)apiUserCfg.getCfgValue();
if(rate != 0){
totalPrice = (long)(totalPrice * rate);
}
}
}
evaluation.setTotalPrice(((Number) (totalPrice)).intValue());
// evaluation.setAvgPrice(((Number) (totalPrice / evaluation.getArea())).intValue());
evaluation.setEvaluateWay(sqmetreRent.getValueType());
evaluation.setCredit(sqmetreRent.getCredit());