|
@@ -670,6 +670,33 @@ public class RepairBillServiceImpl implements RepairBillService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String automaticHighPraise() throws Exception {
|
|
|
+
|
|
|
+ List<Integer> list = repairBillManager.getAutomaticHighPraiseRepairData();
|
|
|
+ for(Integer repairId : list){
|
|
|
+
|
|
|
+ //看是否有评论记录
|
|
|
+ RepairBillComment repairBillComment = repairBillCommentManager.findBy(Long.parseLong(repairId.toString()));
|
|
|
+ if(null != repairBillComment){
|
|
|
+ repairBillComment.setStar(5); //工程维修工单完成状态24*7小时后自动五星好评
|
|
|
+ repairBillCommentManager.updateModel(repairBillComment);
|
|
|
+ }else{
|
|
|
+ RepairBillComment saveRepairBillComment = new RepairBillComment();
|
|
|
+
|
|
|
+ saveRepairBillComment.setBillId(Long.parseLong(repairId.toString()));
|
|
|
+ saveRepairBillComment.setStar(5);
|
|
|
+ saveRepairBillComment.setCreateTime(new Date());
|
|
|
+ repairBillCommentManager.saveModel(saveRepairBillComment);
|
|
|
+ }
|
|
|
+ RepairBill repairBill= repairBillManager.get(Long.parseLong(repairId.toString()));
|
|
|
+ repairBill.setHasComment(2); //是否有评论
|
|
|
+ repairBillManager.updateModel(repairBill);
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public String managePendBillPush() throws Exception {
|