+9
-5
@@ -1072,14 +1072,18 @@ public class EvaluationServiceImpl implements EvaluationService {
|
||||
if(stat != null){
|
||||
int avgPrice = stat.getAvgPrice();
|
||||
// 2c/2b price - weilei 2019-02-25
|
||||
ApiUserCfg cfg = apiUserCfgService.findByUserId(Long.valueOf(evaluation.getFromUserId()), ApiUserCfg.ApiUserCfgKey.PRICE_TYPE);
|
||||
if(cfg != null &&cfg.getCfgValue() != null && StringUtils.equalsIgnoreCase("2B", cfg.getCfgValue().toString())) {
|
||||
if (evaluation != null && evaluation.getAvgPrice2b() != null && evaluation.getAvgPrice2b() > 0) {
|
||||
avgPrice = evaluation.getAvgPrice2b().intValue();
|
||||
System.out.println("evaluation:"+(evaluation==null));
|
||||
if(null!= evaluation && null != evaluation.getFromUserId()){
|
||||
ApiUserCfg cfg = apiUserCfgService.findByUserId(Long.valueOf(evaluation.getFromUserId()), ApiUserCfg.ApiUserCfgKey.PRICE_TYPE);
|
||||
if(cfg != null &&cfg.getCfgValue() != null && StringUtils.equalsIgnoreCase("2B", cfg.getCfgValue().toString())) {
|
||||
if (evaluation != null && evaluation.getAvgPrice2b() != null && evaluation.getAvgPrice2b() > 0) {
|
||||
avgPrice = evaluation.getAvgPrice2b().intValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
long totalPrice = evaluationRateService.evaluation(avgPrice, evaluation);
|
||||
if(StringUtils.isNotBlank(evaluation.getFromUserId())){
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user