提交代码

dev-discount
胡锐 2 years ago
parent 84c1d6fbe1
commit 3cfe1aa378
  1. 2
      hai-order/src/main/java/com/web/controller/OrderController.java
  2. 2
      hai-order/src/main/java/com/web/controller/TestController.java
  3. 26
      hai-order/src/main/resources/prod/application.yml
  4. 282
      hai-service/src/main/java/com/hai/dao/HighGasOrderMapper.java
  5. 7
      hai-service/src/main/java/com/hai/dao/HighGasOrderMapperExt.java
  6. 864
      hai-service/src/main/java/com/hai/dao/HighGasOrderSqlProvider.java
  7. 838
      hai-service/src/main/java/com/hai/entity/HighGasOrder.java
  8. 3424
      hai-service/src/main/java/com/hai/entity/HighGasOrderExample.java
  9. 106
      hai-service/src/main/java/com/hai/model/GasPayPriceModel.java
  10. 2
      hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java
  11. 198
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  12. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderPayServiceImpl.java
  13. 5
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  14. 11
      hai-service/src/main/java/com/hai/order/utils/OrderUtil.java
  15. 8
      hai-service/src/main/java/com/hai/service/HighGasClassGroupTaskService.java
  16. 27
      hai-service/src/main/java/com/hai/service/HighGasOrderService.java
  17. 13
      hai-service/src/main/java/com/hai/service/impl/HighGasClassGroupTaskServiceImpl.java
  18. 32
      hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java
  19. 32
      hai-service/src/main/java/com/hai/service/impl/HighGasOrderServiceImpl.java

@ -218,7 +218,7 @@ public class OrderController {
param.put("status", status);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>());
return ResponseMsgUtil.success(new PageInfo<>(orderService.getOrderList(param)));
} catch (Exception e) {
log.error("OrderController -> getUserOrderList() error!",e);

File diff suppressed because one or more lines are too long

@ -1,10 +1,10 @@
server:
port: 9302
port: 9304
servlet:
context-path: /crest
context-path: /order
#配置是否为debug模式,debug模式下,不开启权限校验
debug: false
debug: true
#datasource数据源设置
spring:
@ -48,7 +48,25 @@ spring:
encoding: UTF-8
content-type: text/html
mode: HTML5
#MQTT配置信息
mqtt:
#MQTT服务地址
url: ws://139.159.177.244:8083/mqtt
#用户名
username: printer_provider
#密码
password: 123654
#客户端id(不能重复)
# client:
# id: provider-id
#MQTT默认的消息推送主题,实际可在调用接口是指定
# default:
# topic: topic
rocketmq:
name-server: 139.159.177.244:9876
producer:
#必须指定group
group: default-group
mybatis:
mapperLocations:
- classpath*:sqlmap*/*.xml

@ -0,0 +1,282 @@
package com.hai.dao;
import com.hai.entity.HighGasOrder;
import com.hai.entity.HighGasOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface HighGasOrderMapper extends HighGasOrderMapperExt {
@SelectProvider(type=HighGasOrderSqlProvider.class, method="countByExample")
long countByExample(HighGasOrderExample example);
@DeleteProvider(type=HighGasOrderSqlProvider.class, method="deleteByExample")
int deleteByExample(HighGasOrderExample example);
@Delete({
"delete from high_gas_order",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_gas_order (order_no, child_order_no, ",
"channel_type, channel_order_no, ",
"mem_id, mem_phone, ",
"mer_id, mer_name, store_id, ",
"store_name, gas_refuel_price, ",
"gas_oil_no, gas_gun_no, ",
"gas_oil_type, gas_price_platform, ",
"gas_price_gun, gas_price_vip, ",
"gas_price_official, gas_price_cost, ",
"gas_price_cost_total, gas_price_channel_pay, ",
"gas_oil_liters, gas_discount, ",
"gas_oil_subsidy, gas_liters_preferences, ",
"gas_price_preferences, gas_class_group_id, ",
"gas_class_group_name, gas_class_group_task_id, ",
"gas_staff_id, gas_staff_name, ",
"gas_salesman_id, gas_salesman_name, ",
"gas_agent_id, gas_agent_name, ",
"gas_org_id, gas_org_name, ",
"`status`, create_time, ",
"pay_time, finish_time, ",
"refund_time, refund_remarks, ",
"ext_1, ext_2, ext_3, ",
"ext_4, ext_5, ext_6)",
"values (#{orderNo,jdbcType=VARCHAR}, #{childOrderNo,jdbcType=VARCHAR}, ",
"#{channelType,jdbcType=INTEGER}, #{channelOrderNo,jdbcType=VARCHAR}, ",
"#{memId,jdbcType=BIGINT}, #{memPhone,jdbcType=VARCHAR}, ",
"#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, ",
"#{storeName,jdbcType=VARCHAR}, #{gasRefuelPrice,jdbcType=DECIMAL}, ",
"#{gasOilNo,jdbcType=VARCHAR}, #{gasGunNo,jdbcType=VARCHAR}, ",
"#{gasOilType,jdbcType=INTEGER}, #{gasPricePlatform,jdbcType=DECIMAL}, ",
"#{gasPriceGun,jdbcType=DECIMAL}, #{gasPriceVip,jdbcType=DECIMAL}, ",
"#{gasPriceOfficial,jdbcType=DECIMAL}, #{gasPriceCost,jdbcType=DECIMAL}, ",
"#{gasPriceCostTotal,jdbcType=DECIMAL}, #{gasPriceChannelPay,jdbcType=DECIMAL}, ",
"#{gasOilLiters,jdbcType=DECIMAL}, #{gasDiscount,jdbcType=DECIMAL}, ",
"#{gasOilSubsidy,jdbcType=DECIMAL}, #{gasLitersPreferences,jdbcType=DECIMAL}, ",
"#{gasPricePreferences,jdbcType=DECIMAL}, #{gasClassGroupId,jdbcType=BIGINT}, ",
"#{gasClassGroupName,jdbcType=VARCHAR}, #{gasClassGroupTaskId,jdbcType=BIGINT}, ",
"#{gasStaffId,jdbcType=BIGINT}, #{gasStaffName,jdbcType=VARCHAR}, ",
"#{gasSalesmanId,jdbcType=BIGINT}, #{gasSalesmanName,jdbcType=VARCHAR}, ",
"#{gasAgentId,jdbcType=BIGINT}, #{gasAgentName,jdbcType=VARCHAR}, ",
"#{gasOrgId,jdbcType=BIGINT}, #{gasOrgName,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{payTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ",
"#{refundTime,jdbcType=TIMESTAMP}, #{refundRemarks,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighGasOrder record);
@InsertProvider(type=HighGasOrderSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighGasOrder record);
@SelectProvider(type=HighGasOrderSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="channel_type", property="channelType", jdbcType=JdbcType.INTEGER),
@Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT),
@Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_refuel_price", property="gasRefuelPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_oil_type", property="gasOilType", jdbcType=JdbcType.INTEGER),
@Result(column="gas_price_platform", property="gasPricePlatform", 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_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_cost", property="gasPriceCost", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_cost_total", property="gasPriceCostTotal", 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_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_liters_preferences", property="gasLitersPreferences", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_preferences", property="gasPricePreferences", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_class_group_task_id", property="gasClassGroupTaskId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_staff_id", property="gasStaffId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_staff_name", property="gasStaffName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_salesman_id", property="gasSalesmanId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_salesman_name", property="gasSalesmanName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_agent_id", property="gasAgentId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_agent_name", property="gasAgentName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_org_id", property="gasOrgId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_org_name", property="gasOrgName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_remarks", property="refundRemarks", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_5", property="ext5", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_6", property="ext6", jdbcType=JdbcType.VARCHAR)
})
List<HighGasOrder> selectByExample(HighGasOrderExample example);
@Select({
"select",
"id, order_no, child_order_no, channel_type, channel_order_no, mem_id, mem_phone, ",
"mer_id, mer_name, store_id, store_name, gas_refuel_price, gas_oil_no, gas_gun_no, ",
"gas_oil_type, gas_price_platform, gas_price_gun, gas_price_vip, gas_price_official, ",
"gas_price_cost, gas_price_cost_total, gas_price_channel_pay, gas_oil_liters, ",
"gas_discount, gas_oil_subsidy, gas_liters_preferences, gas_price_preferences, ",
"gas_class_group_id, gas_class_group_name, gas_class_group_task_id, gas_staff_id, ",
"gas_staff_name, gas_salesman_id, gas_salesman_name, gas_agent_id, gas_agent_name, ",
"gas_org_id, gas_org_name, `status`, create_time, pay_time, finish_time, refund_time, ",
"refund_remarks, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"from high_gas_order",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="channel_type", property="channelType", jdbcType=JdbcType.INTEGER),
@Result(column="channel_order_no", property="channelOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT),
@Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_refuel_price", property="gasRefuelPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_oil_no", property="gasOilNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_gun_no", property="gasGunNo", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_oil_type", property="gasOilType", jdbcType=JdbcType.INTEGER),
@Result(column="gas_price_platform", property="gasPricePlatform", 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_official", property="gasPriceOfficial", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_cost", property="gasPriceCost", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_cost_total", property="gasPriceCostTotal", 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_discount", property="gasDiscount", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_liters_preferences", property="gasLitersPreferences", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_preferences", property="gasPricePreferences", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_class_group_task_id", property="gasClassGroupTaskId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_staff_id", property="gasStaffId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_staff_name", property="gasStaffName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_salesman_id", property="gasSalesmanId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_salesman_name", property="gasSalesmanName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_agent_id", property="gasAgentId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_agent_name", property="gasAgentName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_org_id", property="gasOrgId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_org_name", property="gasOrgName", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_remarks", property="refundRemarks", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_5", property="ext5", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_6", property="ext6", jdbcType=JdbcType.VARCHAR)
})
HighGasOrder selectByPrimaryKey(Long id);
@UpdateProvider(type=HighGasOrderSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighGasOrder record, @Param("example") HighGasOrderExample example);
@UpdateProvider(type=HighGasOrderSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighGasOrder record, @Param("example") HighGasOrderExample example);
@UpdateProvider(type=HighGasOrderSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighGasOrder record);
@Update({
"update high_gas_order",
"set order_no = #{orderNo,jdbcType=VARCHAR},",
"child_order_no = #{childOrderNo,jdbcType=VARCHAR},",
"channel_type = #{channelType,jdbcType=INTEGER},",
"channel_order_no = #{channelOrderNo,jdbcType=VARCHAR},",
"mem_id = #{memId,jdbcType=BIGINT},",
"mem_phone = #{memPhone,jdbcType=VARCHAR},",
"mer_id = #{merId,jdbcType=BIGINT},",
"mer_name = #{merName,jdbcType=VARCHAR},",
"store_id = #{storeId,jdbcType=BIGINT},",
"store_name = #{storeName,jdbcType=VARCHAR},",
"gas_refuel_price = #{gasRefuelPrice,jdbcType=DECIMAL},",
"gas_oil_no = #{gasOilNo,jdbcType=VARCHAR},",
"gas_gun_no = #{gasGunNo,jdbcType=VARCHAR},",
"gas_oil_type = #{gasOilType,jdbcType=INTEGER},",
"gas_price_platform = #{gasPricePlatform,jdbcType=DECIMAL},",
"gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL},",
"gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL},",
"gas_price_official = #{gasPriceOfficial,jdbcType=DECIMAL},",
"gas_price_cost = #{gasPriceCost,jdbcType=DECIMAL},",
"gas_price_cost_total = #{gasPriceCostTotal,jdbcType=DECIMAL},",
"gas_price_channel_pay = #{gasPriceChannelPay,jdbcType=DECIMAL},",
"gas_oil_liters = #{gasOilLiters,jdbcType=DECIMAL},",
"gas_discount = #{gasDiscount,jdbcType=DECIMAL},",
"gas_oil_subsidy = #{gasOilSubsidy,jdbcType=DECIMAL},",
"gas_liters_preferences = #{gasLitersPreferences,jdbcType=DECIMAL},",
"gas_price_preferences = #{gasPricePreferences,jdbcType=DECIMAL},",
"gas_class_group_id = #{gasClassGroupId,jdbcType=BIGINT},",
"gas_class_group_name = #{gasClassGroupName,jdbcType=VARCHAR},",
"gas_class_group_task_id = #{gasClassGroupTaskId,jdbcType=BIGINT},",
"gas_staff_id = #{gasStaffId,jdbcType=BIGINT},",
"gas_staff_name = #{gasStaffName,jdbcType=VARCHAR},",
"gas_salesman_id = #{gasSalesmanId,jdbcType=BIGINT},",
"gas_salesman_name = #{gasSalesmanName,jdbcType=VARCHAR},",
"gas_agent_id = #{gasAgentId,jdbcType=BIGINT},",
"gas_agent_name = #{gasAgentName,jdbcType=VARCHAR},",
"gas_org_id = #{gasOrgId,jdbcType=BIGINT},",
"gas_org_name = #{gasOrgName,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"pay_time = #{payTime,jdbcType=TIMESTAMP},",
"finish_time = #{finishTime,jdbcType=TIMESTAMP},",
"refund_time = #{refundTime,jdbcType=TIMESTAMP},",
"refund_remarks = #{refundRemarks,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR},",
"ext_4 = #{ext4,jdbcType=VARCHAR},",
"ext_5 = #{ext5,jdbcType=VARCHAR},",
"ext_6 = #{ext6,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighGasOrder record);
}

@ -0,0 +1,7 @@
package com.hai.dao;
/**
* mapper扩展类
*/
public interface HighGasOrderMapperExt {
}

@ -0,0 +1,864 @@
package com.hai.dao;
import com.hai.entity.HighGasOrder;
import com.hai.entity.HighGasOrderExample.Criteria;
import com.hai.entity.HighGasOrderExample.Criterion;
import com.hai.entity.HighGasOrderExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighGasOrderSqlProvider {
public String countByExample(HighGasOrderExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_gas_order");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighGasOrderExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_gas_order");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighGasOrder record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_gas_order");
if (record.getOrderNo() != null) {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.VALUES("child_order_no", "#{childOrderNo,jdbcType=VARCHAR}");
}
if (record.getChannelType() != null) {
sql.VALUES("channel_type", "#{channelType,jdbcType=INTEGER}");
}
if (record.getChannelOrderNo() != null) {
sql.VALUES("channel_order_no", "#{channelOrderNo,jdbcType=VARCHAR}");
}
if (record.getMemId() != null) {
sql.VALUES("mem_id", "#{memId,jdbcType=BIGINT}");
}
if (record.getMemPhone() != null) {
sql.VALUES("mem_phone", "#{memPhone,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}");
}
if (record.getStoreId() != null) {
sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}");
}
if (record.getStoreName() != null) {
sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}");
}
if (record.getGasRefuelPrice() != null) {
sql.VALUES("gas_refuel_price", "#{gasRefuelPrice,jdbcType=DECIMAL}");
}
if (record.getGasOilNo() != null) {
sql.VALUES("gas_oil_no", "#{gasOilNo,jdbcType=VARCHAR}");
}
if (record.getGasGunNo() != null) {
sql.VALUES("gas_gun_no", "#{gasGunNo,jdbcType=VARCHAR}");
}
if (record.getGasOilType() != null) {
sql.VALUES("gas_oil_type", "#{gasOilType,jdbcType=INTEGER}");
}
if (record.getGasPricePlatform() != null) {
sql.VALUES("gas_price_platform", "#{gasPricePlatform,jdbcType=DECIMAL}");
}
if (record.getGasPriceGun() != null) {
sql.VALUES("gas_price_gun", "#{gasPriceGun,jdbcType=DECIMAL}");
}
if (record.getGasPriceVip() != null) {
sql.VALUES("gas_price_vip", "#{gasPriceVip,jdbcType=DECIMAL}");
}
if (record.getGasPriceOfficial() != null) {
sql.VALUES("gas_price_official", "#{gasPriceOfficial,jdbcType=DECIMAL}");
}
if (record.getGasPriceCost() != null) {
sql.VALUES("gas_price_cost", "#{gasPriceCost,jdbcType=DECIMAL}");
}
if (record.getGasPriceCostTotal() != null) {
sql.VALUES("gas_price_cost_total", "#{gasPriceCostTotal,jdbcType=DECIMAL}");
}
if (record.getGasPriceChannelPay() != null) {
sql.VALUES("gas_price_channel_pay", "#{gasPriceChannelPay,jdbcType=DECIMAL}");
}
if (record.getGasOilLiters() != null) {
sql.VALUES("gas_oil_liters", "#{gasOilLiters,jdbcType=DECIMAL}");
}
if (record.getGasDiscount() != null) {
sql.VALUES("gas_discount", "#{gasDiscount,jdbcType=DECIMAL}");
}
if (record.getGasOilSubsidy() != null) {
sql.VALUES("gas_oil_subsidy", "#{gasOilSubsidy,jdbcType=DECIMAL}");
}
if (record.getGasLitersPreferences() != null) {
sql.VALUES("gas_liters_preferences", "#{gasLitersPreferences,jdbcType=DECIMAL}");
}
if (record.getGasPricePreferences() != null) {
sql.VALUES("gas_price_preferences", "#{gasPricePreferences,jdbcType=DECIMAL}");
}
if (record.getGasClassGroupId() != null) {
sql.VALUES("gas_class_group_id", "#{gasClassGroupId,jdbcType=BIGINT}");
}
if (record.getGasClassGroupName() != null) {
sql.VALUES("gas_class_group_name", "#{gasClassGroupName,jdbcType=VARCHAR}");
}
if (record.getGasClassGroupTaskId() != null) {
sql.VALUES("gas_class_group_task_id", "#{gasClassGroupTaskId,jdbcType=BIGINT}");
}
if (record.getGasStaffId() != null) {
sql.VALUES("gas_staff_id", "#{gasStaffId,jdbcType=BIGINT}");
}
if (record.getGasStaffName() != null) {
sql.VALUES("gas_staff_name", "#{gasStaffName,jdbcType=VARCHAR}");
}
if (record.getGasSalesmanId() != null) {
sql.VALUES("gas_salesman_id", "#{gasSalesmanId,jdbcType=BIGINT}");
}
if (record.getGasSalesmanName() != null) {
sql.VALUES("gas_salesman_name", "#{gasSalesmanName,jdbcType=VARCHAR}");
}
if (record.getGasAgentId() != null) {
sql.VALUES("gas_agent_id", "#{gasAgentId,jdbcType=BIGINT}");
}
if (record.getGasAgentName() != null) {
sql.VALUES("gas_agent_name", "#{gasAgentName,jdbcType=VARCHAR}");
}
if (record.getGasOrgId() != null) {
sql.VALUES("gas_org_id", "#{gasOrgId,jdbcType=BIGINT}");
}
if (record.getGasOrgName() != null) {
sql.VALUES("gas_org_name", "#{gasOrgName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getPayTime() != null) {
sql.VALUES("pay_time", "#{payTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.VALUES("finish_time", "#{finishTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.VALUES("refund_time", "#{refundTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundRemarks() != null) {
sql.VALUES("refund_remarks", "#{refundRemarks,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
if (record.getExt4() != null) {
sql.VALUES("ext_4", "#{ext4,jdbcType=VARCHAR}");
}
if (record.getExt5() != null) {
sql.VALUES("ext_5", "#{ext5,jdbcType=VARCHAR}");
}
if (record.getExt6() != null) {
sql.VALUES("ext_6", "#{ext6,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(HighGasOrderExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("order_no");
sql.SELECT("child_order_no");
sql.SELECT("channel_type");
sql.SELECT("channel_order_no");
sql.SELECT("mem_id");
sql.SELECT("mem_phone");
sql.SELECT("mer_id");
sql.SELECT("mer_name");
sql.SELECT("store_id");
sql.SELECT("store_name");
sql.SELECT("gas_refuel_price");
sql.SELECT("gas_oil_no");
sql.SELECT("gas_gun_no");
sql.SELECT("gas_oil_type");
sql.SELECT("gas_price_platform");
sql.SELECT("gas_price_gun");
sql.SELECT("gas_price_vip");
sql.SELECT("gas_price_official");
sql.SELECT("gas_price_cost");
sql.SELECT("gas_price_cost_total");
sql.SELECT("gas_price_channel_pay");
sql.SELECT("gas_oil_liters");
sql.SELECT("gas_discount");
sql.SELECT("gas_oil_subsidy");
sql.SELECT("gas_liters_preferences");
sql.SELECT("gas_price_preferences");
sql.SELECT("gas_class_group_id");
sql.SELECT("gas_class_group_name");
sql.SELECT("gas_class_group_task_id");
sql.SELECT("gas_staff_id");
sql.SELECT("gas_staff_name");
sql.SELECT("gas_salesman_id");
sql.SELECT("gas_salesman_name");
sql.SELECT("gas_agent_id");
sql.SELECT("gas_agent_name");
sql.SELECT("gas_org_id");
sql.SELECT("gas_org_name");
sql.SELECT("`status`");
sql.SELECT("create_time");
sql.SELECT("pay_time");
sql.SELECT("finish_time");
sql.SELECT("refund_time");
sql.SELECT("refund_remarks");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.SELECT("ext_4");
sql.SELECT("ext_5");
sql.SELECT("ext_6");
sql.FROM("high_gas_order");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
HighGasOrder record = (HighGasOrder) parameter.get("record");
HighGasOrderExample example = (HighGasOrderExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_gas_order");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.SET("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}");
}
if (record.getChannelType() != null) {
sql.SET("channel_type = #{record.channelType,jdbcType=INTEGER}");
}
if (record.getChannelOrderNo() != null) {
sql.SET("channel_order_no = #{record.channelOrderNo,jdbcType=VARCHAR}");
}
if (record.getMemId() != null) {
sql.SET("mem_id = #{record.memId,jdbcType=BIGINT}");
}
if (record.getMemPhone() != null) {
sql.SET("mem_phone = #{record.memPhone,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
}
if (record.getStoreId() != null) {
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}");
}
if (record.getStoreName() != null) {
sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}");
}
if (record.getGasRefuelPrice() != null) {
sql.SET("gas_refuel_price = #{record.gasRefuelPrice,jdbcType=DECIMAL}");
}
if (record.getGasOilNo() != null) {
sql.SET("gas_oil_no = #{record.gasOilNo,jdbcType=VARCHAR}");
}
if (record.getGasGunNo() != null) {
sql.SET("gas_gun_no = #{record.gasGunNo,jdbcType=VARCHAR}");
}
if (record.getGasOilType() != null) {
sql.SET("gas_oil_type = #{record.gasOilType,jdbcType=INTEGER}");
}
if (record.getGasPricePlatform() != null) {
sql.SET("gas_price_platform = #{record.gasPricePlatform,jdbcType=DECIMAL}");
}
if (record.getGasPriceGun() != null) {
sql.SET("gas_price_gun = #{record.gasPriceGun,jdbcType=DECIMAL}");
}
if (record.getGasPriceVip() != null) {
sql.SET("gas_price_vip = #{record.gasPriceVip,jdbcType=DECIMAL}");
}
if (record.getGasPriceOfficial() != null) {
sql.SET("gas_price_official = #{record.gasPriceOfficial,jdbcType=DECIMAL}");
}
if (record.getGasPriceCost() != null) {
sql.SET("gas_price_cost = #{record.gasPriceCost,jdbcType=DECIMAL}");
}
if (record.getGasPriceCostTotal() != null) {
sql.SET("gas_price_cost_total = #{record.gasPriceCostTotal,jdbcType=DECIMAL}");
}
if (record.getGasPriceChannelPay() != null) {
sql.SET("gas_price_channel_pay = #{record.gasPriceChannelPay,jdbcType=DECIMAL}");
}
if (record.getGasOilLiters() != null) {
sql.SET("gas_oil_liters = #{record.gasOilLiters,jdbcType=DECIMAL}");
}
if (record.getGasDiscount() != null) {
sql.SET("gas_discount = #{record.gasDiscount,jdbcType=DECIMAL}");
}
if (record.getGasOilSubsidy() != null) {
sql.SET("gas_oil_subsidy = #{record.gasOilSubsidy,jdbcType=DECIMAL}");
}
if (record.getGasLitersPreferences() != null) {
sql.SET("gas_liters_preferences = #{record.gasLitersPreferences,jdbcType=DECIMAL}");
}
if (record.getGasPricePreferences() != null) {
sql.SET("gas_price_preferences = #{record.gasPricePreferences,jdbcType=DECIMAL}");
}
if (record.getGasClassGroupId() != null) {
sql.SET("gas_class_group_id = #{record.gasClassGroupId,jdbcType=BIGINT}");
}
if (record.getGasClassGroupName() != null) {
sql.SET("gas_class_group_name = #{record.gasClassGroupName,jdbcType=VARCHAR}");
}
if (record.getGasClassGroupTaskId() != null) {
sql.SET("gas_class_group_task_id = #{record.gasClassGroupTaskId,jdbcType=BIGINT}");
}
if (record.getGasStaffId() != null) {
sql.SET("gas_staff_id = #{record.gasStaffId,jdbcType=BIGINT}");
}
if (record.getGasStaffName() != null) {
sql.SET("gas_staff_name = #{record.gasStaffName,jdbcType=VARCHAR}");
}
if (record.getGasSalesmanId() != null) {
sql.SET("gas_salesman_id = #{record.gasSalesmanId,jdbcType=BIGINT}");
}
if (record.getGasSalesmanName() != null) {
sql.SET("gas_salesman_name = #{record.gasSalesmanName,jdbcType=VARCHAR}");
}
if (record.getGasAgentId() != null) {
sql.SET("gas_agent_id = #{record.gasAgentId,jdbcType=BIGINT}");
}
if (record.getGasAgentName() != null) {
sql.SET("gas_agent_name = #{record.gasAgentName,jdbcType=VARCHAR}");
}
if (record.getGasOrgId() != null) {
sql.SET("gas_org_id = #{record.gasOrgId,jdbcType=BIGINT}");
}
if (record.getGasOrgName() != null) {
sql.SET("gas_org_name = #{record.gasOrgName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getPayTime() != null) {
sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundRemarks() != null) {
sql.SET("refund_remarks = #{record.refundRemarks,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
if (record.getExt4() != null) {
sql.SET("ext_4 = #{record.ext4,jdbcType=VARCHAR}");
}
if (record.getExt5() != null) {
sql.SET("ext_5 = #{record.ext5,jdbcType=VARCHAR}");
}
if (record.getExt6() != null) {
sql.SET("ext_6 = #{record.ext6,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("high_gas_order");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
sql.SET("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}");
sql.SET("channel_type = #{record.channelType,jdbcType=INTEGER}");
sql.SET("channel_order_no = #{record.channelOrderNo,jdbcType=VARCHAR}");
sql.SET("mem_id = #{record.memId,jdbcType=BIGINT}");
sql.SET("mem_phone = #{record.memPhone,jdbcType=VARCHAR}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}");
sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}");
sql.SET("gas_refuel_price = #{record.gasRefuelPrice,jdbcType=DECIMAL}");
sql.SET("gas_oil_no = #{record.gasOilNo,jdbcType=VARCHAR}");
sql.SET("gas_gun_no = #{record.gasGunNo,jdbcType=VARCHAR}");
sql.SET("gas_oil_type = #{record.gasOilType,jdbcType=INTEGER}");
sql.SET("gas_price_platform = #{record.gasPricePlatform,jdbcType=DECIMAL}");
sql.SET("gas_price_gun = #{record.gasPriceGun,jdbcType=DECIMAL}");
sql.SET("gas_price_vip = #{record.gasPriceVip,jdbcType=DECIMAL}");
sql.SET("gas_price_official = #{record.gasPriceOfficial,jdbcType=DECIMAL}");
sql.SET("gas_price_cost = #{record.gasPriceCost,jdbcType=DECIMAL}");
sql.SET("gas_price_cost_total = #{record.gasPriceCostTotal,jdbcType=DECIMAL}");
sql.SET("gas_price_channel_pay = #{record.gasPriceChannelPay,jdbcType=DECIMAL}");
sql.SET("gas_oil_liters = #{record.gasOilLiters,jdbcType=DECIMAL}");
sql.SET("gas_discount = #{record.gasDiscount,jdbcType=DECIMAL}");
sql.SET("gas_oil_subsidy = #{record.gasOilSubsidy,jdbcType=DECIMAL}");
sql.SET("gas_liters_preferences = #{record.gasLitersPreferences,jdbcType=DECIMAL}");
sql.SET("gas_price_preferences = #{record.gasPricePreferences,jdbcType=DECIMAL}");
sql.SET("gas_class_group_id = #{record.gasClassGroupId,jdbcType=BIGINT}");
sql.SET("gas_class_group_name = #{record.gasClassGroupName,jdbcType=VARCHAR}");
sql.SET("gas_class_group_task_id = #{record.gasClassGroupTaskId,jdbcType=BIGINT}");
sql.SET("gas_staff_id = #{record.gasStaffId,jdbcType=BIGINT}");
sql.SET("gas_staff_name = #{record.gasStaffName,jdbcType=VARCHAR}");
sql.SET("gas_salesman_id = #{record.gasSalesmanId,jdbcType=BIGINT}");
sql.SET("gas_salesman_name = #{record.gasSalesmanName,jdbcType=VARCHAR}");
sql.SET("gas_agent_id = #{record.gasAgentId,jdbcType=BIGINT}");
sql.SET("gas_agent_name = #{record.gasAgentName,jdbcType=VARCHAR}");
sql.SET("gas_org_id = #{record.gasOrgId,jdbcType=BIGINT}");
sql.SET("gas_org_name = #{record.gasOrgName,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}");
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
sql.SET("refund_remarks = #{record.refundRemarks,jdbcType=VARCHAR}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
sql.SET("ext_4 = #{record.ext4,jdbcType=VARCHAR}");
sql.SET("ext_5 = #{record.ext5,jdbcType=VARCHAR}");
sql.SET("ext_6 = #{record.ext6,jdbcType=VARCHAR}");
HighGasOrderExample example = (HighGasOrderExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighGasOrder record) {
SQL sql = new SQL();
sql.UPDATE("high_gas_order");
if (record.getOrderNo() != null) {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.SET("child_order_no = #{childOrderNo,jdbcType=VARCHAR}");
}
if (record.getChannelType() != null) {
sql.SET("channel_type = #{channelType,jdbcType=INTEGER}");
}
if (record.getChannelOrderNo() != null) {
sql.SET("channel_order_no = #{channelOrderNo,jdbcType=VARCHAR}");
}
if (record.getMemId() != null) {
sql.SET("mem_id = #{memId,jdbcType=BIGINT}");
}
if (record.getMemPhone() != null) {
sql.SET("mem_phone = #{memPhone,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{merName,jdbcType=VARCHAR}");
}
if (record.getStoreId() != null) {
sql.SET("store_id = #{storeId,jdbcType=BIGINT}");
}
if (record.getStoreName() != null) {
sql.SET("store_name = #{storeName,jdbcType=VARCHAR}");
}
if (record.getGasRefuelPrice() != null) {
sql.SET("gas_refuel_price = #{gasRefuelPrice,jdbcType=DECIMAL}");
}
if (record.getGasOilNo() != null) {
sql.SET("gas_oil_no = #{gasOilNo,jdbcType=VARCHAR}");
}
if (record.getGasGunNo() != null) {
sql.SET("gas_gun_no = #{gasGunNo,jdbcType=VARCHAR}");
}
if (record.getGasOilType() != null) {
sql.SET("gas_oil_type = #{gasOilType,jdbcType=INTEGER}");
}
if (record.getGasPricePlatform() != null) {
sql.SET("gas_price_platform = #{gasPricePlatform,jdbcType=DECIMAL}");
}
if (record.getGasPriceGun() != null) {
sql.SET("gas_price_gun = #{gasPriceGun,jdbcType=DECIMAL}");
}
if (record.getGasPriceVip() != null) {
sql.SET("gas_price_vip = #{gasPriceVip,jdbcType=DECIMAL}");
}
if (record.getGasPriceOfficial() != null) {
sql.SET("gas_price_official = #{gasPriceOfficial,jdbcType=DECIMAL}");
}
if (record.getGasPriceCost() != null) {
sql.SET("gas_price_cost = #{gasPriceCost,jdbcType=DECIMAL}");
}
if (record.getGasPriceCostTotal() != null) {
sql.SET("gas_price_cost_total = #{gasPriceCostTotal,jdbcType=DECIMAL}");
}
if (record.getGasPriceChannelPay() != null) {
sql.SET("gas_price_channel_pay = #{gasPriceChannelPay,jdbcType=DECIMAL}");
}
if (record.getGasOilLiters() != null) {
sql.SET("gas_oil_liters = #{gasOilLiters,jdbcType=DECIMAL}");
}
if (record.getGasDiscount() != null) {
sql.SET("gas_discount = #{gasDiscount,jdbcType=DECIMAL}");
}
if (record.getGasOilSubsidy() != null) {
sql.SET("gas_oil_subsidy = #{gasOilSubsidy,jdbcType=DECIMAL}");
}
if (record.getGasLitersPreferences() != null) {
sql.SET("gas_liters_preferences = #{gasLitersPreferences,jdbcType=DECIMAL}");
}
if (record.getGasPricePreferences() != null) {
sql.SET("gas_price_preferences = #{gasPricePreferences,jdbcType=DECIMAL}");
}
if (record.getGasClassGroupId() != null) {
sql.SET("gas_class_group_id = #{gasClassGroupId,jdbcType=BIGINT}");
}
if (record.getGasClassGroupName() != null) {
sql.SET("gas_class_group_name = #{gasClassGroupName,jdbcType=VARCHAR}");
}
if (record.getGasClassGroupTaskId() != null) {
sql.SET("gas_class_group_task_id = #{gasClassGroupTaskId,jdbcType=BIGINT}");
}
if (record.getGasStaffId() != null) {
sql.SET("gas_staff_id = #{gasStaffId,jdbcType=BIGINT}");
}
if (record.getGasStaffName() != null) {
sql.SET("gas_staff_name = #{gasStaffName,jdbcType=VARCHAR}");
}
if (record.getGasSalesmanId() != null) {
sql.SET("gas_salesman_id = #{gasSalesmanId,jdbcType=BIGINT}");
}
if (record.getGasSalesmanName() != null) {
sql.SET("gas_salesman_name = #{gasSalesmanName,jdbcType=VARCHAR}");
}
if (record.getGasAgentId() != null) {
sql.SET("gas_agent_id = #{gasAgentId,jdbcType=BIGINT}");
}
if (record.getGasAgentName() != null) {
sql.SET("gas_agent_name = #{gasAgentName,jdbcType=VARCHAR}");
}
if (record.getGasOrgId() != null) {
sql.SET("gas_org_id = #{gasOrgId,jdbcType=BIGINT}");
}
if (record.getGasOrgName() != null) {
sql.SET("gas_org_name = #{gasOrgName,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getPayTime() != null) {
sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{finishTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.SET("refund_time = #{refundTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundRemarks() != null) {
sql.SET("refund_remarks = #{refundRemarks,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
if (record.getExt4() != null) {
sql.SET("ext_4 = #{ext4,jdbcType=VARCHAR}");
}
if (record.getExt5() != null) {
sql.SET("ext_5 = #{ext5,jdbcType=VARCHAR}");
}
if (record.getExt6() != null) {
sql.SET("ext_6 = #{ext6,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighGasOrderExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -0,0 +1,838 @@
package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* high_gas_order
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighGasOrder implements Serializable {
/**
* 主键ID
*/
private Long id;
/**
* 交易订单号
*/
private String orderNo;
/**
* 子订单号
*/
private String childOrderNo;
/**
* 渠道类型
*/
private Integer channelType;
/**
* 渠道订单号
*/
private String channelOrderNo;
/**
* 用户id
*/
private Long memId;
/**
* 用户手机号
*/
private String memPhone;
/**
* 商户id
*/
private Long merId;
/**
* 商户名称
*/
private String merName;
/**
* 门店id
*/
private Long storeId;
/**
* 门店名称
*/
private String storeName;
/**
* 加油站加油金额
*/
private BigDecimal gasRefuelPrice;
/**
* 加油站油号
*/
private String gasOilNo;
/**
* 加油站油抢号
*/
private String gasGunNo;
/**
* 加油站油品类型 1:汽油:2:柴油;3:天然气
*/
private Integer gasOilType;
/**
* 加油站平台价
*/
private BigDecimal gasPricePlatform;
/**
* 加油站油枪价
*/
private BigDecimal gasPriceGun;
/**
* 加油站优惠价
*/
private BigDecimal gasPriceVip;
/**
* 加油站国标价
*/
private BigDecimal gasPriceOfficial;
/**
* 加油站成本单价
*/
private BigDecimal gasPriceCost;
/**
* 加油站成本总价
*/
private BigDecimal gasPriceCostTotal;
/**
* 加油站渠道支付金额
*/
private BigDecimal gasPriceChannelPay;
/**
* 加油站加油升数
*/
private BigDecimal gasOilLiters;
/**
* 加油站加油折扣
*/
private BigDecimal gasDiscount;
/**
* 加油站加油补贴
*/
private BigDecimal gasOilSubsidy;
/**
* 加油站每升优惠
*/
private BigDecimal gasLitersPreferences;
/**
* 加油站优惠价格
*/
private BigDecimal gasPricePreferences;
/**
* 加油站班组id
*/
private Long gasClassGroupId;
/**
* 加油站班组名称
*/
private String gasClassGroupName;
/**
* 加油站班组任务id
*/
private Long gasClassGroupTaskId;
/**
* 加油站加油员id
*/
private Long gasStaffId;
/**
* 加油站加油员名称
*/
private String gasStaffName;
/**
* 加油站业务员id
*/
private Long gasSalesmanId;
/**
* 加油站业务员名称
*/
private String gasSalesmanName;
/**
* 加油站代理商id
*/
private Long gasAgentId;
/**
* 加油站代理商名称
*/
private String gasAgentName;
/**
* 加油站代理公司id
*/
private Long gasOrgId;
/**
* 加油站代理公司名称
*/
private String gasOrgName;
/**
* 订单状态
1. 待支付
2. 已支付
3. 已取消
4. 已退款
5. 退款中
6. 退款失败
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 支付时间
*/
private Date payTime;
/**
* 完成时间
*/
private Date finishTime;
/**
* 退款时间
*/
private Date refundTime;
/**
* 退款备注
*/
private String refundRemarks;
private String ext1;
private String ext2;
private String ext3;
private String ext4;
private String ext5;
private String ext6;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getChildOrderNo() {
return childOrderNo;
}
public void setChildOrderNo(String childOrderNo) {
this.childOrderNo = childOrderNo;
}
public Integer getChannelType() {
return channelType;
}
public void setChannelType(Integer channelType) {
this.channelType = channelType;
}
public String getChannelOrderNo() {
return channelOrderNo;
}
public void setChannelOrderNo(String channelOrderNo) {
this.channelOrderNo = channelOrderNo;
}
public Long getMemId() {
return memId;
}
public void setMemId(Long memId) {
this.memId = memId;
}
public String getMemPhone() {
return memPhone;
}
public void setMemPhone(String memPhone) {
this.memPhone = memPhone;
}
public Long getMerId() {
return merId;
}
public void setMerId(Long merId) {
this.merId = merId;
}
public String getMerName() {
return merName;
}
public void setMerName(String merName) {
this.merName = merName;
}
public Long getStoreId() {
return storeId;
}
public void setStoreId(Long storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public BigDecimal getGasRefuelPrice() {
return gasRefuelPrice;
}
public void setGasRefuelPrice(BigDecimal gasRefuelPrice) {
this.gasRefuelPrice = gasRefuelPrice;
}
public String getGasOilNo() {
return gasOilNo;
}
public void setGasOilNo(String gasOilNo) {
this.gasOilNo = gasOilNo;
}
public String getGasGunNo() {
return gasGunNo;
}
public void setGasGunNo(String gasGunNo) {
this.gasGunNo = gasGunNo;
}
public Integer getGasOilType() {
return gasOilType;
}
public void setGasOilType(Integer gasOilType) {
this.gasOilType = gasOilType;
}
public BigDecimal getGasPricePlatform() {
return gasPricePlatform;
}
public void setGasPricePlatform(BigDecimal gasPricePlatform) {
this.gasPricePlatform = gasPricePlatform;
}
public BigDecimal getGasPriceGun() {
return gasPriceGun;
}
public void setGasPriceGun(BigDecimal gasPriceGun) {
this.gasPriceGun = gasPriceGun;
}
public BigDecimal getGasPriceVip() {
return gasPriceVip;
}
public void setGasPriceVip(BigDecimal gasPriceVip) {
this.gasPriceVip = gasPriceVip;
}
public BigDecimal getGasPriceOfficial() {
return gasPriceOfficial;
}
public void setGasPriceOfficial(BigDecimal gasPriceOfficial) {
this.gasPriceOfficial = gasPriceOfficial;
}
public BigDecimal getGasPriceCost() {
return gasPriceCost;
}
public void setGasPriceCost(BigDecimal gasPriceCost) {
this.gasPriceCost = gasPriceCost;
}
public BigDecimal getGasPriceCostTotal() {
return gasPriceCostTotal;
}
public void setGasPriceCostTotal(BigDecimal gasPriceCostTotal) {
this.gasPriceCostTotal = gasPriceCostTotal;
}
public BigDecimal getGasPriceChannelPay() {
return gasPriceChannelPay;
}
public void setGasPriceChannelPay(BigDecimal gasPriceChannelPay) {
this.gasPriceChannelPay = gasPriceChannelPay;
}
public BigDecimal getGasOilLiters() {
return gasOilLiters;
}
public void setGasOilLiters(BigDecimal gasOilLiters) {
this.gasOilLiters = gasOilLiters;
}
public BigDecimal getGasDiscount() {
return gasDiscount;
}
public void setGasDiscount(BigDecimal gasDiscount) {
this.gasDiscount = gasDiscount;
}
public BigDecimal getGasOilSubsidy() {
return gasOilSubsidy;
}
public void setGasOilSubsidy(BigDecimal gasOilSubsidy) {
this.gasOilSubsidy = gasOilSubsidy;
}
public BigDecimal getGasLitersPreferences() {
return gasLitersPreferences;
}
public void setGasLitersPreferences(BigDecimal gasLitersPreferences) {
this.gasLitersPreferences = gasLitersPreferences;
}
public BigDecimal getGasPricePreferences() {
return gasPricePreferences;
}
public void setGasPricePreferences(BigDecimal gasPricePreferences) {
this.gasPricePreferences = gasPricePreferences;
}
public Long getGasClassGroupId() {
return gasClassGroupId;
}
public void setGasClassGroupId(Long gasClassGroupId) {
this.gasClassGroupId = gasClassGroupId;
}
public String getGasClassGroupName() {
return gasClassGroupName;
}
public void setGasClassGroupName(String gasClassGroupName) {
this.gasClassGroupName = gasClassGroupName;
}
public Long getGasClassGroupTaskId() {
return gasClassGroupTaskId;
}
public void setGasClassGroupTaskId(Long gasClassGroupTaskId) {
this.gasClassGroupTaskId = gasClassGroupTaskId;
}
public Long getGasStaffId() {
return gasStaffId;
}
public void setGasStaffId(Long gasStaffId) {
this.gasStaffId = gasStaffId;
}
public String getGasStaffName() {
return gasStaffName;
}
public void setGasStaffName(String gasStaffName) {
this.gasStaffName = gasStaffName;
}
public Long getGasSalesmanId() {
return gasSalesmanId;
}
public void setGasSalesmanId(Long gasSalesmanId) {
this.gasSalesmanId = gasSalesmanId;
}
public String getGasSalesmanName() {
return gasSalesmanName;
}
public void setGasSalesmanName(String gasSalesmanName) {
this.gasSalesmanName = gasSalesmanName;
}
public Long getGasAgentId() {
return gasAgentId;
}
public void setGasAgentId(Long gasAgentId) {
this.gasAgentId = gasAgentId;
}
public String getGasAgentName() {
return gasAgentName;
}
public void setGasAgentName(String gasAgentName) {
this.gasAgentName = gasAgentName;
}
public Long getGasOrgId() {
return gasOrgId;
}
public void setGasOrgId(Long gasOrgId) {
this.gasOrgId = gasOrgId;
}
public String getGasOrgName() {
return gasOrgName;
}
public void setGasOrgName(String gasOrgName) {
this.gasOrgName = gasOrgName;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getPayTime() {
return payTime;
}
public void setPayTime(Date payTime) {
this.payTime = payTime;
}
public Date getFinishTime() {
return finishTime;
}
public void setFinishTime(Date finishTime) {
this.finishTime = finishTime;
}
public Date getRefundTime() {
return refundTime;
}
public void setRefundTime(Date refundTime) {
this.refundTime = refundTime;
}
public String getRefundRemarks() {
return refundRemarks;
}
public void setRefundRemarks(String refundRemarks) {
this.refundRemarks = refundRemarks;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
public String getExt4() {
return ext4;
}
public void setExt4(String ext4) {
this.ext4 = ext4;
}
public String getExt5() {
return ext5;
}
public void setExt5(String ext5) {
this.ext5 = ext5;
}
public String getExt6() {
return ext6;
}
public void setExt6(String ext6) {
this.ext6 = ext6;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
HighGasOrder other = (HighGasOrder) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
&& (this.getChildOrderNo() == null ? other.getChildOrderNo() == null : this.getChildOrderNo().equals(other.getChildOrderNo()))
&& (this.getChannelType() == null ? other.getChannelType() == null : this.getChannelType().equals(other.getChannelType()))
&& (this.getChannelOrderNo() == null ? other.getChannelOrderNo() == null : this.getChannelOrderNo().equals(other.getChannelOrderNo()))
&& (this.getMemId() == null ? other.getMemId() == null : this.getMemId().equals(other.getMemId()))
&& (this.getMemPhone() == null ? other.getMemPhone() == null : this.getMemPhone().equals(other.getMemPhone()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName()))
&& (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
&& (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName()))
&& (this.getGasRefuelPrice() == null ? other.getGasRefuelPrice() == null : this.getGasRefuelPrice().equals(other.getGasRefuelPrice()))
&& (this.getGasOilNo() == null ? other.getGasOilNo() == null : this.getGasOilNo().equals(other.getGasOilNo()))
&& (this.getGasGunNo() == null ? other.getGasGunNo() == null : this.getGasGunNo().equals(other.getGasGunNo()))
&& (this.getGasOilType() == null ? other.getGasOilType() == null : this.getGasOilType().equals(other.getGasOilType()))
&& (this.getGasPricePlatform() == null ? other.getGasPricePlatform() == null : this.getGasPricePlatform().equals(other.getGasPricePlatform()))
&& (this.getGasPriceGun() == null ? other.getGasPriceGun() == null : this.getGasPriceGun().equals(other.getGasPriceGun()))
&& (this.getGasPriceVip() == null ? other.getGasPriceVip() == null : this.getGasPriceVip().equals(other.getGasPriceVip()))
&& (this.getGasPriceOfficial() == null ? other.getGasPriceOfficial() == null : this.getGasPriceOfficial().equals(other.getGasPriceOfficial()))
&& (this.getGasPriceCost() == null ? other.getGasPriceCost() == null : this.getGasPriceCost().equals(other.getGasPriceCost()))
&& (this.getGasPriceCostTotal() == null ? other.getGasPriceCostTotal() == null : this.getGasPriceCostTotal().equals(other.getGasPriceCostTotal()))
&& (this.getGasPriceChannelPay() == null ? other.getGasPriceChannelPay() == null : this.getGasPriceChannelPay().equals(other.getGasPriceChannelPay()))
&& (this.getGasOilLiters() == null ? other.getGasOilLiters() == null : this.getGasOilLiters().equals(other.getGasOilLiters()))
&& (this.getGasDiscount() == null ? other.getGasDiscount() == null : this.getGasDiscount().equals(other.getGasDiscount()))
&& (this.getGasOilSubsidy() == null ? other.getGasOilSubsidy() == null : this.getGasOilSubsidy().equals(other.getGasOilSubsidy()))
&& (this.getGasLitersPreferences() == null ? other.getGasLitersPreferences() == null : this.getGasLitersPreferences().equals(other.getGasLitersPreferences()))
&& (this.getGasPricePreferences() == null ? other.getGasPricePreferences() == null : this.getGasPricePreferences().equals(other.getGasPricePreferences()))
&& (this.getGasClassGroupId() == null ? other.getGasClassGroupId() == null : this.getGasClassGroupId().equals(other.getGasClassGroupId()))
&& (this.getGasClassGroupName() == null ? other.getGasClassGroupName() == null : this.getGasClassGroupName().equals(other.getGasClassGroupName()))
&& (this.getGasClassGroupTaskId() == null ? other.getGasClassGroupTaskId() == null : this.getGasClassGroupTaskId().equals(other.getGasClassGroupTaskId()))
&& (this.getGasStaffId() == null ? other.getGasStaffId() == null : this.getGasStaffId().equals(other.getGasStaffId()))
&& (this.getGasStaffName() == null ? other.getGasStaffName() == null : this.getGasStaffName().equals(other.getGasStaffName()))
&& (this.getGasSalesmanId() == null ? other.getGasSalesmanId() == null : this.getGasSalesmanId().equals(other.getGasSalesmanId()))
&& (this.getGasSalesmanName() == null ? other.getGasSalesmanName() == null : this.getGasSalesmanName().equals(other.getGasSalesmanName()))
&& (this.getGasAgentId() == null ? other.getGasAgentId() == null : this.getGasAgentId().equals(other.getGasAgentId()))
&& (this.getGasAgentName() == null ? other.getGasAgentName() == null : this.getGasAgentName().equals(other.getGasAgentName()))
&& (this.getGasOrgId() == null ? other.getGasOrgId() == null : this.getGasOrgId().equals(other.getGasOrgId()))
&& (this.getGasOrgName() == null ? other.getGasOrgName() == null : this.getGasOrgName().equals(other.getGasOrgName()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
&& (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
&& (this.getRefundTime() == null ? other.getRefundTime() == null : this.getRefundTime().equals(other.getRefundTime()))
&& (this.getRefundRemarks() == null ? other.getRefundRemarks() == null : this.getRefundRemarks().equals(other.getRefundRemarks()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()))
&& (this.getExt4() == null ? other.getExt4() == null : this.getExt4().equals(other.getExt4()))
&& (this.getExt5() == null ? other.getExt5() == null : this.getExt5().equals(other.getExt5()))
&& (this.getExt6() == null ? other.getExt6() == null : this.getExt6().equals(other.getExt6()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
result = prime * result + ((getChildOrderNo() == null) ? 0 : getChildOrderNo().hashCode());
result = prime * result + ((getChannelType() == null) ? 0 : getChannelType().hashCode());
result = prime * result + ((getChannelOrderNo() == null) ? 0 : getChannelOrderNo().hashCode());
result = prime * result + ((getMemId() == null) ? 0 : getMemId().hashCode());
result = prime * result + ((getMemPhone() == null) ? 0 : getMemPhone().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode());
result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode());
result = prime * result + ((getGasRefuelPrice() == null) ? 0 : getGasRefuelPrice().hashCode());
result = prime * result + ((getGasOilNo() == null) ? 0 : getGasOilNo().hashCode());
result = prime * result + ((getGasGunNo() == null) ? 0 : getGasGunNo().hashCode());
result = prime * result + ((getGasOilType() == null) ? 0 : getGasOilType().hashCode());
result = prime * result + ((getGasPricePlatform() == null) ? 0 : getGasPricePlatform().hashCode());
result = prime * result + ((getGasPriceGun() == null) ? 0 : getGasPriceGun().hashCode());
result = prime * result + ((getGasPriceVip() == null) ? 0 : getGasPriceVip().hashCode());
result = prime * result + ((getGasPriceOfficial() == null) ? 0 : getGasPriceOfficial().hashCode());
result = prime * result + ((getGasPriceCost() == null) ? 0 : getGasPriceCost().hashCode());
result = prime * result + ((getGasPriceCostTotal() == null) ? 0 : getGasPriceCostTotal().hashCode());
result = prime * result + ((getGasPriceChannelPay() == null) ? 0 : getGasPriceChannelPay().hashCode());
result = prime * result + ((getGasOilLiters() == null) ? 0 : getGasOilLiters().hashCode());
result = prime * result + ((getGasDiscount() == null) ? 0 : getGasDiscount().hashCode());
result = prime * result + ((getGasOilSubsidy() == null) ? 0 : getGasOilSubsidy().hashCode());
result = prime * result + ((getGasLitersPreferences() == null) ? 0 : getGasLitersPreferences().hashCode());
result = prime * result + ((getGasPricePreferences() == null) ? 0 : getGasPricePreferences().hashCode());
result = prime * result + ((getGasClassGroupId() == null) ? 0 : getGasClassGroupId().hashCode());
result = prime * result + ((getGasClassGroupName() == null) ? 0 : getGasClassGroupName().hashCode());
result = prime * result + ((getGasClassGroupTaskId() == null) ? 0 : getGasClassGroupTaskId().hashCode());
result = prime * result + ((getGasStaffId() == null) ? 0 : getGasStaffId().hashCode());
result = prime * result + ((getGasStaffName() == null) ? 0 : getGasStaffName().hashCode());
result = prime * result + ((getGasSalesmanId() == null) ? 0 : getGasSalesmanId().hashCode());
result = prime * result + ((getGasSalesmanName() == null) ? 0 : getGasSalesmanName().hashCode());
result = prime * result + ((getGasAgentId() == null) ? 0 : getGasAgentId().hashCode());
result = prime * result + ((getGasAgentName() == null) ? 0 : getGasAgentName().hashCode());
result = prime * result + ((getGasOrgId() == null) ? 0 : getGasOrgId().hashCode());
result = prime * result + ((getGasOrgName() == null) ? 0 : getGasOrgName().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
result = prime * result + ((getRefundTime() == null) ? 0 : getRefundTime().hashCode());
result = prime * result + ((getRefundRemarks() == null) ? 0 : getRefundRemarks().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
result = prime * result + ((getExt4() == null) ? 0 : getExt4().hashCode());
result = prime * result + ((getExt5() == null) ? 0 : getExt5().hashCode());
result = prime * result + ((getExt6() == null) ? 0 : getExt6().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", orderNo=").append(orderNo);
sb.append(", childOrderNo=").append(childOrderNo);
sb.append(", channelType=").append(channelType);
sb.append(", channelOrderNo=").append(channelOrderNo);
sb.append(", memId=").append(memId);
sb.append(", memPhone=").append(memPhone);
sb.append(", merId=").append(merId);
sb.append(", merName=").append(merName);
sb.append(", storeId=").append(storeId);
sb.append(", storeName=").append(storeName);
sb.append(", gasRefuelPrice=").append(gasRefuelPrice);
sb.append(", gasOilNo=").append(gasOilNo);
sb.append(", gasGunNo=").append(gasGunNo);
sb.append(", gasOilType=").append(gasOilType);
sb.append(", gasPricePlatform=").append(gasPricePlatform);
sb.append(", gasPriceGun=").append(gasPriceGun);
sb.append(", gasPriceVip=").append(gasPriceVip);
sb.append(", gasPriceOfficial=").append(gasPriceOfficial);
sb.append(", gasPriceCost=").append(gasPriceCost);
sb.append(", gasPriceCostTotal=").append(gasPriceCostTotal);
sb.append(", gasPriceChannelPay=").append(gasPriceChannelPay);
sb.append(", gasOilLiters=").append(gasOilLiters);
sb.append(", gasDiscount=").append(gasDiscount);
sb.append(", gasOilSubsidy=").append(gasOilSubsidy);
sb.append(", gasLitersPreferences=").append(gasLitersPreferences);
sb.append(", gasPricePreferences=").append(gasPricePreferences);
sb.append(", gasClassGroupId=").append(gasClassGroupId);
sb.append(", gasClassGroupName=").append(gasClassGroupName);
sb.append(", gasClassGroupTaskId=").append(gasClassGroupTaskId);
sb.append(", gasStaffId=").append(gasStaffId);
sb.append(", gasStaffName=").append(gasStaffName);
sb.append(", gasSalesmanId=").append(gasSalesmanId);
sb.append(", gasSalesmanName=").append(gasSalesmanName);
sb.append(", gasAgentId=").append(gasAgentId);
sb.append(", gasAgentName=").append(gasAgentName);
sb.append(", gasOrgId=").append(gasOrgId);
sb.append(", gasOrgName=").append(gasOrgName);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", payTime=").append(payTime);
sb.append(", finishTime=").append(finishTime);
sb.append(", refundTime=").append(refundTime);
sb.append(", refundRemarks=").append(refundRemarks);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", ext4=").append(ext4);
sb.append(", ext5=").append(ext5);
sb.append(", ext6=").append(ext6);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -1,11 +1,14 @@
package com.hai.model;
import lombok.Data;
import java.math.BigDecimal;
/**
* 团购支付价格模型
* @author hurui
*/
@Data
public class GasPayPriceModel {
/**
@ -73,107 +76,4 @@ public class GasPayPriceModel {
*/
private BigDecimal payPrice;
public BigDecimal getPreferentialMargin() {
return preferentialMargin;
}
public void setPreferentialMargin(BigDecimal preferentialMargin) {
this.preferentialMargin = preferentialMargin;
}
public BigDecimal getGasStationDrop() {
return gasStationDrop;
}
public void setGasStationDrop(BigDecimal gasStationDrop) {
this.gasStationDrop = gasStationDrop;
}
public BigDecimal getOilingPrice() {
return oilingPrice;
}
public void setOilingPrice(BigDecimal oilingPrice) {
this.oilingPrice = oilingPrice;
}
public BigDecimal getPriceVip() {
return priceVip;
}
public void setPriceVip(BigDecimal priceVip) {
this.priceVip = priceVip;
}
public BigDecimal getPriceGun() {
return priceGun;
}
public void setPriceGun(BigDecimal priceGun) {
this.priceGun = priceGun;
}
public BigDecimal getPriceOfficial() {
return priceOfficial;
}
public void setPriceOfficial(BigDecimal priceOfficial) {
this.priceOfficial = priceOfficial;
}
public BigDecimal getPricePlatform() {
return pricePlatform;
}
public void setPricePlatform(BigDecimal pricePlatform) {
this.pricePlatform = pricePlatform;
}
public BigDecimal getOilLiters() {
return oilLiters;
}
public void setOilLiters(BigDecimal oilLiters) {
this.oilLiters = oilLiters;
}
public BigDecimal getDiscount() {
return discount;
}
public void setDiscount(BigDecimal discount) {
this.discount = discount;
}
public BigDecimal getLitersPreferences() {
return litersPreferences;
}
public void setLitersPreferences(BigDecimal litersPreferences) {
this.litersPreferences = litersPreferences;
}
public BigDecimal getPricePreferences() {
return pricePreferences;
}
public void setPricePreferences(BigDecimal pricePreferences) {
this.pricePreferences = pricePreferences;
}
public BigDecimal getTotalPreferences() {
return totalPreferences;
}
public void setTotalPreferences(BigDecimal totalPreferences) {
this.totalPreferences = totalPreferences;
}
public BigDecimal getPayPrice() {
return payPrice;
}
public void setPayPrice(BigDecimal payPrice) {
this.payPrice = payPrice;
}
}

@ -38,7 +38,7 @@ public interface OrderCreateHandleService {
* @param createOrderChild 子订单参数
* @return
*/
HighChildOrder oilHandle(HighOrder order,HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild);
HighChildOrder oilHandle(HighOrder order,HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild) throws Exception;
/**
* 优惠券包校验

@ -9,8 +9,14 @@ import com.hai.common.security.UserCenter;
import com.hai.common.utils.IDGenerator;
import com.hai.config.HuiLianTongConfig;
import com.hai.config.HuiLianTongUnionCardConfig;
import com.hai.config.JinZhuJiaYouService;
import com.hai.entity.*;
import com.hai.enum_type.GasClassGroupTaskStatus;
import com.hai.enum_type.JinZhuJiaYouOilNo;
import com.hai.enum_type.MerAccountMarketingType;
import com.hai.enum_type.MerchantStoreSourceType;
import com.hai.model.GasPayPriceModel;
import com.hai.model.HighMerchantModel;
import com.hai.model.ResponseData;
import com.hai.order.model.CreateOrderChildModel;
import com.hai.order.service.OrderCreateHandleService;
@ -18,6 +24,7 @@ import com.hai.order.service.OrderService;
import com.hai.order.service.OrderServiceExt;
import com.hai.order.type.OrderChildGoodsType;
import com.hai.order.type.OrderChildStatus;
import com.hai.order.utils.OrderUtil;
import com.hai.service.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@ -59,12 +66,33 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
@Resource
private HighMerchantStoreService storeService;
@Resource
private HighMerchantService merchantService;
@Resource
private HighDiscountCouponRelService discountCouponRelService;
@Resource
private HighCouponHandselService highCouponHandselService;
@Resource
private HighMerchantAccountMarketingService merchantAccountMarketingService;
@Resource
private HighGasClassGroupTaskService gasClassGroupTaskService;
@Resource
private HighGasStaffService gasStaffService;
@Resource
private HighGasDiscountOilPriceService gasDiscountOilPriceService;
@Resource
private HighTyAgentOilStationService gasTyAgentOilStationService;
@Resource
private JinZhuJiaYouService gasJinZhuJiaYouService;
@Override
public List<HighChildOrder> couponHandle(HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild) throws Exception {
if (createOrderChild.getSaleCount() != 1) {
@ -96,7 +124,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
}
// 生成子订单编号
String childOrderNo = generateChildOrderNo();
String childOrderNo = OrderUtil.generateChildOrderNo();
// 如果不是来源不是贵州中石化,需要校验库存
if (!coupon.getCouponSource().equals(4)) {
@ -166,7 +194,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
if (handselCoupon == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_COUPON, "");
}
String handselChildOrderNo = generateChildOrderNo();
String handselChildOrderNo = OrderUtil.generateChildOrderNo();
// 赠送卡卷是否有库存,没有就不赠送
if (couponService.assignOrderStock(handselCoupon.getId(), handselChildOrderNo) != null) {
@ -202,7 +230,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到用户信息");
}
HighChildOrder childOrder = new HighChildOrder();
childOrder.setChildOrderNo(generateChildOrderNo());
childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo());
childOrder.setGoodsType(OrderChildGoodsType.TYPE1.getNumber());
childOrder.setGoodsId(user.getId());
childOrder.setGoodsName(user.getName());
@ -220,13 +248,12 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
}
@Override
public HighChildOrder oilHandle(HighOrder order,HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild) {
public HighChildOrder oilHandle(HighOrder order,HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild) throws Exception {
// 查询油品类型
SecDictionary gasOilType = commonService.mappingSysCode("GAS_OIL_TYPE", createOrderChild.getGasOilNo());
if (gasOilType == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知油品类型");
}
// 加油限制
if (gasOilType.getExt1().equals("1")) {
SecDictionary refuelLimit = commonService.mappingSysName("REFUEL_LIMIT", "汽油");
@ -239,7 +266,125 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "柴油加油金额不能超过" + refuelLimit.getCodeValue()+"元");
}
}
// 查询油站
HighMerchantStore store = storeService.getDetailById(createOrderChild.getGoodsId());
if (store == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的油站");
}
// 查询商户
HighMerchant merchant = merchantService.getDetailById(store.getMerchantId());
if (merchant == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的油站");
}
// 营销减免的金额
BigDecimal marketingPrice = merchantAccountMarketingService.getPrice(store.getMerchantId(), MerAccountMarketingType.type3.getType(), Integer.valueOf(createOrderChild.getGasOilNo()));
// 计算价格
GasPayPriceModel priceModel = gasDiscountOilPriceService.oilPriceDiscountCompute(createOrderChild.getGoodsPrice(), createOrderChild.getGoodsId(), createOrderChild.getGasOilNo(), createOrderChild.getIsTyAgent());
// 生成交易子订单
HighChildOrder childOrder = new HighChildOrder();
childOrder.setOrderNo(order.getOrderNo());
childOrder.setMemId(createOrderChild.getMemId());
childOrder.setMemName(createOrderChild.getMemName());
childOrder.setMemPhone(createOrderChild.getMemPhone());
childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo());
childOrder.setGoodsType(OrderChildGoodsType.TYPE3.getNumber());
childOrder.setGoodsId(store.getId());
childOrder.setGoodsName(store.getStoreName());
childOrder.setGoodsImg(store.getStoreLogo());
childOrder.setGoodsSpecName("默认");
childOrder.setGoodsPrice(priceModel.getOilLiters());
childOrder.setGoodsActualPrice(priceModel.getPayPrice());
childOrder.setSaleCount(createOrderChild.getSaleCount());
childOrder.setGiveawayType(false);
childOrder.setChildOrderStatus(OrderChildStatus.STATUS1.getNumber());
childOrder.setTotalPrice(new BigDecimal(childOrder.getSaleCount().toString()).multiply(childOrder.getGoodsPrice()));
childOrder.setTotalActualPrice(new BigDecimal(childOrder.getSaleCount().toString()).multiply(childOrder.getGoodsActualPrice()));
childOrder.setSurplusRefundNum(childOrder.getSaleCount());
childOrder.setSurplusRefundPrice(new BigDecimal("0"));
childOrder.setSurplusRefundIntegral(0);
childOrder.setPraiseStatus(0);
childOrder.setCreateTime(new Date());
// 生成加油订单
HighGasOrder gasOrder = new HighGasOrder();
gasOrder.setOrderNo(order.getOrderNo());
gasOrder.setChildOrderNo(createOrderChild.getOrderNo());
gasOrder.setMemId(childOrder.getMemId());
gasOrder.setMemPhone(childOrder.getMemPhone());
gasOrder.setMerId(store.getMerchantId());
gasOrder.setMerName(merchant.getMerchantName());
gasOrder.setStoreId(store.getId());
gasOrder.setStoreName(store.getStoreName());
gasOrder.setGasOilNo(createOrderChild.getGasOilNo());
gasOrder.setGasGunNo(createOrderChild.getGasGunNo());
gasOrder.setGasOilType(Integer.parseInt(gasOilType.getExt1()));
// 使用了优惠价
if (discountUserRel != null) {
// 支付价格
childOrder.setGoodsActualPrice(childOrder.getGoodsPrice());
// 油价信息
gasOrder.setGasRefuelPrice(childOrder.getGoodsPrice());
gasOrder.setGasPriceGun(priceModel.getPriceGun());
gasOrder.setGasPriceVip(priceModel.getPriceGun());
gasOrder.setGasPriceOfficial(new BigDecimal("0"));
gasOrder.setGasPricePlatform(priceModel.getPriceGun());
gasOrder.setGasOilLiters(priceModel.getOilLiters());
gasOrder.setGasDiscount(new BigDecimal("0"));
gasOrder.setGasOilSubsidy(new BigDecimal("0"));
gasOrder.setGasLitersPreferences(new BigDecimal("0"));
gasOrder.setGasPricePreferences(priceModel.getPriceGun());
} else {
// 支付价格
childOrder.setGoodsActualPrice(priceModel.getPayPrice());
// 油价信息
gasOrder.setGasRefuelPrice(childOrder.getGoodsPrice());
gasOrder.setGasPriceGun(priceModel.getPriceGun());
gasOrder.setGasPriceVip(priceModel.getPriceVip());
gasOrder.setGasPriceOfficial(priceModel.getPriceOfficial());
gasOrder.setGasPricePlatform(priceModel.getPricePlatform());
gasOrder.setGasOilLiters(priceModel.getOilLiters());
gasOrder.setGasDiscount(priceModel.getDiscount());
gasOrder.setGasOilSubsidy(priceModel.getPreferentialMargin());
gasOrder.setGasLitersPreferences(priceModel.getLitersPreferences());
gasOrder.setGasPricePreferences(priceModel.getPricePreferences());
}
if (store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) {
// 查询金猪油品数据
JinZhuJiaYouOilNo jzOilNo = JinZhuJiaYouOilNo.getDataByOilNo(Integer.valueOf(gasOrder.getGasOilNo()));
if (jzOilNo == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法提交订单,未知的油品");
}
// 请求金猪接口 - 创建金猪订单
JSONObject jzOrderObject = gasJinZhuJiaYouService.createOrder(gasOrder.getOrderNo(),
gasOrder.getGasRefuelPrice(),
store.getStoreKey(),
jzOilNo.getOilNoCode(),
gasOrder.getGasGunNo(),
gasOrder.getMemPhone()
);
gasOrder.setChannelOrderNo(jzOrderObject.getJSONObject("data").getString("systemOrderNo"));
gasOrder.setGasPriceChannelPay(jzOrderObject.getJSONObject("data").getBigDecimal("paymentAmount"));
}
if (createOrderChild.getIsTyAgent() != null && createOrderChild.getIsTyAgent().equals(true)) {
// 查询加油站
HighTyAgentOilStation oilStation = gasTyAgentOilStationService.getDetailByOilStationId(createOrderChild.getGoodsId());
if (oilStation != null) {
gasOrder.setGasSalesmanId(oilStation.getTySalesmanId());
gasOrder.setGasSalesmanName(oilStation.getTySalesmanName());
gasOrder.setGasAgentId(oilStation.getTyAgentId());
gasOrder.setGasAgentName(oilStation.getTyAgentName());
gasOrder.setGasOrgId(oilStation.getOrganizationId());
gasOrder.setGasOrgName(oilStation.getOrganizationName());
}
}
// 加油员
if (StringUtils.isNotBlank(createOrderChild.getGasStaffCode())) {
String qrCodeSignKey = commonService.getDictionaryCodeName("QR_CODE_SIGN_KEY", "1");
if (StringUtils.isBlank(qrCodeSignKey)) {
@ -249,35 +394,29 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
try {
staffId = AESEncodeUtil.aesDecryptByBytes(AESEncodeUtil.base64Decode(URLDecoder.decode(createOrderChild.getGasStaffCode(),"UTF-8")), qrCodeSignKey);
} catch (Exception e) {
log.error("HighOrderController --> addOrder() error!", "收银员code解析失败");
log.error("HighOrderController --> addOrder() error!", "加油员code解析失败");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "收银员code解析失败");
}
/* // 查询员工
// 查询员工
HighGasStaff gasStaff = gasStaffService.getStaffDetailById(Long.parseLong(staffId));
if (gasStaff == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知收银员");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知加油员");
}
if (gasStaff.getMerchantStoreId().equals(childOrder.getGoodsId())) {
childOrder.setGasStaffId(gasStaff.getId());
childOrder.setGasStaffName(gasStaff.getName());
}*/
gasOrder.setGasStaffId(gasStaff.getId());
gasOrder.setGasStaffName(gasStaff.getName());
}
}
// 查询加油站是否开启班组
HighGasClassGroupTask groupTask = gasClassGroupTaskService.getCurrentTaskByStoreId(gasOrder.getStoreId());
if (groupTask != null) {
gasOrder.setGasClassGroupId(groupTask.getGasClassGroupId());
gasOrder.setGasClassGroupName(groupTask.getGasClassGroupName());
gasOrder.setGasClassGroupTaskId(groupTask.getId());
}
/* // 查询加油站是否开启班组
Map<String, Object> classGroup = new HashMap<>();
classGroup.put("merchantStoreId", createOrderChild.getGoodsId());
classGroup.put("status", GasClassGroupTaskStatus.status1.getStatus());
List<HighGasClassGroupTask> groupTaskList = gasClassGroupTaskService.getGroupTaskList(classGroup);
if (groupTaskList.size() > 0) {
HighGasClassGroupTask groupTask = groupTaskList.get(0);
childOrder.setGasClassGroupId(groupTask.getGasClassGroupId());
childOrder.setGasClassGroupName(groupTask.getGasClassGroupName());
childOrder.setGasClassGroupTaskId(groupTask.getId());
}*/
return null;
return childOrder;
}
@Override
@ -290,13 +429,4 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
return null;
}
/**
* 生成子订单号
* @return
* @throws Exception
*/
public static String generateChildOrderNo() {
// 生成子订单号
return IDGenerator.nextId(16);
}
}

@ -20,6 +20,7 @@ import com.hai.order.type.OrderProductType;
import com.hai.order.type.OrderStatus;
import com.hai.service.HighOilCardService;
import com.hai.service.HighUserCardService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
@ -31,6 +32,7 @@ import java.util.Map;
* @author: HuRui
* @date: 2022/9/5
**/
@Service("orderPayService")
public class OrderPayServiceImpl implements OrderPayService {
@Resource

@ -341,6 +341,7 @@ public class OrderServiceImpl implements OrderService {
// 订单入库
HighOrder orderData = insertOrderData(order);
if (orderData.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
// 10分钟后取消订单
Message<HighOrder> rocketMsg = MessageBuilder.withPayload(order).build();
@ -519,6 +520,10 @@ public class OrderServiceImpl implements OrderService {
criteria.andMemIdEqualTo(MapUtils.getLong(param, "userId"));
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "orderNo"))) {
criteria.andOrderNoLike("%" + MapUtils.getString(param, "orderNo") + "%");
}
if (MapUtils.getInteger(param, "productType") != null) {
criteria.andProductTypeEqualTo(MapUtils.getInteger(param, "productType"));
}

@ -49,6 +49,17 @@ public class OrderUtil {
return DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + randomNum;
}
/**
* 生成子订单号
* @return
* @throws Exception
*/
public static String generateChildOrderNo() {
// 生成子订单号
return IDGenerator.nextId(16);
}
/**
* 生成退款订单号
* @return

@ -2,6 +2,7 @@ package com.hai.service;
import com.alibaba.fastjson.JSONObject;
import com.hai.entity.HighGasClassGroupTask;
import com.hai.entity.HighGasOrder;
import com.hai.model.GasClassGroupTaskDataCount;
import java.util.Date;
@ -61,4 +62,11 @@ public interface HighGasClassGroupTaskService {
*/
List<HighGasClassGroupTask> getGroupTaskList(Map<String, Object> param);
/**
* 跟油站 获取当前班组任务
* @param storeId
* @return
*/
HighGasClassGroupTask getCurrentTaskByStoreId(Long storeId);
}

@ -0,0 +1,27 @@
package com.hai.service;
import com.hai.entity.HighGasOrder;
/**
* 加油订单
* @className: HighGasOrderService
* @author: HuRui
* @date: 2022/9/6
**/
public interface HighGasOrderService {
/**
* 增加订单
* @param gasOrder
*/
void addGasOrder(HighGasOrder gasOrder);
/**
* 修改订单
* @param gasOrder
*/
void updateGasOrder(HighGasOrder gasOrder);
}

@ -219,4 +219,17 @@ public class HighGasClassGroupTaskServiceImpl implements HighGasClassGroupTaskSe
example.setOrderByClause("create_time desc");
return gasClassGroupTaskMapper.selectByExample(example);
}
@Override
public HighGasClassGroupTask getCurrentTaskByStoreId(Long storeId) {
HighGasClassGroupTaskExample example = new HighGasClassGroupTaskExample();
example.createCriteria()
.andMerchantStoreIdEqualTo(storeId)
.andStatusEqualTo(GasClassGroupTaskStatus.status1.getStatus());
List<HighGasClassGroupTask> list = gasClassGroupTaskMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
}

@ -7,10 +7,7 @@ import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.config.TuanYouConfig;
import com.hai.dao.HighGasDiscountOilPriceMapper;
import com.hai.entity.HighGasDiscountOilPrice;
import com.hai.entity.HighGasDiscountOilPriceExample;
import com.hai.entity.HighGasOilPrice;
import com.hai.entity.HighTyAgentPrice;
import com.hai.entity.*;
import com.hai.enum_type.MerchantStoreSourceType;
import com.hai.model.GasPayPriceModel;
import com.hai.model.HighMerchantStoreModel;
@ -103,7 +100,7 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri
@Override
public GasPayPriceModel oilPriceDiscountCompute(BigDecimal oilingPrice, Long goodsId, String oilNo, Boolean isTyAgent) throws Exception {
// 查询油站信息
HighMerchantStoreModel store = merchantStoreService.getMerchantStoreById(goodsId);
HighMerchantStore store = merchantStoreService.getDetailById(goodsId);
if (store == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油站");
}
@ -115,25 +112,26 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri
// 优惠比例
BigDecimal discount = new BigDecimal("100");
// 查询是否配置了【油站的】优惠比例
HighTyAgentPrice tyAgentPrice = tyAgentPriceService.getDetail(1, goodsId, oilNo);
if (tyAgentPrice != null) {
discount = tyAgentPrice.getPriceRate();
} else {
// 查询是否配置了【油品】优惠比例
HighGasDiscountOilPrice gasDiscountOilPrice = gasDiscountOilPriceService.getDetailByOilNo(oilNo);
if (gasDiscountOilPrice != null) {
discount = gasDiscountOilPrice.getPriceRate();
}
}
if (isTyAgent != null && isTyAgent.equals(true)) {
// 价格
HighTyAgentPrice priceRate = tyAgentPriceService.getDetail(2, goodsId, oilNo);
if (priceRate != null) {
discount = priceRate.getPriceRate();
}
} else {
// 查询是否配置了【油站的】优惠比例
HighTyAgentPrice tyAgentPrice = tyAgentPriceService.getDetail(1, goodsId, oilNo);
if (tyAgentPrice != null) {
discount = tyAgentPrice.getPriceRate();
} else {
// 查询是否配置了【油品】优惠比例
HighGasDiscountOilPrice gasDiscountOilPrice = gasDiscountOilPriceService.getDetailByOilNo(oilNo);
if (gasDiscountOilPrice != null) {
discount = gasDiscountOilPrice.getPriceRate();
}
}
}
discount = discount.divide(new BigDecimal("100"));
// 查询油站价格

@ -0,0 +1,32 @@
package com.hai.service.impl;
import com.hai.dao.HighGasOrderMapper;
import com.hai.entity.HighGasOrder;
import com.hai.service.HighGasOrderService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
/**
* @className: HighGasOrderServiceImpl
* @author: HuRui
* @date: 2022/9/6
**/
@Service("gasOrderService")
public class HighGasOrderServiceImpl implements HighGasOrderService {
@Resource
private HighGasOrderMapper gasOrderMapper;
@Override
public void addGasOrder(HighGasOrder gasOrder) {
gasOrder.setCreateTime(new Date());
gasOrderMapper.insert(gasOrder);
}
@Override
public void updateGasOrder(HighGasOrder gasOrder) {
gasOrderMapper.updateByPrimaryKeySelective(gasOrder);
}
}
Loading…
Cancel
Save