diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerStoreAmountController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerStoreAmountController.java
index 72f5b035..1af15704 100644
--- a/hai-bweb/src/main/java/com/bweb/controller/HighMerStoreAmountController.java
+++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerStoreAmountController.java
@@ -92,6 +92,44 @@ public class HighMerStoreAmountController {
}
}
+ @RequestMapping(value = "/setAmountsEarlyWarning", method = RequestMethod.POST)
+ @ResponseBody
+ @ApiOperation(value = "设置加油站预警值")
+ public ResponseData setAmountsEarlyWarning(@RequestBody JSONObject body) {
+ try {
+ UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
+ if (userInfoModel == null) {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
+ }
+ if (userInfoModel.getBsCompany() == null) {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
+ }
+ if (body.getLong("storeId") == null || body.getBigDecimal("earlyWarning") == null) {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
+ }
+ if (body.getBigDecimal("earlyWarning").compareTo(new BigDecimal("0")) == -1) {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "充值金额不能小于0");
+ }
+ // 门店
+ HighMerchantStoreAccount accountDetail = merchantStoreAccountService.getStoreAccountDetail(body.getLong("storeId"));
+ if (accountDetail == null) {
+ throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此加油站无法设置预警");
+ }
+ accountDetail.setAmountsEarlyWarning(body.getBigDecimal("earlyWarning"));
+ merchantStoreAccountService.editStoreAccount(accountDetail);
+
+ return ResponseMsgUtil.success("操作成功");
+
+ } catch (DeadlockLoserDataAccessException deadlockLoserDataAccessException) {
+ log.error("HighActivityController -> userLottery() error!", "服务器繁忙");
+ return ResponseMsgUtil.builderResponse(ErrorCode.SERVER_BUSY_ERROR.getCode(),ErrorCode.SERVER_BUSY_ERROR.getMsg(),null);
+
+ } catch (Exception e) {
+ log.error("HighCompanyAmountController --> recharge() error!", e);
+ return ResponseMsgUtil.exception(e);
+ }
+ }
+
@RequestMapping(value = "/getAccountRecordList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询账户记录列表")
diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java
index 72a8576c..1bebb4a8 100644
--- a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java
+++ b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java
@@ -101,7 +101,8 @@ public class HighGasController {
}
}
- if (StringUtils.isNotBlank(longitude) && StringUtils.isNotBlank(latitude)) {
+ if (StringUtils.isNotBlank(longitude) && StringUtils.isNotBlank(latitude)
+ && StringUtils.isNotBlank(store.get("longitude").toString()) && StringUtils.isNotBlank(store.get("latitude").toString())) {
double distance = CoordCommonUtil.getDistance(Double.valueOf(store.get("latitude").toString()), Double.valueOf(store.get("longitude").toString()), Double.valueOf(latitude), Double.valueOf(longitude));
store.put("distance", Math.round(distance/100d)/10d);
} else {
@@ -289,8 +290,14 @@ public class HighGasController {
param.put("gasId", store.getStoreKey());
param.put("gasName", store.getStoreName());
param.put("gasAddress", store.getAddress());
- param.put("gasLogoBig", CommonSysConst.getSysConfig().getHsgDomainName()+"/filesystem/"+store.getStoreLogo());
- param.put("gasLogoSmall", CommonSysConst.getSysConfig().getHsgDomainName()+"/filesystem/"+store.getStoreLogo());
+
+ if (store.getSourceType().equals(1)) {
+ param.put("gasLogoBig", CommonSysConst.getSysConfig().getHsgDomainName()+"/filesystem/"+store.getStoreLogo());
+ param.put("gasLogoSmall", CommonSysConst.getSysConfig().getHsgDomainName()+"/filesystem/"+store.getStoreLogo());
+ } else {
+ param.put("gasLogoBig", store.getStoreLogo());
+ param.put("gasLogoSmall", store.getStoreLogo());
+ }
param.put("gasAddressLatitude", store.getLatitude());
param.put("gasAddressLongitude", store.getLongitude());
@@ -483,8 +490,13 @@ public class HighGasController {
param.put("gasId", store.getStoreKey());
param.put("gasName", store.getStoreName());
param.put("gasAddress", store.getAddress());
- param.put("gasLogoBig", CommonSysConst.getSysConfig().getHsgDomainName()+"/filesystem/"+store.getStoreLogo());
- param.put("gasLogoSmall", CommonSysConst.getSysConfig().getHsgDomainName()+"/filesystem/"+store.getStoreLogo());
+ if (store.getSourceType().equals(1)) {
+ param.put("gasLogoBig", CommonSysConst.getSysConfig().getHsgDomainName()+"/filesystem/"+store.getStoreLogo());
+ param.put("gasLogoSmall", CommonSysConst.getSysConfig().getHsgDomainName()+"/filesystem/"+store.getStoreLogo());
+ } else {
+ param.put("gasLogoBig", store.getStoreLogo());
+ param.put("gasLogoSmall", store.getStoreLogo());
+ }
param.put("gasAddressLatitude", store.getLatitude());
param.put("gasAddressLongitude", store.getLongitude());
// 距离
diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
index 3b53ad96..f1ac8ffe 100644
--- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
+++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
@@ -335,10 +335,10 @@ public class HighOrderController {
childOrder.setGasPricePreferences(priceModel.getPricePreferences());
// 来源类型 1:平台自建 2:团油
- if (store.getSourceType().equals(2)) {
- childOrder.setGoodsImg(store.getStoreLogo());
- } else {
+ if (store.getSourceType().equals(1)) {
childOrder.setGoodsImg(CommonSysConst.getSysConfig().getHsgDomainName()+"/filesystem/"+store.getStoreLogo());
+ } else {
+ childOrder.setGoodsImg(store.getStoreLogo());
}
childOrder.setGoodsName(store.getStoreName());
diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java
index 58c40e8f..788d11aa 100644
--- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java
+++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java
@@ -33,6 +33,8 @@ public interface HighGasOilPriceMapperExt {
" AND a.`status` = 1 " +
" AND b.region_id = #{regionId} " +
" AND a.oil_no_name = #{oilNoName}" +
+ " AND b.longitude is not null" +
+ " AND b.latitude is not null" +
" and b.store_name like '%${storeName}%'" +
" " )
List