Merge branch 'dev' into order

dev-discount
胡锐 2 years ago
commit b77e2c82ca
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighGasController.java
  2. 64
      hai-bweb/src/main/java/com/bweb/controller/HighMerAmountController.java
  3. 95
      hai-bweb/src/main/java/com/bweb/controller/HighMerchantAccountRecordController.java
  4. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  5. 20
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  6. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  7. 10
      hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java
  8. 6
      hai-service/src/main/java/com/hai/config/ShellGroupService.java
  9. 18
      hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java
  10. 28
      hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java
  11. 2
      hai-service/src/main/java/com/hai/dao/HighMerchantAccountMapperExt.java
  12. 125
      hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapper.java
  13. 7
      hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingMapperExt.java
  14. 332
      hai-service/src/main/java/com/hai/dao/HighMerchantAccountMarketingSqlProvider.java
  15. 170
      hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordMapper.java
  16. 7
      hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordMapperExt.java
  17. 486
      hai-service/src/main/java/com/hai/dao/HighMerchantAccountRecordSqlProvider.java
  18. 19
      hai-service/src/main/java/com/hai/dao/HighOrderMapper.java
  19. 2
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  20. 14
      hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java
  21. 32
      hai-service/src/main/java/com/hai/entity/HighChildOrder.java
  22. 120
      hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java
  23. 230
      hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketing.java
  24. 984
      hai-service/src/main/java/com/hai/entity/HighMerchantAccountMarketingExample.java
  25. 406
      hai-service/src/main/java/com/hai/entity/HighMerchantAccountRecord.java
  26. 1664
      hai-service/src/main/java/com/hai/entity/HighMerchantAccountRecordExample.java
  27. 34
      hai-service/src/main/java/com/hai/entity/HighOrder.java
  28. 60
      hai-service/src/main/java/com/hai/entity/HighOrderExample.java
  29. 36
      hai-service/src/main/java/com/hai/enum_type/MerAccountMarketingType.java
  30. 37
      hai-service/src/main/java/com/hai/enum_type/MerAmountSourceTypeEnum.java
  31. 36
      hai-service/src/main/java/com/hai/enum_type/MerAmountTypeEnum.java
  32. 40
      hai-service/src/main/java/com/hai/service/HighMerchantAccountMarketingService.java
  33. 25
      hai-service/src/main/java/com/hai/service/HighMerchantAccountRecordService.java
  34. 4
      hai-service/src/main/java/com/hai/service/HighMerchantAccountService.java
  35. 10
      hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java
  36. 65
      hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountMarketingServiceImpl.java
  37. 52
      hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountRecordServiceImpl.java
  38. 88
      hai-service/src/main/java/com/hai/service/impl/HighMerchantAccountServiceImpl.java
  39. 7
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  40. 9
      v1/src/main/java/com/v1/controller/HighOrderController.java

@ -86,7 +86,7 @@ public class HighGasController {
BigDecimal account = new BigDecimal("0");
// 查询商户余额
HighMerchantAccount merchantAccount = merchantAccountService.getStoreAccountDetail(userInfoModel.getMerchant().getId());
HighMerchantAccount merchantAccount = merchantAccountService.getMerAccountDetail(userInfoModel.getMerchant().getId());
if (merchantAccount != null) {
account = merchantAccount.getAmounts();
}

@ -8,14 +8,12 @@ import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighMerchantAccount;
import com.hai.entity.HighMerchantStoreAccount;
import com.hai.enum_type.MerStoreAmountSourceTypeEnum;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.HighCompanyTwoPwdService;
import com.hai.service.HighMerchantAccountService;
import com.hai.service.HighMerchantStoreAccountRecordService;
import com.hai.service.HighMerchantStoreAccountService;
import com.hai.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
@ -39,6 +37,9 @@ public class HighMerAmountController {
@Resource
private HighMerchantAccountService merchantAccountService;
@Resource
private HighMerchantAccountMarketingService accountMarketingService;
@Resource
private UserCenter userCenter;
@ -54,18 +55,30 @@ public class HighMerAmountController {
if (userInfoModel.getBsCompany() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
}
if (body.getLong("merId") == null || body.getBigDecimal("amount") == null) {
if (body.getLong("merId") == null || body.getBigDecimal("amount") == null || body.getBoolean("marketingStatus") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
if (body.getBigDecimal("amount").compareTo(new BigDecimal("0")) == -1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "充值金额不能小于0");
}
if (body.getBoolean("marketingStatus").equals(true)
&& body.getInteger("marketingType") == null
&& body.getBigDecimal("marketingPrice") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
Map<String, Object> map = new HashMap<>();
map.put("sourceType", MerStoreAmountSourceTypeEnum.type1.getType());
map.put("sourceContent", "充值额度:" + body.getBigDecimal("amount") + " 元");
map.put("opUserId", userInfoModel.getSecUser().getId());
map.put("opUserName", userInfoModel.getSecUser().getUserName());
merchantAccountService.recharge(body.getLong("merId"), body.getBigDecimal("amount"), map);
Map<String, Object> marketingParam = new HashMap<>();
marketingParam.put("marketingStatus", body.getBoolean("marketingStatus"));
marketingParam.put("marketingType", body.getInteger("marketingType"));
marketingParam.put("marketingPrice", body.getBigDecimal("marketingPrice"));
marketingParam.put("marketingOilNoData", body.getJSONArray("marketingOilNoData"));
merchantAccountService.recharge(body.getLong("merId"), body.getBigDecimal("amount"), marketingParam, map);
return ResponseMsgUtil.success("操作成功");
@ -79,4 +92,43 @@ public class HighMerAmountController {
}
}
@RequestMapping(value = "/getMerAccount", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询商户账户")
public ResponseData getMerAccount(@RequestParam(name = "merId", required = true) Long merId) {
try {
BigDecimal account = new BigDecimal("0");
// 查询商户余额
HighMerchantAccount merchantAccount = merchantAccountService.getMerAccountDetail(merId);
if (merchantAccount != null) {
account = merchantAccount.getAmounts();
}
Map<String, Object> param = new HashMap<>();
param.put("amount", account.subtract(merchantAccountService.countMerGasOilAmount(merId)));
param.put("oilNoReliefPrice", accountMarketingService.getDetailByMerAndType(merId, 3));
return ResponseMsgUtil.success(param);
} catch (Exception e) {
log.error("HighCompanyAmountController --> recharge() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getMerAccountMarketing", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询商户账户营销信息")
public ResponseData getMerAccountMarketing(@RequestParam(name = "merId", required = true) Long merId,
@RequestParam(name = "type", required = true) Integer type) {
try {
return ResponseMsgUtil.success(accountMarketingService.getDetailByMerAndType(merId, type));
} catch (Exception e) {
log.error("HighCompanyAmountController --> getMerAccountMarketing() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -0,0 +1,95 @@
package com.bweb.controller;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighMerchant;
import com.hai.enum_type.MerStoreAmountSourceTypeEnum;
import com.hai.enum_type.UserObjectTypeEnum;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.HighMerchantAccountRecordService;
import com.hai.service.HighMerchantService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.DeadlockLoserDataAccessException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping(value = "/merAccountRecord")
@Api(value = "商户门店接口")
public class HighMerchantAccountRecordController {
private static Logger log = LoggerFactory.getLogger(HighMerchantAccountRecordController.class);
@Resource
private HighMerchantAccountRecordService merchantAccountRecordService;
@Resource
private HighMerchantService merchantService;
@Resource
private UserCenter userCenter;
@RequestMapping(value = "/getRecordList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询记录列表")
public synchronized ResponseData getRecordList(@RequestParam(name = "merId", required = false) Long merId,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
try {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
if (userInfoModel == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
}
Map<String, Object> param = new HashMap<>();
if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) {
param.put("merId", merId);
} else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType())) {
if (merId == null) {
Map<String, Object> merMap = new HashMap<>();
merMap.put("companyId", userInfoModel.getBsCompany().getId());
List<HighMerchant> merchantList = merchantService.getMerchantList(merMap);
List<Long> merIdList = new ArrayList<>();
for (HighMerchant merchant : merchantList) {
merIdList.add(merchant.getId());
}
param.put("merIdList", merIdList);
} else {
param.put("merId", merId);
}
} else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type2.getType())) {
param.put("merId", userInfoModel.getMerchant().getId());
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOT_AUTHORIZED, "");
}
param.put("type", 1);
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(merchantAccountRecordService.getRecordList(param)));
} catch (Exception e) {
log.error("HighCompanyAmountController --> recharge() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

File diff suppressed because one or more lines are too long

@ -20,6 +20,7 @@ import com.hai.config.TuanYouConfig;
import com.hai.entity.*;
import com.hai.enum_type.DiscountUseScope;
import com.hai.enum_type.GasClassGroupTaskStatus;
import com.hai.enum_type.MerAccountMarketingType;
import com.hai.enum_type.OrderChildGoodsTypeEnum;
import com.hai.model.GasPayPriceModel;
import com.hai.model.HighMerchantStoreModel;
@ -71,6 +72,9 @@ public class HighOrderController {
@Resource
private HighMerchantStoreService highMerchantStoreService;
@Resource
private HighMerchantAccountMarketingService merchantAccountMarketingService;
@Resource
private HighCouponCodeService highCouponCodeService;
@ -318,6 +322,9 @@ public class HighOrderController {
}
}
// 营销减免的金额
BigDecimal marketingPrice = merchantAccountMarketingService.getPrice(store.getMerchantId(), MerAccountMarketingType.type3.getType(), Integer.valueOf(childOrder.getGasOilNo()));
// 计算价格
GasPayPriceModel priceModel = gasDiscountOilPriceService.oilPriceDiscountCompute(childOrder.getGoodsPrice(), childOrder.getGoodsId(), childOrder.getGasOilNo(), highOrder.getIsTyAgent());
@ -336,7 +343,7 @@ public class HighOrderController {
childOrder.setGasOilSubsidy(new BigDecimal("0"));
childOrder.setGasLitersPreferences(new BigDecimal("0"));
childOrder.setGasPricePreferences(priceModel.getPriceGun());
} else {
} else {
// 支付价格
childOrder.setGoodsActualPrice(priceModel.getPayPrice());
// 油价信息
@ -363,6 +370,14 @@ public class HighOrderController {
childOrder.setGoodsName(store.getStoreName());
childOrder.setGoodsSpecName("默认");
childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount().toString())));
// 成本价 油站价 减 营销策略价
childOrder.setGasPriceCost(priceModel.getPriceGun().subtract(marketingPrice));
if (marketingPrice.compareTo(new BigDecimal("0")) <= 0) {
childOrder.setGasPriceCostTotal(childOrder.getTotalPrice());
} else {
childOrder.setGasPriceCostTotal(childOrder.getGasPriceCost().multiply(childOrder.getGasOilLiters()).setScale(2, BigDecimal.ROUND_HALF_DOWN));
}
}
if (childOrder.getGoodsType() == 7) {
@ -444,13 +459,14 @@ public class HighOrderController {
if (request.getHeader("regionId") != null) {
if (request.getHeader("regionId") != null && request.getHeader("regionId").length() != 0) {
SecRegion region = commonService.getParentByRegion(Long.valueOf(request.getHeader("regionId")));
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString());
highOrder.setCompanyId(bsCompany.getId());
}
highOrder.setMerchId(request.getHeader("mchId"));
highOrder.setWhetherRebate(false);
highOrder.setTotalPrice(totalPrice);
highOrder.setPayablePrice(totalActualPrice);

File diff suppressed because one or more lines are too long

@ -196,7 +196,7 @@ public class OrderController {
if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
BigDecimal account = new BigDecimal("0");
// 查询账号余额
HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId());
HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId());
if (merAccount != null) {
account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId()));
}
@ -424,7 +424,7 @@ public class OrderController {
|| store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) {
BigDecimal account = new BigDecimal("0");
// 查询账号余额
HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId());
HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId());
if (merAccount != null) {
account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId()));
}
@ -551,7 +551,7 @@ public class OrderController {
if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
BigDecimal account = new BigDecimal("0");
// 查询账号余额
HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId());
HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId());
if (merAccount != null) {
account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId()));
}
@ -677,7 +677,7 @@ public class OrderController {
if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
BigDecimal account = new BigDecimal("0");
// 查询账号余额
HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId());
HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId());
if (merAccount != null) {
account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId()));
}
@ -783,7 +783,7 @@ public class OrderController {
if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
BigDecimal account = new BigDecimal("0");
// 查询账号余额
HighMerchantAccount merAccount = merchantAccountService.getStoreAccountDetail(store.getMerchantId());
HighMerchantAccount merAccount = merchantAccountService.getMerAccountDetail(store.getMerchantId());
if (merAccount != null) {
account = merAccount.getAmounts().subtract(merchantAccountService.countMerGasOilAmount(store.getMerchantId()));
}

@ -69,7 +69,7 @@ public class ShellGroupService {
* @param oilCode 油品编码
* @param oilGun 油枪
* @param settlementAmount 支付金额
* @param favourAmount 优惠金额
* @param channelFavourAmount 优惠金额
* @return
*/
public JSONObject gasSyncPayment(String orderNo,
@ -79,20 +79,20 @@ public class ShellGroupService {
String oilCode,
String oilGun,
BigDecimal settlementAmount,
BigDecimal favourAmount) {
BigDecimal channelFavourAmount) {
try {
Map<String, Object> param = new HashMap<>();
param.put("platMerchantId", CommonSysConst.getSysConfig().getShellPlatMerchantId());
param.put("stationCode", stationCode);
param.put("orderType", "OIL");
param.put("finishTime", DateUtil.date2String(finishTime, "yyyy-MM-dd HH:mm:ss"));
param.put("channelFavourAmount", channelFavourAmount);
Map<String, Object> tradeOilOrder = new HashMap<>();
tradeOilOrder.put("amount", oilPrice);
tradeOilOrder.put("code", oilCode);
tradeOilOrder.put("oilGun", oilGun);
tradeOilOrder.put("channelSettlementAmount", settlementAmount);
tradeOilOrder.put("channelFavourAmount", favourAmount);
param.put("tradeOilOrder", JSONObject.toJSONString(tradeOilOrder));
return request(orderNo.replace("HF",""), "gas_sync_payment_notify", param);
} catch (Exception e) {

@ -52,6 +52,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"gas_oil_type, gas_order_no, ",
"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, ",
@ -76,6 +77,7 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"#{gasOilType,jdbcType=INTEGER}, #{gasOrderNo,jdbcType=VARCHAR}, ",
"#{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}, ",
@ -124,6 +126,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@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),
@ -156,11 +160,11 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"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, ",
"gas_gun_no, gas_oil_type, gas_order_no, gas_price_platform, gas_price_gun, gas_price_vip, ",
"gas_price_official, 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, ext_1, ext_2, ext_3, ",
"ext_4, ext_5, ext_6",
"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, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"from high_child_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -192,6 +196,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@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),
@ -255,6 +261,8 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"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},",

@ -132,6 +132,14 @@ public class HighChildOrderSqlProvider {
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}");
}
@ -260,6 +268,8 @@ public class HighChildOrderSqlProvider {
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");
@ -408,6 +418,14 @@ public class HighChildOrderSqlProvider {
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}");
}
@ -535,6 +553,8 @@ public class HighChildOrderSqlProvider {
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}");
@ -672,6 +692,14 @@ public class HighChildOrderSqlProvider {
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}");
}

@ -14,7 +14,7 @@ public interface HighMerchantAccountMapperExt {
@Select({"select " +
" case when sum(b.total_price) is not null then sum(b.total_price) ELSE 0 end " +
" case when sum(a.gas_price_cost_total) is not null then sum(a.gas_price_cost_total) ELSE 0 end " +
" from high_child_order a, high_order b" +
" where goods_type = 3 " +
" and a.order_id = b.id" +

@ -0,0 +1,125 @@
package com.hai.dao;
import com.hai.entity.HighMerchantAccountMarketing;
import com.hai.entity.HighMerchantAccountMarketingExample;
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 HighMerchantAccountMarketingMapper extends HighMerchantAccountMarketingMapperExt {
@SelectProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="countByExample")
long countByExample(HighMerchantAccountMarketingExample example);
@DeleteProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="deleteByExample")
int deleteByExample(HighMerchantAccountMarketingExample example);
@Delete({
"delete from high_merchant_account_marketing",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_merchant_account_marketing (`type`, mer_id, ",
"mer_account_id, price, ",
"oil_no_relief_price, `status`, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{type,jdbcType=INTEGER}, #{merId,jdbcType=BIGINT}, ",
"#{merAccountId,jdbcType=BIGINT}, #{price,jdbcType=DECIMAL}, ",
"#{oilNoReliefPrice,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighMerchantAccountMarketing record);
@InsertProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighMerchantAccountMarketing record);
@SelectProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_account_id", property="merAccountId", jdbcType=JdbcType.BIGINT),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="oil_no_relief_price", property="oilNoReliefPrice", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@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)
})
List<HighMerchantAccountMarketing> selectByExample(HighMerchantAccountMarketingExample example);
@Select({
"select",
"id, `type`, mer_id, mer_account_id, price, oil_no_relief_price, `status`, create_time, ",
"update_time, ext_1, ext_2, ext_3",
"from high_merchant_account_marketing",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_account_id", property="merAccountId", jdbcType=JdbcType.BIGINT),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="oil_no_relief_price", property="oilNoReliefPrice", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@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)
})
HighMerchantAccountMarketing selectByPrimaryKey(Long id);
@UpdateProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighMerchantAccountMarketing record, @Param("example") HighMerchantAccountMarketingExample example);
@UpdateProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighMerchantAccountMarketing record, @Param("example") HighMerchantAccountMarketingExample example);
@UpdateProvider(type=HighMerchantAccountMarketingSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighMerchantAccountMarketing record);
@Update({
"update high_merchant_account_marketing",
"set `type` = #{type,jdbcType=INTEGER},",
"mer_id = #{merId,jdbcType=BIGINT},",
"mer_account_id = #{merAccountId,jdbcType=BIGINT},",
"price = #{price,jdbcType=DECIMAL},",
"oil_no_relief_price = #{oilNoReliefPrice,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighMerchantAccountMarketing record);
}

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

@ -0,0 +1,332 @@
package com.hai.dao;
import com.hai.entity.HighMerchantAccountMarketing;
import com.hai.entity.HighMerchantAccountMarketingExample.Criteria;
import com.hai.entity.HighMerchantAccountMarketingExample.Criterion;
import com.hai.entity.HighMerchantAccountMarketingExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighMerchantAccountMarketingSqlProvider {
public String countByExample(HighMerchantAccountMarketingExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_merchant_account_marketing");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighMerchantAccountMarketingExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_merchant_account_marketing");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighMerchantAccountMarketing record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_merchant_account_marketing");
if (record.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getMerAccountId() != null) {
sql.VALUES("mer_account_id", "#{merAccountId,jdbcType=BIGINT}");
}
if (record.getPrice() != null) {
sql.VALUES("price", "#{price,jdbcType=DECIMAL}");
}
if (record.getOilNoReliefPrice() != null) {
sql.VALUES("oil_no_relief_price", "#{oilNoReliefPrice,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.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
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}");
}
return sql.toString();
}
public String selectByExample(HighMerchantAccountMarketingExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("`type`");
sql.SELECT("mer_id");
sql.SELECT("mer_account_id");
sql.SELECT("price");
sql.SELECT("oil_no_relief_price");
sql.SELECT("`status`");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_merchant_account_marketing");
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) {
HighMerchantAccountMarketing record = (HighMerchantAccountMarketing) parameter.get("record");
HighMerchantAccountMarketingExample example = (HighMerchantAccountMarketingExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_merchant_account_marketing");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getMerAccountId() != null) {
sql.SET("mer_account_id = #{record.merAccountId,jdbcType=BIGINT}");
}
if (record.getPrice() != null) {
sql.SET("price = #{record.price,jdbcType=DECIMAL}");
}
if (record.getOilNoReliefPrice() != null) {
sql.SET("oil_no_relief_price = #{record.oilNoReliefPrice,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.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
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}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("high_merchant_account_marketing");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_account_id = #{record.merAccountId,jdbcType=BIGINT}");
sql.SET("price = #{record.price,jdbcType=DECIMAL}");
sql.SET("oil_no_relief_price = #{record.oilNoReliefPrice,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
HighMerchantAccountMarketingExample example = (HighMerchantAccountMarketingExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighMerchantAccountMarketing record) {
SQL sql = new SQL();
sql.UPDATE("high_merchant_account_marketing");
if (record.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getMerAccountId() != null) {
sql.SET("mer_account_id = #{merAccountId,jdbcType=BIGINT}");
}
if (record.getPrice() != null) {
sql.SET("price = #{price,jdbcType=DECIMAL}");
}
if (record.getOilNoReliefPrice() != null) {
sql.SET("oil_no_relief_price = #{oilNoReliefPrice,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.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
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}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighMerchantAccountMarketingExample 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,170 @@
package com.hai.dao;
import com.hai.entity.HighMerchantAccountRecord;
import com.hai.entity.HighMerchantAccountRecordExample;
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 HighMerchantAccountRecordMapper extends HighMerchantAccountRecordMapperExt {
@SelectProvider(type=HighMerchantAccountRecordSqlProvider.class, method="countByExample")
long countByExample(HighMerchantAccountRecordExample example);
@DeleteProvider(type=HighMerchantAccountRecordSqlProvider.class, method="deleteByExample")
int deleteByExample(HighMerchantAccountRecordExample example);
@Delete({
"delete from high_merchant_account_record",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_merchant_account_record (mer_amount_id, mer_id, ",
"mer_name, `type`, amount, ",
"marketing_status, marketing_type, ",
"marketing_price, marketing_trade_price, ",
"trade_price, before_amount, ",
"after_amount, source_type, ",
"source_id, source_content, ",
"`status`, create_time, ",
"op_user_id, op_user_name, ",
"ext_1, ext_2, ext_3)",
"values (#{merAmountId,jdbcType=BIGINT}, #{merId,jdbcType=BIGINT}, ",
"#{merName,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, ",
"#{marketingStatus,jdbcType=BIT}, #{marketingType,jdbcType=INTEGER}, ",
"#{marketingPrice,jdbcType=DECIMAL}, #{marketingTradePrice,jdbcType=DECIMAL}, ",
"#{tradePrice,jdbcType=DECIMAL}, #{beforeAmount,jdbcType=DECIMAL}, ",
"#{afterAmount,jdbcType=DECIMAL}, #{sourceType,jdbcType=INTEGER}, ",
"#{sourceId,jdbcType=BIGINT}, #{sourceContent,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighMerchantAccountRecord record);
@InsertProvider(type=HighMerchantAccountRecordSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighMerchantAccountRecord record);
@SelectProvider(type=HighMerchantAccountRecordSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="mer_amount_id", property="merAmountId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
@Result(column="marketing_status", property="marketingStatus", jdbcType=JdbcType.BIT),
@Result(column="marketing_type", property="marketingType", jdbcType=JdbcType.INTEGER),
@Result(column="marketing_price", property="marketingPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="marketing_trade_price", property="marketingTradePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="trade_price", property="tradePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER),
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT),
@Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT),
@Result(column="op_user_name", property="opUserName", 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)
})
List<HighMerchantAccountRecord> selectByExample(HighMerchantAccountRecordExample example);
@Select({
"select",
"id, mer_amount_id, mer_id, mer_name, `type`, amount, marketing_status, marketing_type, ",
"marketing_price, marketing_trade_price, trade_price, before_amount, after_amount, ",
"source_type, source_id, source_content, `status`, create_time, op_user_id, op_user_name, ",
"ext_1, ext_2, ext_3",
"from high_merchant_account_record",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="mer_amount_id", property="merAmountId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
@Result(column="marketing_status", property="marketingStatus", jdbcType=JdbcType.BIT),
@Result(column="marketing_type", property="marketingType", jdbcType=JdbcType.INTEGER),
@Result(column="marketing_price", property="marketingPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="marketing_trade_price", property="marketingTradePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="trade_price", property="tradePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER),
@Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT),
@Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT),
@Result(column="op_user_name", property="opUserName", 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)
})
HighMerchantAccountRecord selectByPrimaryKey(Long id);
@UpdateProvider(type=HighMerchantAccountRecordSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighMerchantAccountRecord record, @Param("example") HighMerchantAccountRecordExample example);
@UpdateProvider(type=HighMerchantAccountRecordSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighMerchantAccountRecord record, @Param("example") HighMerchantAccountRecordExample example);
@UpdateProvider(type=HighMerchantAccountRecordSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighMerchantAccountRecord record);
@Update({
"update high_merchant_account_record",
"set mer_amount_id = #{merAmountId,jdbcType=BIGINT},",
"mer_id = #{merId,jdbcType=BIGINT},",
"mer_name = #{merName,jdbcType=VARCHAR},",
"`type` = #{type,jdbcType=INTEGER},",
"amount = #{amount,jdbcType=DECIMAL},",
"marketing_status = #{marketingStatus,jdbcType=BIT},",
"marketing_type = #{marketingType,jdbcType=INTEGER},",
"marketing_price = #{marketingPrice,jdbcType=DECIMAL},",
"marketing_trade_price = #{marketingTradePrice,jdbcType=DECIMAL},",
"trade_price = #{tradePrice,jdbcType=DECIMAL},",
"before_amount = #{beforeAmount,jdbcType=DECIMAL},",
"after_amount = #{afterAmount,jdbcType=DECIMAL},",
"source_type = #{sourceType,jdbcType=INTEGER},",
"source_id = #{sourceId,jdbcType=BIGINT},",
"source_content = #{sourceContent,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"op_user_id = #{opUserId,jdbcType=BIGINT},",
"op_user_name = #{opUserName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighMerchantAccountRecord record);
}

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

@ -0,0 +1,486 @@
package com.hai.dao;
import com.hai.entity.HighMerchantAccountRecord;
import com.hai.entity.HighMerchantAccountRecordExample.Criteria;
import com.hai.entity.HighMerchantAccountRecordExample.Criterion;
import com.hai.entity.HighMerchantAccountRecordExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighMerchantAccountRecordSqlProvider {
public String countByExample(HighMerchantAccountRecordExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_merchant_account_record");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighMerchantAccountRecordExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_merchant_account_record");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighMerchantAccountRecord record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_merchant_account_record");
if (record.getMerAmountId() != null) {
sql.VALUES("mer_amount_id", "#{merAmountId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}");
}
if (record.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
if (record.getAmount() != null) {
sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}");
}
if (record.getMarketingStatus() != null) {
sql.VALUES("marketing_status", "#{marketingStatus,jdbcType=BIT}");
}
if (record.getMarketingType() != null) {
sql.VALUES("marketing_type", "#{marketingType,jdbcType=INTEGER}");
}
if (record.getMarketingPrice() != null) {
sql.VALUES("marketing_price", "#{marketingPrice,jdbcType=DECIMAL}");
}
if (record.getMarketingTradePrice() != null) {
sql.VALUES("marketing_trade_price", "#{marketingTradePrice,jdbcType=DECIMAL}");
}
if (record.getTradePrice() != null) {
sql.VALUES("trade_price", "#{tradePrice,jdbcType=DECIMAL}");
}
if (record.getBeforeAmount() != null) {
sql.VALUES("before_amount", "#{beforeAmount,jdbcType=DECIMAL}");
}
if (record.getAfterAmount() != null) {
sql.VALUES("after_amount", "#{afterAmount,jdbcType=DECIMAL}");
}
if (record.getSourceType() != null) {
sql.VALUES("source_type", "#{sourceType,jdbcType=INTEGER}");
}
if (record.getSourceId() != null) {
sql.VALUES("source_id", "#{sourceId,jdbcType=BIGINT}");
}
if (record.getSourceContent() != null) {
sql.VALUES("source_content", "#{sourceContent,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.getOpUserId() != null) {
sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}");
}
if (record.getOpUserName() != null) {
sql.VALUES("op_user_name", "#{opUserName,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}");
}
return sql.toString();
}
public String selectByExample(HighMerchantAccountRecordExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("mer_amount_id");
sql.SELECT("mer_id");
sql.SELECT("mer_name");
sql.SELECT("`type`");
sql.SELECT("amount");
sql.SELECT("marketing_status");
sql.SELECT("marketing_type");
sql.SELECT("marketing_price");
sql.SELECT("marketing_trade_price");
sql.SELECT("trade_price");
sql.SELECT("before_amount");
sql.SELECT("after_amount");
sql.SELECT("source_type");
sql.SELECT("source_id");
sql.SELECT("source_content");
sql.SELECT("`status`");
sql.SELECT("create_time");
sql.SELECT("op_user_id");
sql.SELECT("op_user_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_merchant_account_record");
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) {
HighMerchantAccountRecord record = (HighMerchantAccountRecord) parameter.get("record");
HighMerchantAccountRecordExample example = (HighMerchantAccountRecordExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_merchant_account_record");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getMerAmountId() != null) {
sql.SET("mer_amount_id = #{record.merAmountId,jdbcType=BIGINT}");
}
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.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
if (record.getAmount() != null) {
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}");
}
if (record.getMarketingStatus() != null) {
sql.SET("marketing_status = #{record.marketingStatus,jdbcType=BIT}");
}
if (record.getMarketingType() != null) {
sql.SET("marketing_type = #{record.marketingType,jdbcType=INTEGER}");
}
if (record.getMarketingPrice() != null) {
sql.SET("marketing_price = #{record.marketingPrice,jdbcType=DECIMAL}");
}
if (record.getMarketingTradePrice() != null) {
sql.SET("marketing_trade_price = #{record.marketingTradePrice,jdbcType=DECIMAL}");
}
if (record.getTradePrice() != null) {
sql.SET("trade_price = #{record.tradePrice,jdbcType=DECIMAL}");
}
if (record.getBeforeAmount() != null) {
sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}");
}
if (record.getAfterAmount() != null) {
sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}");
}
if (record.getSourceType() != null) {
sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}");
}
if (record.getSourceId() != null) {
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}");
}
if (record.getSourceContent() != null) {
sql.SET("source_content = #{record.sourceContent,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.getOpUserId() != null) {
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}");
}
if (record.getOpUserName() != null) {
sql.SET("op_user_name = #{record.opUserName,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}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("high_merchant_account_record");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("mer_amount_id = #{record.merAmountId,jdbcType=BIGINT}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("amount = #{record.amount,jdbcType=DECIMAL}");
sql.SET("marketing_status = #{record.marketingStatus,jdbcType=BIT}");
sql.SET("marketing_type = #{record.marketingType,jdbcType=INTEGER}");
sql.SET("marketing_price = #{record.marketingPrice,jdbcType=DECIMAL}");
sql.SET("marketing_trade_price = #{record.marketingTradePrice,jdbcType=DECIMAL}");
sql.SET("trade_price = #{record.tradePrice,jdbcType=DECIMAL}");
sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}");
sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}");
sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}");
sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}");
sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}");
sql.SET("op_user_name = #{record.opUserName,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}");
HighMerchantAccountRecordExample example = (HighMerchantAccountRecordExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighMerchantAccountRecord record) {
SQL sql = new SQL();
sql.UPDATE("high_merchant_account_record");
if (record.getMerAmountId() != null) {
sql.SET("mer_amount_id = #{merAmountId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{merName,jdbcType=VARCHAR}");
}
if (record.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
if (record.getAmount() != null) {
sql.SET("amount = #{amount,jdbcType=DECIMAL}");
}
if (record.getMarketingStatus() != null) {
sql.SET("marketing_status = #{marketingStatus,jdbcType=BIT}");
}
if (record.getMarketingType() != null) {
sql.SET("marketing_type = #{marketingType,jdbcType=INTEGER}");
}
if (record.getMarketingPrice() != null) {
sql.SET("marketing_price = #{marketingPrice,jdbcType=DECIMAL}");
}
if (record.getMarketingTradePrice() != null) {
sql.SET("marketing_trade_price = #{marketingTradePrice,jdbcType=DECIMAL}");
}
if (record.getTradePrice() != null) {
sql.SET("trade_price = #{tradePrice,jdbcType=DECIMAL}");
}
if (record.getBeforeAmount() != null) {
sql.SET("before_amount = #{beforeAmount,jdbcType=DECIMAL}");
}
if (record.getAfterAmount() != null) {
sql.SET("after_amount = #{afterAmount,jdbcType=DECIMAL}");
}
if (record.getSourceType() != null) {
sql.SET("source_type = #{sourceType,jdbcType=INTEGER}");
}
if (record.getSourceId() != null) {
sql.SET("source_id = #{sourceId,jdbcType=BIGINT}");
}
if (record.getSourceContent() != null) {
sql.SET("source_content = #{sourceContent,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.getOpUserId() != null) {
sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}");
}
if (record.getOpUserName() != null) {
sql.SET("op_user_name = #{opUserName,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}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighMerchantAccountRecordExample 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());
}
}
}

@ -58,9 +58,9 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"profit_sharing_ratio, account_merchant_num, ",
"product_type, print_status, ",
"print_num, whether_check, ",
"region_id, company_id, ",
"merch_id, ext_1, ext_2, ",
"ext_3)",
"whether_rebate, region_id, ",
"company_id, merch_id, ",
"ext_1, ext_2, ext_3)",
"values (#{orderNo,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ",
"#{memDiscountName,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ",
"#{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
@ -80,9 +80,9 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"#{profitSharingRatio,jdbcType=DECIMAL}, #{accountMerchantNum,jdbcType=VARCHAR}, ",
"#{productType,jdbcType=INTEGER}, #{printStatus,jdbcType=BIT}, ",
"#{printNum,jdbcType=INTEGER}, #{whetherCheck,jdbcType=BIT}, ",
"#{regionId,jdbcType=VARCHAR}, #{companyId,jdbcType=BIGINT}, ",
"#{merchId,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR})"
"#{whetherRebate,jdbcType=BIT}, #{regionId,jdbcType=VARCHAR}, ",
"#{companyId,jdbcType=BIGINT}, #{merchId,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighOrder record);
@ -132,6 +132,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="print_status", property="printStatus", jdbcType=JdbcType.BIT),
@Result(column="print_num", property="printNum", jdbcType=JdbcType.INTEGER),
@Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT),
@Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="merch_id", property="merchId", jdbcType=JdbcType.VARCHAR),
@ -149,8 +150,8 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"total_price, create_time, pay_time, cancel_time, cancel_remarks, finish_time, ",
"remarks, refund_no, refund_time, refund_price, refund_content, refusal_refund_content, ",
"Identification_code, profit_sharing_status, profit_sharing_ratio, account_merchant_num, ",
"product_type, print_status, print_num, whether_check, region_id, company_id, ",
"merch_id, ext_1, ext_2, ext_3",
"product_type, print_status, print_num, whether_check, whether_rebate, region_id, ",
"company_id, merch_id, ext_1, ext_2, ext_3",
"from high_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -194,6 +195,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="print_status", property="printStatus", jdbcType=JdbcType.BIT),
@Result(column="print_num", property="printNum", jdbcType=JdbcType.INTEGER),
@Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT),
@Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="merch_id", property="merchId", jdbcType=JdbcType.VARCHAR),
@ -252,6 +254,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"print_status = #{printStatus,jdbcType=BIT},",
"print_num = #{printNum,jdbcType=INTEGER},",
"whether_check = #{whetherCheck,jdbcType=BIT},",
"whether_rebate = #{whetherRebate,jdbcType=BIT},",
"region_id = #{regionId,jdbcType=VARCHAR},",
"company_id = #{companyId,jdbcType=BIGINT},",
"merch_id = #{merchId,jdbcType=VARCHAR},",

@ -1250,7 +1250,7 @@ public interface HighOrderMapperExt {
})
List<SelfOilStationModel> getSelfOilStationOrderList(@Param("goodsId") String goodsId);
@Select("select * from high_order where order_status = 3 and pay_type != 3 and pay_real_price > 0 ")
@Select("select * from high_order where order_status = 3 and pay_type != 3 and pay_real_price > 0 and whether_rebate = false ")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),

@ -180,6 +180,10 @@ public class HighOrderSqlProvider {
sql.VALUES("whether_check", "#{whetherCheck,jdbcType=BIT}");
}
if (record.getWhetherRebate() != null) {
sql.VALUES("whether_rebate", "#{whetherRebate,jdbcType=BIT}");
}
if (record.getRegionId() != null) {
sql.VALUES("region_id", "#{regionId,jdbcType=VARCHAR}");
}
@ -252,6 +256,7 @@ public class HighOrderSqlProvider {
sql.SELECT("print_status");
sql.SELECT("print_num");
sql.SELECT("whether_check");
sql.SELECT("whether_rebate");
sql.SELECT("region_id");
sql.SELECT("company_id");
sql.SELECT("merch_id");
@ -431,6 +436,10 @@ public class HighOrderSqlProvider {
sql.SET("whether_check = #{record.whetherCheck,jdbcType=BIT}");
}
if (record.getWhetherRebate() != null) {
sql.SET("whether_rebate = #{record.whetherRebate,jdbcType=BIT}");
}
if (record.getRegionId() != null) {
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}");
}
@ -502,6 +511,7 @@ public class HighOrderSqlProvider {
sql.SET("print_status = #{record.printStatus,jdbcType=BIT}");
sql.SET("print_num = #{record.printNum,jdbcType=INTEGER}");
sql.SET("whether_check = #{record.whetherCheck,jdbcType=BIT}");
sql.SET("whether_rebate = #{record.whetherRebate,jdbcType=BIT}");
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("merch_id = #{record.merchId,jdbcType=VARCHAR}");
@ -670,6 +680,10 @@ public class HighOrderSqlProvider {
sql.SET("whether_check = #{whetherCheck,jdbcType=BIT}");
}
if (record.getWhetherRebate() != null) {
sql.SET("whether_rebate = #{whetherRebate,jdbcType=BIT}");
}
if (record.getRegionId() != null) {
sql.SET("region_id = #{regionId,jdbcType=VARCHAR}");
}

@ -148,6 +148,16 @@ public class HighChildOrder implements Serializable {
*/
private BigDecimal gasPriceOfficial;
/**
* 加油站成本单价
*/
private BigDecimal gasPriceCost;
/**
* 加油站成本总价
*/
private BigDecimal gasPriceCostTotal;
/**
* 加油站渠道支付金额
*/
@ -463,6 +473,22 @@ public class HighChildOrder implements Serializable {
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;
}
@ -686,6 +712,8 @@ public class HighChildOrder implements Serializable {
&& (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()))
@ -742,6 +770,8 @@ public class HighChildOrder implements Serializable {
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());
@ -801,6 +831,8 @@ public class HighChildOrder implements Serializable {
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);

@ -1835,6 +1835,126 @@ public class HighChildOrderExample {
return (Criteria) this;
}
public Criteria andGasPriceCostIsNull() {
addCriterion("gas_price_cost is null");
return (Criteria) this;
}
public Criteria andGasPriceCostIsNotNull() {
addCriterion("gas_price_cost is not null");
return (Criteria) this;
}
public Criteria andGasPriceCostEqualTo(BigDecimal value) {
addCriterion("gas_price_cost =", value, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostNotEqualTo(BigDecimal value) {
addCriterion("gas_price_cost <>", value, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostGreaterThan(BigDecimal value) {
addCriterion("gas_price_cost >", value, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_cost >=", value, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostLessThan(BigDecimal value) {
addCriterion("gas_price_cost <", value, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostLessThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_cost <=", value, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostIn(List<BigDecimal> values) {
addCriterion("gas_price_cost in", values, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostNotIn(List<BigDecimal> values) {
addCriterion("gas_price_cost not in", values, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_cost between", value1, value2, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_cost not between", value1, value2, "gasPriceCost");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalIsNull() {
addCriterion("gas_price_cost_total is null");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalIsNotNull() {
addCriterion("gas_price_cost_total is not null");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalEqualTo(BigDecimal value) {
addCriterion("gas_price_cost_total =", value, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalNotEqualTo(BigDecimal value) {
addCriterion("gas_price_cost_total <>", value, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalGreaterThan(BigDecimal value) {
addCriterion("gas_price_cost_total >", value, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_cost_total >=", value, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalLessThan(BigDecimal value) {
addCriterion("gas_price_cost_total <", value, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalLessThanOrEqualTo(BigDecimal value) {
addCriterion("gas_price_cost_total <=", value, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalIn(List<BigDecimal> values) {
addCriterion("gas_price_cost_total in", values, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalNotIn(List<BigDecimal> values) {
addCriterion("gas_price_cost_total not in", values, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_cost_total between", value1, value2, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceCostTotalNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("gas_price_cost_total not between", value1, value2, "gasPriceCostTotal");
return (Criteria) this;
}
public Criteria andGasPriceChannelPayIsNull() {
addCriterion("gas_price_channel_pay is null");
return (Criteria) this;

@ -0,0 +1,230 @@
package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* high_merchant_account_marketing
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighMerchantAccountMarketing implements Serializable {
private Long id;
/**
* 类型 1. 充值赠送 2. 充值返点 3. 加油减免
*/
private Integer type;
/**
* 商户id
*/
private Long merId;
/**
* 商户账户id
*/
private Long merAccountId;
/**
* 金额 类型为 12才会使用此字段
*/
private BigDecimal price;
/**
* 油品金额减免JSON数据类型为3才会使用此字段
*/
private String oilNoReliefPrice;
/**
* 状态 0删除 1正常
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改时间
*/
private Date updateTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Long getMerId() {
return merId;
}
public void setMerId(Long merId) {
this.merId = merId;
}
public Long getMerAccountId() {
return merAccountId;
}
public void setMerAccountId(Long merAccountId) {
this.merAccountId = merAccountId;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String getOilNoReliefPrice() {
return oilNoReliefPrice;
}
public void setOilNoReliefPrice(String oilNoReliefPrice) {
this.oilNoReliefPrice = oilNoReliefPrice;
}
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 getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
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;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
HighMerchantAccountMarketing other = (HighMerchantAccountMarketing) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getMerAccountId() == null ? other.getMerAccountId() == null : this.getMerAccountId().equals(other.getMerAccountId()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
&& (this.getOilNoReliefPrice() == null ? other.getOilNoReliefPrice() == null : this.getOilNoReliefPrice().equals(other.getOilNoReliefPrice()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (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()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getMerAccountId() == null) ? 0 : getMerAccountId().hashCode());
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
result = prime * result + ((getOilNoReliefPrice() == null) ? 0 : getOilNoReliefPrice().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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());
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(", type=").append(type);
sb.append(", merId=").append(merId);
sb.append(", merAccountId=").append(merAccountId);
sb.append(", price=").append(price);
sb.append(", oilNoReliefPrice=").append(oilNoReliefPrice);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,984 @@
package com.hai.entity;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HighMerchantAccountMarketingExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public HighMerchantAccountMarketingExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public Integer getLimit() {
return limit;
}
public void setOffset(Long offset) {
this.offset = offset;
}
public Long getOffset() {
return offset;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("`type` =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("`type` <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("`type` >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`type` >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("`type` <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("`type` <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andMerIdIsNull() {
addCriterion("mer_id is null");
return (Criteria) this;
}
public Criteria andMerIdIsNotNull() {
addCriterion("mer_id is not null");
return (Criteria) this;
}
public Criteria andMerIdEqualTo(Long value) {
addCriterion("mer_id =", value, "merId");
return (Criteria) this;
}
public Criteria andMerIdNotEqualTo(Long value) {
addCriterion("mer_id <>", value, "merId");
return (Criteria) this;
}
public Criteria andMerIdGreaterThan(Long value) {
addCriterion("mer_id >", value, "merId");
return (Criteria) this;
}
public Criteria andMerIdGreaterThanOrEqualTo(Long value) {
addCriterion("mer_id >=", value, "merId");
return (Criteria) this;
}
public Criteria andMerIdLessThan(Long value) {
addCriterion("mer_id <", value, "merId");
return (Criteria) this;
}
public Criteria andMerIdLessThanOrEqualTo(Long value) {
addCriterion("mer_id <=", value, "merId");
return (Criteria) this;
}
public Criteria andMerIdIn(List<Long> values) {
addCriterion("mer_id in", values, "merId");
return (Criteria) this;
}
public Criteria andMerIdNotIn(List<Long> values) {
addCriterion("mer_id not in", values, "merId");
return (Criteria) this;
}
public Criteria andMerIdBetween(Long value1, Long value2) {
addCriterion("mer_id between", value1, value2, "merId");
return (Criteria) this;
}
public Criteria andMerIdNotBetween(Long value1, Long value2) {
addCriterion("mer_id not between", value1, value2, "merId");
return (Criteria) this;
}
public Criteria andMerAccountIdIsNull() {
addCriterion("mer_account_id is null");
return (Criteria) this;
}
public Criteria andMerAccountIdIsNotNull() {
addCriterion("mer_account_id is not null");
return (Criteria) this;
}
public Criteria andMerAccountIdEqualTo(Long value) {
addCriterion("mer_account_id =", value, "merAccountId");
return (Criteria) this;
}
public Criteria andMerAccountIdNotEqualTo(Long value) {
addCriterion("mer_account_id <>", value, "merAccountId");
return (Criteria) this;
}
public Criteria andMerAccountIdGreaterThan(Long value) {
addCriterion("mer_account_id >", value, "merAccountId");
return (Criteria) this;
}
public Criteria andMerAccountIdGreaterThanOrEqualTo(Long value) {
addCriterion("mer_account_id >=", value, "merAccountId");
return (Criteria) this;
}
public Criteria andMerAccountIdLessThan(Long value) {
addCriterion("mer_account_id <", value, "merAccountId");
return (Criteria) this;
}
public Criteria andMerAccountIdLessThanOrEqualTo(Long value) {
addCriterion("mer_account_id <=", value, "merAccountId");
return (Criteria) this;
}
public Criteria andMerAccountIdIn(List<Long> values) {
addCriterion("mer_account_id in", values, "merAccountId");
return (Criteria) this;
}
public Criteria andMerAccountIdNotIn(List<Long> values) {
addCriterion("mer_account_id not in", values, "merAccountId");
return (Criteria) this;
}
public Criteria andMerAccountIdBetween(Long value1, Long value2) {
addCriterion("mer_account_id between", value1, value2, "merAccountId");
return (Criteria) this;
}
public Criteria andMerAccountIdNotBetween(Long value1, Long value2) {
addCriterion("mer_account_id not between", value1, value2, "merAccountId");
return (Criteria) this;
}
public Criteria andPriceIsNull() {
addCriterion("price is null");
return (Criteria) this;
}
public Criteria andPriceIsNotNull() {
addCriterion("price is not null");
return (Criteria) this;
}
public Criteria andPriceEqualTo(BigDecimal value) {
addCriterion("price =", value, "price");
return (Criteria) this;
}
public Criteria andPriceNotEqualTo(BigDecimal value) {
addCriterion("price <>", value, "price");
return (Criteria) this;
}
public Criteria andPriceGreaterThan(BigDecimal value) {
addCriterion("price >", value, "price");
return (Criteria) this;
}
public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("price >=", value, "price");
return (Criteria) this;
}
public Criteria andPriceLessThan(BigDecimal value) {
addCriterion("price <", value, "price");
return (Criteria) this;
}
public Criteria andPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("price <=", value, "price");
return (Criteria) this;
}
public Criteria andPriceIn(List<BigDecimal> values) {
addCriterion("price in", values, "price");
return (Criteria) this;
}
public Criteria andPriceNotIn(List<BigDecimal> values) {
addCriterion("price not in", values, "price");
return (Criteria) this;
}
public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("price between", value1, value2, "price");
return (Criteria) this;
}
public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("price not between", value1, value2, "price");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceIsNull() {
addCriterion("oil_no_relief_price is null");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceIsNotNull() {
addCriterion("oil_no_relief_price is not null");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceEqualTo(String value) {
addCriterion("oil_no_relief_price =", value, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceNotEqualTo(String value) {
addCriterion("oil_no_relief_price <>", value, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceGreaterThan(String value) {
addCriterion("oil_no_relief_price >", value, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceGreaterThanOrEqualTo(String value) {
addCriterion("oil_no_relief_price >=", value, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceLessThan(String value) {
addCriterion("oil_no_relief_price <", value, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceLessThanOrEqualTo(String value) {
addCriterion("oil_no_relief_price <=", value, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceLike(String value) {
addCriterion("oil_no_relief_price like", value, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceNotLike(String value) {
addCriterion("oil_no_relief_price not like", value, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceIn(List<String> values) {
addCriterion("oil_no_relief_price in", values, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceNotIn(List<String> values) {
addCriterion("oil_no_relief_price not in", values, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceBetween(String value1, String value2) {
addCriterion("oil_no_relief_price between", value1, value2, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andOilNoReliefPriceNotBetween(String value1, String value2) {
addCriterion("oil_no_relief_price not between", value1, value2, "oilNoReliefPrice");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("`status` is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("`status` is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("`status` =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("`status` <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("`status` >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("`status` >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("`status` <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("`status` <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("`status` in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("`status` not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("`status` between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("`status` not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andExt1IsNull() {
addCriterion("ext_1 is null");
return (Criteria) this;
}
public Criteria andExt1IsNotNull() {
addCriterion("ext_1 is not null");
return (Criteria) this;
}
public Criteria andExt1EqualTo(String value) {
addCriterion("ext_1 =", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotEqualTo(String value) {
addCriterion("ext_1 <>", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1GreaterThan(String value) {
addCriterion("ext_1 >", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1GreaterThanOrEqualTo(String value) {
addCriterion("ext_1 >=", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1LessThan(String value) {
addCriterion("ext_1 <", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1LessThanOrEqualTo(String value) {
addCriterion("ext_1 <=", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1Like(String value) {
addCriterion("ext_1 like", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotLike(String value) {
addCriterion("ext_1 not like", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1In(List<String> values) {
addCriterion("ext_1 in", values, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotIn(List<String> values) {
addCriterion("ext_1 not in", values, "ext1");
return (Criteria) this;
}
public Criteria andExt1Between(String value1, String value2) {
addCriterion("ext_1 between", value1, value2, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotBetween(String value1, String value2) {
addCriterion("ext_1 not between", value1, value2, "ext1");
return (Criteria) this;
}
public Criteria andExt2IsNull() {
addCriterion("ext_2 is null");
return (Criteria) this;
}
public Criteria andExt2IsNotNull() {
addCriterion("ext_2 is not null");
return (Criteria) this;
}
public Criteria andExt2EqualTo(String value) {
addCriterion("ext_2 =", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotEqualTo(String value) {
addCriterion("ext_2 <>", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2GreaterThan(String value) {
addCriterion("ext_2 >", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2GreaterThanOrEqualTo(String value) {
addCriterion("ext_2 >=", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2LessThan(String value) {
addCriterion("ext_2 <", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2LessThanOrEqualTo(String value) {
addCriterion("ext_2 <=", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2Like(String value) {
addCriterion("ext_2 like", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotLike(String value) {
addCriterion("ext_2 not like", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2In(List<String> values) {
addCriterion("ext_2 in", values, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotIn(List<String> values) {
addCriterion("ext_2 not in", values, "ext2");
return (Criteria) this;
}
public Criteria andExt2Between(String value1, String value2) {
addCriterion("ext_2 between", value1, value2, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotBetween(String value1, String value2) {
addCriterion("ext_2 not between", value1, value2, "ext2");
return (Criteria) this;
}
public Criteria andExt3IsNull() {
addCriterion("ext_3 is null");
return (Criteria) this;
}
public Criteria andExt3IsNotNull() {
addCriterion("ext_3 is not null");
return (Criteria) this;
}
public Criteria andExt3EqualTo(String value) {
addCriterion("ext_3 =", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotEqualTo(String value) {
addCriterion("ext_3 <>", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3GreaterThan(String value) {
addCriterion("ext_3 >", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3GreaterThanOrEqualTo(String value) {
addCriterion("ext_3 >=", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3LessThan(String value) {
addCriterion("ext_3 <", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3LessThanOrEqualTo(String value) {
addCriterion("ext_3 <=", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3Like(String value) {
addCriterion("ext_3 like", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotLike(String value) {
addCriterion("ext_3 not like", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3In(List<String> values) {
addCriterion("ext_3 in", values, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotIn(List<String> values) {
addCriterion("ext_3 not in", values, "ext3");
return (Criteria) this;
}
public Criteria andExt3Between(String value1, String value2) {
addCriterion("ext_3 between", value1, value2, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotBetween(String value1, String value2) {
addCriterion("ext_3 not between", value1, value2, "ext3");
return (Criteria) this;
}
}
/**
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

@ -0,0 +1,406 @@
package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* high_merchant_account_record
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighMerchantAccountRecord implements Serializable {
private Long id;
/**
* 商户账户表id
*/
private Long merAmountId;
/**
* 商户id
*/
private Long merId;
/**
* 商户名称
*/
private String merName;
/**
* 类型 1进账 2出账
*/
private Integer type;
/**
* 账户金额
*/
private BigDecimal amount;
/**
* 参与营销 0 1
*/
private Boolean marketingStatus;
/**
* 营销类型 1赠送金额 2充值返点
*/
private Integer marketingType;
/**
* 营销金额
*/
private BigDecimal marketingPrice;
/**
* 营销交易金额
*/
private BigDecimal marketingTradePrice;
/**
* 交易金额
*/
private BigDecimal tradePrice;
/**
* 变更前金额
*/
private BigDecimal beforeAmount;
/**
* 变更后金额
*/
private BigDecimal afterAmount;
/**
* 来源类型 1.金额充值 2. 订单消费 3.订单退款
*/
private Integer sourceType;
/**
* 来源id
*/
private Long sourceId;
/**
* 来源内容
*/
private String sourceContent;
/**
* 状态 0删除 1正常
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 操作人id
*/
private Long opUserId;
/**
* 操作人名称
*/
private String opUserName;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getMerAmountId() {
return merAmountId;
}
public void setMerAmountId(Long merAmountId) {
this.merAmountId = merAmountId;
}
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 Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public Boolean getMarketingStatus() {
return marketingStatus;
}
public void setMarketingStatus(Boolean marketingStatus) {
this.marketingStatus = marketingStatus;
}
public Integer getMarketingType() {
return marketingType;
}
public void setMarketingType(Integer marketingType) {
this.marketingType = marketingType;
}
public BigDecimal getMarketingPrice() {
return marketingPrice;
}
public void setMarketingPrice(BigDecimal marketingPrice) {
this.marketingPrice = marketingPrice;
}
public BigDecimal getMarketingTradePrice() {
return marketingTradePrice;
}
public void setMarketingTradePrice(BigDecimal marketingTradePrice) {
this.marketingTradePrice = marketingTradePrice;
}
public BigDecimal getTradePrice() {
return tradePrice;
}
public void setTradePrice(BigDecimal tradePrice) {
this.tradePrice = tradePrice;
}
public BigDecimal getBeforeAmount() {
return beforeAmount;
}
public void setBeforeAmount(BigDecimal beforeAmount) {
this.beforeAmount = beforeAmount;
}
public BigDecimal getAfterAmount() {
return afterAmount;
}
public void setAfterAmount(BigDecimal afterAmount) {
this.afterAmount = afterAmount;
}
public Integer getSourceType() {
return sourceType;
}
public void setSourceType(Integer sourceType) {
this.sourceType = sourceType;
}
public Long getSourceId() {
return sourceId;
}
public void setSourceId(Long sourceId) {
this.sourceId = sourceId;
}
public String getSourceContent() {
return sourceContent;
}
public void setSourceContent(String sourceContent) {
this.sourceContent = sourceContent;
}
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 Long getOpUserId() {
return opUserId;
}
public void setOpUserId(Long opUserId) {
this.opUserId = opUserId;
}
public String getOpUserName() {
return opUserName;
}
public void setOpUserName(String opUserName) {
this.opUserName = opUserName;
}
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;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
HighMerchantAccountRecord other = (HighMerchantAccountRecord) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getMerAmountId() == null ? other.getMerAmountId() == null : this.getMerAmountId().equals(other.getMerAmountId()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
&& (this.getMarketingStatus() == null ? other.getMarketingStatus() == null : this.getMarketingStatus().equals(other.getMarketingStatus()))
&& (this.getMarketingType() == null ? other.getMarketingType() == null : this.getMarketingType().equals(other.getMarketingType()))
&& (this.getMarketingPrice() == null ? other.getMarketingPrice() == null : this.getMarketingPrice().equals(other.getMarketingPrice()))
&& (this.getMarketingTradePrice() == null ? other.getMarketingTradePrice() == null : this.getMarketingTradePrice().equals(other.getMarketingTradePrice()))
&& (this.getTradePrice() == null ? other.getTradePrice() == null : this.getTradePrice().equals(other.getTradePrice()))
&& (this.getBeforeAmount() == null ? other.getBeforeAmount() == null : this.getBeforeAmount().equals(other.getBeforeAmount()))
&& (this.getAfterAmount() == null ? other.getAfterAmount() == null : this.getAfterAmount().equals(other.getAfterAmount()))
&& (this.getSourceType() == null ? other.getSourceType() == null : this.getSourceType().equals(other.getSourceType()))
&& (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId()))
&& (this.getSourceContent() == null ? other.getSourceContent() == null : this.getSourceContent().equals(other.getSourceContent()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId()))
&& (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName()))
&& (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()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getMerAmountId() == null) ? 0 : getMerAmountId().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
result = prime * result + ((getMarketingStatus() == null) ? 0 : getMarketingStatus().hashCode());
result = prime * result + ((getMarketingType() == null) ? 0 : getMarketingType().hashCode());
result = prime * result + ((getMarketingPrice() == null) ? 0 : getMarketingPrice().hashCode());
result = prime * result + ((getMarketingTradePrice() == null) ? 0 : getMarketingTradePrice().hashCode());
result = prime * result + ((getTradePrice() == null) ? 0 : getTradePrice().hashCode());
result = prime * result + ((getBeforeAmount() == null) ? 0 : getBeforeAmount().hashCode());
result = prime * result + ((getAfterAmount() == null) ? 0 : getAfterAmount().hashCode());
result = prime * result + ((getSourceType() == null) ? 0 : getSourceType().hashCode());
result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode());
result = prime * result + ((getSourceContent() == null) ? 0 : getSourceContent().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode());
result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().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());
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(", merAmountId=").append(merAmountId);
sb.append(", merId=").append(merId);
sb.append(", merName=").append(merName);
sb.append(", type=").append(type);
sb.append(", amount=").append(amount);
sb.append(", marketingStatus=").append(marketingStatus);
sb.append(", marketingType=").append(marketingType);
sb.append(", marketingPrice=").append(marketingPrice);
sb.append(", marketingTradePrice=").append(marketingTradePrice);
sb.append(", tradePrice=").append(tradePrice);
sb.append(", beforeAmount=").append(beforeAmount);
sb.append(", afterAmount=").append(afterAmount);
sb.append(", sourceType=").append(sourceType);
sb.append(", sourceId=").append(sourceId);
sb.append(", sourceContent=").append(sourceContent);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", opUserId=").append(opUserId);
sb.append(", opUserName=").append(opUserName);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -210,6 +210,11 @@ public class HighOrder implements Serializable {
*/
private Boolean whetherCheck;
/**
* 是否返利
*/
private Boolean whetherRebate;
/**
* 区域编码
*/
@ -228,6 +233,7 @@ public class HighOrder implements Serializable {
private String ext3;
private String payPwd;
private List<HighChildOrder> highChildOrderList;
@ -245,15 +251,8 @@ public class HighOrder implements Serializable {
*/
private Boolean buyPoints;
private static final long serialVersionUID = 1L;
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPayPwd() {
return payPwd;
@ -295,6 +294,14 @@ public class HighOrder implements Serializable {
this.gasStaffCode = gasStaffCode;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Boolean getBuyPoints() {
return buyPoints;
}
@ -303,6 +310,8 @@ public class HighOrder implements Serializable {
this.buyPoints = buyPoints;
}
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
@ -615,6 +624,14 @@ public class HighOrder implements Serializable {
this.whetherCheck = whetherCheck;
}
public Boolean getWhetherRebate() {
return whetherRebate;
}
public void setWhetherRebate(Boolean whetherRebate) {
this.whetherRebate = whetherRebate;
}
public String getRegionId() {
return regionId;
}
@ -714,6 +731,7 @@ public class HighOrder implements Serializable {
&& (this.getPrintStatus() == null ? other.getPrintStatus() == null : this.getPrintStatus().equals(other.getPrintStatus()))
&& (this.getPrintNum() == null ? other.getPrintNum() == null : this.getPrintNum().equals(other.getPrintNum()))
&& (this.getWhetherCheck() == null ? other.getWhetherCheck() == null : this.getWhetherCheck().equals(other.getWhetherCheck()))
&& (this.getWhetherRebate() == null ? other.getWhetherRebate() == null : this.getWhetherRebate().equals(other.getWhetherRebate()))
&& (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getMerchId() == null ? other.getMerchId() == null : this.getMerchId().equals(other.getMerchId()))
@ -765,6 +783,7 @@ public class HighOrder implements Serializable {
result = prime * result + ((getPrintStatus() == null) ? 0 : getPrintStatus().hashCode());
result = prime * result + ((getPrintNum() == null) ? 0 : getPrintNum().hashCode());
result = prime * result + ((getWhetherCheck() == null) ? 0 : getWhetherCheck().hashCode());
result = prime * result + ((getWhetherRebate() == null) ? 0 : getWhetherRebate().hashCode());
result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getMerchId() == null) ? 0 : getMerchId().hashCode());
@ -819,6 +838,7 @@ public class HighOrder implements Serializable {
sb.append(", printStatus=").append(printStatus);
sb.append(", printNum=").append(printNum);
sb.append(", whetherCheck=").append(whetherCheck);
sb.append(", whetherRebate=").append(whetherRebate);
sb.append(", regionId=").append(regionId);
sb.append(", companyId=").append(companyId);
sb.append(", merchId=").append(merchId);

@ -2586,6 +2586,66 @@ public class HighOrderExample {
return (Criteria) this;
}
public Criteria andWhetherRebateIsNull() {
addCriterion("whether_rebate is null");
return (Criteria) this;
}
public Criteria andWhetherRebateIsNotNull() {
addCriterion("whether_rebate is not null");
return (Criteria) this;
}
public Criteria andWhetherRebateEqualTo(Boolean value) {
addCriterion("whether_rebate =", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateNotEqualTo(Boolean value) {
addCriterion("whether_rebate <>", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateGreaterThan(Boolean value) {
addCriterion("whether_rebate >", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateGreaterThanOrEqualTo(Boolean value) {
addCriterion("whether_rebate >=", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateLessThan(Boolean value) {
addCriterion("whether_rebate <", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateLessThanOrEqualTo(Boolean value) {
addCriterion("whether_rebate <=", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateIn(List<Boolean> values) {
addCriterion("whether_rebate in", values, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateNotIn(List<Boolean> values) {
addCriterion("whether_rebate not in", values, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateBetween(Boolean value1, Boolean value2) {
addCriterion("whether_rebate between", value1, value2, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateNotBetween(Boolean value1, Boolean value2) {
addCriterion("whether_rebate not between", value1, value2, "whetherRebate");
return (Criteria) this;
}
public Criteria andRegionIdIsNull() {
addCriterion("region_id is null");
return (Criteria) this;

@ -0,0 +1,36 @@
package com.hai.enum_type;
/**
* 商户账户营销类型
* @author hurui
*/
public enum MerAccountMarketingType {
type1(1 , "充值赠送"),
type2(2 , "充值返点"),
type3(3 , "加油减免"),
;
private Integer type;
private String name;
MerAccountMarketingType(int type , String name) {
this.type = type;
this.name = name;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,37 @@
package com.hai.enum_type;
/**
* 商户账户记录来源
* @author hurui
*/
public enum MerAmountSourceTypeEnum {
type1(1, "金额充值"),
type2(2, "订单消费"),
type3(3, "订单退款"),
;
private Integer type;
private String name;
MerAmountSourceTypeEnum(int type, String name) {
this.type = type;
this.name = name;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,36 @@
package com.hai.enum_type;
/**
* 商户账户记录类型
* @author hurui
*/
public enum MerAmountTypeEnum {
type1(1, "进账"),
type2(2, "出账")
;
private Integer type;
private String name;
MerAmountTypeEnum(int type, String name) {
this.type = type;
this.name = name;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,40 @@
package com.hai.service;
import com.hai.entity.HighMerchantAccountMarketing;
import java.math.BigDecimal;
/**
* 商户账户营销配置
*/
public interface HighMerchantAccountMarketingService {
/**
* 增加
* @param merchantAccountMarketing
*/
void insert(HighMerchantAccountMarketing merchantAccountMarketing);
/**
* 修改
* @param merchantAccountMarketing
*/
void update(HighMerchantAccountMarketing merchantAccountMarketing);
/**
* 查询详情
* @param merId
* @param type
* @return
*/
HighMerchantAccountMarketing getDetailByMerAndType(Long merId,Integer type);
/**
* 查询价格
* @param merId
* @param type
* @param oilNo
* @return
*/
BigDecimal getPrice(Long merId,Integer type,Integer oilNo);
}

@ -0,0 +1,25 @@
package com.hai.service;
import com.hai.entity.HighMerchantAccountRecord;
import java.util.List;
import java.util.Map;
/**
* 商户账户变更记录
*/
public interface HighMerchantAccountRecordService {
/**
* 增加记录
* @param record
*/
void insert(HighMerchantAccountRecord record);
/**
* 查询记录列表
* @param param
* @return
*/
List<HighMerchantAccountRecord> getRecordList(Map<String, Object> param);
}

@ -20,14 +20,14 @@ public interface HighMerchantAccountService {
* @param amount
* @param otherParam
*/
void recharge(Long merId, BigDecimal amount, Map<String, Object> otherParam);
void recharge(Long merId, BigDecimal amount, Map<String, Object> marketingParam, Map<String, Object> otherParam);
/**
* 查询商户账户
* @param merId
* @return
*/
HighMerchantAccount getStoreAccountDetail(Long merId);
HighMerchantAccount getMerAccountDetail(Long merId);
/**
* 统计商户加油金额

@ -5,7 +5,9 @@ import com.hai.common.utils.DateUtil;
import com.hai.dao.BsIntegralRebateMapper;
import com.hai.entity.BsIntegralRebate;
import com.hai.entity.BsIntegralRebateExample;
import com.hai.entity.HighOrder;
import com.hai.service.BsIntegralRebateService;
import com.hai.service.HighOrderService;
import com.hai.service.HighUserService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
@ -25,6 +27,9 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
@Resource
private HighUserService highUserService;
@Resource
private HighOrderService highOrderService;
@Override
public BsIntegralRebate findIntegralRebateByMap(Map<String, Object> map) {
@ -100,6 +105,11 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
BsIntegralRebate bsIntegralRebate = findIntegralRebateByMap(map);
if (DateUtil.isEffectiveDate(object.getDate("createTime"), bsIntegralRebate.getStartTime() , bsIntegralRebate.getEndTime())) {
HighOrder order = highOrderService.getOrderById(object.getLong("orderId"));
order.setWhetherRebate(true);
BigDecimal integralNum = object.getBigDecimal("price").multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP );
highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum);

@ -0,0 +1,65 @@
package com.hai.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hai.dao.HighMerchantAccountMarketingMapper;
import com.hai.entity.HighMerchantAccountMarketing;
import com.hai.entity.HighMerchantAccountMarketingExample;
import com.hai.enum_type.MerAccountMarketingType;
import com.hai.service.HighMerchantAccountMarketingService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Service("merchantAccountMarketingService")
public class HighMerchantAccountMarketingServiceImpl implements HighMerchantAccountMarketingService {
@Resource
private HighMerchantAccountMarketingMapper marketingMapper;
@Override
public void insert(HighMerchantAccountMarketing merchantAccountMarketing) {
merchantAccountMarketing.setStatus(1);
merchantAccountMarketing.setCreateTime(new Date());
merchantAccountMarketing.setUpdateTime(new Date());
marketingMapper.insert(merchantAccountMarketing);
}
@Override
public void update(HighMerchantAccountMarketing merchantAccountMarketing) {
merchantAccountMarketing.setUpdateTime(new Date());
marketingMapper.updateByPrimaryKeySelective(merchantAccountMarketing);
}
@Override
public HighMerchantAccountMarketing getDetailByMerAndType(Long merId, Integer type) {
HighMerchantAccountMarketingExample example = new HighMerchantAccountMarketingExample();
example.createCriteria().andMerIdEqualTo(merId).andTypeEqualTo(type).andStatusNotEqualTo(0);
List<HighMerchantAccountMarketing> list = marketingMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public BigDecimal getPrice(Long merId, Integer type, Integer oilNo) {
HighMerchantAccountMarketing marketing = getDetailByMerAndType(merId, type);
if (marketing == null) {
return new BigDecimal("0");
}
if (type.equals(MerAccountMarketingType.type3.getType())) {
JSONArray oilNoArray = JSONArray.parseArray(marketing.getOilNoReliefPrice());
for (Object obj : oilNoArray) {
JSONObject oilNoData = (JSONObject) obj;
if (oilNo.equals(oilNoData.getInteger("oilNo"))) {
return oilNoData.getBigDecimal("price");
}
}
}
return new BigDecimal("0");
}
}

@ -0,0 +1,52 @@
package com.hai.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.hai.dao.HighMerchantAccountRecordMapper;
import com.hai.entity.HighMerchantAccountRecord;
import com.hai.entity.HighMerchantAccountRecordExample;
import com.hai.service.HighMerchantAccountRecordService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service("merchantAccountRecordService")
public class HighMerchantAccountRecordServiceImpl implements HighMerchantAccountRecordService {
@Resource
private HighMerchantAccountRecordMapper merchantAccountRecordMapper;
@Override
public void insert(HighMerchantAccountRecord record) {
record.setCreateTime(new Date());
record.setStatus(1);
merchantAccountRecordMapper.insert(record);
}
@Override
public List<HighMerchantAccountRecord> getRecordList(Map<String, Object> param) {
HighMerchantAccountRecordExample example = new HighMerchantAccountRecordExample();
HighMerchantAccountRecordExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0);
if (MapUtils.getLong(param, "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId"));
}
if (MapUtils.getObject(param, "merIdList") != null) {
JSONObject.toJSONString(MapUtils.getObject(param, "merIdList"));
List<Long> merList = (List<Long>) MapUtils.getObject(param, "merIdList");
criteria.andMerIdIn(merList);
}
if (MapUtils.getInteger(param, "type") != null) {
criteria.andTypeEqualTo(MapUtils.getInteger(param, "type"));
}
example.setOrderByClause("create_time desc");
return merchantAccountRecordMapper.selectByExample(example);
}
}

@ -1,18 +1,25 @@
package com.hai.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.BankNumberUtil;
import com.hai.dao.HighMerchantAccountMapper;
import com.hai.entity.HighMerchant;
import com.hai.entity.HighMerchantAccount;
import com.hai.entity.HighMerchantAccountExample;
import com.hai.entity.HighMerchantStoreAccount;
import com.hai.entity.*;
import com.hai.enum_type.MerAccountMarketingType;
import com.hai.enum_type.MerAmountSourceTypeEnum;
import com.hai.enum_type.MerAmountTypeEnum;
import com.hai.model.HighMerchantModel;
import com.hai.model.HighMerchantStoreModel;
import com.hai.model.UserInfoModel;
import com.hai.service.HighMerchantAccountMarketingService;
import com.hai.service.HighMerchantAccountRecordService;
import com.hai.service.HighMerchantAccountService;
import com.hai.service.HighMerchantService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -32,6 +39,15 @@ public class HighMerchantAccountServiceImpl implements HighMerchantAccountServic
@Resource
private HighMerchantService merchantService;
@Resource
private HighMerchantAccountRecordService merchantAccountRecordService;
@Resource
private HighMerchantAccountMarketingService marketingService;
@Resource
private UserCenter userCenter;
@Override
public void editMerchantAccount(HighMerchantAccount merchantAccount) {
if (merchantAccount.getId() == null) {
@ -48,30 +64,86 @@ public class HighMerchantAccountServiceImpl implements HighMerchantAccountServic
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void recharge(Long merId, BigDecimal amount, Map<String, Object> otherParam) {
public void recharge(Long merId, BigDecimal amount, Map<String, Object> marketingParam, Map<String, Object> otherParam) {
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
// 查询商户
HighMerchant merchant = merchantService.getDetailById(merId);
if (merchant == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户");
}
// 是否开通了账户
HighMerchantAccount account = getStoreAccountDetail(merId);
HighMerchantAccount account = getMerAccountDetail(merId);
if (account == null) {
account = new HighMerchantAccount();
account.setMerId(merId);
account.setAmounts(new BigDecimal("0"));
}
// 本次交易金额
BigDecimal tradePrice = amount;
HighMerchantAccountRecord accountRecord = new HighMerchantAccountRecord();
accountRecord.setMarketingStatus(MapUtils.getBoolean(marketingParam, "marketingStatus"));
// 营销活动
if (MapUtils.getBoolean(marketingParam, "marketingStatus") == true) {
if (MapUtils.getInteger(marketingParam, "marketingType").equals(MerAccountMarketingType.type1.getType())) {
accountRecord.setMarketingType(MerAccountMarketingType.type1.getType());
accountRecord.setMarketingPrice(new BigDecimal(MapUtils.getString(marketingParam, "marketingPrice")));
accountRecord.setMarketingTradePrice(new BigDecimal(MapUtils.getString(marketingParam, "marketingPrice")));
tradePrice = tradePrice.add(accountRecord.getMarketingTradePrice());
}
if (MapUtils.getInteger(marketingParam, "marketingType").equals(MerAccountMarketingType.type2.getType())) {
accountRecord.setMarketingType(MerAccountMarketingType.type2.getType());
accountRecord.setMarketingPrice(new BigDecimal(MapUtils.getString(marketingParam, "marketingPrice")));
accountRecord.setMarketingTradePrice(amount.multiply(new BigDecimal(MapUtils.getString(marketingParam, "marketingPrice")).setScale(BigDecimal.ROUND_HALF_DOWN)));
tradePrice = tradePrice.add(accountRecord.getMarketingTradePrice());
}
if (MapUtils.getInteger(marketingParam, "marketingType").equals(MerAccountMarketingType.type3.getType())) {
HighMerchantAccountMarketing accountMarketing = marketingService.getDetailByMerAndType(merId, MerAccountMarketingType.type3.getType());
if (accountMarketing == null) {
accountMarketing = new HighMerchantAccountMarketing();
accountMarketing.setType(MerAccountMarketingType.type3.getType());
accountMarketing.setMerId(merId);
accountMarketing.setMerAccountId(account.getId());
JSONArray oilNoData = (JSONArray) marketingParam.get("marketingOilNoData");
accountMarketing.setOilNoReliefPrice(oilNoData.toJSONString());
marketingService.insert(accountMarketing);
} else {
JSONArray oilNoData = (JSONArray) marketingParam.get("marketingOilNoData");
accountMarketing.setOilNoReliefPrice(oilNoData.toJSONString());
marketingService.update(accountMarketing);
}
}
}
// 变更前金额
BigDecimal beforeAmount = account.getAmounts();
// 计算金额
account.setAmounts(account.getAmounts().add(amount));
account.setAmounts(account.getAmounts().add(tradePrice));
// 变更后金额
BigDecimal afterAmount = account.getAmounts();
editMerchantAccount(account);
accountRecord.setMerAmountId(account.getId());
accountRecord.setMerId(merchant.getId());
accountRecord.setMerName(merchant.getMerchantName());
accountRecord.setType(MerAmountTypeEnum.type1.getType());
accountRecord.setAmount(amount);
accountRecord.setTradePrice(tradePrice);
accountRecord.setBeforeAmount(beforeAmount);
accountRecord.setAfterAmount(afterAmount);
accountRecord.setSourceType(MerAmountSourceTypeEnum.type1.getType());
accountRecord.setOpUserId(userInfoModel.getSecUser().getId());
accountRecord.setOpUserName(userInfoModel.getSecUser().getUserName());
merchantAccountRecordService.insert(accountRecord);
}
@Override
public HighMerchantAccount getStoreAccountDetail(Long merId) {
public HighMerchantAccount getMerAccountDetail(Long merId) {
HighMerchantAccountExample example = new HighMerchantAccountExample();
example.createCriteria().andStatusEqualTo(1).andMerIdEqualTo(merId);
List<HighMerchantAccount> list = merchantAccountMapper.selectByExample(example);

@ -1608,6 +1608,11 @@ public class HighOrderServiceImpl implements HighOrderService {
if (MapUtils.getString(map, "merchId") != null) {
criteria.andMerchIdEqualTo(MapUtils.getString(map, "merchId"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "createTimeS")) && StringUtils.isNotBlank(MapUtils.getString(map, "createTimeE"))) {
criteria.andCreateTimeBetween(
DateUtil.format(MapUtils.getString(map, "createTimeS"), "yyyy-MM-dd HH:mm:ss"),
DateUtil.format(MapUtils.getString(map, "createTimeE"), "yyyy-MM-dd HH:mm:ss"));
}
example.setOrderByClause("create_time desc");
List<HighOrder> list = highOrderMapper.selectByExample(example);
@ -2217,6 +2222,7 @@ public class HighOrderServiceImpl implements HighOrderService {
HighOrder highOrder = new HighOrder();
highOrder.setMerchId(object.getString("mchId"));
highOrder.setWhetherRebate(false);
HighUser user = highUserService.findByUserId(object.getLong("userId"));
JSONObject jsonObject = null;
@ -2688,6 +2694,7 @@ public class HighOrderServiceImpl implements HighOrderService {
order.setOrderStatus(2);
order.setMemCardNo(userCard.getCardNo());
order.setPayType(4);
order.setPayTime(new Date()); // 支付时间
updateOrder(order);

@ -71,6 +71,9 @@ public class HighOrderController {
}
if (StringUtils.isBlank(object.getString("apiKey")) ||
StringUtils.isBlank(object.getString("merchId")) ||
StringUtils.isBlank(object.getString("createTimeS")) ||
StringUtils.isBlank(object.getString("createTimeE")) ||
StringUtils.isBlank(object.getString("merchId")) ||
StringUtils.isBlank(object.getString("timetable")) ||
StringUtils.isBlank(object.getString("sign"))
@ -90,6 +93,8 @@ public class HighOrderController {
map.put("apiKey" , object.getString("apiKey"));
map.put("timetable" , object.getString("timetable"));
map.put("merchId" , object.getString("merchId"));
map.put("createTimeS" , object.getString("createTimeS"));
map.put("createTimeE" , object.getString("createTimeE"));
if (!secConfigService.isSignVerify(map , object.getString("sign"))) {
log.error("getRechargeProduct error!", "签名校验失败!");
@ -133,6 +138,8 @@ public class HighOrderController {
if (StringUtils.isBlank(object.getString("apiKey")) ||
StringUtils.isBlank(object.getString("merchId")) ||
StringUtils.isBlank(object.getString("createTimeS")) ||
StringUtils.isBlank(object.getString("createTimeE")) ||
StringUtils.isBlank(object.getString("timetable")) ||
StringUtils.isBlank(object.getString("sign"))
) {
@ -151,6 +158,8 @@ public class HighOrderController {
map.put("apiKey" , object.getString("apiKey"));
map.put("timetable" , object.getString("timetable"));
map.put("merchId" , object.getString("merchId"));
map.put("createTimeS" , object.getString("createTimeS"));
map.put("createTimeE" , object.getString("createTimeE"));
if (!secConfigService.isSignVerify(map , object.getString("sign"))) {
log.error("getRechargeProduct error!", "签名校验失败!");

Loading…
Cancel
Save