提交代码

dev-discount
胡锐 2 years ago
parent c7bd117495
commit 704d1c246b
  1. 10
      hai-bweb/src/main/java/com/bweb/controller/HighGasController.java
  2. 2
      hai-bweb/src/main/java/com/bweb/model/ImportStoreModel.java
  3. 3
      hai-service/src/main/java/com/hai/config/JinZhuJiaYouService.java
  4. 55
      hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java
  5. 14
      hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java
  6. 19
      hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapper.java
  7. 14
      hai-service/src/main/java/com/hai/dao/HighGasOilPriceSqlProvider.java
  8. 18
      hai-service/src/main/java/com/hai/entity/HighChildOrder.java
  9. 60
      hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java
  10. 16
      hai-service/src/main/java/com/hai/entity/HighGasOilPrice.java
  11. 60
      hai-service/src/main/java/com/hai/entity/HighGasOilPriceExample.java
  12. 9
      hai-service/src/main/java/com/hai/enum_type/JinZhuJiaYouOilNo.java
  13. 9
      hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java
  14. 45
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -812,6 +812,10 @@ public class HighGasController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败,未找到加油站信息"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败,未找到加油站信息");
} }
// 油站来源,根据不同的来源,请求不同的退款业务接口。
// 团油 退款需要申请。不是实时退款
// 加好油 实时退款,退款成功就可以退款给用户
// 金猪加油 没有线上退款接口,线下核实后直接退款给用户。
if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) { if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) {
JSONObject object = TuanYouConfig.refuelingOrderRefund(order.getMemPhone(), order.getOrderNo(), body.getString("refundContent")); JSONObject object = TuanYouConfig.refuelingOrderRefund(order.getMemPhone(), order.getOrderNo(), body.getString("refundContent"));
if (object == null || !object.getString("code").equals("200")) { if (object == null || !object.getString("code").equals("200")) {
@ -831,9 +835,13 @@ public class HighGasController {
highOrderService.updateOrderDetail(order); highOrderService.updateOrderDetail(order);
} }
// 用户支付金额原路退款
// 来源类型 1:平台自建 2:团油 // 来源类型 1:平台自建 2:团油
if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber()) if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { || store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())
) {
if (order.getPayType() == 2) { if (order.getPayType() == 2) {
OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund(order.getPaySerialNo(), order.getPayRealPrice(), order.getAccountMerchantNum(), order.getPayRealPrice()); OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund(order.getPaySerialNo(), order.getPayRealPrice(), order.getAccountMerchantNum(), order.getPayRealPrice());

@ -5,7 +5,7 @@ import com.alibaba.excel.annotation.format.DateTimeFormat;
/** /**
* @Author 胡锐 * @Author 胡锐
* @Description 导入门店 * @Description
* @Date 2021/3/26 19:23 * @Date 2021/3/26 19:23
**/ **/
public class ImportStoreModel { public class ImportStoreModel {

@ -112,7 +112,7 @@ public class JinZhuJiaYouService {
// 请求头部 // 请求头部
Map<String, Object> heard = new HashMap<>(); Map<String, Object> heard = new HashMap<>();
heard.put("Request-App-Id", "app_xiaohan_test_01"); heard.put("Request-App-Id", "app_xiaohan_test_01");
heard.put("Request-Service-Name", "STATION_TREE_PAGE"); heard.put("Request-Service-Name", service);
heard.put("Request-Signature", generateSign(param)); heard.put("Request-Signature", generateSign(param));
JSONObject repsObject = HttpsUtils.doPost(reqUrl, param, heard); JSONObject repsObject = HttpsUtils.doPost(reqUrl, param, heard);
@ -128,7 +128,6 @@ public class JinZhuJiaYouService {
|| !repsObject.getInteger("status").equals(200) || !repsObject.getInteger("status").equals(200)
|| !repsObject.getString("type").equals("OK")) { || !repsObject.getString("type").equals("OK")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, repsObject == null?"请求失败":repsObject.getString("title")); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, repsObject == null?"请求失败":repsObject.getString("title"));
} }
return repsObject; return repsObject;
} }

@ -52,16 +52,17 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"gas_oil_type, gas_order_no, ", "gas_oil_type, gas_order_no, ",
"gas_price_platform, gas_price_gun, ", "gas_price_platform, gas_price_gun, ",
"gas_price_vip, gas_price_official, ", "gas_price_vip, gas_price_official, ",
"gas_oil_liters, gas_discount, ", "gas_price_channel_pay, gas_oil_liters, ",
"gas_oil_subsidy, gas_liters_preferences, ", "gas_discount, gas_oil_subsidy, ",
"gas_price_preferences, gas_class_group_id, ", "gas_liters_preferences, gas_price_preferences, ",
"gas_class_group_name, gas_class_group_task_id, ", "gas_class_group_id, gas_class_group_name, ",
"gas_staff_id, gas_staff_name, ", "gas_class_group_task_id, gas_staff_id, ",
"gas_salesman_id, gas_salesman_name, ", "gas_staff_name, gas_salesman_id, ",
"gas_agent_id, gas_agent_name, ", "gas_salesman_name, gas_agent_id, ",
"gas_org_id, gas_org_name, ", "gas_agent_name, gas_org_id, ",
"ext_1, ext_2, ext_3, ", "gas_org_name, ext_1, ",
"ext_4, ext_5, ext_6)", "ext_2, ext_3, ext_4, ",
"ext_5, ext_6)",
"values (#{orderId,jdbcType=BIGINT}, #{memId,jdbcType=BIGINT}, ", "values (#{orderId,jdbcType=BIGINT}, #{memId,jdbcType=BIGINT}, ",
"#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ", "#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ",
"#{storeAddress,jdbcType=VARCHAR}, #{goodsType,jdbcType=INTEGER}, ", "#{storeAddress,jdbcType=VARCHAR}, #{goodsType,jdbcType=INTEGER}, ",
@ -75,16 +76,17 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"#{gasOilType,jdbcType=INTEGER}, #{gasOrderNo,jdbcType=VARCHAR}, ", "#{gasOilType,jdbcType=INTEGER}, #{gasOrderNo,jdbcType=VARCHAR}, ",
"#{gasPricePlatform,jdbcType=DECIMAL}, #{gasPriceGun,jdbcType=DECIMAL}, ", "#{gasPricePlatform,jdbcType=DECIMAL}, #{gasPriceGun,jdbcType=DECIMAL}, ",
"#{gasPriceVip,jdbcType=DECIMAL}, #{gasPriceOfficial,jdbcType=DECIMAL}, ", "#{gasPriceVip,jdbcType=DECIMAL}, #{gasPriceOfficial,jdbcType=DECIMAL}, ",
"#{gasOilLiters,jdbcType=DECIMAL}, #{gasDiscount,jdbcType=DECIMAL}, ", "#{gasPriceChannelPay,jdbcType=DECIMAL}, #{gasOilLiters,jdbcType=DECIMAL}, ",
"#{gasOilSubsidy,jdbcType=DECIMAL}, #{gasLitersPreferences,jdbcType=DECIMAL}, ", "#{gasDiscount,jdbcType=DECIMAL}, #{gasOilSubsidy,jdbcType=DECIMAL}, ",
"#{gasPricePreferences,jdbcType=DECIMAL}, #{gasClassGroupId,jdbcType=BIGINT}, ", "#{gasLitersPreferences,jdbcType=DECIMAL}, #{gasPricePreferences,jdbcType=DECIMAL}, ",
"#{gasClassGroupName,jdbcType=VARCHAR}, #{gasClassGroupTaskId,jdbcType=BIGINT}, ", "#{gasClassGroupId,jdbcType=BIGINT}, #{gasClassGroupName,jdbcType=VARCHAR}, ",
"#{gasStaffId,jdbcType=BIGINT}, #{gasStaffName,jdbcType=VARCHAR}, ", "#{gasClassGroupTaskId,jdbcType=BIGINT}, #{gasStaffId,jdbcType=BIGINT}, ",
"#{gasSalesmanId,jdbcType=BIGINT}, #{gasSalesmanName,jdbcType=VARCHAR}, ", "#{gasStaffName,jdbcType=VARCHAR}, #{gasSalesmanId,jdbcType=BIGINT}, ",
"#{gasAgentId,jdbcType=BIGINT}, #{gasAgentName,jdbcType=VARCHAR}, ", "#{gasSalesmanName,jdbcType=VARCHAR}, #{gasAgentId,jdbcType=BIGINT}, ",
"#{gasOrgId,jdbcType=BIGINT}, #{gasOrgName,jdbcType=VARCHAR}, ", "#{gasAgentName,jdbcType=VARCHAR}, #{gasOrgId,jdbcType=BIGINT}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ", "#{gasOrgName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ",
"#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighChildOrder record); int insert(HighChildOrder record);
@ -122,6 +124,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_channel_pay", property="gasPriceChannelPay", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_oil_liters", property="gasOilLiters", jdbcType=JdbcType.DECIMAL), @Result(column="gas_oil_liters", property="gasOilLiters", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL), @Result(column="gas_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL), @Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL),
@ -153,11 +156,11 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"goods_name, goods_desc, goods_img, goods_spec_name, goods_price, goods_actual_price, ", "goods_name, goods_desc, goods_img, goods_spec_name, goods_price, goods_actual_price, ",
"sale_count, total_price, giveaway_type, child_orde_status, praise_status, gas_oil_no, ", "sale_count, total_price, giveaway_type, child_orde_status, praise_status, gas_oil_no, ",
"gas_gun_no, gas_oil_type, gas_order_no, gas_price_platform, gas_price_gun, gas_price_vip, ", "gas_gun_no, gas_oil_type, gas_order_no, gas_price_platform, gas_price_gun, gas_price_vip, ",
"gas_price_official, gas_oil_liters, gas_discount, gas_oil_subsidy, gas_liters_preferences, ", "gas_price_official, gas_price_channel_pay, gas_oil_liters, gas_discount, gas_oil_subsidy, ",
"gas_price_preferences, gas_class_group_id, gas_class_group_name, gas_class_group_task_id, ", "gas_liters_preferences, gas_price_preferences, gas_class_group_id, gas_class_group_name, ",
"gas_staff_id, gas_staff_name, gas_salesman_id, gas_salesman_name, gas_agent_id, ", "gas_class_group_task_id, gas_staff_id, gas_staff_name, gas_salesman_id, gas_salesman_name, ",
"gas_agent_name, gas_org_id, gas_org_name, ext_1, ext_2, ext_3, ext_4, ext_5, ", "gas_agent_id, gas_agent_name, gas_org_id, gas_org_name, ext_1, ext_2, ext_3, ",
"ext_6", "ext_4, ext_5, ext_6",
"from high_child_order", "from high_child_order",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -189,6 +192,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_gun", property="gasPriceGun", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_vip", property="gasPriceVip", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_channel_pay", property="gasPriceChannelPay", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_oil_liters", property="gasOilLiters", jdbcType=JdbcType.DECIMAL), @Result(column="gas_oil_liters", property="gasOilLiters", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL), @Result(column="gas_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL), @Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL),
@ -251,6 +255,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL},", "gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL},",
"gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL},", "gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL},",
"gas_price_official = #{gasPriceOfficial,jdbcType=DECIMAL},", "gas_price_official = #{gasPriceOfficial,jdbcType=DECIMAL},",
"gas_price_channel_pay = #{gasPriceChannelPay,jdbcType=DECIMAL},",
"gas_oil_liters = #{gasOilLiters,jdbcType=DECIMAL},", "gas_oil_liters = #{gasOilLiters,jdbcType=DECIMAL},",
"gas_discount = #{gasDiscount,jdbcType=DECIMAL},", "gas_discount = #{gasDiscount,jdbcType=DECIMAL},",
"gas_oil_subsidy = #{gasOilSubsidy,jdbcType=DECIMAL},", "gas_oil_subsidy = #{gasOilSubsidy,jdbcType=DECIMAL},",

@ -132,6 +132,10 @@ public class HighChildOrderSqlProvider {
sql.VALUES("gas_price_official", "#{gasPriceOfficial,jdbcType=DECIMAL}"); sql.VALUES("gas_price_official", "#{gasPriceOfficial,jdbcType=DECIMAL}");
} }
if (record.getGasPriceChannelPay() != null) {
sql.VALUES("gas_price_channel_pay", "#{gasPriceChannelPay,jdbcType=DECIMAL}");
}
if (record.getGasOilLiters() != null) { if (record.getGasOilLiters() != null) {
sql.VALUES("gas_oil_liters", "#{gasOilLiters,jdbcType=DECIMAL}"); sql.VALUES("gas_oil_liters", "#{gasOilLiters,jdbcType=DECIMAL}");
} }
@ -256,6 +260,7 @@ public class HighChildOrderSqlProvider {
sql.SELECT("gas_price_gun"); sql.SELECT("gas_price_gun");
sql.SELECT("gas_price_vip"); sql.SELECT("gas_price_vip");
sql.SELECT("gas_price_official"); sql.SELECT("gas_price_official");
sql.SELECT("gas_price_channel_pay");
sql.SELECT("gas_oil_liters"); sql.SELECT("gas_oil_liters");
sql.SELECT("gas_discount"); sql.SELECT("gas_discount");
sql.SELECT("gas_oil_subsidy"); sql.SELECT("gas_oil_subsidy");
@ -403,6 +408,10 @@ public class HighChildOrderSqlProvider {
sql.SET("gas_price_official = #{record.gasPriceOfficial,jdbcType=DECIMAL}"); sql.SET("gas_price_official = #{record.gasPriceOfficial,jdbcType=DECIMAL}");
} }
if (record.getGasPriceChannelPay() != null) {
sql.SET("gas_price_channel_pay = #{record.gasPriceChannelPay,jdbcType=DECIMAL}");
}
if (record.getGasOilLiters() != null) { if (record.getGasOilLiters() != null) {
sql.SET("gas_oil_liters = #{record.gasOilLiters,jdbcType=DECIMAL}"); sql.SET("gas_oil_liters = #{record.gasOilLiters,jdbcType=DECIMAL}");
} }
@ -526,6 +535,7 @@ public class HighChildOrderSqlProvider {
sql.SET("gas_price_gun = #{record.gasPriceGun,jdbcType=DECIMAL}"); sql.SET("gas_price_gun = #{record.gasPriceGun,jdbcType=DECIMAL}");
sql.SET("gas_price_vip = #{record.gasPriceVip,jdbcType=DECIMAL}"); sql.SET("gas_price_vip = #{record.gasPriceVip,jdbcType=DECIMAL}");
sql.SET("gas_price_official = #{record.gasPriceOfficial,jdbcType=DECIMAL}"); sql.SET("gas_price_official = #{record.gasPriceOfficial,jdbcType=DECIMAL}");
sql.SET("gas_price_channel_pay = #{record.gasPriceChannelPay,jdbcType=DECIMAL}");
sql.SET("gas_oil_liters = #{record.gasOilLiters,jdbcType=DECIMAL}"); sql.SET("gas_oil_liters = #{record.gasOilLiters,jdbcType=DECIMAL}");
sql.SET("gas_discount = #{record.gasDiscount,jdbcType=DECIMAL}"); sql.SET("gas_discount = #{record.gasDiscount,jdbcType=DECIMAL}");
sql.SET("gas_oil_subsidy = #{record.gasOilSubsidy,jdbcType=DECIMAL}"); sql.SET("gas_oil_subsidy = #{record.gasOilSubsidy,jdbcType=DECIMAL}");
@ -662,6 +672,10 @@ public class HighChildOrderSqlProvider {
sql.SET("gas_price_official = #{gasPriceOfficial,jdbcType=DECIMAL}"); sql.SET("gas_price_official = #{gasPriceOfficial,jdbcType=DECIMAL}");
} }
if (record.getGasPriceChannelPay() != null) {
sql.SET("gas_price_channel_pay = #{gasPriceChannelPay,jdbcType=DECIMAL}");
}
if (record.getGasOilLiters() != null) { if (record.getGasOilLiters() != null) {
sql.SET("gas_oil_liters = #{gasOilLiters,jdbcType=DECIMAL}"); sql.SET("gas_oil_liters = #{gasOilLiters,jdbcType=DECIMAL}");
} }

@ -43,16 +43,16 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt {
"oil_no_name, preferential_margin, ", "oil_no_name, preferential_margin, ",
"gas_station_drop, price_vip, ", "gas_station_drop, price_vip, ",
"price_gun, price_official, ", "price_gun, price_official, ",
"oil_type, oil_type_name, ", "price_cost, oil_type, ",
"`status`, ext_1, ext_2, ", "oil_type_name, `status`, ",
"ext_3)", "ext_1, ext_2, ext_3)",
"values (#{merchantStoreId,jdbcType=BIGINT}, #{oilNo,jdbcType=INTEGER}, ", "values (#{merchantStoreId,jdbcType=BIGINT}, #{oilNo,jdbcType=INTEGER}, ",
"#{oilNoName,jdbcType=VARCHAR}, #{preferentialMargin,jdbcType=DECIMAL}, ", "#{oilNoName,jdbcType=VARCHAR}, #{preferentialMargin,jdbcType=DECIMAL}, ",
"#{gasStationDrop,jdbcType=DECIMAL}, #{priceVip,jdbcType=DECIMAL}, ", "#{gasStationDrop,jdbcType=DECIMAL}, #{priceVip,jdbcType=DECIMAL}, ",
"#{priceGun,jdbcType=DECIMAL}, #{priceOfficial,jdbcType=DECIMAL}, ", "#{priceGun,jdbcType=DECIMAL}, #{priceOfficial,jdbcType=DECIMAL}, ",
"#{oilType,jdbcType=INTEGER}, #{oilTypeName,jdbcType=VARCHAR}, ", "#{priceCost,jdbcType=DECIMAL}, #{oilType,jdbcType=INTEGER}, ",
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", "#{oilTypeName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{ext3,jdbcType=VARCHAR})" "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighGasOilPrice record); int insert(HighGasOilPrice record);
@ -72,6 +72,7 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt {
@Result(column="price_vip", property="priceVip", jdbcType=JdbcType.DECIMAL), @Result(column="price_vip", property="priceVip", jdbcType=JdbcType.DECIMAL),
@Result(column="price_gun", property="priceGun", jdbcType=JdbcType.DECIMAL), @Result(column="price_gun", property="priceGun", jdbcType=JdbcType.DECIMAL),
@Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL),
@Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL),
@Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER),
@Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@ -84,8 +85,8 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt {
@Select({ @Select({
"select", "select",
"id, merchant_store_id, oil_no, oil_no_name, preferential_margin, gas_station_drop, ", "id, merchant_store_id, oil_no, oil_no_name, preferential_margin, gas_station_drop, ",
"price_vip, price_gun, price_official, oil_type, oil_type_name, `status`, ext_1, ", "price_vip, price_gun, price_official, price_cost, oil_type, oil_type_name, `status`, ",
"ext_2, ext_3", "ext_1, ext_2, ext_3",
"from high_gas_oil_price", "from high_gas_oil_price",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -99,6 +100,7 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt {
@Result(column="price_vip", property="priceVip", jdbcType=JdbcType.DECIMAL), @Result(column="price_vip", property="priceVip", jdbcType=JdbcType.DECIMAL),
@Result(column="price_gun", property="priceGun", jdbcType=JdbcType.DECIMAL), @Result(column="price_gun", property="priceGun", jdbcType=JdbcType.DECIMAL),
@Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL),
@Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL),
@Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER),
@Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@ -127,6 +129,7 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt {
"price_vip = #{priceVip,jdbcType=DECIMAL},", "price_vip = #{priceVip,jdbcType=DECIMAL},",
"price_gun = #{priceGun,jdbcType=DECIMAL},", "price_gun = #{priceGun,jdbcType=DECIMAL},",
"price_official = #{priceOfficial,jdbcType=DECIMAL},", "price_official = #{priceOfficial,jdbcType=DECIMAL},",
"price_cost = #{priceCost,jdbcType=DECIMAL},",
"oil_type = #{oilType,jdbcType=INTEGER},", "oil_type = #{oilType,jdbcType=INTEGER},",
"oil_type_name = #{oilTypeName,jdbcType=VARCHAR},", "oil_type_name = #{oilTypeName,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},", "`status` = #{status,jdbcType=INTEGER},",

@ -60,6 +60,10 @@ public class HighGasOilPriceSqlProvider {
sql.VALUES("price_official", "#{priceOfficial,jdbcType=DECIMAL}"); sql.VALUES("price_official", "#{priceOfficial,jdbcType=DECIMAL}");
} }
if (record.getPriceCost() != null) {
sql.VALUES("price_cost", "#{priceCost,jdbcType=DECIMAL}");
}
if (record.getOilType() != null) { if (record.getOilType() != null) {
sql.VALUES("oil_type", "#{oilType,jdbcType=INTEGER}"); sql.VALUES("oil_type", "#{oilType,jdbcType=INTEGER}");
} }
@ -102,6 +106,7 @@ public class HighGasOilPriceSqlProvider {
sql.SELECT("price_vip"); sql.SELECT("price_vip");
sql.SELECT("price_gun"); sql.SELECT("price_gun");
sql.SELECT("price_official"); sql.SELECT("price_official");
sql.SELECT("price_cost");
sql.SELECT("oil_type"); sql.SELECT("oil_type");
sql.SELECT("oil_type_name"); sql.SELECT("oil_type_name");
sql.SELECT("`status`"); sql.SELECT("`status`");
@ -161,6 +166,10 @@ public class HighGasOilPriceSqlProvider {
sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}"); sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}");
} }
if (record.getPriceCost() != null) {
sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}");
}
if (record.getOilType() != null) { if (record.getOilType() != null) {
sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}");
} }
@ -202,6 +211,7 @@ public class HighGasOilPriceSqlProvider {
sql.SET("price_vip = #{record.priceVip,jdbcType=DECIMAL}"); sql.SET("price_vip = #{record.priceVip,jdbcType=DECIMAL}");
sql.SET("price_gun = #{record.priceGun,jdbcType=DECIMAL}"); sql.SET("price_gun = #{record.priceGun,jdbcType=DECIMAL}");
sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}"); sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}");
sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}");
sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}");
sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}"); sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
@ -250,6 +260,10 @@ public class HighGasOilPriceSqlProvider {
sql.SET("price_official = #{priceOfficial,jdbcType=DECIMAL}"); sql.SET("price_official = #{priceOfficial,jdbcType=DECIMAL}");
} }
if (record.getPriceCost() != null) {
sql.SET("price_cost = #{priceCost,jdbcType=DECIMAL}");
}
if (record.getOilType() != null) { if (record.getOilType() != null) {
sql.SET("oil_type = #{oilType,jdbcType=INTEGER}"); sql.SET("oil_type = #{oilType,jdbcType=INTEGER}");
} }

@ -148,6 +148,11 @@ public class HighChildOrder implements Serializable {
*/ */
private BigDecimal gasPriceOfficial; private BigDecimal gasPriceOfficial;
/**
* 加油站渠道支付金额
*/
private BigDecimal gasPriceChannelPay;
/** /**
* 加油站加油升数 * 加油站加油升数
*/ */
@ -458,6 +463,14 @@ public class HighChildOrder implements Serializable {
this.gasPriceOfficial = gasPriceOfficial; this.gasPriceOfficial = gasPriceOfficial;
} }
public BigDecimal getGasPriceChannelPay() {
return gasPriceChannelPay;
}
public void setGasPriceChannelPay(BigDecimal gasPriceChannelPay) {
this.gasPriceChannelPay = gasPriceChannelPay;
}
public BigDecimal getGasOilLiters() { public BigDecimal getGasOilLiters() {
return gasOilLiters; return gasOilLiters;
} }
@ -673,6 +686,7 @@ public class HighChildOrder implements Serializable {
&& (this.getGasPriceGun() == null ? other.getGasPriceGun() == null : this.getGasPriceGun().equals(other.getGasPriceGun())) && (this.getGasPriceGun() == null ? other.getGasPriceGun() == null : this.getGasPriceGun().equals(other.getGasPriceGun()))
&& (this.getGasPriceVip() == null ? other.getGasPriceVip() == null : this.getGasPriceVip().equals(other.getGasPriceVip())) && (this.getGasPriceVip() == null ? other.getGasPriceVip() == null : this.getGasPriceVip().equals(other.getGasPriceVip()))
&& (this.getGasPriceOfficial() == null ? other.getGasPriceOfficial() == null : this.getGasPriceOfficial().equals(other.getGasPriceOfficial())) && (this.getGasPriceOfficial() == null ? other.getGasPriceOfficial() == null : this.getGasPriceOfficial().equals(other.getGasPriceOfficial()))
&& (this.getGasPriceChannelPay() == null ? other.getGasPriceChannelPay() == null : this.getGasPriceChannelPay().equals(other.getGasPriceChannelPay()))
&& (this.getGasOilLiters() == null ? other.getGasOilLiters() == null : this.getGasOilLiters().equals(other.getGasOilLiters())) && (this.getGasOilLiters() == null ? other.getGasOilLiters() == null : this.getGasOilLiters().equals(other.getGasOilLiters()))
&& (this.getGasDiscount() == null ? other.getGasDiscount() == null : this.getGasDiscount().equals(other.getGasDiscount())) && (this.getGasDiscount() == null ? other.getGasDiscount() == null : this.getGasDiscount().equals(other.getGasDiscount()))
&& (this.getGasOilSubsidy() == null ? other.getGasOilSubsidy() == null : this.getGasOilSubsidy().equals(other.getGasOilSubsidy())) && (this.getGasOilSubsidy() == null ? other.getGasOilSubsidy() == null : this.getGasOilSubsidy().equals(other.getGasOilSubsidy()))
@ -728,6 +742,7 @@ public class HighChildOrder implements Serializable {
result = prime * result + ((getGasPriceGun() == null) ? 0 : getGasPriceGun().hashCode()); result = prime * result + ((getGasPriceGun() == null) ? 0 : getGasPriceGun().hashCode());
result = prime * result + ((getGasPriceVip() == null) ? 0 : getGasPriceVip().hashCode()); result = prime * result + ((getGasPriceVip() == null) ? 0 : getGasPriceVip().hashCode());
result = prime * result + ((getGasPriceOfficial() == null) ? 0 : getGasPriceOfficial().hashCode()); result = prime * result + ((getGasPriceOfficial() == null) ? 0 : getGasPriceOfficial().hashCode());
result = prime * result + ((getGasPriceChannelPay() == null) ? 0 : getGasPriceChannelPay().hashCode());
result = prime * result + ((getGasOilLiters() == null) ? 0 : getGasOilLiters().hashCode()); result = prime * result + ((getGasOilLiters() == null) ? 0 : getGasOilLiters().hashCode());
result = prime * result + ((getGasDiscount() == null) ? 0 : getGasDiscount().hashCode()); result = prime * result + ((getGasDiscount() == null) ? 0 : getGasDiscount().hashCode());
result = prime * result + ((getGasOilSubsidy() == null) ? 0 : getGasOilSubsidy().hashCode()); result = prime * result + ((getGasOilSubsidy() == null) ? 0 : getGasOilSubsidy().hashCode());
@ -786,6 +801,7 @@ public class HighChildOrder implements Serializable {
sb.append(", gasPriceGun=").append(gasPriceGun); sb.append(", gasPriceGun=").append(gasPriceGun);
sb.append(", gasPriceVip=").append(gasPriceVip); sb.append(", gasPriceVip=").append(gasPriceVip);
sb.append(", gasPriceOfficial=").append(gasPriceOfficial); sb.append(", gasPriceOfficial=").append(gasPriceOfficial);
sb.append(", gasPriceChannelPay=").append(gasPriceChannelPay);
sb.append(", gasOilLiters=").append(gasOilLiters); sb.append(", gasOilLiters=").append(gasOilLiters);
sb.append(", gasDiscount=").append(gasDiscount); sb.append(", gasDiscount=").append(gasDiscount);
sb.append(", gasOilSubsidy=").append(gasOilSubsidy); sb.append(", gasOilSubsidy=").append(gasOilSubsidy);
@ -812,4 +828,4 @@ public class HighChildOrder implements Serializable {
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
} }
} }

@ -1835,6 +1835,66 @@ public class HighChildOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGasPriceChannelPayIsNull() {
addCriterion("gas_price_channel_pay is null");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayIsNotNull() {
addCriterion("gas_price_channel_pay is not null");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayEqualTo(BigDecimal value) {
addCriterion("gas_price_channel_pay =", value, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayNotEqualTo(BigDecimal value) {
addCriterion("gas_price_channel_pay <>", value, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayGreaterThan(BigDecimal value) {
addCriterion("gas_price_channel_pay >", value, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_channel_pay >=", value, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayLessThan(BigDecimal value) {
addCriterion("gas_price_channel_pay <", value, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayLessThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_channel_pay <=", value, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayIn(List<BigDecimal> values) {
addCriterion("gas_price_channel_pay in", values, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayNotIn(List<BigDecimal> values) {
addCriterion("gas_price_channel_pay not in", values, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_channel_pay between", value1, value2, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_channel_pay not between", value1, value2, "gasPriceChannelPay");
return (Criteria) this;
}
public Criteria andGasOilLitersIsNull() { public Criteria andGasOilLitersIsNull() {
addCriterion("gas_oil_liters is null"); addCriterion("gas_oil_liters is null");
return (Criteria) this; return (Criteria) this;

@ -58,6 +58,11 @@ public class HighGasOilPrice implements Serializable {
*/ */
private BigDecimal priceOfficial; private BigDecimal priceOfficial;
/**
* 成本价
*/
private BigDecimal priceCost;
/** /**
* 油品类型 1:汽油:2:柴油;3:天然气 * 油品类型 1:汽油:2:柴油;3:天然气
*/ */
@ -153,6 +158,14 @@ public class HighGasOilPrice implements Serializable {
this.priceOfficial = priceOfficial; this.priceOfficial = priceOfficial;
} }
public BigDecimal getPriceCost() {
return priceCost;
}
public void setPriceCost(BigDecimal priceCost) {
this.priceCost = priceCost;
}
public Integer getOilType() { public Integer getOilType() {
return oilType; return oilType;
} }
@ -222,6 +235,7 @@ public class HighGasOilPrice implements Serializable {
&& (this.getPriceVip() == null ? other.getPriceVip() == null : this.getPriceVip().equals(other.getPriceVip())) && (this.getPriceVip() == null ? other.getPriceVip() == null : this.getPriceVip().equals(other.getPriceVip()))
&& (this.getPriceGun() == null ? other.getPriceGun() == null : this.getPriceGun().equals(other.getPriceGun())) && (this.getPriceGun() == null ? other.getPriceGun() == null : this.getPriceGun().equals(other.getPriceGun()))
&& (this.getPriceOfficial() == null ? other.getPriceOfficial() == null : this.getPriceOfficial().equals(other.getPriceOfficial())) && (this.getPriceOfficial() == null ? other.getPriceOfficial() == null : this.getPriceOfficial().equals(other.getPriceOfficial()))
&& (this.getPriceCost() == null ? other.getPriceCost() == null : this.getPriceCost().equals(other.getPriceCost()))
&& (this.getOilType() == null ? other.getOilType() == null : this.getOilType().equals(other.getOilType())) && (this.getOilType() == null ? other.getOilType() == null : this.getOilType().equals(other.getOilType()))
&& (this.getOilTypeName() == null ? other.getOilTypeName() == null : this.getOilTypeName().equals(other.getOilTypeName())) && (this.getOilTypeName() == null ? other.getOilTypeName() == null : this.getOilTypeName().equals(other.getOilTypeName()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
@ -243,6 +257,7 @@ public class HighGasOilPrice implements Serializable {
result = prime * result + ((getPriceVip() == null) ? 0 : getPriceVip().hashCode()); result = prime * result + ((getPriceVip() == null) ? 0 : getPriceVip().hashCode());
result = prime * result + ((getPriceGun() == null) ? 0 : getPriceGun().hashCode()); result = prime * result + ((getPriceGun() == null) ? 0 : getPriceGun().hashCode());
result = prime * result + ((getPriceOfficial() == null) ? 0 : getPriceOfficial().hashCode()); result = prime * result + ((getPriceOfficial() == null) ? 0 : getPriceOfficial().hashCode());
result = prime * result + ((getPriceCost() == null) ? 0 : getPriceCost().hashCode());
result = prime * result + ((getOilType() == null) ? 0 : getOilType().hashCode()); result = prime * result + ((getOilType() == null) ? 0 : getOilType().hashCode());
result = prime * result + ((getOilTypeName() == null) ? 0 : getOilTypeName().hashCode()); result = prime * result + ((getOilTypeName() == null) ? 0 : getOilTypeName().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
@ -267,6 +282,7 @@ public class HighGasOilPrice implements Serializable {
sb.append(", priceVip=").append(priceVip); sb.append(", priceVip=").append(priceVip);
sb.append(", priceGun=").append(priceGun); sb.append(", priceGun=").append(priceGun);
sb.append(", priceOfficial=").append(priceOfficial); sb.append(", priceOfficial=").append(priceOfficial);
sb.append(", priceCost=").append(priceCost);
sb.append(", oilType=").append(oilType); sb.append(", oilType=").append(oilType);
sb.append(", oilTypeName=").append(oilTypeName); sb.append(", oilTypeName=").append(oilTypeName);
sb.append(", status=").append(status); sb.append(", status=").append(status);

@ -675,6 +675,66 @@ public class HighGasOilPriceExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPriceCostIsNull() {
addCriterion("price_cost is null");
return (Criteria) this;
}
public Criteria andPriceCostIsNotNull() {
addCriterion("price_cost is not null");
return (Criteria) this;
}
public Criteria andPriceCostEqualTo(BigDecimal value) {
addCriterion("price_cost =", value, "priceCost");
return (Criteria) this;
}
public Criteria andPriceCostNotEqualTo(BigDecimal value) {
addCriterion("price_cost <>", value, "priceCost");
return (Criteria) this;
}
public Criteria andPriceCostGreaterThan(BigDecimal value) {
addCriterion("price_cost >", value, "priceCost");
return (Criteria) this;
}
public Criteria andPriceCostGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("price_cost >=", value, "priceCost");
return (Criteria) this;
}
public Criteria andPriceCostLessThan(BigDecimal value) {
addCriterion("price_cost <", value, "priceCost");
return (Criteria) this;
}
public Criteria andPriceCostLessThanOrEqualTo(BigDecimal value) {
addCriterion("price_cost <=", value, "priceCost");
return (Criteria) this;
}
public Criteria andPriceCostIn(List<BigDecimal> values) {
addCriterion("price_cost in", values, "priceCost");
return (Criteria) this;
}
public Criteria andPriceCostNotIn(List<BigDecimal> values) {
addCriterion("price_cost not in", values, "priceCost");
return (Criteria) this;
}
public Criteria andPriceCostBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("price_cost between", value1, value2, "priceCost");
return (Criteria) this;
}
public Criteria andPriceCostNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("price_cost not between", value1, value2, "priceCost");
return (Criteria) this;
}
public Criteria andOilTypeIsNull() { public Criteria andOilTypeIsNull() {
addCriterion("oil_type is null"); addCriterion("oil_type is null");
return (Criteria) this; return (Criteria) this;

@ -3,7 +3,7 @@ package com.hai.enum_type;
import java.util.Objects; import java.util.Objects;
/** /**
* 金猪加油 油号枚举 * 油号枚举
*/ */
public enum JinZhuJiaYouOilNo { public enum JinZhuJiaYouOilNo {
@ -34,6 +34,13 @@ public enum JinZhuJiaYouOilNo {
return null; return null;
} }
public static JinZhuJiaYouOilNo getDataByOilNo(Integer oilNo) {
for (JinZhuJiaYouOilNo ele : values()) {
if(Objects.equals(oilNo,ele.getOilNo())) return ele;
}
return null;
}
public String getOilNoCode() { public String getOilNoCode() {
return oilNoCode; return oilNoCode;
} }

@ -297,7 +297,8 @@ public class HighGasServiceImpl implements HighGasService {
highGasOilPrice.setPreferentialMargin(new BigDecimal("0")); highGasOilPrice.setPreferentialMargin(new BigDecimal("0"));
highGasOilPrice.setGasStationDrop(oilPriceObject.getBigDecimal("guidancePrice").subtract(oilPriceObject.getBigDecimal("listingPrice"))); highGasOilPrice.setGasStationDrop(oilPriceObject.getBigDecimal("guidancePrice").subtract(oilPriceObject.getBigDecimal("listingPrice")));
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("merchantStrikePrice")); highGasOilPrice.setPriceCost(oilPriceObject.getBigDecimal("merchantStrikePrice"));
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("listingPrice"));
highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("listingPrice")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("listingPrice"));
highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("guidancePrice")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("guidancePrice"));
highGasOilPriceService.editGasOilPrice(highGasOilPrice); highGasOilPriceService.editGasOilPrice(highGasOilPrice);
@ -321,7 +322,8 @@ public class HighGasServiceImpl implements HighGasService {
} else { } else {
highGasOilPrice.setGasStationDrop(oilPriceObject.getBigDecimal("guidancePrice").subtract(oilPriceObject.getBigDecimal("listingPrice"))); highGasOilPrice.setGasStationDrop(oilPriceObject.getBigDecimal("guidancePrice").subtract(oilPriceObject.getBigDecimal("listingPrice")));
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("merchantStrikePrice")); highGasOilPrice.setPriceCost(oilPriceObject.getBigDecimal("merchantStrikePrice"));
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("listingPrice"));
highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("listingPrice")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("listingPrice"));
highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("guidancePrice")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("guidancePrice"));
highGasOilPriceService.editGasOilPrice(highGasOilPrice); highGasOilPriceService.editGasOilPrice(highGasOilPrice);
@ -386,7 +388,8 @@ public class HighGasServiceImpl implements HighGasService {
highGasOilPrice.setPreferentialMargin(new BigDecimal("0")); highGasOilPrice.setPreferentialMargin(new BigDecimal("0"));
highGasOilPrice.setGasStationDrop(oilPriceObject.getBigDecimal("guidancePrice").subtract(oilPriceObject.getBigDecimal("listingPrice"))); highGasOilPrice.setGasStationDrop(oilPriceObject.getBigDecimal("guidancePrice").subtract(oilPriceObject.getBigDecimal("listingPrice")));
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("merchantStrikePrice")); highGasOilPrice.setPriceCost(oilPriceObject.getBigDecimal("merchantStrikePrice"));
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("listingPrice"));
highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("listingPrice")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("listingPrice"));
highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("guidancePrice")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("guidancePrice"));

@ -166,6 +166,9 @@ public class HighOrderServiceImpl implements HighOrderService {
@Resource @Resource
private ShellGroupService shellGroupService; private ShellGroupService shellGroupService;
@Resource
private JinZhuJiaYouService jinZhuJiaYouService;
@Override @Override
@Transactional( @Transactional(
isolation = Isolation.SERIALIZABLE, isolation = Isolation.SERIALIZABLE,
@ -255,6 +258,34 @@ public class HighOrderServiceImpl implements HighOrderService {
} }
} }
if (childOrder.getGoodsType() == 3) {
// 加油站详情
HighMerchantStore store = highMerchantStoreService.getDetailById(childOrder.getGoodsId());
if (store == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");
}
if (store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) {
// 查询金猪油品数据
JinZhuJiaYouOilNo jzOilNo = JinZhuJiaYouOilNo.getDataByOilNo(Integer.valueOf(childOrder.getGasOilNo()));
if (jzOilNo == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法提交订单,未知的油品");
}
// 创建金猪订单
JSONObject jzOrderObject = jinZhuJiaYouService.createOrder(highOrder.getOrderNo(),
highOrder.getTotalPrice(),
store.getStoreKey(),
jzOilNo.getOilNoCode(),
childOrder.getGasGunNo(),
highOrder.getMemPhone()
);
childOrder.setGasOrderNo(jzOrderObject.getJSONObject("data").getString("systemOrderNo"));
childOrder.setGasPriceChannelPay(jzOrderObject.getJSONObject("data").getBigDecimal("paymentAmount"));
highChildOrderMapper.updateByPrimaryKey(childOrder);
}
}
if (childOrder.getGoodsType() == 7) { if (childOrder.getGoodsType() == 7) {
// 查询库存 // 查询库存
List<HighDiscountPackageActual> list = discountPackageActualService.getListByPackageId(childOrder.getGoodsId().intValue(), 1); List<HighDiscountPackageActual> list = discountPackageActualService.getListByPackageId(childOrder.getGoodsId().intValue(), 1);
@ -515,14 +546,24 @@ public class HighOrderServiceImpl implements HighOrderService {
} }
} else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { } else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
// 推送壳牌 // 推送加好油
JSONObject syncPayment = shellGroupService.gasSyncPayment(highOrder.getOrderNo(), shellGroupService.gasSyncPayment(highOrder.getOrderNo(),
store.getStoreKey(), store.getStoreKey(),
highOrder.getPayTime(), highOrder.getPayTime(),
highChildOrder.getGasPriceGun(), highChildOrder.getGasPriceGun(),
highChildOrder.getGasOilNo(), highChildOrder.getGasOilNo(),
highChildOrder.getGasGunNo(), highChildOrder.getGasGunNo(),
highOrder.getTotalPrice()); highOrder.getTotalPrice());
} else if (store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) {
// 推送金猪加油
JSONObject jzOrderObject = jinZhuJiaYouService.payOrder(highOrder.getOrderNo(), highChildOrder.getGasPriceChannelPay());
if (jzOrderObject == null
|| !jzOrderObject.getString("type").equals("OK")
|| !jzOrderObject.getInteger("status").equals(200)) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, jzOrderObject.getString("title"));
}
} }
} }

Loading…
Cancel
Save