| | |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.crossCity.server.IOrderCrossCityService; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogistics; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.dao.OrderEvaluateMapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | @Service |
| | |
| | | |
| | | @Autowired |
| | | private IOrderCrossCityService orderCrossCityService; |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | |
| | | |
| | | |
| | |
| | | return ResultUtil.error(language == 1 ? "评价内容过长" : language == 2 ? "Rating-content is overlong." : "Le contenu de l’évaluation est trop long."); |
| | | } |
| | | List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); |
| | | List<String> list = Arrays.asList(content.split(" ")); |
| | | for(SensitiveWords s : sensitiveWords){ |
| | | content = content.replaceAll(s.getContent(), "***"); |
| | | List<String> str = new ArrayList<>(); |
| | | String lowerCase = s.getContent().toLowerCase(); |
| | | for (String s1 : list) { |
| | | if(lowerCase.equals(s1.toLowerCase())){ |
| | | str.add("***"); |
| | | }else{ |
| | | str.add(s1); |
| | | } |
| | | } |
| | | list = str; |
| | | } |
| | | content = list.stream().collect(Collectors.joining(" ")); |
| | | } |
| | | OrderEvaluate orderEvaluate = new OrderEvaluate(); |
| | | Integer driverId = null; |
| | |
| | | driverId = orderCrossCity.getDriverId(); |
| | | uid = orderCrossCity.getUserId(); |
| | | break; |
| | | case 4: |
| | | OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId); |
| | | driverId = orderLogistics.getDriverId(); |
| | | uid = orderLogistics.getUserId(); |
| | | break; |
| | | } |
| | | |
| | | orderEvaluate.setOrderId(orderId); |