提交代码

new-dev
胡锐 1 year ago
commit aa18ef7b26
  1. 4
      hai-bweb/src/main/java/com/bweb/controller/HighGasChannelConfigController.java
  2. 101
      hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java
  3. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  4. 1
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  5. 24
      hai-cweb/src/main/java/com/cweb/controller/CommonController.java
  6. 45
      hai-cweb/src/main/java/com/cweb/controller/HighGasController.java
  7. 149
      hai-cweb/src/main/java/com/cweb/controller/group/GroupController.java
  8. 95
      hai-order/src/main/java/com/web/controller/OrderPayController.java
  9. 23
      hai-service/src/main/java/com/hai/common/utils/WxUtils.java
  10. 39
      hai-service/src/main/java/com/hai/config/KytcService.java
  11. 30
      hai-service/src/main/java/com/hai/dao/HighGasChannelConfigMapper.java
  12. 14
      hai-service/src/main/java/com/hai/dao/HighGasChannelConfigSqlProvider.java
  13. 128
      hai-service/src/main/java/com/hai/dao/HighOilCardOrderMapper.java
  14. 7
      hai-service/src/main/java/com/hai/dao/HighOilCardOrderMapperExt.java
  15. 346
      hai-service/src/main/java/com/hai/dao/HighOilCardOrderSqlProvider.java
  16. 125
      hai-service/src/main/java/com/hai/dao/HighStoreOilCardMapper.java
  17. 7
      hai-service/src/main/java/com/hai/dao/HighStoreOilCardMapperExt.java
  18. 332
      hai-service/src/main/java/com/hai/dao/HighStoreOilCardSqlProvider.java
  19. 120
      hai-service/src/main/java/com/hai/dao/HighUserLevelMapper.java
  20. 7
      hai-service/src/main/java/com/hai/dao/HighUserLevelMapperExt.java
  21. 318
      hai-service/src/main/java/com/hai/dao/HighUserLevelSqlProvider.java
  22. 20
      hai-service/src/main/java/com/hai/entity/HighGasChannelConfig.java
  23. 70
      hai-service/src/main/java/com/hai/entity/HighGasChannelConfigExample.java
  24. 258
      hai-service/src/main/java/com/hai/entity/HighOilCardOrder.java
  25. 1074
      hai-service/src/main/java/com/hai/entity/HighOilCardOrderExample.java
  26. 241
      hai-service/src/main/java/com/hai/entity/HighStoreOilCard.java
  27. 993
      hai-service/src/main/java/com/hai/entity/HighStoreOilCardExample.java
  28. 225
      hai-service/src/main/java/com/hai/entity/HighUserLevel.java
  29. 933
      hai-service/src/main/java/com/hai/entity/HighUserLevelExample.java
  30. 1
      hai-service/src/main/java/com/hai/enum_type/GasChannel.java
  31. 1
      hai-service/src/main/java/com/hai/enum_type/GasChannelPayPlatformType.java
  32. 1
      hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java
  33. 66
      hai-service/src/main/java/com/hai/group/GroupService.java
  34. 2
      hai-service/src/main/java/com/hai/order/model/CreateOrderChildModel.java
  35. 11
      hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java
  36. 50
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  37. 41
      hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java
  38. 6
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  39. 4
      hai-service/src/main/java/com/hai/order/type/OrderChildGoodsType.java
  40. 3
      hai-service/src/main/java/com/hai/order/type/OrderProductType.java
  41. 54
      hai-service/src/main/java/com/hai/pay/channel/huipay/config/HuiConfig.java
  42. 4
      hai-service/src/main/java/com/hai/service/HighGasChannelConfigService.java
  43. 41
      hai-service/src/main/java/com/hai/service/HighMerchantStoreService.java
  44. 13
      hai-service/src/main/java/com/hai/service/HighOilCardOrderService.java
  45. 8
      hai-service/src/main/java/com/hai/service/HighUserService.java
  46. 26
      hai-service/src/main/java/com/hai/service/impl/HighGasChannelConfigServiceImpl.java
  47. 1
      hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java
  48. 3
      hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java
  49. 28
      hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java
  50. 43
      hai-service/src/main/java/com/hai/service/impl/HighOilCardOrderServiceImpl.java
  51. 29
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java
  52. 2
      hai-user/src/main/java/com/web/controller/LoginController.java

@ -67,8 +67,7 @@ public class HighGasChannelConfigController {
// 查询平台
HighGasChannelConfig platform = gasChannelConfigService.getConfig(
GasChannel.getChannelByType(body.getInteger("channelId")),
GasChannelPayPlatformType.getPlatformByType(body.getInteger("payPlatformType")));
GasChannel.getChannelByType(body.getInteger("channelId")));
if (platform == null) {
platform = new HighGasChannelConfig();
@ -78,6 +77,7 @@ public class HighGasChannelConfigController {
platform.setPayPlatformType(body.getInteger("payPlatformType"));
platform.setPayPlatformMerName(body.getString("payPlatformMerName"));
platform.setPayPlatformMerNo(body.getString("payPlatformMerNo"));
platform.setPayPlatformMerKey(body.getString("payPlatformKey"));
platform.setProfitSharingStatus(body.getBoolean("profitSharingStatus"));
platform.setProfitSharingRatio(body.getBigDecimal("profitSharingRatio"));
platform.setProfitSharingReceiversNo(body.getString("profitSharingReceiversNo"));

@ -13,10 +13,7 @@ import com.hai.common.security.UserCenter;
import com.hai.common.utils.HttpsUtils;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.config.CommonSysConst;
import com.hai.entity.BsCompany;
import com.hai.entity.HighMerchant;
import com.hai.entity.HighMerchantStore;
import com.hai.entity.SecRegion;
import com.hai.entity.*;
import com.hai.enum_type.MerchantStoreSourceType;
import com.hai.model.*;
import com.hai.service.*;
@ -135,7 +132,10 @@ public class HighMerchantStoreController {
highMerchantStore.setMerchantId(merchant.getId());
highMerchantStore.setOperatorId(userInfoModel.getSecUser().getId());
highMerchantStore.setOperatorName(userInfoModel.getSecUser().getUserName());
highMerchantStore.setSourceType(MerchantStoreSourceType.type1.getNumber());
if (highMerchantStore.getSourceType() == null) {
highMerchantStore.setSourceType(MerchantStoreSourceType.type1.getNumber());
}
highMerchantStoreService.insertMerchantStore(highMerchantStore);
return ResponseMsgUtil.success(highMerchantStore);
@ -250,11 +250,14 @@ public class HighMerchantStoreController {
store.setTelephone(highMerchantStore.getTelephone());
store.setAddress(highMerchantStore.getAddress());
store.setLatitude(highMerchantStore.getLatitude());
store.setExt3(highMerchantStore.getExt3());
store.setLongitude(highMerchantStore.getLongitude());
store.setDeviceSn(highMerchantStore.getDeviceSn());
store.setDeviceKey(highMerchantStore.getDeviceKey());
store.setDeviceName(highMerchantStore.getDeviceName());
if (highMerchantStore.getSourceType() != null) {
store.setSourceType(highMerchantStore.getSourceType());
}
store.setUpdateTime(new Date());
store.setOperatorId(userInfoModel.getSecUser().getId());
store.setOperatorName(userInfoModel.getSecUser().getUserName());
@ -383,5 +386,91 @@ public class HighMerchantStoreController {
}
}
@RequestMapping(value="/insertStoreOilCard",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "新增门店油卡")
public ResponseData insertStoreOilCard(@RequestBody HighStoreOilCard highStoreOilCard, HttpServletRequest request) {
try {
//发布人员
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (userInfoModel.getMerchant() == null) {
log.error("HighMerchantController -> insertMerchantStore() error!","该主角色没有权限");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, "");
}
if (highStoreOilCard.getStoreId() == null
|| StringUtils.isBlank(highStoreOilCard.getOilCardNo())
) {
log.error("HighMerchantStoreController -> insertMerchantStore() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 查询门店
HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(highStoreOilCard.getStoreId());
if (store == null) {
log.error("BsStudentController --> addStudent() error!", "未找到门店信息");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到门店信息");
}
BsCompany company = bsCompanyService.getCompanyById(store.getCompanyId());
if (company == null) {
log.error("HighMerchantStoreController -> insertMerchantStore() error!","未找到分公司");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, "");
}
highStoreOilCard.setType(1);
highStoreOilCard.setStatus(1);
highStoreOilCard.setCreateTime(new Date());
highStoreOilCard.setUpdateTime(new Date());
highStoreOilCard.setOpId(userInfoModel.getSecUser().getId());
highStoreOilCard.setOpName(userInfoModel.getSecUser().getUserName());
highMerchantStoreService.insertStoreOilCard(highStoreOilCard);
return ResponseMsgUtil.success(highStoreOilCard);
} catch (Exception e) {
log.error("HighMerchantStoreController -> editMerchantStore() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/deleteStoreOilCard", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "删除油卡")
public ResponseData deleteStoreOilCard(@RequestParam(name = "id", required = false) Long id) {
try {
HighStoreOilCard highStoreOilCard = highMerchantStoreService.findStoreOilCard(id);
if (highStoreOilCard == null) {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR, "未查到相关油卡");
}
highStoreOilCard.setUpdateTime(new Date());
highStoreOilCard.setStatus(0);
highMerchantStoreService.updateStoreOilCard(highStoreOilCard);
return ResponseMsgUtil.success("删除油卡");
} catch (Exception e) {
log.error("HighOrderController --> getBackendToken() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getStoreOilCardList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询油卡")
public ResponseData getStoreOilCardList(@RequestParam(name = "storeId", required = false) Long storeId) {
try {
return ResponseMsgUtil.success(highMerchantStoreService.getStoreOilCardList(storeId));
} catch (Exception e) {
log.error("HighOrderController --> getBackendToken() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

File diff suppressed because one or more lines are too long

@ -145,6 +145,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/outRechargePrice/*")
.excludePathPatterns("/userDiscount/*")
.excludePathPatterns("/highThirdParty/*")
.excludePathPatterns("/group/*")
;
}

@ -50,6 +50,9 @@ public class CommonController {
@Autowired
private RedisUtil redisUtil;
@Resource
private HighUserService highUserService;
@Resource
private BsIntegralRebateService bsIntegralRebateService;
@ -504,4 +507,25 @@ public class CommonController {
}
}
@RequestMapping(value = "/getLevelUserMsg", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取用户级别信息")
public ResponseData getLevelUserMsg(
@RequestParam(name = "userId", required = false) Long userId) {
try {
JSONObject object = new JSONObject();
object.put("userLeve" , highUserService.findUserLevel(userId));
object.put("price" , commonService.findSecConfigByType("LEVEL_PRICE").getCodeValue());
return ResponseMsgUtil.success(object);
} catch (Exception e) {
log.error("HighOrderController --> unionStagingPay() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -49,17 +49,16 @@ public class HighGasController {
@Resource
private HighOrderService highOrderService;
@Resource
private CommonService commonService;
private HighMerchantStoreService highMerchantStoreService;
@Resource
private HighTyAgentOilStationService tyAgentOilStationService;
private CommonService commonService;
@Resource
private HighTyAgentPriceService tyAgentPriceService;
@Resource
private HighGasOrderPushMapper highGasOrderPushMapper;
@Resource
private HighMerchantStoreService merchantStoreService;
@ -170,7 +169,7 @@ public class HighGasController {
}
}
} else if (MapUtils.getInteger(map, "source_type").equals(2)|| MapUtils.getInteger(map, "source_type").equals(6)) {
} else if (MapUtils.getInteger(map, "source_type").equals(2)) {
// 查询是否配置了【油站的】优惠比例
HighTyAgentPrice tyAgentPrice = tyAgentPriceService.getDetail(1, MapUtils.getLong(map, "id"), MapUtils.getString(map, "oil_no"));
if (tyAgentPrice != null) {
@ -287,7 +286,8 @@ public class HighGasController {
if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())) {
|| store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type7.getNumber())) {
Map<String, Object> param = new HashMap<>();
param.put("provinceName", null);
param.put("provinceCode", null);
@ -387,6 +387,10 @@ public class HighGasController {
oilPriceMapList.add(oilPriceMap);
}
param.put("oilPriceList", oilPriceMapList);
if (store.getSourceType().equals(MerchantStoreSourceType.type7.getNumber())) {
param.put("oilCardList", highMerchantStoreService.getStoreOilCardList(store.getId()));
param.put("img", store.getExt3());
}
return ResponseMsgUtil.success(param);
@ -495,40 +499,13 @@ public class HighGasController {
price.put("priceOfficial" , price.getString("priceGun"));
price.put("oilNo" , price.getString("youhao"));
price.put("oilType" , price.getString("oiltype"));
price.put("priceVip" , price.getString("priceVip"));
// 查询油站油品状态
HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), price.getString("youhao"));
if (oilNo != null && !oilNo.getStatus().equals(GasOilPriceStatusEnum.status1.getStatus())) {
continue;
}
// 查询是否配置了【油站的】优惠比例
HighTyAgentPrice tyAgentPrice = tyAgentPriceService.getDetail(1, store.getId(), price.getString("youhao"));
if (tyAgentPrice != null) {
// 优惠比例 / 100 = 最终优惠比例
BigDecimal priceRate = tyAgentPrice.getPriceRate().divide(new BigDecimal("100").setScale(2, BigDecimal.ROUND_DOWN));
// 油品国标价 * 最终优惠比例
price.put("priceVip", price.getBigDecimal("priceGun").multiply(priceRate).setScale(2, BigDecimal.ROUND_HALF_UP));
} else {
// 查询是否配置了【油品】优惠比例
HighGasDiscountOilPrice gasDiscountOilPrice = gasDiscountOilPriceService.getDetailByOilNo(price.getString("youhao"));
if (gasDiscountOilPrice != null) {
// 优惠比例 / 100 = 最终优惠比例
BigDecimal priceRate = gasDiscountOilPrice.getPriceRate().divide(new BigDecimal("100").setScale(2, BigDecimal.ROUND_DOWN));
// 油品国标价 * 最终优惠比例
price.put("priceVip", price.getBigDecimal("priceGun").multiply(priceRate).setScale(2, BigDecimal.ROUND_HALF_UP));
}
}
// 查询是否配置了【代理商油站】优惠比例
if (isTyAgent != null && isTyAgent == true) {
HighTyAgentPrice agentPrice = tyAgentPriceService.getDetail(2, store.getId(), price.getString("youhao"));
if (agentPrice != null) {
// 优惠比例 / 100 = 最终优惠比例
BigDecimal priceRate = agentPrice.getPriceRate().divide(new BigDecimal("100").setScale(2, BigDecimal.ROUND_DOWN));
// 油品国标价 * 最终优惠比例
price.put("priceVip", price.getBigDecimal("priceGun").multiply(priceRate).setScale(2, BigDecimal.ROUND_HALF_UP));
}
}
newOilPriceList.add(price);
}

@ -0,0 +1,149 @@
package com.cweb.controller.group;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.BsMsg;
import com.hai.group.GroupService;
import com.hai.model.HighUserModel;
import com.hai.model.ResponseData;
import com.hai.service.BsMsgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author sum1dream
*/
@Controller
@RequestMapping(value = "/group")
@Api(value = "团购")
public class GroupController {
Logger log = LoggerFactory.getLogger(GroupController.class);
@Resource
private GroupService groupService;
@RequestMapping(value="/getStoreList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "商户查询门店列表")
public ResponseData getStoreListByMer(
@RequestParam(value = "name" , required = false) String name,
@RequestParam(value = "childId" , required = false) Long childId,
@RequestParam(value = "parentId" , required = false) Long parentId,
@RequestParam(name = "longitude", required = false) String longitude,
@RequestParam(name = "latitude", required = false) String latitude
) {
try {
JSONObject map = new JSONObject();
map.put("name" , name);
map.put("childId" , childId);
map.put("parentId" , parentId);
map.put("longitude" , longitude);
map.put("latitude" , latitude);
JSONObject object = groupService.getStoreList(map);
if (object.getString("return_code").equals("000000")) {
return ResponseMsgUtil.success(object.getJSONArray("return_data"));
} else {
return ResponseMsgUtil.success(object.getString("return_msg"));
}
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getGroupContent",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询团购内容")
public ResponseData getGroupContent(@RequestParam(value = "groupId" , required = true) Long groupId) {
try {
JSONObject object = groupService.getGroupContent(groupId);
if (object.getString("return_code").equals("000000")) {
return ResponseMsgUtil.success(object.getJSONObject("return_data"));
} else {
return ResponseMsgUtil.success(object.getString("return_msg"));
}
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getStoreMsg",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询门店信息")
public ResponseData getStoreMsg(@RequestParam(value = "storeId" , required = true) Long storeId) {
try {
JSONObject object = groupService.getStoreMsg(storeId);
if (object.getString("return_code").equals("000000")) {
return ResponseMsgUtil.success(object.getJSONObject("return_data"));
} else {
return ResponseMsgUtil.success(object.getString("return_msg"));
}
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getBsStoreImgByList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询门店图片列表")
public ResponseData getBsStoreImgByList(
@RequestParam(value = "type" , required = false) Integer type,
@RequestParam(value = "storeId" , required = false) Long storeId) {
try {
JSONObject map = new JSONObject();
map.put("storeId" , storeId);
map.put("type" , type);
JSONObject object = groupService.getBsStoreImgByList(map);
if (object.getString("return_code").equals("000000")) {
return ResponseMsgUtil.success(object.getJSONArray("return_data"));
} else {
return ResponseMsgUtil.success(object.getString("return_msg"));
}
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -163,7 +163,11 @@ public class OrderPayController {
if (productType != null) {
orderTitle = productType.getName();
}
JSONObject objectGas = new JSONObject();
Integer payPlatformType = 1;
String payPlatformKey = null;
String payPlatformMerNo = null;
if (PlatformType.TYPE2.getNumber().equals(body.getInteger("platformType"))) {
weChatPayReqInfo.setSub_mch_id(WxOrderConfig.MCH_ID_1648729281);
@ -246,48 +250,79 @@ public class OrderPayController {
} else if (store.getSourceType().equals(MerchantStoreSourceType.type2.getNumber())) {
// 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type2, GasChannelPayPlatformType.type1);
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type2);
if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
}
payPlatformType = gasChannelConfig.getPayPlatformType();
payPlatformKey = gasChannelConfig.getPayPlatformMerKey();
payPlatformMerNo = gasChannelConfig.getPayPlatformMerNo();
weChatPayReqInfo.setSub_mch_id(gasChannelConfig.getPayPlatformMerNo());
profitSharing = gasChannelConfig.getProfitSharingStatus().equals(true) ? "Y" : "N";
} else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) {
// 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type3, GasChannelPayPlatformType.type1);
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type3);
if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
}
payPlatformType = gasChannelConfig.getPayPlatformType();
payPlatformMerNo = gasChannelConfig.getPayPlatformMerNo();
payPlatformKey = gasChannelConfig.getPayPlatformMerKey();
weChatPayReqInfo.setSub_mch_id(gasChannelConfig.getPayPlatformMerNo());
profitSharing = gasChannelConfig.getProfitSharingStatus().equals(true) ? "Y" : "N";
} else if (store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) {
// 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type4, GasChannelPayPlatformType.type1);
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type4);
if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
}
payPlatformType = gasChannelConfig.getPayPlatformType();
payPlatformMerNo = gasChannelConfig.getPayPlatformMerNo();
payPlatformKey = gasChannelConfig.getPayPlatformMerKey();
weChatPayReqInfo.setSub_mch_id(gasChannelConfig.getPayPlatformMerNo());
profitSharing = gasChannelConfig.getProfitSharingStatus().equals(true) ? "Y" : "N";
} else if (store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())) {
// 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type5, GasChannelPayPlatformType.type1);
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type5);
if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
}
payPlatformType = gasChannelConfig.getPayPlatformType();
payPlatformMerNo = gasChannelConfig.getPayPlatformMerNo();
payPlatformKey = gasChannelConfig.getPayPlatformMerKey();
weChatPayReqInfo.setSub_mch_id(gasChannelConfig.getPayPlatformMerNo());
profitSharing = gasChannelConfig.getProfitSharingStatus().equals(true) ? "Y" : "N";
} else if (store.getSourceType().equals(MerchantStoreSourceType.type6.getNumber())) {
// 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type2, GasChannelPayPlatformType.type1);
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type6);
if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
}
payPlatformType = gasChannelConfig.getPayPlatformType();
payPlatformMerNo = gasChannelConfig.getPayPlatformMerNo();
payPlatformKey = gasChannelConfig.getPayPlatformMerKey();
weChatPayReqInfo.setSub_mch_id(gasChannelConfig.getPayPlatformMerNo());
profitSharing = gasChannelConfig.getProfitSharingStatus().equals(true) ? "Y" : "N";
} else if (store.getSourceType().equals(MerchantStoreSourceType.type7.getNumber())) {
// 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type7);
if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
}
payPlatformType = gasChannelConfig.getPayPlatformType();
payPlatformMerNo = gasChannelConfig.getPayPlatformMerNo();
payPlatformKey = gasChannelConfig.getPayPlatformMerKey();
weChatPayReqInfo.setSub_mch_id(gasChannelConfig.getPayPlatformMerNo());
profitSharing = gasChannelConfig.getProfitSharingStatus().equals(true) ? "Y" : "N";
@ -306,6 +341,17 @@ public class OrderPayController {
} else if (order.getProductType().equals(OrderProductType.PRODUCT_TYPE12.getNumber())) {
weChatPayReqInfo.setSub_mch_id(WxOrderConfig.MCH_ID_1614670195);
} else if (order.getProductType().equals(OrderProductType.PRODUCT_TYPE15.getNumber())) {
// 查询支付配置
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(GasChannel.type7);
if (gasChannelConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置支付参数,请稍后重试!");
}
payPlatformType = gasChannelConfig.getPayPlatformType();
payPlatformMerNo = gasChannelConfig.getPayPlatformMerNo();
payPlatformKey = gasChannelConfig.getPayPlatformMerKey();
weChatPayReqInfo.setSub_mch_id(gasChannelConfig.getPayPlatformMerNo());
profitSharing = gasChannelConfig.getProfitSharingStatus().equals(true) ? "Y" : "N";
} else {
weChatPayReqInfo.setSub_mch_id(WxOrderConfig.MCH_ID_1609882817);
}
@ -327,8 +373,24 @@ public class OrderPayController {
weChatPayReqInfo.setTime_expire(DateUtil.date2String(DateUtil.addMinute(order.getCreateTime(), 10), "yyyyMMddHHmmss"));
SortedMap<Object, Object> sortedMap;
if (!order.getProductType().equals(OrderProductType.PRODUCT_TYPE6.getNumber())) {
if (payPlatformType == 2) {
objectGas.put("outTradeNo" , order.getOrderNo());
objectGas.put("transType" , "JSAPI");
objectGas.put("payMode" , "WECHAT");
objectGas.put("totalAmount" , order.getTotalPrice());
objectGas.put("profitSharing" , 0);
objectGas.put("notifyUrl" , SysConst.getSysConfig().getHuiPayNotify());
objectGas.put("subject" , orderTitle);
objectGas.put("userId" , body.getString("openId"));
sortedMap = huiConfig.preorder(objectGas , payPlatformKey , payPlatformMerNo);
order.setAccountMerchantNum(payPlatformMerNo);
order.setProfitSharingStatus(false);
order.setPayChannel(2);
orderService.updateOrderData(order);
} else {
//附加数据,区分订单类型
Map<String, String> payMap = new HashMap<>();
payMap.put("app_id", weChatPayReqInfo.getSub_appid());
@ -341,25 +403,6 @@ public class OrderPayController {
order.setProfitSharingStatus(profitSharing.equals("Y"));
order.setPayChannel(1);
orderService.updateOrderData(order);
} else {
JSONObject object = new JSONObject();
object.put("outTradeNo" , order.getOrderNo());
object.put("transType" , "JSAPI");
object.put("payMode" , "WECHAT");
object.put("totalAmount" , order.getPayPrice());
object.put("profitSharing" , 0);
object.put("notifyUrl" , SysConst.getSysConfig().getHuiPayNotify());
object.put("subject" , orderTitle);
object.put("userId" , body.getString("openId"));
sortedMap = huiConfig.preorder(object);
order.setAccountMerchantNum(HuiConfig.hlMerNo);
order.setProfitSharingStatus(false);
order.setPayChannel(2);
orderService.updateOrderData(order);
}

@ -1,6 +1,5 @@
package com.hai.common.utils;
import com.alibaba.fastjson.JSON;
import com.google.common.collect.Maps;
import com.hai.common.pay.util.sdk.WXPayConstants;
import com.hai.common.pay.util.sdk.WXPayXmlUtil;
@ -10,7 +9,6 @@ import com.thoughtworks.xstream.io.xml.XppDriver;
import net.sf.cglib.beans.BeanMap;
import org.apache.commons.lang3.StringUtils;
import org.springframework.util.DigestUtils;
import javax.crypto.Mac;
@ -619,4 +617,25 @@ public class WxUtils {
}
}
public static String generateSignKytc(Map<String , Object> map , String key) throws Exception {
Set<String> keySet = map.keySet();
String[] keyArray = keySet.toArray(new String[keySet.size()]);
Arrays.sort(keyArray);
StringBuilder sb = new StringBuilder();
for (String k : keyArray) {
if (k.equals(WXPayConstants.FIELD_SIGN) || k.equals("key")) {
continue;
}
if (map.get(k) != null) // 参数值为空,则不参与签名
{
sb.append(k).append("=").append(map.get(k)).append("&");
}
}
sb.append("key=").append(key);
return MD5(sb.toString().toUpperCase() , true);
}
}

@ -0,0 +1,39 @@
package com.hai.config;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.pay.util.sdk.WXPayConstants;
import com.hai.common.utils.HttpsUtils;
import com.hai.common.utils.WxUtils;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
@Component
public class KytcService {
private final static String reqUrl = "https://kykh.dctpay.com";
private final static String key = "ad/s-kfa*#s!dkfjhjh";
public static JSONObject getOrderPay(String orderNo , BigDecimal price , String cardNo) throws Exception {
JSONObject paramMap = new JSONObject();
paramMap.put("Amount" ,price);
paramMap.put("OrderNo" , orderNo);
paramMap.put("CardNo" , cardNo);
paramMap.put("sign", WxUtils.generateSignKytc(paramMap , key));
return HttpsUtils.doPost(reqUrl + "/api/hf/order-pay", paramMap);
}
public static JSONObject getOrderInfo(String orderNo) throws Exception {
JSONObject paramMap = new JSONObject();
paramMap.put("OrderNo" , orderNo);
paramMap.put("sign", WxUtils.generateSignKytc(paramMap , key));
return HttpsUtils.doPost(reqUrl + "/api/hf/order-info", paramMap);
}
}

@ -41,18 +41,20 @@ public interface HighGasChannelConfigMapper extends HighGasChannelConfigMapperEx
@Insert({
"insert into high_gas_channel_config (channel_id, channel_name, ",
"pay_platform_type, pay_platform_mer_name, ",
"pay_platform_mer_no, profit_sharing_status, ",
"profit_sharing_receivers_no, profit_sharing_ratio, ",
"profit_sharing_receivers_name, `status`, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"pay_platform_mer_no, pay_platform_mer_key, ",
"profit_sharing_status, profit_sharing_receivers_no, ",
"profit_sharing_ratio, profit_sharing_receivers_name, ",
"`status`, create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"values (#{channelId,jdbcType=INTEGER}, #{channelName,jdbcType=VARCHAR}, ",
"#{payPlatformType,jdbcType=INTEGER}, #{payPlatformMerName,jdbcType=VARCHAR}, ",
"#{payPlatformMerNo,jdbcType=VARCHAR}, #{profitSharingStatus,jdbcType=BIT}, ",
"#{profitSharingReceiversNo,jdbcType=VARCHAR}, #{profitSharingRatio,jdbcType=DECIMAL}, ",
"#{profitSharingReceiversName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"#{payPlatformMerNo,jdbcType=VARCHAR}, #{payPlatformMerKey,jdbcType=VARCHAR}, ",
"#{profitSharingStatus,jdbcType=BIT}, #{profitSharingReceiversNo,jdbcType=VARCHAR}, ",
"#{profitSharingRatio,jdbcType=DECIMAL}, #{profitSharingReceiversName,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(HighGasChannelConfig record);
@ -69,6 +71,7 @@ public interface HighGasChannelConfigMapper extends HighGasChannelConfigMapperEx
@Result(column="pay_platform_type", property="payPlatformType", jdbcType=JdbcType.INTEGER),
@Result(column="pay_platform_mer_name", property="payPlatformMerName", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_platform_mer_no", property="payPlatformMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_platform_mer_key", property="payPlatformMerKey", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT),
@Result(column="profit_sharing_receivers_no", property="profitSharingReceiversNo", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL),
@ -85,8 +88,9 @@ public interface HighGasChannelConfigMapper extends HighGasChannelConfigMapperEx
@Select({
"select",
"id, channel_id, channel_name, pay_platform_type, pay_platform_mer_name, pay_platform_mer_no, ",
"profit_sharing_status, profit_sharing_receivers_no, profit_sharing_ratio, profit_sharing_receivers_name, ",
"`status`, create_time, update_time, ext_1, ext_2, ext_3",
"pay_platform_mer_key, profit_sharing_status, profit_sharing_receivers_no, profit_sharing_ratio, ",
"profit_sharing_receivers_name, `status`, create_time, update_time, ext_1, ext_2, ",
"ext_3",
"from high_gas_channel_config",
"where id = #{id,jdbcType=BIGINT}"
})
@ -97,6 +101,7 @@ public interface HighGasChannelConfigMapper extends HighGasChannelConfigMapperEx
@Result(column="pay_platform_type", property="payPlatformType", jdbcType=JdbcType.INTEGER),
@Result(column="pay_platform_mer_name", property="payPlatformMerName", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_platform_mer_no", property="payPlatformMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_platform_mer_key", property="payPlatformMerKey", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT),
@Result(column="profit_sharing_receivers_no", property="profitSharingReceiversNo", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL),
@ -126,6 +131,7 @@ public interface HighGasChannelConfigMapper extends HighGasChannelConfigMapperEx
"pay_platform_type = #{payPlatformType,jdbcType=INTEGER},",
"pay_platform_mer_name = #{payPlatformMerName,jdbcType=VARCHAR},",
"pay_platform_mer_no = #{payPlatformMerNo,jdbcType=VARCHAR},",
"pay_platform_mer_key = #{payPlatformMerKey,jdbcType=VARCHAR},",
"profit_sharing_status = #{profitSharingStatus,jdbcType=BIT},",
"profit_sharing_receivers_no = #{profitSharingReceiversNo,jdbcType=VARCHAR},",
"profit_sharing_ratio = #{profitSharingRatio,jdbcType=DECIMAL},",

@ -48,6 +48,10 @@ public class HighGasChannelConfigSqlProvider {
sql.VALUES("pay_platform_mer_no", "#{payPlatformMerNo,jdbcType=VARCHAR}");
}
if (record.getPayPlatformMerKey() != null) {
sql.VALUES("pay_platform_mer_key", "#{payPlatformMerKey,jdbcType=VARCHAR}");
}
if (record.getProfitSharingStatus() != null) {
sql.VALUES("profit_sharing_status", "#{profitSharingStatus,jdbcType=BIT}");
}
@ -103,6 +107,7 @@ public class HighGasChannelConfigSqlProvider {
sql.SELECT("pay_platform_type");
sql.SELECT("pay_platform_mer_name");
sql.SELECT("pay_platform_mer_no");
sql.SELECT("pay_platform_mer_key");
sql.SELECT("profit_sharing_status");
sql.SELECT("profit_sharing_receivers_no");
sql.SELECT("profit_sharing_ratio");
@ -154,6 +159,10 @@ public class HighGasChannelConfigSqlProvider {
sql.SET("pay_platform_mer_no = #{record.payPlatformMerNo,jdbcType=VARCHAR}");
}
if (record.getPayPlatformMerKey() != null) {
sql.SET("pay_platform_mer_key = #{record.payPlatformMerKey,jdbcType=VARCHAR}");
}
if (record.getProfitSharingStatus() != null) {
sql.SET("profit_sharing_status = #{record.profitSharingStatus,jdbcType=BIT}");
}
@ -208,6 +217,7 @@ public class HighGasChannelConfigSqlProvider {
sql.SET("pay_platform_type = #{record.payPlatformType,jdbcType=INTEGER}");
sql.SET("pay_platform_mer_name = #{record.payPlatformMerName,jdbcType=VARCHAR}");
sql.SET("pay_platform_mer_no = #{record.payPlatformMerNo,jdbcType=VARCHAR}");
sql.SET("pay_platform_mer_key = #{record.payPlatformMerKey,jdbcType=VARCHAR}");
sql.SET("profit_sharing_status = #{record.profitSharingStatus,jdbcType=BIT}");
sql.SET("profit_sharing_receivers_no = #{record.profitSharingReceiversNo,jdbcType=VARCHAR}");
sql.SET("profit_sharing_ratio = #{record.profitSharingRatio,jdbcType=DECIMAL}");
@ -248,6 +258,10 @@ public class HighGasChannelConfigSqlProvider {
sql.SET("pay_platform_mer_no = #{payPlatformMerNo,jdbcType=VARCHAR}");
}
if (record.getPayPlatformMerKey() != null) {
sql.SET("pay_platform_mer_key = #{payPlatformMerKey,jdbcType=VARCHAR}");
}
if (record.getProfitSharingStatus() != null) {
sql.SET("profit_sharing_status = #{profitSharingStatus,jdbcType=BIT}");
}

@ -0,0 +1,128 @@
package com.hai.dao;
import com.hai.entity.HighOilCardOrder;
import com.hai.entity.HighOilCardOrderExample;
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 HighOilCardOrderMapper extends HighOilCardOrderMapperExt {
@SelectProvider(type=HighOilCardOrderSqlProvider.class, method="countByExample")
long countByExample(HighOilCardOrderExample example);
@DeleteProvider(type=HighOilCardOrderSqlProvider.class, method="deleteByExample")
int deleteByExample(HighOilCardOrderExample example);
@Delete({
"delete from high_oil_card_order",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_oil_card_order (card_no, price, ",
"order_no, third_order_no, ",
"create_time, update_time, ",
"`status`, op_id, op_name, ",
"ext_1, ext_2, ext_3)",
"values (#{cardNo,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, ",
"#{orderNo,jdbcType=VARCHAR}, #{thirdOrderNo,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighOilCardOrder record);
@InsertProvider(type=HighOilCardOrderSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighOilCardOrder record);
@SelectProvider(type=HighOilCardOrderSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="third_order_no", property="thirdOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", 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<HighOilCardOrder> selectByExample(HighOilCardOrderExample example);
@Select({
"select",
"id, card_no, price, order_no, third_order_no, create_time, update_time, `status`, ",
"op_id, op_name, ext_1, ext_2, ext_3",
"from high_oil_card_order",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="third_order_no", property="thirdOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", 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)
})
HighOilCardOrder selectByPrimaryKey(Long id);
@UpdateProvider(type=HighOilCardOrderSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighOilCardOrder record, @Param("example") HighOilCardOrderExample example);
@UpdateProvider(type=HighOilCardOrderSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighOilCardOrder record, @Param("example") HighOilCardOrderExample example);
@UpdateProvider(type=HighOilCardOrderSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighOilCardOrder record);
@Update({
"update high_oil_card_order",
"set card_no = #{cardNo,jdbcType=VARCHAR},",
"price = #{price,jdbcType=DECIMAL},",
"order_no = #{orderNo,jdbcType=VARCHAR},",
"third_order_no = #{thirdOrderNo,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",
"op_id = #{opId,jdbcType=BIGINT},",
"op_name = #{opName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighOilCardOrder record);
}

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

@ -0,0 +1,346 @@
package com.hai.dao;
import com.hai.entity.HighOilCardOrder;
import com.hai.entity.HighOilCardOrderExample.Criteria;
import com.hai.entity.HighOilCardOrderExample.Criterion;
import com.hai.entity.HighOilCardOrderExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighOilCardOrderSqlProvider {
public String countByExample(HighOilCardOrderExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_oil_card_order");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighOilCardOrderExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_oil_card_order");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighOilCardOrder record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_oil_card_order");
if (record.getCardNo() != null) {
sql.VALUES("card_no", "#{cardNo,jdbcType=VARCHAR}");
}
if (record.getPrice() != null) {
sql.VALUES("price", "#{price,jdbcType=DECIMAL}");
}
if (record.getOrderNo() != null) {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
}
if (record.getThirdOrderNo() != null) {
sql.VALUES("third_order_no", "#{thirdOrderNo,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.VALUES("op_name", "#{opName,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(HighOilCardOrderExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("card_no");
sql.SELECT("price");
sql.SELECT("order_no");
sql.SELECT("third_order_no");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("`status`");
sql.SELECT("op_id");
sql.SELECT("op_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_oil_card_order");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
HighOilCardOrder record = (HighOilCardOrder) parameter.get("record");
HighOilCardOrderExample example = (HighOilCardOrderExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_oil_card_order");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getCardNo() != null) {
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}");
}
if (record.getPrice() != null) {
sql.SET("price = #{record.price,jdbcType=DECIMAL}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
}
if (record.getThirdOrderNo() != null) {
sql.SET("third_order_no = #{record.thirdOrderNo,jdbcType=VARCHAR}");
}
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.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{record.opName,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_oil_card_order");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}");
sql.SET("price = #{record.price,jdbcType=DECIMAL}");
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
sql.SET("third_order_no = #{record.thirdOrderNo,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
sql.SET("op_name = #{record.opName,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}");
HighOilCardOrderExample example = (HighOilCardOrderExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighOilCardOrder record) {
SQL sql = new SQL();
sql.UPDATE("high_oil_card_order");
if (record.getCardNo() != null) {
sql.SET("card_no = #{cardNo,jdbcType=VARCHAR}");
}
if (record.getPrice() != null) {
sql.SET("price = #{price,jdbcType=DECIMAL}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
}
if (record.getThirdOrderNo() != null) {
sql.SET("third_order_no = #{thirdOrderNo,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{opName,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, HighOilCardOrderExample 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,125 @@
package com.hai.dao;
import com.hai.entity.HighStoreOilCard;
import com.hai.entity.HighStoreOilCardExample;
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 HighStoreOilCardMapper extends HighStoreOilCardMapperExt {
@SelectProvider(type=HighStoreOilCardSqlProvider.class, method="countByExample")
long countByExample(HighStoreOilCardExample example);
@DeleteProvider(type=HighStoreOilCardSqlProvider.class, method="deleteByExample")
int deleteByExample(HighStoreOilCardExample example);
@Delete({
"delete from high_store_oil_card",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_store_oil_card (store_id, `type`, ",
"oil_card_no, create_time, ",
"update_time, `status`, ",
"op_id, op_name, ext_1, ",
"ext_2, ext_3)",
"values (#{storeId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, ",
"#{oilCardNo,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
"#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighStoreOilCard record);
@InsertProvider(type=HighStoreOilCardSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighStoreOilCard record);
@SelectProvider(type=HighStoreOilCardSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="oil_card_no", property="oilCardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", 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<HighStoreOilCard> selectByExample(HighStoreOilCardExample example);
@Select({
"select",
"id, store_id, `type`, oil_card_no, create_time, update_time, `status`, op_id, ",
"op_name, ext_1, ext_2, ext_3",
"from high_store_oil_card",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="oil_card_no", property="oilCardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", 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)
})
HighStoreOilCard selectByPrimaryKey(Long id);
@UpdateProvider(type=HighStoreOilCardSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighStoreOilCard record, @Param("example") HighStoreOilCardExample example);
@UpdateProvider(type=HighStoreOilCardSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighStoreOilCard record, @Param("example") HighStoreOilCardExample example);
@UpdateProvider(type=HighStoreOilCardSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighStoreOilCard record);
@Update({
"update high_store_oil_card",
"set store_id = #{storeId,jdbcType=BIGINT},",
"`type` = #{type,jdbcType=INTEGER},",
"oil_card_no = #{oilCardNo,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",
"op_id = #{opId,jdbcType=BIGINT},",
"op_name = #{opName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighStoreOilCard record);
}

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

@ -0,0 +1,332 @@
package com.hai.dao;
import com.hai.entity.HighStoreOilCard;
import com.hai.entity.HighStoreOilCardExample.Criteria;
import com.hai.entity.HighStoreOilCardExample.Criterion;
import com.hai.entity.HighStoreOilCardExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighStoreOilCardSqlProvider {
public String countByExample(HighStoreOilCardExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_store_oil_card");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighStoreOilCardExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_store_oil_card");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighStoreOilCard record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_store_oil_card");
if (record.getStoreId() != null) {
sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}");
}
if (record.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
if (record.getOilCardNo() != null) {
sql.VALUES("oil_card_no", "#{oilCardNo,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.VALUES("op_name", "#{opName,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(HighStoreOilCardExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("store_id");
sql.SELECT("`type`");
sql.SELECT("oil_card_no");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("`status`");
sql.SELECT("op_id");
sql.SELECT("op_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_store_oil_card");
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) {
HighStoreOilCard record = (HighStoreOilCard) parameter.get("record");
HighStoreOilCardExample example = (HighStoreOilCardExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_store_oil_card");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getStoreId() != null) {
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}");
}
if (record.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
if (record.getOilCardNo() != null) {
sql.SET("oil_card_no = #{record.oilCardNo,jdbcType=VARCHAR}");
}
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.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{record.opName,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_store_oil_card");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("oil_card_no = #{record.oilCardNo,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
sql.SET("op_name = #{record.opName,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}");
HighStoreOilCardExample example = (HighStoreOilCardExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighStoreOilCard record) {
SQL sql = new SQL();
sql.UPDATE("high_store_oil_card");
if (record.getStoreId() != null) {
sql.SET("store_id = #{storeId,jdbcType=BIGINT}");
}
if (record.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
if (record.getOilCardNo() != null) {
sql.SET("oil_card_no = #{oilCardNo,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{opName,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, HighStoreOilCardExample 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,120 @@
package com.hai.dao;
import com.hai.entity.HighUserLevel;
import com.hai.entity.HighUserLevelExample;
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 HighUserLevelMapper extends HighUserLevelMapperExt {
@SelectProvider(type=HighUserLevelSqlProvider.class, method="countByExample")
long countByExample(HighUserLevelExample example);
@DeleteProvider(type=HighUserLevelSqlProvider.class, method="deleteByExample")
int deleteByExample(HighUserLevelExample example);
@Delete({
"delete from high_user_level",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_user_level (`level`, user_id, ",
"create_time, update_time, ",
"`status`, op_id, op_name, ",
"ext_1, ext_2, ext_3)",
"values (#{level,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighUserLevel record);
@InsertProvider(type=HighUserLevelSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighUserLevel record);
@SelectProvider(type=HighUserLevelSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="level", property="level", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", 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<HighUserLevel> selectByExample(HighUserLevelExample example);
@Select({
"select",
"id, `level`, user_id, create_time, update_time, `status`, op_id, op_name, ext_1, ",
"ext_2, ext_3",
"from high_user_level",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="level", property="level", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", 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)
})
HighUserLevel selectByPrimaryKey(Long id);
@UpdateProvider(type=HighUserLevelSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighUserLevel record, @Param("example") HighUserLevelExample example);
@UpdateProvider(type=HighUserLevelSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighUserLevel record, @Param("example") HighUserLevelExample example);
@UpdateProvider(type=HighUserLevelSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighUserLevel record);
@Update({
"update high_user_level",
"set `level` = #{level,jdbcType=VARCHAR},",
"user_id = #{userId,jdbcType=BIGINT},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",
"op_id = #{opId,jdbcType=BIGINT},",
"op_name = #{opName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighUserLevel record);
}

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

@ -0,0 +1,318 @@
package com.hai.dao;
import com.hai.entity.HighUserLevel;
import com.hai.entity.HighUserLevelExample.Criteria;
import com.hai.entity.HighUserLevelExample.Criterion;
import com.hai.entity.HighUserLevelExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighUserLevelSqlProvider {
public String countByExample(HighUserLevelExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_user_level");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighUserLevelExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_user_level");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighUserLevel record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_user_level");
if (record.getLevel() != null) {
sql.VALUES("`level`", "#{level,jdbcType=VARCHAR}");
}
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.VALUES("op_name", "#{opName,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(HighUserLevelExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("`level`");
sql.SELECT("user_id");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("`status`");
sql.SELECT("op_id");
sql.SELECT("op_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_user_level");
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) {
HighUserLevel record = (HighUserLevel) parameter.get("record");
HighUserLevelExample example = (HighUserLevelExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_user_level");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getLevel() != null) {
sql.SET("`level` = #{record.level,jdbcType=VARCHAR}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
}
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.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{record.opName,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_user_level");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("`level` = #{record.level,jdbcType=VARCHAR}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
sql.SET("op_name = #{record.opName,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}");
HighUserLevelExample example = (HighUserLevelExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighUserLevel record) {
SQL sql = new SQL();
sql.UPDATE("high_user_level");
if (record.getLevel() != null) {
sql.SET("`level` = #{level,jdbcType=VARCHAR}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{opName,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, HighUserLevelExample 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());
}
}
}

@ -20,7 +20,7 @@ public class HighGasChannelConfig implements Serializable {
private Long id;
/**
* 渠道id 1自建站 2团油 3加好油 4金猪加油 6:点点网络
* 渠道id 1自建站 2团油 3加好油 4金猪加油
*/
private Integer channelId;
@ -30,7 +30,7 @@ public class HighGasChannelConfig implements Serializable {
private String channelName;
/**
* 平台类型 1微信
* 平台类型 1微信 2: 惠支付
*/
private Integer payPlatformType;
@ -44,6 +44,11 @@ public class HighGasChannelConfig implements Serializable {
*/
private String payPlatformMerNo;
/**
* 商户key
*/
private String payPlatformMerKey;
/**
* 是否分账
*/
@ -135,6 +140,14 @@ public class HighGasChannelConfig implements Serializable {
this.payPlatformMerNo = payPlatformMerNo;
}
public String getPayPlatformMerKey() {
return payPlatformMerKey;
}
public void setPayPlatformMerKey(String payPlatformMerKey) {
this.payPlatformMerKey = payPlatformMerKey;
}
public Boolean getProfitSharingStatus() {
return profitSharingStatus;
}
@ -233,6 +246,7 @@ public class HighGasChannelConfig implements Serializable {
&& (this.getPayPlatformType() == null ? other.getPayPlatformType() == null : this.getPayPlatformType().equals(other.getPayPlatformType()))
&& (this.getPayPlatformMerName() == null ? other.getPayPlatformMerName() == null : this.getPayPlatformMerName().equals(other.getPayPlatformMerName()))
&& (this.getPayPlatformMerNo() == null ? other.getPayPlatformMerNo() == null : this.getPayPlatformMerNo().equals(other.getPayPlatformMerNo()))
&& (this.getPayPlatformMerKey() == null ? other.getPayPlatformMerKey() == null : this.getPayPlatformMerKey().equals(other.getPayPlatformMerKey()))
&& (this.getProfitSharingStatus() == null ? other.getProfitSharingStatus() == null : this.getProfitSharingStatus().equals(other.getProfitSharingStatus()))
&& (this.getProfitSharingReceiversNo() == null ? other.getProfitSharingReceiversNo() == null : this.getProfitSharingReceiversNo().equals(other.getProfitSharingReceiversNo()))
&& (this.getProfitSharingRatio() == null ? other.getProfitSharingRatio() == null : this.getProfitSharingRatio().equals(other.getProfitSharingRatio()))
@ -255,6 +269,7 @@ public class HighGasChannelConfig implements Serializable {
result = prime * result + ((getPayPlatformType() == null) ? 0 : getPayPlatformType().hashCode());
result = prime * result + ((getPayPlatformMerName() == null) ? 0 : getPayPlatformMerName().hashCode());
result = prime * result + ((getPayPlatformMerNo() == null) ? 0 : getPayPlatformMerNo().hashCode());
result = prime * result + ((getPayPlatformMerKey() == null) ? 0 : getPayPlatformMerKey().hashCode());
result = prime * result + ((getProfitSharingStatus() == null) ? 0 : getProfitSharingStatus().hashCode());
result = prime * result + ((getProfitSharingReceiversNo() == null) ? 0 : getProfitSharingReceiversNo().hashCode());
result = prime * result + ((getProfitSharingRatio() == null) ? 0 : getProfitSharingRatio().hashCode());
@ -280,6 +295,7 @@ public class HighGasChannelConfig implements Serializable {
sb.append(", payPlatformType=").append(payPlatformType);
sb.append(", payPlatformMerName=").append(payPlatformMerName);
sb.append(", payPlatformMerNo=").append(payPlatformMerNo);
sb.append(", payPlatformMerKey=").append(payPlatformMerKey);
sb.append(", profitSharingStatus=").append(profitSharingStatus);
sb.append(", profitSharingReceiversNo=").append(profitSharingReceiversNo);
sb.append(", profitSharingRatio=").append(profitSharingRatio);

@ -516,6 +516,76 @@ public class HighGasChannelConfigExample {
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyIsNull() {
addCriterion("pay_platform_mer_key is null");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyIsNotNull() {
addCriterion("pay_platform_mer_key is not null");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyEqualTo(String value) {
addCriterion("pay_platform_mer_key =", value, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyNotEqualTo(String value) {
addCriterion("pay_platform_mer_key <>", value, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyGreaterThan(String value) {
addCriterion("pay_platform_mer_key >", value, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyGreaterThanOrEqualTo(String value) {
addCriterion("pay_platform_mer_key >=", value, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyLessThan(String value) {
addCriterion("pay_platform_mer_key <", value, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyLessThanOrEqualTo(String value) {
addCriterion("pay_platform_mer_key <=", value, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyLike(String value) {
addCriterion("pay_platform_mer_key like", value, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyNotLike(String value) {
addCriterion("pay_platform_mer_key not like", value, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyIn(List<String> values) {
addCriterion("pay_platform_mer_key in", values, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyNotIn(List<String> values) {
addCriterion("pay_platform_mer_key not in", values, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyBetween(String value1, String value2) {
addCriterion("pay_platform_mer_key between", value1, value2, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andPayPlatformMerKeyNotBetween(String value1, String value2) {
addCriterion("pay_platform_mer_key not between", value1, value2, "payPlatformMerKey");
return (Criteria) this;
}
public Criteria andProfitSharingStatusIsNull() {
addCriterion("profit_sharing_status is null");
return (Criteria) this;

@ -0,0 +1,258 @@
package com.hai.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* high_oil_card_order
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighOilCardOrder implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 卡号
*/
private String cardNo;
/**
* 金额
*/
private BigDecimal price;
/**
* 订单号
*/
private String orderNo;
/**
* 第三方订单号
*/
private String thirdOrderNo;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 订单状态1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消
*/
private Integer status;
/**
* 操作人
*/
private Long opId;
/**
* 操作人名称
*/
private String opName;
/**
* ext_1
*/
private String ext1;
/**
* ext_2
*/
private String ext2;
/**
* ext_3
*/
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getThirdOrderNo() {
return thirdOrderNo;
}
public void setThirdOrderNo(String thirdOrderNo) {
this.thirdOrderNo = thirdOrderNo;
}
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 Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getOpId() {
return opId;
}
public void setOpId(Long opId) {
this.opId = opId;
}
public String getOpName() {
return opName;
}
public void setOpName(String opName) {
this.opName = opName;
}
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;
}
HighOilCardOrder other = (HighOilCardOrder) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCardNo() == null ? other.getCardNo() == null : this.getCardNo().equals(other.getCardNo()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
&& (this.getThirdOrderNo() == null ? other.getThirdOrderNo() == null : this.getThirdOrderNo().equals(other.getThirdOrderNo()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId()))
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName()))
&& (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 + ((getCardNo() == null) ? 0 : getCardNo().hashCode());
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
result = prime * result + ((getThirdOrderNo() == null) ? 0 : getThirdOrderNo().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode());
result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", cardNo=").append(cardNo);
sb.append(", price=").append(price);
sb.append(", orderNo=").append(orderNo);
sb.append(", thirdOrderNo=").append(thirdOrderNo);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", status=").append(status);
sb.append(", opId=").append(opId);
sb.append(", opName=").append(opName);
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,241 @@
package com.hai.entity;
import java.io.Serializable;
import java.util.Date;
/**
* high_store_oil_card
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighStoreOilCard implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 门店Id
*/
private Long storeId;
/**
* 油卡类型1实体油卡
*/
private Integer type;
/**
* 油卡号
*/
private String oilCardNo;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 状态
*/
private Integer status;
/**
* 操作人
*/
private Long opId;
/**
* 操作人名称
*/
private String opName;
/**
* ext_1
*/
private String ext1;
/**
* ext_2
*/
private String ext2;
/**
* ext_3
*/
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getStoreId() {
return storeId;
}
public void setStoreId(Long storeId) {
this.storeId = storeId;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getOilCardNo() {
return oilCardNo;
}
public void setOilCardNo(String oilCardNo) {
this.oilCardNo = oilCardNo;
}
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 Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getOpId() {
return opId;
}
public void setOpId(Long opId) {
this.opId = opId;
}
public String getOpName() {
return opName;
}
public void setOpName(String opName) {
this.opName = opName;
}
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;
}
HighStoreOilCard other = (HighStoreOilCard) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getOilCardNo() == null ? other.getOilCardNo() == null : this.getOilCardNo().equals(other.getOilCardNo()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId()))
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName()))
&& (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 + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getOilCardNo() == null) ? 0 : getOilCardNo().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode());
result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", storeId=").append(storeId);
sb.append(", type=").append(type);
sb.append(", oilCardNo=").append(oilCardNo);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", status=").append(status);
sb.append(", opId=").append(opId);
sb.append(", opName=").append(opName);
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,993 @@
package com.hai.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HighStoreOilCardExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public HighStoreOilCardExample() {
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 andStoreIdIsNull() {
addCriterion("store_id is null");
return (Criteria) this;
}
public Criteria andStoreIdIsNotNull() {
addCriterion("store_id is not null");
return (Criteria) this;
}
public Criteria andStoreIdEqualTo(Long value) {
addCriterion("store_id =", value, "storeId");
return (Criteria) this;
}
public Criteria andStoreIdNotEqualTo(Long value) {
addCriterion("store_id <>", value, "storeId");
return (Criteria) this;
}
public Criteria andStoreIdGreaterThan(Long value) {
addCriterion("store_id >", value, "storeId");
return (Criteria) this;
}
public Criteria andStoreIdGreaterThanOrEqualTo(Long value) {
addCriterion("store_id >=", value, "storeId");
return (Criteria) this;
}
public Criteria andStoreIdLessThan(Long value) {
addCriterion("store_id <", value, "storeId");
return (Criteria) this;
}
public Criteria andStoreIdLessThanOrEqualTo(Long value) {
addCriterion("store_id <=", value, "storeId");
return (Criteria) this;
}
public Criteria andStoreIdIn(List<Long> values) {
addCriterion("store_id in", values, "storeId");
return (Criteria) this;
}
public Criteria andStoreIdNotIn(List<Long> values) {
addCriterion("store_id not in", values, "storeId");
return (Criteria) this;
}
public Criteria andStoreIdBetween(Long value1, Long value2) {
addCriterion("store_id between", value1, value2, "storeId");
return (Criteria) this;
}
public Criteria andStoreIdNotBetween(Long value1, Long value2) {
addCriterion("store_id not between", value1, value2, "storeId");
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 andOilCardNoIsNull() {
addCriterion("oil_card_no is null");
return (Criteria) this;
}
public Criteria andOilCardNoIsNotNull() {
addCriterion("oil_card_no is not null");
return (Criteria) this;
}
public Criteria andOilCardNoEqualTo(String value) {
addCriterion("oil_card_no =", value, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoNotEqualTo(String value) {
addCriterion("oil_card_no <>", value, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoGreaterThan(String value) {
addCriterion("oil_card_no >", value, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoGreaterThanOrEqualTo(String value) {
addCriterion("oil_card_no >=", value, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoLessThan(String value) {
addCriterion("oil_card_no <", value, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoLessThanOrEqualTo(String value) {
addCriterion("oil_card_no <=", value, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoLike(String value) {
addCriterion("oil_card_no like", value, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoNotLike(String value) {
addCriterion("oil_card_no not like", value, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoIn(List<String> values) {
addCriterion("oil_card_no in", values, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoNotIn(List<String> values) {
addCriterion("oil_card_no not in", values, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoBetween(String value1, String value2) {
addCriterion("oil_card_no between", value1, value2, "oilCardNo");
return (Criteria) this;
}
public Criteria andOilCardNoNotBetween(String value1, String value2) {
addCriterion("oil_card_no not between", value1, value2, "oilCardNo");
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 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 andOpIdIsNull() {
addCriterion("op_id is null");
return (Criteria) this;
}
public Criteria andOpIdIsNotNull() {
addCriterion("op_id is not null");
return (Criteria) this;
}
public Criteria andOpIdEqualTo(Long value) {
addCriterion("op_id =", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdNotEqualTo(Long value) {
addCriterion("op_id <>", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdGreaterThan(Long value) {
addCriterion("op_id >", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdGreaterThanOrEqualTo(Long value) {
addCriterion("op_id >=", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdLessThan(Long value) {
addCriterion("op_id <", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdLessThanOrEqualTo(Long value) {
addCriterion("op_id <=", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdIn(List<Long> values) {
addCriterion("op_id in", values, "opId");
return (Criteria) this;
}
public Criteria andOpIdNotIn(List<Long> values) {
addCriterion("op_id not in", values, "opId");
return (Criteria) this;
}
public Criteria andOpIdBetween(Long value1, Long value2) {
addCriterion("op_id between", value1, value2, "opId");
return (Criteria) this;
}
public Criteria andOpIdNotBetween(Long value1, Long value2) {
addCriterion("op_id not between", value1, value2, "opId");
return (Criteria) this;
}
public Criteria andOpNameIsNull() {
addCriterion("op_name is null");
return (Criteria) this;
}
public Criteria andOpNameIsNotNull() {
addCriterion("op_name is not null");
return (Criteria) this;
}
public Criteria andOpNameEqualTo(String value) {
addCriterion("op_name =", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameNotEqualTo(String value) {
addCriterion("op_name <>", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameGreaterThan(String value) {
addCriterion("op_name >", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameGreaterThanOrEqualTo(String value) {
addCriterion("op_name >=", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameLessThan(String value) {
addCriterion("op_name <", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameLessThanOrEqualTo(String value) {
addCriterion("op_name <=", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameLike(String value) {
addCriterion("op_name like", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameNotLike(String value) {
addCriterion("op_name not like", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameIn(List<String> values) {
addCriterion("op_name in", values, "opName");
return (Criteria) this;
}
public Criteria andOpNameNotIn(List<String> values) {
addCriterion("op_name not in", values, "opName");
return (Criteria) this;
}
public Criteria andOpNameBetween(String value1, String value2) {
addCriterion("op_name between", value1, value2, "opName");
return (Criteria) this;
}
public Criteria andOpNameNotBetween(String value1, String value2) {
addCriterion("op_name not between", value1, value2, "opName");
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,225 @@
package com.hai.entity;
import java.io.Serializable;
import java.util.Date;
/**
* high_user_level
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighUserLevel implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 1缴费会员
*/
private String level;
/**
* 用户id
*/
private Long userId;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 状态
*/
private Integer status;
/**
* 操作人
*/
private Long opId;
/**
* 操作人名称
*/
private String opName;
/**
* ext_1
*/
private String ext1;
/**
* ext_2
*/
private String ext2;
/**
* ext_3
*/
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getLevel() {
return level;
}
public void setLevel(String level) {
this.level = level;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
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 Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getOpId() {
return opId;
}
public void setOpId(Long opId) {
this.opId = opId;
}
public String getOpName() {
return opName;
}
public void setOpName(String opName) {
this.opName = opName;
}
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;
}
HighUserLevel other = (HighUserLevel) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId()))
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName()))
&& (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 + ((getLevel() == null) ? 0 : getLevel().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode());
result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", level=").append(level);
sb.append(", userId=").append(userId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", status=").append(status);
sb.append(", opId=").append(opId);
sb.append(", opName=").append(opName);
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,933 @@
package com.hai.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HighUserLevelExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public HighUserLevelExample() {
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 andLevelIsNull() {
addCriterion("`level` is null");
return (Criteria) this;
}
public Criteria andLevelIsNotNull() {
addCriterion("`level` is not null");
return (Criteria) this;
}
public Criteria andLevelEqualTo(String value) {
addCriterion("`level` =", value, "level");
return (Criteria) this;
}
public Criteria andLevelNotEqualTo(String value) {
addCriterion("`level` <>", value, "level");
return (Criteria) this;
}
public Criteria andLevelGreaterThan(String value) {
addCriterion("`level` >", value, "level");
return (Criteria) this;
}
public Criteria andLevelGreaterThanOrEqualTo(String value) {
addCriterion("`level` >=", value, "level");
return (Criteria) this;
}
public Criteria andLevelLessThan(String value) {
addCriterion("`level` <", value, "level");
return (Criteria) this;
}
public Criteria andLevelLessThanOrEqualTo(String value) {
addCriterion("`level` <=", value, "level");
return (Criteria) this;
}
public Criteria andLevelLike(String value) {
addCriterion("`level` like", value, "level");
return (Criteria) this;
}
public Criteria andLevelNotLike(String value) {
addCriterion("`level` not like", value, "level");
return (Criteria) this;
}
public Criteria andLevelIn(List<String> values) {
addCriterion("`level` in", values, "level");
return (Criteria) this;
}
public Criteria andLevelNotIn(List<String> values) {
addCriterion("`level` not in", values, "level");
return (Criteria) this;
}
public Criteria andLevelBetween(String value1, String value2) {
addCriterion("`level` between", value1, value2, "level");
return (Criteria) this;
}
public Criteria andLevelNotBetween(String value1, String value2) {
addCriterion("`level` not between", value1, value2, "level");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
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 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 andOpIdIsNull() {
addCriterion("op_id is null");
return (Criteria) this;
}
public Criteria andOpIdIsNotNull() {
addCriterion("op_id is not null");
return (Criteria) this;
}
public Criteria andOpIdEqualTo(Long value) {
addCriterion("op_id =", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdNotEqualTo(Long value) {
addCriterion("op_id <>", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdGreaterThan(Long value) {
addCriterion("op_id >", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdGreaterThanOrEqualTo(Long value) {
addCriterion("op_id >=", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdLessThan(Long value) {
addCriterion("op_id <", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdLessThanOrEqualTo(Long value) {
addCriterion("op_id <=", value, "opId");
return (Criteria) this;
}
public Criteria andOpIdIn(List<Long> values) {
addCriterion("op_id in", values, "opId");
return (Criteria) this;
}
public Criteria andOpIdNotIn(List<Long> values) {
addCriterion("op_id not in", values, "opId");
return (Criteria) this;
}
public Criteria andOpIdBetween(Long value1, Long value2) {
addCriterion("op_id between", value1, value2, "opId");
return (Criteria) this;
}
public Criteria andOpIdNotBetween(Long value1, Long value2) {
addCriterion("op_id not between", value1, value2, "opId");
return (Criteria) this;
}
public Criteria andOpNameIsNull() {
addCriterion("op_name is null");
return (Criteria) this;
}
public Criteria andOpNameIsNotNull() {
addCriterion("op_name is not null");
return (Criteria) this;
}
public Criteria andOpNameEqualTo(String value) {
addCriterion("op_name =", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameNotEqualTo(String value) {
addCriterion("op_name <>", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameGreaterThan(String value) {
addCriterion("op_name >", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameGreaterThanOrEqualTo(String value) {
addCriterion("op_name >=", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameLessThan(String value) {
addCriterion("op_name <", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameLessThanOrEqualTo(String value) {
addCriterion("op_name <=", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameLike(String value) {
addCriterion("op_name like", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameNotLike(String value) {
addCriterion("op_name not like", value, "opName");
return (Criteria) this;
}
public Criteria andOpNameIn(List<String> values) {
addCriterion("op_name in", values, "opName");
return (Criteria) this;
}
public Criteria andOpNameNotIn(List<String> values) {
addCriterion("op_name not in", values, "opName");
return (Criteria) this;
}
public Criteria andOpNameBetween(String value1, String value2) {
addCriterion("op_name between", value1, value2, "opName");
return (Criteria) this;
}
public Criteria andOpNameNotBetween(String value1, String value2) {
addCriterion("op_name not between", value1, value2, "opName");
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);
}
}
}

@ -12,6 +12,7 @@ public enum GasChannel {
type4(4 , "金猪加油"),
type5(5 , "paylo系统"),
type6(6 , "点点网络"),
type7(7 , "烨歌百货"),
;
private Integer type;

@ -7,6 +7,7 @@ import java.util.Objects;
*/
public enum GasChannelPayPlatformType {
type1(1 , "微信"),
type2(2 , "惠支付"),
;
private Integer type;

@ -13,6 +13,7 @@ public enum MerchantStoreSourceType {
type4(4, "金猪加油", "金猪加油"),
type5(5, "paylo", "四川壳牌"),
type6(6, "点点网络", "团油"),
type7(7, "油卡站点", "自建站"),
;
private Integer number;

@ -0,0 +1,66 @@
package com.hai.group;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.utils.HttpsUtils;
import com.hai.config.CommonSysConst;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
@Component
public class GroupService {
/**
* @Author Sum1Dream
* @Name getStoreList
* @Description // 查询门店列表
* @Date 11:24 2023/11/1
* @Param params
* @return com.alibaba.fastjson.JSONObject
*/
public JSONObject getStoreList(JSONObject params) {
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getPayPostUrl() + "/openGroup/getStoreList" , params);
}
/**
* @Author Sum1Dream
* @Name getGroupContent
* @Description // 查询团购内容
* @Date 11:24 2023/11/1
* @Param groupId
* @return com.alibaba.fastjson.JSONObject
*/
public JSONObject getGroupContent(Long groupId) {
Map<String , Object> params = new HashMap<>();
params.put("groupId" , groupId);
return HttpsUtils.doGet(CommonSysConst.getSysConfig().getPayPostUrl() + "/openGroup/getGroupContent" , params);
}
/**
* @Author Sum1Dream
* @Name getStoreMsg
* @Description // 查询门店信息
* @Date 11:24 2023/11/1
* @Param storeId
* @return com.alibaba.fastjson.JSONObject
*/
public JSONObject getStoreMsg(Long storeId) {
Map<String , Object> params = new HashMap<>();
params.put("storeId" , storeId);
return HttpsUtils.doGet(CommonSysConst.getSysConfig().getPayPostUrl() + "/openGroup/getStoreMsg" , params);
}
/**
* @Author Sum1Dream
* @Name getBsStoreImgByList
* @Description // 门店查询图片
* @Date 10:00 2023/11/2
* @Param params
* @return com.alibaba.fastjson.JSONObject
*/
public JSONObject getBsStoreImgByList(JSONObject params) {
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getPayPostUrl() + "/openGroup/getBsStoreImgByList" , params);
}
}

@ -92,6 +92,8 @@ public class CreateOrderChildModel {
private String gasGunNo;
// 代理商价格
private Boolean isTyAgent;
// 油卡号
private String oilCardNo;
/** ======================= 油站所需参数 ======================== **/

@ -108,4 +108,15 @@ public interface OrderCreateHandleService {
*/
HighChildOrder blxOrder(HighOrder order , CreateOrderChildModel createOrderChildModel) throws Exception;
/**
* @Author Sum1Dream
* @Name levelUp
* @Description // 升级会员
* @Date 11:02 2023/11/6
* @Param order
* @Param createOrderChildModel
* @return com.hai.entity.HighChildOrder
*/
HighChildOrder levelUp(HighOrder order , CreateOrderChildModel createOrderChildModel) throws Exception;
}

@ -150,6 +150,9 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
@Resource
private ShoppingCartService shoppingCartService;
@Resource
private HighOilCardOrderService highOilCardOrderService;
@Override
public List<HighChildOrder> couponHandle(HighDiscountUserRel discountUserRel, CreateOrderChildModel createOrderChild) throws Exception {
if (createOrderChild.getSaleCount() != 1) {
@ -354,6 +357,13 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
if (store == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的油站");
}
if (store.getSourceType() == 7) {
if (createOrderChild.getOilCardNo() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "卡号不能为空!");
}
}
// 查询商户
HighMerchant merchant = merchantService.getDetailById(store.getMerchantId());
if (merchant == null) {
@ -549,6 +559,20 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
}
gasOrderService.addGasOrder(gasOrder);
if (store.getSourceType() == 7 ){
HighOilCardOrder oilCardOrder = new HighOilCardOrder();
oilCardOrder.setPrice(createOrderChild.getGoodsPrice());
oilCardOrder.setCardNo(createOrderChild.getOilCardNo());
oilCardOrder.setOrderNo(createOrderModel.getOrderNo());
oilCardOrder.setThirdOrderNo("HF" + OrderUtil.generateOrderNo());
oilCardOrder.setCreateTime(new Date());
oilCardOrder.setUpdateTime(new Date());
oilCardOrder.setStatus(1);
highOilCardOrderService.insertOilCardOrder(oilCardOrder);
}
return childOrder;
}
@ -1087,4 +1111,30 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
return childOrder;
}
@Override
public HighChildOrder levelUp(HighOrder order, CreateOrderChildModel createOrderChildModel) throws Exception {
HighChildOrder childOrder = new HighChildOrder();
childOrder.setOrderNo(order.getOrderNo());
childOrder.setMemId(order.getMemId());
childOrder.setMemName(order.getMemName());
childOrder.setMemPhone(order.getMemPhone());
childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo());
childOrder.setGoodsType(OrderChildGoodsType.TYPE14.getNumber());
childOrder.setGoodsId(order.getMemId());
childOrder.setGoodsName("升级会员");
childOrder.setGoodsSpecName("升级会员");
childOrder.setGoodsPrice(createOrderChildModel.getGoodsPrice());
childOrder.setGoodsActualPrice(childOrder.getGoodsPrice());
childOrder.setSaleCount(createOrderChildModel.getSaleCount());
childOrder.setGiveawayType(false);
childOrder.setChildOrderStatus(OrderChildStatus.STATUS1.getNumber());
childOrder.setTotalPrice(childOrder.getGoodsPrice());
childOrder.setTotalActualPrice(childOrder.getGoodsPrice());
childOrder.setTotalDeductionPrice(childOrder.getTotalPrice().subtract(childOrder.getTotalActualPrice()));
childOrder.setPraiseStatus(0);
childOrder.setCreateTime(new Date());
return childOrder;
}
}

@ -122,6 +122,10 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
@Resource
private HighOilCardService oilCardService;
@Resource
private HighOilCardOrderService highOilCardOrderService;
@Override
public HighOrder orderPaySuccessHandle(String orderNo, OrderPayType payType, String paySerialNo, BigDecimal payRealPrice, HighUserCard userCard) {
HighOrder order = orderService.getOrderDetailByNo(orderNo);
@ -243,6 +247,8 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE13.getNumber())) {
blxOrderHandle(order);
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE14.getNumber())) {
levelUp(order);
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE15.getNumber())) {
oilCardHandle(childOrder.getGoodsSpecName(), order);
}
}
@ -396,6 +402,17 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
object.put("priceGun", gasOrder.getGasPriceGun()); // 枪单价
object.put("priceVip", gasOrder.getGasPriceVip()); // 优惠价
DianConfig.refuelingOrderPush(object);
} else if (gasOrder.getChannelType().equals(MerchantStoreSourceType.type7.getNumber())) {
HighOilCardOrder highOilCardOrder = highOilCardOrderService.findOrder(order.getOrderNo());
highOilCardOrder.setStatus(2);
JSONObject object = KytcService.getOrderPay(highOilCardOrder.getThirdOrderNo() , highOilCardOrder.getPrice() , highOilCardOrder.getCardNo());
highOilCardOrder.setExt1(object.toJSONString());
highOilCardOrderService.updateOilCardOrder(highOilCardOrder);
}
}
}
@ -603,8 +620,32 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
}
<<<<<<< HEAD
private void oilCardHandle(String cardNo, HighOrder order) {
oilCardService.recharge(cardNo, order.getOrderNo());
}
=======
private void levelUp(HighOrder order) {
HighUserLevel userLevel = new HighUserLevel();
userLevel.setLevel("1");
userLevel.setCreateTime(new Date());
userLevel.setUserId(order.getMemId());
userLevel.setStatus(1);
userLevel.setUpdateTime(new Date());
userService.insertLevelUp(userLevel);
order.setOrderStatus(OrderStatus.STATUS3.getNumber());
order.setFinishTime(new Date());
for (HighChildOrder childOrder : order.getHighChildOrderList()) {
childOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber());
}
}
>>>>>>> 7fcdfd2e6935a820db8abb66831c9c85be5d9aae
}

@ -357,6 +357,12 @@ public class OrderServiceImpl implements OrderService {
order.setTitle(order.getTitle() + "+" +childOrder.getGoodsName());
order.setExt6(order.getExt6() + "," +childOrder.getGoodsImg());
}
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE14.getNumber())) {
HighChildOrder childOrder = orderCreateHandleService.levelUp(order , child);
childOrderList.add(childOrder);
order.setProductType(OrderProductType.PRODUCT_TYPE15.getNumber());
order.setSecUserId(childOrder.getId());
order.setTitle("升级会员");
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知业务类型");
}

@ -22,7 +22,9 @@ public enum OrderChildGoodsType {
TYPE11(11, "实物商品购买"),
TYPE12(12, "比邻星停车券"),
TYPE13(13, "比邻星停车"),
TYPE14(14, "个人油卡充值"),
TYPE14(14, "升级会员"),
TYPE15(15, "个人油卡充值"),
;
private Integer number;

@ -24,7 +24,8 @@ public enum OrderProductType {
PRODUCT_TYPE12(12, "实物商品" , "orderLogo/goods.png", "GOODS"),
PRODUCT_TYPE13(13, "比邻星停车券" , "orderLogo/coupon.png", "BLX_COUPON"),
PRODUCT_TYPE14(14, "比邻星停车业务" , "orderLogo/coupon.png", "BLX_PARK"),
PRODUCT_TYPE15(15, "个人油卡充值" , "orderLogo/coupon.png", ""),
PRODUCT_TYPE15(15, "升级会员" , "orderLogo/coupon.png", "LEVEL_UP"),
PRODUCT_TYPE16(16, "个人油卡充值" , "orderLogo/coupon.png", ""),
PRODUCT_TYPE101(101, "惠支付" , "orderLogo/pay.png", "PAY"),
PRODUCT_TYPE102(102, "门店活动" , "orderLogo/store_activity.png", "STORE_ACTIVITY"),
;

@ -8,10 +8,13 @@ import com.hai.common.pay.WechatPayUtil;
import com.hai.common.utils.HttpsUtils;
import com.hai.config.CommonSysConst;
import com.hai.dao.HighPayRecordMapper;
import com.hai.entity.HighGasChannelConfig;
import com.hai.entity.HighOrder;
import com.hai.entity.HighPayRecord;
import com.hai.enum_type.GasChannel;
import com.hai.order.utils.OrderUtil;
import com.hai.pay.channel.huipay.utils.SignatureUtil;
import com.hai.service.HighGasChannelConfigService;
import com.hai.service.HighOrderService;
import com.hai.service.pay.PayRecordService;
import org.slf4j.Logger;
@ -29,16 +32,18 @@ import java.util.TreeMap;
public class HuiConfig {
@Resource
private PayRecordService payRecordService;
private HighGasChannelConfigService gasChannelConfigService;
@Resource
private HighOrderService highOrderService;
private PayRecordService payRecordService;
private static Logger log = LoggerFactory.getLogger(HuiConfig.class);
// 请求地址
public final static String postUrl = "https://pay.dctpay.com/openApi/v1/";
public final static String hlSubAppid = "wx8d49e2f83025229d";
// 渝北区浩联物资经营部
public final static String hlMerNo = "2023090816465844909";
public final static String yFMerNo = "2023101109385455305";
@ -47,8 +52,6 @@ public class HuiConfig {
public final static String hlKey = "ZatCMLMSZxnkc2rk7dtpTORMLcKetcKt";
public final static String yFKey = "plfJ6Ohgj4OmPblknuMzoSeT8cvI5dTR";
public final static String hlSubAppid = "wx8d49e2f83025229d";
/**
* @Author Sum1Dream
* @Name preorder
@ -57,6 +60,43 @@ public class HuiConfig {
* @Param object
* @return java.util.SortedMap<java.lang.Object,java.lang.Object>
*/
public SortedMap<Object,Object> preorder(JSONObject object , String key , String payPlatformMerNo) throws Exception {
object.put("merchantNo" , payPlatformMerNo);
object.put("subAppid" , hlSubAppid);
object.put("sign" , SignatureUtil.createSign(object , key));
JSONObject jsonObject = HttpsUtils.doPost(postUrl + "trade/preorder", object, new HashMap<>());
// 签名校验
SortedMap<Object,Object> sortedMap;
if (jsonObject.getString("return_code").equals("000000")) {
JSONObject payParam = jsonObject.getJSONObject("return_data").getJSONObject("payParam");
sortedMap = new TreeMap<>();
sortedMap.put("appId", payParam.get("app_id"));
sortedMap.put("nonceStr", payParam.get("nonce_str"));
sortedMap.put("timeStamp", payParam.get("time_stamp"));
sortedMap.put("signType", "MD5");
sortedMap.put("package", payParam.get("package"));
sortedMap.put("sign", payParam.get("pay_sign"));
// 将支付请求存入支付纪录
HighPayRecord payRecord = new HighPayRecord();
payRecord.setBodyInfo(String.valueOf(payParam));
payRecord.setResType(1);
payRecord.setPayType(2);
payRecord.setPayMoney(object.getBigDecimal("totalAmount"));
payRecordService.addPayRecord(payRecord);
} else {
log.error("微信支付 -> 组装支付参数:支付信息错误");
log.error("错误信息:" + jsonObject.getString("return_msg"));
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法支付,请稍后重新提交订单支付!");
}
return sortedMap;
}
public SortedMap<Object,Object> preorder(JSONObject object) throws Exception {
object.put("merchantNo" , yFMerNo);
object.put("subAppid" , hlSubAppid);
@ -104,12 +144,14 @@ public class HuiConfig {
*/
public JSONObject refund(HighOrder order) throws Exception {
HighGasChannelConfig gasChannelConfig = gasChannelConfigService.getConfig(order.getAccountMerchantNum());
JSONObject object = new JSONObject();
object.put("merchantNo" , hlMerNo);
object.put("merchantNo" , gasChannelConfig.getPayPlatformMerNo());
object.put("outTradeNo" , order.getOrderNo());
object.put("refundTradeNo" , OrderUtil.generateRefundOrderNo());
object.put("refundAmount" , order.getPayRealPrice());
object.put("sign" , SignatureUtil.createSign(object , hlKey));
object.put("sign" , SignatureUtil.createSign(object , gasChannelConfig.getPayPlatformMerKey()));
return HttpsUtils.doPost(postUrl + "trade/refund", object, new HashMap<>());

@ -23,4 +23,8 @@ public interface HighGasChannelConfigService {
*/
HighGasChannelConfig getConfig(GasChannel channelId, GasChannelPayPlatformType payPlatformType);
HighGasChannelConfig getConfig(GasChannel channelId);
HighGasChannelConfig getConfig(String merNo);
}

@ -2,6 +2,7 @@ package com.hai.service;
import com.github.pagehelper.PageInfo;
import com.hai.entity.HighMerchantStore;
import com.hai.entity.HighStoreOilCard;
import com.hai.model.GasSelfBuiltStationModel;
import com.hai.model.HighMerchantStoreModel;
@ -105,4 +106,44 @@ public interface HighMerchantStoreService {
* @return
*/
List<GasSelfBuiltStationModel> getGasSelfBuiltStationList(Map<String, Object> map);
/**
* @Author Sum1Dream
* @Name insertStoreOilCard
* @Description // 新增门店油卡
* @Date 14:28 2023/11/2
* @Param highStoreOilCard
* @return void
*/
void insertStoreOilCard(HighStoreOilCard highStoreOilCard) throws Exception;
/**
* @Author 胡锐
* @Description 修改新增门店油卡
* @Date 2021/3/12 22:15
**/
void updateStoreOilCard(HighStoreOilCard highStoreOilCard) throws Exception;
/**
* @Author Sum1Dream
* @Name findStoreOilCard
* @Description // 查询门店油卡
* @Date 14:42 2023/11/2
* @Param id
* @return com.hai.entity.HighStoreOilCard
*/
HighStoreOilCard findStoreOilCard(Long id);
/**
* @Author Sum1Dream
* @Name getStoreOilCardList
* @Description //TODO
* @Date 14:32 2023/11/2
* @Param map
* @return java.util.List<com.hai.entity.HighStoreOilCard>
*/
List<HighStoreOilCard> getStoreOilCardList(Long storeId);
}

@ -0,0 +1,13 @@
package com.hai.service;
import com.hai.entity.HighOilCardOrder;
public interface HighOilCardOrderService {
void insertOilCardOrder(HighOilCardOrder highOilCardOrder);
void updateOilCardOrder(HighOilCardOrder highOilCardOrder);
HighOilCardOrder findOrder(String orderNo);
}

@ -3,6 +3,7 @@ package com.hai.service;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.security.SessionObject;
import com.hai.entity.HighUser;
import com.hai.entity.HighUserLevel;
import com.hai.enum_type.LoginPlatform;
import com.hai.model.HighUserModel;
@ -161,5 +162,12 @@ public interface HighUserService {
*/
JSONObject userDistributionStatistics(Long userId);
void insertLevelUp(HighUserLevel highUserLevel);
void editLevelUp(HighUserLevel highUserLevel);
HighUserLevel findUserLevel(Long userId);
}

@ -45,4 +45,30 @@ public class HighGasChannelConfigServiceImpl implements HighGasChannelConfigServ
}
return null;
}
@Override
public HighGasChannelConfig getConfig(GasChannel channelId) {
HighGasChannelConfigExample example = new HighGasChannelConfigExample();
example.createCriteria()
.andChannelIdEqualTo(channelId.getType())
.andStatusEqualTo(1);
List<HighGasChannelConfig> list = gasChannelConfigMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public HighGasChannelConfig getConfig(String merNo) {
HighGasChannelConfigExample example = new HighGasChannelConfigExample();
example.createCriteria()
.andPayPlatformMerNoEqualTo(merNo)
.andStatusEqualTo(1);
List<HighGasChannelConfig> list = gasChannelConfigMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
}

@ -156,6 +156,7 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri
|| store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type6.getNumber())
|| store.getSourceType().equals(MerchantStoreSourceType.type7.getNumber())
) {
// 嗨森逛平台价 油枪价 * 折扣

@ -503,6 +503,7 @@ public class HighGasServiceImpl implements HighGasService {
highGasOilPrice = new HighGasOilPrice();
highGasOilPrice.setMerchantStoreId(store.getId());
highGasOilPrice.setOilNo(oilPriceObject.getString("youhao"));
highGasOilPrice.setPreferentialMargin(new BigDecimal(0));
highGasOilPrice.setOilNoName(oilPriceObject.getString("youhao") + "#");
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip"));
highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun"));
@ -515,6 +516,7 @@ public class HighGasServiceImpl implements HighGasService {
highGasOilPrice.setOilNo(oilPriceObject.getString("youhao"));
highGasOilPrice.setOilNoName( oilPriceObject.getString("youhao") + "#");
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip"));
highGasOilPrice.setPreferentialMargin(new BigDecimal(0));
highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setOilType(oilPriceObject.getInteger("oiltype"));
@ -555,6 +557,7 @@ public class HighGasServiceImpl implements HighGasService {
highGasOilPrice.setOilNo(oilPriceObject.getString("youhao"));
highGasOilPrice.setOilNoName(oilPriceObject.getString("youhao") + "#");
highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip"));
highGasOilPrice.setPreferentialMargin(new BigDecimal(0));
highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceGun"));
highGasOilPrice.setOilType(oilPriceObject.getInteger("oiltype"));

@ -10,6 +10,7 @@ import com.hai.common.utils.CoordCommonUtil;
import com.hai.common.utils.MD5Util;
import com.hai.config.SpPrinterConfig;
import com.hai.dao.HighMerchantStoreMapper;
import com.hai.dao.HighStoreOilCardMapper;
import com.hai.entity.*;
import com.hai.model.GasSelfBuiltStationModel;
import com.hai.model.HighMerchantStoreModel;
@ -44,6 +45,9 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService {
@Resource
private HighMerchantStoreAccountService merchantStoreAccountService;
@Resource
private HighStoreOilCardMapper highStoreOilCardMapper;
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void insertMerchantStore(HighMerchantStoreModel highMerchantStore) throws Exception {
@ -255,5 +259,29 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService {
return highMerchantStoreMapper.selectGasSelfBuiltStationList(map);
}
@Override
public void insertStoreOilCard(HighStoreOilCard highStoreOilCard) throws Exception {
highStoreOilCardMapper.insert(highStoreOilCard);
}
@Override
public void updateStoreOilCard(HighStoreOilCard highStoreOilCard) throws Exception {
highStoreOilCardMapper.updateByPrimaryKey(highStoreOilCard);
}
@Override
public HighStoreOilCard findStoreOilCard(Long id) {
return highStoreOilCardMapper.selectByPrimaryKey(id);
}
@Override
public List<HighStoreOilCard> getStoreOilCardList(Long storeId) {
HighStoreOilCardExample example = new HighStoreOilCardExample();
HighStoreOilCardExample.Criteria criteria = example.createCriteria();
criteria.andStoreIdEqualTo(storeId).andStatusEqualTo(1);
return highStoreOilCardMapper.selectByExample(example);
}
}

@ -0,0 +1,43 @@
package com.hai.service.impl;
import com.hai.dao.HighOilCardOrderMapper;
import com.hai.entity.HighOilCardOrder;
import com.hai.entity.HighOilCardOrderExample;
import com.hai.service.HighOilCardOrderService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service("highOilCardOrderService")
public class HighOilCardOrderServiceImpl implements HighOilCardOrderService {
@Resource
private HighOilCardOrderMapper highOilCardOrderMapper;
@Override
public void insertOilCardOrder(HighOilCardOrder highOilCardOrder) {
highOilCardOrderMapper.insert(highOilCardOrder);
}
@Override
public void updateOilCardOrder(HighOilCardOrder highOilCardOrder) {
highOilCardOrderMapper.updateByPrimaryKey(highOilCardOrder);
}
@Override
public HighOilCardOrder findOrder(String orderNo) {
HighOilCardOrderExample example = new HighOilCardOrderExample();
HighOilCardOrderExample.Criteria criteria = example.createCriteria();
criteria.andOrderNoEqualTo(orderNo);
List<HighOilCardOrder> list = highOilCardOrderMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
}

@ -12,6 +12,7 @@ import com.hai.common.utils.DateUtil;
import com.hai.common.utils.HttpsUtils;
import com.hai.common.utils.RequestUtils;
import com.hai.dao.HighGoldRecMapper;
import com.hai.dao.HighUserLevelMapper;
import com.hai.dao.HighUserLoginLogMapper;
import com.hai.dao.HighUserMapper;
import com.hai.entity.*;
@ -50,7 +51,7 @@ public class HighUserServiceImpl implements HighUserService {
private HighUserCouponService highUserCouponService;
@Resource
private OutRechargeOrderService outRechargeOrderService;
private HighUserLevelMapper highUserLevelMapper;
@Resource
private HighUserCardService highUserCardService;
@ -420,6 +421,32 @@ public class HighUserServiceImpl implements HighUserService {
JSONObject object = new JSONObject();
return null;
}
@Override
public void insertLevelUp(HighUserLevel highUserLevel) {
highUserLevelMapper.insert(highUserLevel);
}
@Override
public void editLevelUp(HighUserLevel highUserLevel) {
highUserLevelMapper.updateByPrimaryKeySelective(highUserLevel);
}
@Override
public HighUserLevel findUserLevel(Long userId) {
HighUserLevelExample example = new HighUserLevelExample();
HighUserLevelExample.Criteria criteria = example.createCriteria();
criteria.andUserIdEqualTo(userId).andStatusEqualTo(1);
List<HighUserLevel> list = highUserLevelMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save