袁野 1 year ago
parent b846e3f6d6
commit 2cc143e685
  1. 46
      hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java
  2. 2
      hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java

@ -74,29 +74,29 @@ public class HighOrderSchedule {
* @Param []
* @return void
*/
@Scheduled(cron="0 0/10 * * * ?") //每 10分钟执行一次
public void integralRebateOrder() {
// 查询满足初步返利条件订单
List<HighOrder> order = highOrderService.integralRebateOrder();
for (HighOrder highOrder : order) {
// 查询是否存在积分记录
Map<String, Object> map = new HashMap<>();
map.put("goldType", 1);
map.put("resType", 4);
map.put("userId", highOrder.getMemId());
map.put("resId", highOrder.getId());
List<HighGoldRec> goldRecs = highGoldRecService.getGoldRec(map);
// 判断是否重复赠送积分
if (goldRecs.size() == 0) {
bsOrderRebateService.insertOrderRebate(highOrder);
}
}
}
// @Scheduled(cron="0 0/10 * * * ?") //每 10分钟执行一次
// public void integralRebateOrder() {
//
// // 查询满足初步返利条件订单
// List<HighOrder> order = highOrderService.integralRebateOrder();
// for (HighOrder highOrder : order) {
//
// // 查询是否存在积分记录
// Map<String, Object> map = new HashMap<>();
// map.put("goldType", 1);
// map.put("resType", 4);
// map.put("userId", highOrder.getMemId());
// map.put("resId", highOrder.getId());
//
// List<HighGoldRec> goldRecs = highGoldRecService.getGoldRec(map);
//
// // 判断是否重复赠送积分
// if (goldRecs.size() == 0) {
// bsOrderRebateService.insertOrderRebate(highOrder);
// }
//
// }
// }
}

@ -556,7 +556,7 @@ public class CommonServiceImpl implements CommonService {
// GPS 经纬度类型
map.put("coordtype", "wgs84ll");
//百度经纬度
map.put("location", lat+","+lng+"");
map.put("location", lat+","+lng);
return HttpsUtils.doGet("http://api.map.baidu.com/reverse_geocoding/v3/" , map);

Loading…
Cancel
Save