袁野 4 weeks ago
parent 639b38f89b
commit f979a2f1cd
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 6
      hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java
  3. 2
      hai-service/src/main/java/com/hai/order/model/ExportOrderMobileModel.java
  4. 15
      hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java
  5. 5
      hai-service/src/main/java/com/hai/service/HighGasService.java
  6. 107
      hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java
  7. 32
      hai-user/src/main/java/com/web/controller/WechatController.java
  8. 5
      v1/src/main/java/com/v1/controller/business/RefuelOnlineController.java

File diff suppressed because one or more lines are too long

@ -147,12 +147,12 @@ public class HighGasSchedule {
// }
// }
// }
/*
@Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
public void getJiaHaoYouAllStation() throws Exception {
// gasService.getJiaHaoYouAllStation();
gasService.getJiaHaoYouAllStation();
}
*/
// @Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
// public void getPayloAllStation() throws Exception {

@ -36,7 +36,6 @@ public class ExportOrderMobileModel {
@ExcelProperty("充值子订单号")
private String childOrderNo;
@ColumnWidth(15)
@ExcelProperty("充值平台")
private String rechargePlatform;
@ -61,7 +60,6 @@ public class ExportOrderMobileModel {
@ExcelProperty("订单状态")
private String orderStatus;
@ColumnWidth(15)
@ExcelProperty("创建时间")
private Date createTime;

@ -295,11 +295,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE20.getNumber())) {
etcUser(order);
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE21.getNumber())) {
etcTrain
(order);
etcTrain(order);
}
}
}
@ -490,14 +486,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
// 支付给千猪
QianZhuConfig.payKfcOrder(channelOrderNo);
// 推送订单记录
// HighGasOrderPush highGasOrderPush = new HighGasOrderPush();
// highGasOrderPush.setType(OrderPushType.type3.getType());
// highGasOrderPush.setOrderNo(order.getOrderNo());
// highGasOrderPush.setCreateTime(new Date());
// highGasOrderPush.setRequestContent(order.getOrderNo());
// highGasOrderPush.setReturnContent(object.toJSONString());
// highGasOrderPushMapper.insert(highGasOrderPush);
}
/**

@ -26,6 +26,11 @@ public interface HighGasService {
* 获取渠道商点点网络全量加油站
*/
void getDianAllStation() throws Exception;
/**
* 团油
* 获取团游全量加油站
*/
void getGasInfoList() throws Exception;
/**
*

@ -473,6 +473,113 @@ public class HighGasServiceImpl implements HighGasService {
@Override
public void getDianAllStation() throws Exception {
HighMerchantModel merchant = highMerchantService.getMerchantById(39L);
JSONObject jsonObject = DianConfig.getGasInfoAll();
JSONArray resultObject = jsonObject.getObject("result", JSONArray.class);
for (int i = 0; i < resultObject.size();i++) {
Object objectData = resultObject.get(i);
JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(objectData));
HighMerchantStore highMerchantStore;
HighGasOilPrice highGasOilPrice;
HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreByKey(object.getString("jyzid"));
SecRegion region = commonService.getRegionsByName(object.getString("province"));
if (store != null) {
store.setType(1);
store.setSourceType(6);
store.setMerchantId(merchant.getId());
store.setCompanyId(merchant.getCompanyId());
store.setStoreKey(object.getString("jyzid"));
store.setStoreName(object.getString("mingcheng"));
store.setStoreLogo(object.getString("tupian"));
store.setRegionId(region.getRegionId());
store.setRegionName(object.getString("province"));
store.setAddress(object.getString("dizhi"));
store.setLongitude(object.getString("lng"));
store.setLatitude(object.getString("lat"));
store.setStatus(object.getInteger("zhuangtai"));
store.setPrestoreType(0);
store.setOperatorId(0L);
store.setOperatorName("系统创建");
store.setUpdateTime(new Date());
store.setExt1(object.getString("gasSourceId"));
highMerchantStoreService.updateMerchantStoreDetail(store);
JSONArray oilPriceList = object.getJSONArray("oilPriceList");
for (Object oilPrice : oilPriceList) {
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice));
// 查询门店油号
highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("youhao"));
if (highGasOilPrice == null) {
highGasOilPrice = new HighGasOilPrice();
highGasOilPrice.setMerchantStoreId(store.getId());
highGasOilPrice.setOilNo(oilPriceObject.getString("youhao"));
highGasOilPrice.setOilNoName(oilPriceObject.getString("youhao") + "#");
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip"));
highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setOilType(oilPriceObject.getInteger("oiltype"));
highGasOilPrice.setOilTypeName(oilPriceObject.getString("oiltype").equals("1") ? "汽油": "柴油");
highGasOilPrice.setStatus(GasOilPriceStatusEnum.status1.getStatus());
} else {
highGasOilPrice.setMerchantStoreId(store.getId());
highGasOilPrice.setOilNo(oilPriceObject.getString("youhao"));
highGasOilPrice.setOilNoName( oilPriceObject.getString("youhao") + "#");
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip"));
highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setOilType(oilPriceObject.getInteger("oiltype"));
highGasOilPrice.setOilTypeName(oilPriceObject.getString("oiltype").equals("1") ? "汽油": "柴油");
}
highGasOilPriceService.editGasOilPrice(highGasOilPrice);
}
} else {
highMerchantStore = new HighMerchantStore();
highMerchantStore.setType(1);
highMerchantStore.setSourceType(6);
highMerchantStore.setMerchantId(merchant.getId());
highMerchantStore.setCompanyId(merchant.getCompanyId());
highMerchantStore.setStoreKey(object.getString("jyzid"));
highMerchantStore.setStoreName(object.getString("mingcheng"));
highMerchantStore.setStoreLogo(object.getString("tupian"));
highMerchantStore.setRegionId(region.getRegionId());
highMerchantStore.setRegionName(object.getString("province"));
highMerchantStore.setAddress(object.getString("dizhi"));
highMerchantStore.setLongitude(object.getString("lng"));
highMerchantStore.setLatitude(object.getString("lat"));
highMerchantStore.setStatus(1);
highMerchantStore.setPrestoreType(0);
highMerchantStore.setOperatorId(0L);
highMerchantStore.setOperatorName("系统创建");
highMerchantStore.setCreateTime(new Date());
highMerchantStore.setUpdateTime(new Date());
highMerchantStore.setExt1(object.getString("gasSourceId"));
HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel();
BeanUtils.copyProperties(highMerchantStore, merchantStoreModel);
highMerchantStoreService.insertMerchantStore(merchantStoreModel);
JSONArray oilPriceList = object.getJSONArray("oilPriceList");
for (Object oilPrice : oilPriceList) {
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice));
highGasOilPrice = new HighGasOilPrice();
highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId());
highGasOilPrice.setOilNo(oilPriceObject.getString("youhao"));
highGasOilPrice.setOilNoName(oilPriceObject.getString("youhao") + "#");
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip"));
highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setOilType(oilPriceObject.getInteger("oiltype"));
highGasOilPrice.setOilTypeName(oilPriceObject.getString("oiltype").equals("1") ? "汽油": "柴油");
highGasOilPriceService.editGasOilPrice(highGasOilPrice);
}
}
}
}
@Override
public void getGasInfoList() throws Exception {
HighMerchantModel merchant = highMerchantService.getMerchantById(39L);
if (merchant == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户");

@ -1,19 +1,20 @@
package com.web.controller;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.utils.*;
import com.hai.enum_type.LoginPlatform;
import com.hai.enum_type.RedisFileFolder;
import com.hai.model.ResponseData;
import com.hai.service.HighUserService;
import com.web.type.LoginType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@ -68,4 +69,27 @@ public class WechatController {
}
}
@RequestMapping(value = "/phone", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "【H5】手机号登录")
public ResponseData phone(
@RequestParam(value = "phone", required = false) String phone ,
HttpServletRequest request, HttpServletResponse response) {
try {
// 客户端
LoginPlatform platform = LoginPlatform.getDataByType("H5");
if (platform == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知客户端");
}
return ResponseMsgUtil.success(userService.loginAndRegister(platform, phone, null , null, request, response));
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}
}
}

@ -116,9 +116,6 @@ public class RefuelOnlineController {
List<ApiMchStoreModel> apiMchStoreModels;
apiMchStoreModels = (List<ApiMchStoreModel>) redisUtil.get("stationStoreApi");
if (apiMchStoreModels == null) {
apiMchStoreModels = new ArrayList<>();
Map<String, Object> mapProduct = new HashMap<>();
mapProduct.put("mchId" , object.getString("merchId"));
@ -168,8 +165,6 @@ public class RefuelOnlineController {
apiMchStoreModel.setApiGasOliPriceModels(list);
apiMchStoreModels.add(apiMchStoreModel);
}
redisUtil.set("stationStoreApi", apiMchStoreModels);
}
return ResponseMsgUtil.success(apiMchStoreModels);

Loading…
Cancel
Save