加入价格系统
This commit is contained in:
+10
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user