diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java index c7efd61b..888d5206 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java @@ -60,6 +60,7 @@ public class HighDiscountController { } if (StringUtils.isBlank(highDiscount.getDiscountName()) || StringUtils.isBlank(highDiscount.getDiscountImg()) + || highDiscount.getPlatform() == null || highDiscount.getDiscountType() == null || highDiscount.getDiscountPrice() == null || highDiscount.getEffectiveDay() == null diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java index 2a0b9a63..1596f0ce 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java @@ -605,7 +605,7 @@ public class HighGasController { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } // 查询油品价格 - HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getInteger("oilNo")); + HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getString("oilNo")); if (oilNo == null) { log.error("HighGasController -> disabledOil() error!",""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); @@ -631,7 +631,7 @@ public class HighGasController { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } // 查询油品价格 - HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getInteger("oilNo")); + HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getString("oilNo")); if (oilNo == null) { log.error("HighGasController -> enableOil() error!",""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceController.java index 984d86fe..ccc98adf 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceController.java @@ -81,18 +81,18 @@ public class HighGasOilPriceController { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油品"); } // 查询价格 - HighGasOilPrice price = gasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), Integer.valueOf(body.getString("oilNo"))); + HighGasOilPrice price = gasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getString("oilNo")); if (price == null) { price = new HighGasOilPrice(); // 查询国标价格 - HighGasOilPriceOfficial priceOfficial = gasOilPriceOfficialService.getPrice(store.getRegionId(), body.getInteger("oilNo")); + HighGasOilPriceOfficial priceOfficial = gasOilPriceOfficialService.getPrice(store.getRegionId(), body.getString("oilNo")); if (priceOfficial == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法添加,系统未配置"+body.getInteger("oilNo")+"油号的国标价"); } price.setMerchantStoreId(body.getLong("storeId")); price.setOilType(Integer.parseInt(oilNo.getExt1())); price.setOilTypeName(oilNo.getExt2()); - price.setOilNo(Integer.parseInt(oilNo.getCodeValue())); + price.setOilNo(oilNo.getCodeValue()); price.setOilNoName(oilNo.getCodeName()); price.setPriceOfficial(priceOfficial.getPriceOfficial()); @@ -124,7 +124,7 @@ public class HighGasOilPriceController { } // 查询价格 - HighGasOilPrice price = gasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), Integer.valueOf(body.getString("oilNo"))); + HighGasOilPrice price = gasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getString("oilNo")); if (price == null) { log.error("HighGasDiscountOilPriceController -> editGasOilPrice() error!","未找到油品价格"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油品价格"); @@ -149,7 +149,7 @@ public class HighGasOilPriceController { @ResponseBody @ApiOperation(value = "查询油品价格详情") public ResponseData getOilPriceDetail(@RequestParam(name = "storeId", required = true) Long storeId, - @RequestParam(name = "oilNo", required = true) Integer oilNo) { + @RequestParam(name = "oilNo", required = true) String oilNo) { try { // 查询门店详情 HighMerchantStoreModel store = merchantStoreService.getMerchantStoreById(storeId); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceOfficialController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceOfficialController.java index 351e4aaa..7cd57fe0 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceOfficialController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceOfficialController.java @@ -49,16 +49,16 @@ public class HighGasOilPriceOfficialController { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } - HighGasOilPriceOfficial price = gasOilPriceOfficialService.getPrice(body.getLong("regionId"), body.getInteger("oilNo")); + HighGasOilPriceOfficial price = gasOilPriceOfficialService.getPrice(body.getLong("regionId"), body.getString("oilNo")); if (price == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到价格"); } price.setPriceOfficial(body.getBigDecimal("price")); - gasOilPriceOfficialService.editPrice(body.getLong("regionId"), body.getInteger("oilNo"), body.getBigDecimal("price")); + gasOilPriceOfficialService.editPrice(body.getLong("regionId"), body.getString("oilNo"), body.getBigDecimal("price")); new Thread(() -> { // 查询区域下的油品 - List list = highGasOilPriceService.getPriceListByRegionAndOilNo(body.getLong("regionId"), body.getInteger("oilNo")); + List list = highGasOilPriceService.getPriceListByRegionAndOilNo(body.getLong("regionId"), body.getString("oilNo")); for (HighGasOilPrice gasOilPrice : list) { gasOilPrice.setPriceOfficial(body.getBigDecimal("price")); highGasOilPriceService.editGasOilPrice(gasOilPrice); @@ -76,7 +76,7 @@ public class HighGasOilPriceOfficialController { @ResponseBody @ApiOperation(value = "查询油品国标价详情") public ResponseData getOilPriceOfficialDetail(@RequestParam(name = "regionId", required = true) Long regionId, - @RequestParam(name = "oilNo", required = true) Integer oilNo) { + @RequestParam(name = "oilNo", required = true) String oilNo) { try { return ResponseMsgUtil.success(gasOilPriceOfficialService.getPrice(regionId,oilNo)); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentPriceController.java b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentPriceController.java index 4bc05ef4..993bf8db 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentPriceController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentPriceController.java @@ -170,7 +170,7 @@ public class HighTyAgentPriceController { if (oilStation.getLong("oilStationId") == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); } - HighGasOilPrice oilNo = gasOilPriceService.getGasOilPriceByStoreAndOilNo(oilStation.getLong("oilStationId"), body.getInteger("oilNo")); + HighGasOilPrice oilNo = gasOilPriceService.getGasOilPriceByStoreAndOilNo(oilStation.getLong("oilStationId"), body.getString("oilNo")); if (oilNo != null) { oilNo.setStatus(body.getInteger("status")); gasOilPriceService.editGasOilPrice(oilNo); diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java index 3aa4155b..19339b15 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java @@ -128,7 +128,9 @@ public class HighGasController { if (StringUtils.isNotBlank(MapUtils.getString(map, "oil_no"))) { if (MapUtils.getInteger(map, "source_type").equals(1) || MapUtils.getInteger(map, "source_type").equals(3) - || MapUtils.getInteger(map, "source_type").equals(4)) { + || MapUtils.getInteger(map, "source_type").equals(4) + || MapUtils.getInteger(map, "source_type").equals(5) + ) { // 查询是否配置了【油站的】优惠比例 HighTyAgentPrice tyAgentPrice = tyAgentPriceService.getDetail(1, MapUtils.getLong(map, "id"), MapUtils.getString(map, "oil_no")); if (tyAgentPrice != null) { @@ -281,7 +283,8 @@ public class HighGasController { // 来源类型 1:平台自建 2:团油 if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber()) || store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber()) - || store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) { + || store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber()) + || store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())) { Map param = new HashMap<>(); param.put("provinceName", null); param.put("provinceCode", null); @@ -399,7 +402,7 @@ public class HighGasController { JSONObject price = JSON.parseObject(JSONObject.toJSONString(oilPriceObject), JSONObject.class); // 查询油站油品状态 - HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), price.getInteger("oilNo")); + HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), price.getString("oilNo")); if (oilNo != null && !oilNo.getStatus().equals(GasOilPriceStatusEnum.status1.getStatus())) { continue; } @@ -483,7 +486,8 @@ public class HighGasController { // 来源类型 1:平台自建 2:团油 if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber()) || store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber()) - || store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber()) ) { + || store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber()) + || store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())) { Map param = new HashMap<>(); param.put("provinceName", null); param.put("provinceCode", null); @@ -595,7 +599,7 @@ public class HighGasController { JSONObject price = JSON.parseObject(JSONObject.toJSONString(oilPriceObject), JSONObject.class); // 查询油站油品状态 - HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), price.getInteger("oilNo")); + HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), price.getString("oilNo")); if (oilNo != null && !oilNo.getStatus().equals(GasOilPriceStatusEnum.status1.getStatus())) { continue; } diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java index cff612d7..fc8a7c4a 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java @@ -1 +1 @@ - package com.cweb.controller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cweb.config.SysConst; import com.hai.common.Base64Util; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.security.SessionObject; import com.hai.common.security.UserCenter; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.*; import com.hai.enum_type.MerchantStoreSourceType; import com.hai.model.*; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.util.EntityUtils; import org.bouncycastle.util.encoders.UrlBase64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.IdGenerator; import org.springframework.web.bind.annotation.*; import sun.nio.cs.StreamEncoder; import javax.annotation.Resource; import javax.net.ssl.SSLContext; import javax.servlet.http.HttpServletRequest; import java.io.*; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.security.KeyStore; import java.util.*; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private HighMerchantService highMerchantService; @Resource private HighMerchantStoreService highMerchantStoreService; @Resource private HighGasOilPriceService highGasOilPriceService; @Resource private HighOrderService highOrderService; @Autowired private UserCenter userCenter; @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @Resource private BaiduVoiceService baiduVoiceService; @Resource private ShellGroupService shellGroupService; @Resource private HighGasService gasService; @Resource private BsMsgService bsMsgService; @RequestMapping(value = "/queryGasInfoByGasId", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据油站 id 拉取最新的油站数据") public ResponseData queryGasInfoByGasId(@RequestParam(name = "gasId", required = true) String gasId, HttpServletRequest request) { try { return ResponseMsgUtil.success(TuanYouConfig.queryGasInfoByGasId(gasId)); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardInfo() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/initTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "初始化加油站") public ResponseData initTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } JSONObject jsonObjectP = TuanYouConfig.queryGasInfoListByPage(1, 1000); JSONObject resultObjectP = jsonObjectP.getObject("result", JSONObject.class); for (int i = 1; i <= resultObjectP.getInteger("totalPageNum").intValue(); i++) { JSONObject jsonObject = TuanYouConfig.queryGasInfoListByPage(i, 1000); JSONObject resultObject = jsonObject.getObject("result", JSONObject.class); JSONArray jsonArray = resultObject.getJSONArray("gasInfoList"); HighMerchantStore highMerchantStore; HighGasOilPrice highGasOilPrice; for (Object gasObject : jsonArray) { JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(gasObject)); HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreByKey(object.getString("gasId")); if (store != null) { store.setType(1); store.setMerchantId(merchant.getId()); store.setCompanyId(merchant.getCompanyId()); store.setStoreKey(object.getString("gasId")); store.setStoreName(object.getString("gasName")); store.setStoreLogo(object.getString("gasLogoSmall")); store.setRegionId(object.getLong("provinceCode")); store.setRegionName(object.getString("provinceName")); store.setAddress(object.getString("gasAddress")); store.setLongitude(object.getString("gasAddressLongitude")); store.setLatitude(object.getString("gasAddressLatitude")); store.setStatus(object.getInteger("gasStatus")); store.setOperatorId(0L); store.setOperatorName("系统创建"); store.setUpdateTime(new Date()); store.setExt1(object.getString("gasSourceId")); highMerchantStoreService.updateMerchantStoreDetail(store); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getInteger("oilNo")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } else { highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } else { highMerchantStore = new HighMerchantStore(); highMerchantStore.setType(1); highMerchantStore.setMerchantId(merchant.getId()); highMerchantStore.setCompanyId(merchant.getCompanyId()); highMerchantStore.setStoreKey(object.getString("gasId")); highMerchantStore.setStoreName(object.getString("gasName")); highMerchantStore.setStoreLogo(object.getString("gasLogoSmall")); highMerchantStore.setRegionId(object.getLong("provinceCode")); highMerchantStore.setRegionName(object.getString("provinceName")); highMerchantStore.setAddress(object.getString("gasAddress")); highMerchantStore.setLongitude(object.getString("gasAddressLongitude")); highMerchantStore.setLatitude(object.getString("gasAddressLatitude")); highMerchantStore.setStatus(1); highMerchantStore.setOperatorId(0L); highMerchantStore.setOperatorName("系统创建"); highMerchantStore.setCreateTime(new Date()); highMerchantStore.setUpdateTime(new Date()); highMerchantStore.setExt1(object.getString("gasSourceId")); HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel(); BeanUtils.copyProperties(highMerchantStore, merchantStoreModel); highMerchantStoreService.insertMerchantStore(merchantStoreModel); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } } } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/detectTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "检测加油站") public ResponseData detectTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } Map param = new HashMap<>(); param.put("merchantId", merchant.getId()); List stores = highMerchantStoreService.getMerchantStoreList(param); for (HighMerchantStore store : stores) { JSONObject jsonObject = TuanYouConfig.queryGasInfoByGasId(store.getStoreKey()); if (jsonObject != null && jsonObject.getString("code").equals("200")) { JSONObject result = jsonObject.getJSONObject("result"); store.setStatus(result.getInteger("gasStatus")); } else { store.setStatus(0); } highMerchantStoreService.updateMerchantStoreDetail(store); } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/queryCompanyAccountInfo2JD", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyAccountInfo2JD() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyAccountInfo2JD()); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryCompanyPriceDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyPriceDetail() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyPriceDetail("LW000115995", "92")); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrdersPay", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "星巴克支付") public ResponseData starbucksOrdersPay(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrdersPay(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payKfcOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "肯德基支付") public ResponseData payKfcOrder(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.payKfcOrder(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/wxSplitAccount", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "微信分账") public ResponseData wxSplitAccount() { try { HighOrder orderNo = highOrderService.getOrderByOrderNo("HF2021101812025050304"); wxProfitsharing(orderNo.getOrderNo(), orderNo.getPaySerialNo(), orderNo.getPayRealPrice()); return ResponseMsgUtil.success("分账成功"); } catch (Exception e) { log.error("HighOrderController --> getOrderById() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryStaging", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "分期查询") public ResponseData queryStaging(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.queryStaging(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/orderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "退款") public ResponseData orderToRefund(HttpServletRequest request) { try { OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund("4200001301202202035413938093", new BigDecimal("30.80"), new BigDecimal("16.90")); return ResponseMsgUtil.success(orderRefundModel); } catch (Exception e) { log.error("HighOrderController --> orderToRefund() error!", e); return ResponseMsgUtil.exception(e); } }*/ @RequestMapping(value = "/query", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单查询") public ResponseData query(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.query(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } public void wxProfitsharing(String transaction_id, String out_order_no, BigDecimal amount) { try { Map param = new LinkedHashMap<>(); param.put("appid", "wx637bd6f7314daa46"); param.put("mch_id", "1289663601"); param.put("sub_mch_id", "1609882817"); // 个体户黎杨珍 param.put("transaction_id", transaction_id); param.put("out_order_no", out_order_no); param.put("nonce_str", WxUtils.makeNonStr()); // 分账金额 BigDecimal porofitSharingAmount = amount; List> receiversList = new ArrayList<>(); Map receiversMap = new LinkedHashMap<>(); receiversMap.put("type", "MERCHANT_ID"); receiversMap.put("account", "1603942866"); receiversMap.put("amount", porofitSharingAmount.multiply(new BigDecimal("100")).intValue()); receiversMap.put("description", "分给商户【惠昕石化】"); receiversList.add(receiversMap); param.put("receivers", JSONObject.toJSONString(receiversList)); String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5", WXPayConstants.SignType.HMACSHA256); param.put("sign", signStr); String resultXmL = this.doRefundRequest(param.get("mch_id"), null, WxUtils.mapToXml(param)); // 请求分账返回的结果 ResultProfitSharing resultProfitSharing = XmlUtil.getObjectFromXML(resultXmL, ResultProfitSharing.class); if (!resultProfitSharing.getResult_code().equals("FAIL")) { HighProfitSharingRecord sharingRecord = new HighProfitSharingRecord(); sharingRecord.setOutOrderNo(resultProfitSharing.getOut_order_no()); sharingRecord.setTransactionId(resultProfitSharing.getTransaction_id()); sharingRecord.setOrderId(resultProfitSharing.getOrder_id()); sharingRecord.setStatus(resultProfitSharing.getResult_code()); sharingRecord.setPrice(amount); sharingRecord.setCreateTime(new Date()); sharingRecord.setContent(resultXmL); highProfitSharingRecordService.insert(sharingRecord); } } catch (Exception e) { log.error("CmsContentController --> getCorporateAdvertising() error!", e); } } public CloseableHttpClient readCertificate(String mchId) throws Exception { /** * 注意PKCS12证书 是从微信商户平台-》账户设置-》 API安全 中下载的 */ KeyStore keyStore = KeyStore.getInstance("PKCS12"); //P12文件目录 证书路径,这里需要你自己修改,linux下还是windows下的根路径 FileInputStream instream = new FileInputStream("/home/project/wx_cert/1289663601_apiclient_cert.p12"); // FileInputStream instream = new FileInputStream("G:\\hurui-project/hai-parent/hai-service/src/main/java/privatekey/1289663601_apiclient_cert.p12"); try { keyStore.load(instream, "1289663601".toCharArray());//这里写密码..默认是你的MCHID } finally { instream.close(); } SSLContext sslcontext = SSLContexts.custom().loadKeyMaterial(keyStore, "1289663601".toCharArray()).build();//这里也是写密码的 SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, SSLConnectionSocketFactory.getDefaultHostnameVerifier()); // Allow TLSv1 protocol only return HttpClients.custom().setSSLSocketFactory(sslsf).build(); } public String doRefundRequest(String mchId, String url, String data) throws Exception { //小程序退款需要调用双向证书的认证 CloseableHttpClient httpClient = readCertificate(mchId); try { HttpPost httpost = new HttpPost("https://api.mch.weixin.qq.com/secapi/pay/profitsharing"); // 设置响应头信息 httpost.addHeader("Connection", "keep-alive"); httpost.addHeader("Accept", "*/*"); httpost.addHeader("Content-Type", "text/xml"); httpost.addHeader("Host", "api.mch.weixin.qq.com"); httpost.addHeader("X-Requested-With", "XMLHttpRequest"); httpost.addHeader("Cache-Control", "max-age=0"); httpost.addHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) "); httpost.setEntity(new StringEntity(data, "UTF-8")); CloseableHttpResponse response = httpClient.execute(httpost); try { HttpEntity entity = response.getEntity(); String jsonStr = EntityUtils.toString(response.getEntity(), "UTF-8"); EntityUtils.consume(entity); return jsonStr; } finally { response.close(); } } catch (Exception e) { throw new RuntimeException(e); } finally { httpClient.close(); } } @RequestMapping(value = "/websocket", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "websocket") public ResponseData websocket(@RequestParam(name = "orderNo", required = true) String orderNo ) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { Map pushMsg = new HashMap<>(); pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); Map msgContent = new HashMap<>(); msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo())); msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + "加油站,收款:" + order.getTotalPrice())); pushMsg.put("message", JSONObject.toJSONString(msgContent)); HttpsUtils.doPost("http://127.0.0.1:9901/msg/test/websocket", pushMsg, new HashMap<>()); } return ResponseMsgUtil.success("null"); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasStationQueryDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasStationQueryDetail") public ResponseData gasStationQueryDetail() { try { return ResponseMsgUtil.success(shellGroupService.gasStationQueryDetail("0001")); } catch (Exception e) { log.error("HighOrderController --> gasStationQueryDetail() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasPageQueryAllStation", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasPageQueryAllStation") public ResponseData gasPageQueryAllStation() { try { gasService.getJiaHaoYouAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasPageQueryAllStation() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasSyncRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasSyncRefund") public ResponseData gasSyncRefund() { try { shellGroupService.gasSyncRefund(new Date(1659511289000L), "1659511289357"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getJzStationListPage", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "getJzStationListPage") public ResponseData getJzStationListPage() { try { gasService.getJinZhuAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/insertV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付") public ResponseData insertV2() { try { String orderNo = "HF2022080818504922206"; JSONObject object = QianZhuConfig.insertV2("PLM100024", orderNo, "15585850137"); object.put("orderNo", orderNo); return ResponseMsgUtil.success(object); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/QueryV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单号") public ResponseData QueryV2(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); JSONObject orderObject = QianZhuConfig.QueryV2(orderNo); if (orderObject != null && orderObject.getLong("Code") == 999) { // 订单失败 // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 3) { // 订单失败 if (order.getOrderStatus() == 2) { highOrderService.thirdOrderToRefund(order.getId()); } else { highOrderService.thirdCancelOrder(order.getId()); } } // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 2) { for (HighChildOrder childOrder : order.getHighChildOrderList()) { childOrder.setChildOrdeStatus(3); } order.setOrderStatus(3); order.setFinishTime(new Date()); highOrderService.updateOrder(order); } } return ResponseMsgUtil.success(QianZhuConfig.QueryV2(orderNo)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } */ @RequestMapping(value = "/getKfcOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询肯德基订单") public ResponseData getKfcOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.getKfcOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克订单") public ResponseData starbucksOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/thirdOrderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "第三方退款") public ResponseData thirdOrderToRefund(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); highOrderService.thirdOrderToRefund(order.getId()); return ResponseMsgUtil.success(""); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/rechargeOrderByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇话费充值 ") public ResponseData rechargeOrderByCy() { try { JSONObject object = new JSONObject(); object.put("mobile" , "18090580471"); object.put("productId" , 172); object.put("agentOrderId" , "RCG" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5)); return ResponseMsgUtil.success(RechargeConfig.rechargeOrderByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryRechargeByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇查询订单") public ResponseData queryRechargeByCy(@RequestParam(name = "orderNo", required = true) String orderNo) { try { JSONObject object = new JSONObject(); object.put("orderNo" , orderNo); return ResponseMsgUtil.success(RechargeConfig.queryRechargeByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/postIp", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "请求ip地址") public ResponseData postIp(HttpServletRequest request) { try { request.getHeader("regionId"); if (request.getHeader("regionId") != null && request.getHeader("regionId").length() != 0) { System.out.println("111"); } return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsgcs.dctpay.com/brest/openApi/test")); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/testMsg", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "测试站内信") public ResponseData testMsg(HttpServletRequest request) { try { bsMsgService.pushUserMsg(71465L , "支付成功"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getPayOrderByCouNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付") public ResponseData getPayOrderByCouNo() { try { JSONObject jsonObject = HuiLianTongConfig.getPayOrderByCouNo("3D3F3D3D3F393E3737363F3F363C3739363D3D"); if (jsonObject.getString("respCode").equals("0000")) { JSONObject data = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data")); return ResponseMsgUtil.success(data); } return ResponseMsgUtil.success(jsonObject); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/postThirdParty", method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "提交第三方订单") public ResponseData postThirdParty(@RequestBody JSONObject object) { try { Map map = new HashMap<>(); map.put("customerMobile" , "18090580471"); map.put("productType" , object.getString("productType")); map.put("apiKey" , "E5A03E6AB18656BA2C56FA9A0DBAE561"); map.put("timetable" , new Date().getTime()); map.put("sourceOrderNo" , "POST" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5)); map.put("notifyUrl" , "https://hsgcs.dctpay.com/crest/czOrder/apiCallBack"); map.put("merchId" , "20221233300"); String signPost = WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5); object.put("customerMobile" , map.get("customerMobile")); object.put("productType" , map.get("productType")); object.put("apiKey" , map.get("apiKey")); object.put("timetable" , map.get("timetable")); object.put("sourceOrderNo" , map.get("sourceOrderNo")); object.put("notifyUrl" , map.get("notifyUrl")); object.put("merchId" , map.get("merchId")); object.put("sign" , signPost); JSONObject jsonObject = HttpsUtils.doPost("http://localhost:9902/v1/thirdParty/createOrder" , object); return ResponseMsgUtil.success(jsonObject); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/postPhone", method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "提交话费订单") public ResponseData postPhone(@RequestBody JSONObject object) { try { Map map = new HashMap<>(); map.put("mobile" , "18090580471"); map.put("apiConfigProductId" , object.getString("apiConfigProductId")); map.put("apiKey" , "E5A03E6AB18656BA2C56FA9A0DBAE561"); map.put("timetable" , new Date().getTime()); map.put("sourceOrderNo" , "PHONE" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5)); map.put("notifyUrl" , "https://hsgcs.dctpay.com/crest/czOrder/apiCallBack"); map.put("merchId" , "20221233300"); String signPost = WxUtils.generateSignApi(map, MapUtils.getString(map, "apiKey"), WXPayConstants.SignType.MD5); object.put("mobile" , map.get("mobile")); object.put("apiConfigProductId" , map.get("apiConfigProductId")); object.put("apiKey" , map.get("apiKey")); object.put("timetable" , map.get("timetable")); object.put("sourceOrderNo" , map.get("sourceOrderNo")); object.put("notifyUrl" , map.get("notifyUrl")); object.put("merchId" , map.get("merchId")); object.put("sign" , signPost); JSONObject jsonObject = HttpsUtils.doPost("http://localhost:9902/v1/rechargeProduct/createOrder" , object); return ResponseMsgUtil.success(jsonObject); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } } \ No newline at end of file +package com.cweb.controller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cweb.config.SysConst; import com.hai.common.Base64Util; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.security.SessionObject; import com.hai.common.security.UserCenter; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.*; import com.hai.enum_type.MerchantStoreSourceType; import com.hai.model.*; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.util.EntityUtils; import org.bouncycastle.util.encoders.UrlBase64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.IdGenerator; import org.springframework.web.bind.annotation.*; import sun.nio.cs.StreamEncoder; import javax.annotation.Resource; import javax.net.ssl.SSLContext; import javax.servlet.http.HttpServletRequest; import java.io.*; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.security.KeyStore; import java.util.*; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private HighMerchantService highMerchantService; @Resource private HighMerchantStoreService highMerchantStoreService; @Resource private HighGasOilPriceService highGasOilPriceService; @Resource private HighOrderService highOrderService; @Autowired private UserCenter userCenter; @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @Resource private BaiduVoiceService baiduVoiceService; @Resource private ShellGroupService shellGroupService; @Resource private HighGasService gasService; @Resource private BsMsgService bsMsgService; @RequestMapping(value = "/queryGasInfoByGasId", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据油站 id 拉取最新的油站数据") public ResponseData queryGasInfoByGasId(@RequestParam(name = "gasId", required = true) String gasId, HttpServletRequest request) { try { return ResponseMsgUtil.success(TuanYouConfig.queryGasInfoByGasId(gasId)); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardInfo() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/initTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "初始化加油站") public ResponseData initTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } JSONObject jsonObjectP = TuanYouConfig.queryGasInfoListByPage(1, 1000); JSONObject resultObjectP = jsonObjectP.getObject("result", JSONObject.class); for (int i = 1; i <= resultObjectP.getInteger("totalPageNum").intValue(); i++) { JSONObject jsonObject = TuanYouConfig.queryGasInfoListByPage(i, 1000); JSONObject resultObject = jsonObject.getObject("result", JSONObject.class); JSONArray jsonArray = resultObject.getJSONArray("gasInfoList"); HighMerchantStore highMerchantStore; HighGasOilPrice highGasOilPrice; for (Object gasObject : jsonArray) { JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(gasObject)); HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreByKey(object.getString("gasId")); if (store != null) { store.setType(1); store.setMerchantId(merchant.getId()); store.setCompanyId(merchant.getCompanyId()); store.setStoreKey(object.getString("gasId")); store.setStoreName(object.getString("gasName")); store.setStoreLogo(object.getString("gasLogoSmall")); store.setRegionId(object.getLong("provinceCode")); store.setRegionName(object.getString("provinceName")); store.setAddress(object.getString("gasAddress")); store.setLongitude(object.getString("gasAddressLongitude")); store.setLatitude(object.getString("gasAddressLatitude")); store.setStatus(object.getInteger("gasStatus")); store.setOperatorId(0L); store.setOperatorName("系统创建"); store.setUpdateTime(new Date()); store.setExt1(object.getString("gasSourceId")); highMerchantStoreService.updateMerchantStoreDetail(store); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("oilNo")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } else { highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } else { highMerchantStore = new HighMerchantStore(); highMerchantStore.setType(1); highMerchantStore.setMerchantId(merchant.getId()); highMerchantStore.setCompanyId(merchant.getCompanyId()); highMerchantStore.setStoreKey(object.getString("gasId")); highMerchantStore.setStoreName(object.getString("gasName")); highMerchantStore.setStoreLogo(object.getString("gasLogoSmall")); highMerchantStore.setRegionId(object.getLong("provinceCode")); highMerchantStore.setRegionName(object.getString("provinceName")); highMerchantStore.setAddress(object.getString("gasAddress")); highMerchantStore.setLongitude(object.getString("gasAddressLongitude")); highMerchantStore.setLatitude(object.getString("gasAddressLatitude")); highMerchantStore.setStatus(1); highMerchantStore.setOperatorId(0L); highMerchantStore.setOperatorName("系统创建"); highMerchantStore.setCreateTime(new Date()); highMerchantStore.setUpdateTime(new Date()); highMerchantStore.setExt1(object.getString("gasSourceId")); HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel(); BeanUtils.copyProperties(highMerchantStore, merchantStoreModel); highMerchantStoreService.insertMerchantStore(merchantStoreModel); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } } } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/detectTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "检测加油站") public ResponseData detectTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } Map param = new HashMap<>(); param.put("merchantId", merchant.getId()); List stores = highMerchantStoreService.getMerchantStoreList(param); for (HighMerchantStore store : stores) { JSONObject jsonObject = TuanYouConfig.queryGasInfoByGasId(store.getStoreKey()); if (jsonObject != null && jsonObject.getString("code").equals("200")) { JSONObject result = jsonObject.getJSONObject("result"); store.setStatus(result.getInteger("gasStatus")); } else { store.setStatus(0); } highMerchantStoreService.updateMerchantStoreDetail(store); } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/queryCompanyAccountInfo2JD", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyAccountInfo2JD() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyAccountInfo2JD()); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryCompanyPriceDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyPriceDetail() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyPriceDetail("LW000115995", "92")); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrdersPay", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "星巴克支付") public ResponseData starbucksOrdersPay(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrdersPay(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payKfcOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "肯德基支付") public ResponseData payKfcOrder(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.payKfcOrder(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/wxSplitAccount", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "微信分账") public ResponseData wxSplitAccount() { try { HighOrder orderNo = highOrderService.getOrderByOrderNo("HF2021101812025050304"); wxProfitsharing(orderNo.getOrderNo(), orderNo.getPaySerialNo(), orderNo.getPayRealPrice()); return ResponseMsgUtil.success("分账成功"); } catch (Exception e) { log.error("HighOrderController --> getOrderById() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryStaging", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "分期查询") public ResponseData queryStaging(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.queryStaging(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/orderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "退款") public ResponseData orderToRefund(HttpServletRequest request) { try { OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund("4200001301202202035413938093", new BigDecimal("30.80"), new BigDecimal("16.90")); return ResponseMsgUtil.success(orderRefundModel); } catch (Exception e) { log.error("HighOrderController --> orderToRefund() error!", e); return ResponseMsgUtil.exception(e); } }*/ @RequestMapping(value = "/sendCNPCTicket", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单查询") public ResponseData sendCNPCTicket(@RequestParam(name = "couponKey", required = true) String couponKey, HttpServletRequest request) { try { String orderNo = System.currentTimeMillis()+""; // 预发码 JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(couponKey, orderNo, 1, "17726395120"); if (preSendCoupon.getInteger("status").equals(1)) { // 给用户发码 JSONObject response = ChongQingCNPCService.sendCNPCTicket(couponKey, orderNo, 1, "17726395120"); return ResponseMsgUtil.success(response); } return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryCoupon", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单查询") public ResponseData queryCoupon(@RequestParam(name = "couponNo", required = true) String couponNo, HttpServletRequest request) { try { return ResponseMsgUtil.success(ChongQingCNPCService.queryCoupon(couponNo)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } public void wxProfitsharing(String transaction_id, String out_order_no, BigDecimal amount) { try { Map param = new LinkedHashMap<>(); param.put("appid", "wx637bd6f7314daa46"); param.put("mch_id", "1289663601"); param.put("sub_mch_id", "1609882817"); // 个体户黎杨珍 param.put("transaction_id", transaction_id); param.put("out_order_no", out_order_no); param.put("nonce_str", WxUtils.makeNonStr()); // 分账金额 BigDecimal porofitSharingAmount = amount; List> receiversList = new ArrayList<>(); Map receiversMap = new LinkedHashMap<>(); receiversMap.put("type", "MERCHANT_ID"); receiversMap.put("account", "1603942866"); receiversMap.put("amount", porofitSharingAmount.multiply(new BigDecimal("100")).intValue()); receiversMap.put("description", "分给商户【惠昕石化】"); receiversList.add(receiversMap); param.put("receivers", JSONObject.toJSONString(receiversList)); String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5", WXPayConstants.SignType.HMACSHA256); param.put("sign", signStr); String resultXmL = this.doRefundRequest(param.get("mch_id"), null, WxUtils.mapToXml(param)); // 请求分账返回的结果 ResultProfitSharing resultProfitSharing = XmlUtil.getObjectFromXML(resultXmL, ResultProfitSharing.class); if (!resultProfitSharing.getResult_code().equals("FAIL")) { HighProfitSharingRecord sharingRecord = new HighProfitSharingRecord(); sharingRecord.setOutOrderNo(resultProfitSharing.getOut_order_no()); sharingRecord.setTransactionId(resultProfitSharing.getTransaction_id()); sharingRecord.setOrderId(resultProfitSharing.getOrder_id()); sharingRecord.setStatus(resultProfitSharing.getResult_code()); sharingRecord.setPrice(amount); sharingRecord.setCreateTime(new Date()); sharingRecord.setContent(resultXmL); highProfitSharingRecordService.insert(sharingRecord); } } catch (Exception e) { log.error("CmsContentController --> getCorporateAdvertising() error!", e); } } public CloseableHttpClient readCertificate(String mchId) throws Exception { /** * 注意PKCS12证书 是从微信商户平台-》账户设置-》 API安全 中下载的 */ KeyStore keyStore = KeyStore.getInstance("PKCS12"); //P12文件目录 证书路径,这里需要你自己修改,linux下还是windows下的根路径 FileInputStream instream = new FileInputStream("/home/project/wx_cert/1289663601_apiclient_cert.p12"); // FileInputStream instream = new FileInputStream("G:\\hurui-project/hai-parent/hai-service/src/main/java/privatekey/1289663601_apiclient_cert.p12"); try { keyStore.load(instream, "1289663601".toCharArray());//这里写密码..默认是你的MCHID } finally { instream.close(); } SSLContext sslcontext = SSLContexts.custom().loadKeyMaterial(keyStore, "1289663601".toCharArray()).build();//这里也是写密码的 SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, SSLConnectionSocketFactory.getDefaultHostnameVerifier()); // Allow TLSv1 protocol only return HttpClients.custom().setSSLSocketFactory(sslsf).build(); } public String doRefundRequest(String mchId, String url, String data) throws Exception { //小程序退款需要调用双向证书的认证 CloseableHttpClient httpClient = readCertificate(mchId); try { HttpPost httpost = new HttpPost("https://api.mch.weixin.qq.com/secapi/pay/profitsharing"); // 设置响应头信息 httpost.addHeader("Connection", "keep-alive"); httpost.addHeader("Accept", "*/*"); httpost.addHeader("Content-Type", "text/xml"); httpost.addHeader("Host", "api.mch.weixin.qq.com"); httpost.addHeader("X-Requested-With", "XMLHttpRequest"); httpost.addHeader("Cache-Control", "max-age=0"); httpost.addHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) "); httpost.setEntity(new StringEntity(data, "UTF-8")); CloseableHttpResponse response = httpClient.execute(httpost); try { HttpEntity entity = response.getEntity(); String jsonStr = EntityUtils.toString(response.getEntity(), "UTF-8"); EntityUtils.consume(entity); return jsonStr; } finally { response.close(); } } catch (Exception e) { throw new RuntimeException(e); } finally { httpClient.close(); } } @RequestMapping(value = "/websocket", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "websocket") public ResponseData websocket(@RequestParam(name = "orderNo", required = true) String orderNo ) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { Map pushMsg = new HashMap<>(); pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); Map msgContent = new HashMap<>(); msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo())); msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + "加油站,收款:" + order.getTotalPrice())); pushMsg.put("message", JSONObject.toJSONString(msgContent)); HttpsUtils.doPost("http://127.0.0.1:9901/msg/test/websocket", pushMsg, new HashMap<>()); } return ResponseMsgUtil.success("null"); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasStationQueryDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasStationQueryDetail") public ResponseData gasStationQueryDetail() { try { return ResponseMsgUtil.success(shellGroupService.gasStationQueryDetail("0001")); } catch (Exception e) { log.error("HighOrderController --> gasStationQueryDetail() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasPageQueryAllStation", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasPageQueryAllStation") public ResponseData gasPageQueryAllStation() { try { gasService.getJiaHaoYouAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasPageQueryAllStation() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasSyncRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasSyncRefund") public ResponseData gasSyncRefund() { try { shellGroupService.gasSyncRefund(new Date(1659511289000L), "1659511289357"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getJzStationListPage", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "getJzStationListPage") public ResponseData getJzStationListPage() { try { gasService.getJinZhuAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/insertV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付") public ResponseData insertV2() { try { String orderNo = "HF2022080818504922206"; JSONObject object = QianZhuConfig.insertV2("PLM100024", orderNo, "15585850137"); object.put("orderNo", orderNo); return ResponseMsgUtil.success(object); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/QueryV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单号") public ResponseData QueryV2(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); JSONObject orderObject = QianZhuConfig.QueryV2(orderNo); if (orderObject != null && orderObject.getLong("Code") == 999) { // 订单失败 // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 3) { // 订单失败 if (order.getOrderStatus() == 2) { highOrderService.thirdOrderToRefund(order.getId()); } else { highOrderService.thirdCancelOrder(order.getId()); } } // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 2) { for (HighChildOrder childOrder : order.getHighChildOrderList()) { childOrder.setChildOrdeStatus(3); } order.setOrderStatus(3); order.setFinishTime(new Date()); highOrderService.updateOrder(order); } } return ResponseMsgUtil.success(QianZhuConfig.QueryV2(orderNo)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } */ @RequestMapping(value = "/getKfcOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询肯德基订单") public ResponseData getKfcOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.getKfcOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克订单") public ResponseData starbucksOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/thirdOrderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "第三方退款") public ResponseData thirdOrderToRefund(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); highOrderService.thirdOrderToRefund(order.getId()); return ResponseMsgUtil.success(""); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/rechargeOrderByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇话费充值 ") public ResponseData rechargeOrderByCy() { try { JSONObject object = new JSONObject(); object.put("mobile" , "18090580471"); object.put("productId" , 172); object.put("agentOrderId" , "RCG" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5)); return ResponseMsgUtil.success(RechargeConfig.rechargeOrderByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryRechargeByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇查询订单") public ResponseData queryRechargeByCy(@RequestParam(name = "orderNo", required = true) String orderNo) { try { JSONObject object = new JSONObject(); object.put("orderNo" , orderNo); return ResponseMsgUtil.success(RechargeConfig.queryRechargeByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/postIp", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "请求ip地址") public ResponseData postIp(HttpServletRequest request) { try { request.getHeader("regionId"); if (request.getHeader("regionId") != null && request.getHeader("regionId").length() != 0) { System.out.println("111"); } return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsgcs.dctpay.com/brest/openApi/test")); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/testMsg", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "测试站内信") public ResponseData testMsg(HttpServletRequest request) { try { bsMsgService.pushUserMsg(71465L , "支付成功"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } } \ No newline at end of file diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java index 55c9238f..0a602e09 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java @@ -305,20 +305,19 @@ public class HighUserDiscountController { if (goodsType.getType().equals(OrderChildGoodsTypeEnum.type3.getType())) { // 过滤出加油服务的加油券 - List collect = userDiscountList.stream().filter(o -> o.getHighDiscount().getUseScope().equals(DiscountUseScope.type7.getType())).collect(Collectors.toList()); + List collect = userDiscountList.stream() + .filter(o -> o.getDiscountUseScope().equals(DiscountUseScope.type7.getType()) || o.getDiscountUseScope().equals(DiscountUseScope.type1.getType())) + .collect(Collectors.toList()); for (HighDiscountUserRel userDiscount : collect) { // 满减 - if (userDiscount.getHighDiscount().getDiscountType().equals(1)) { - if (body.getBigDecimal("goodsPrice").compareTo(userDiscount.getHighDiscount().getDiscountCondition()) >= 0) { + if (userDiscount.getDiscountType().equals(1)) { + if (body.getBigDecimal("goodsPrice").compareTo(userDiscount.getDiscountCondition()) >= 0) { list.add(userDiscount); } } - - if (userDiscount.getHighDiscount().getDiscountType().equals(2) - || userDiscount.getHighDiscount().getDiscountType().equals(3)) { + if (userDiscount.getDiscountType().equals(2) || userDiscount.getDiscountType().equals(3)) { list.add(userDiscount); } - } } list.sort(Comparator.comparing(o -> o.getUseEndTime())); diff --git a/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java b/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java index ae356fb4..25f10dec 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java @@ -54,14 +54,13 @@ public class NotifyController { @ApiOperation(value = "重庆中石油通知") public Object cqCnpcNotify(@RequestBody String paramsStr) { System.out.println(paramsStr); - log.info(paramsStr); + log.info("重庆中石油核销通知"); + log.info("通知参数:" + paramsStr); try { if (StringUtils.isNotBlank(paramsStr)) { JSONObject sendMessage = JSONObject.parseObject(paramsStr).getJSONObject("sendMessage"); JSONObject body = ChongQingCNPCService.decryptBody(sendMessage.getString("body")); - couponCodeOtherService.cqCnpcUseNotify(body); - HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); highGasOrderPush.setType(OrderPushType.type10.getType()); highGasOrderPush.setOrderNo(body.getString("tradeId")); @@ -70,6 +69,7 @@ public class NotifyController { highGasOrderPush.setReturnContent(paramsStr); highGasOrderPushMapper.insert(highGasOrderPush); + couponCodeOtherService.cqCnpcUseNotify(body); Map param = new HashMap<>(); param.put("status", 1); param.put("msg", "成功"); @@ -104,8 +104,8 @@ public class NotifyController { returnContent.put("postMessage", returnPostMessage); return returnContent; } - } catch (Exception e) { + log.info("重庆中石油核销通知业务出现异常", e); return null; // return ResponseMsgUtil.exception(e); } diff --git a/hai-order/src/main/java/com/web/controller/OrderController.java b/hai-order/src/main/java/com/web/controller/OrderController.java index f6e70131..f31f7d09 100644 --- a/hai-order/src/main/java/com/web/controller/OrderController.java +++ b/hai-order/src/main/java/com/web/controller/OrderController.java @@ -42,7 +42,7 @@ import java.util.Map; @Api(value = "订单业务") public class OrderController { - private static Logger log = LoggerFactory.getLogger(OrderController.class); + private static final Logger log = LoggerFactory.getLogger(OrderController.class); @Resource private OrderService orderService; diff --git a/hai-order/src/main/java/com/web/controller/OrderPayController.java b/hai-order/src/main/java/com/web/controller/OrderPayController.java index 1828ad0d..82cad564 100644 --- a/hai-order/src/main/java/com/web/controller/OrderPayController.java +++ b/hai-order/src/main/java/com/web/controller/OrderPayController.java @@ -294,6 +294,9 @@ public class OrderPayController { } else if (userCard.getType().equals(UserCardType.type2.getType())) { return ResponseMsgUtil.success(orderPayService.oilCardPay(order, userCard)); + } else if (userCard.getType().equals(UserCardType.type3.getType())) { + return ResponseMsgUtil.success(orderPayService.oilCardPay(order, userCard)); + } else { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的卡号类型"); } diff --git a/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java b/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java index e3cfaa01..4a95adf5 100644 --- a/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java +++ b/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java @@ -58,6 +58,7 @@ public class OrderIntegralRechargeController { public ResponseData getOrderList(@RequestParam(name = "memPhone", required = false) String memPhone, @RequestParam(name = "orderNo", required = false) String orderNo, @RequestParam(name = "status", required = false) Long status, + @RequestParam(name = "payType", required = false) Long payType, @RequestParam(name = "createTimeS", required = false) Long createTimeS, @RequestParam(name = "createTimeE", required = false) Long createTimeE, @RequestParam(name = "payTimeS", required = false) Long payTimeS, @@ -69,7 +70,8 @@ public class OrderIntegralRechargeController { Map param = new HashMap<>(); param.put("orderNo", orderNo); param.put("memPhone", memPhone); - param.put("status", status); + param.put("orderStatus", status); + param.put("payType", payType); param.put("createTimeS", createTimeS); param.put("createTimeE", createTimeE); param.put("payTimeS", payTimeS); diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java index cab823fc..3ca8b7d7 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; +import com.hai.config.PayloService; import com.hai.config.TuanYouConfig; import com.hai.entity.HighGasOilPrice; import com.hai.entity.HighGasOilPriceOfficial; @@ -41,7 +42,6 @@ public class HighGasSchedule { @Resource private HighGasService gasService; - @Scheduled(cron = "0 0 1 * * ?") //每日凌晨1点执行一次 public void certification() throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(39L); @@ -84,11 +84,11 @@ public class HighGasSchedule { for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 - highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getInteger("oilNo")); + highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("oilNo")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); + highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); @@ -98,7 +98,7 @@ public class HighGasSchedule { highGasOilPrice.setStatus(GasOilPriceStatusEnum.status1.getStatus()); } else { highGasOilPrice.setMerchantStoreId(store.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); + highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); @@ -137,7 +137,7 @@ public class HighGasSchedule { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); + highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); @@ -156,6 +156,11 @@ public class HighGasSchedule { gasService.getJiaHaoYouAllStation(); } + @Scheduled(cron = "10 0 0 * * ?") // 每日凌晨00:00:10执行一次 + public void getPayloAllStation() throws Exception { + gasService.getPayloAllStation(); + } + /* @Scheduled(cron = "0 1 0 * * ?") //每日凌晨12点01分执行一次 public void getJinZhuAllStation() throws Exception { gasService.getJinZhuAllStation(); diff --git a/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java b/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java index 38dd8f38..0b258e85 100644 --- a/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java +++ b/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java @@ -22,6 +22,22 @@ public class ChongQingCNPCService { private static Logger log = LoggerFactory.getLogger(ChongQingCNPCService.class); + /** + * 电子券预发放接口 + * @param requestCode + * @param tradeId + * @param ticketSum + * @param phone + */ + public static JSONObject preSendCoupon(String requestCode, String tradeId, Integer ticketSum, String phone) throws Exception { + Map map = new HashMap<>(); + map.put("requestCode", requestCode); + map.put("tradeId", tradeId); + map.put("ticketSum", ticketSum); + map.put("phone", phone); + return request("preSendCoupon", map); + } + /** * 发放电子券 * @param requestCode diff --git a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java index bd2c6f1b..bed6c3c0 100644 --- a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java +++ b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java @@ -306,8 +306,8 @@ public class HuiLianTongUnionCardConfig { } public static void main(String[] args) { - - String data = "T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YDwYfnUdBVz6Kj4HS2oCA1TTiqJkCUIYa4G\\nnKXcKOzlf7gwVpP6h5gK1tT3xUQd1iW9VOjF0iOn9bVuWzUqlPb+6YhgCjwVIWvutzGr07fQX1jV\\n4jlRdiZVaq3frwd8SuG5KRlWTHXXTnshDIoO4DyR5P7HfF3W3m4=".replace("\\n", ""); + // {"respMessage":"ok","data":"Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\nyj/wi/UNr8TDne094+yu","sign":"47186141FD8B3FB6CCB590F58321D9C6","respCode":"0000","responseId":"1669202185936"} + String data = "Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\\nyj/wi/UNr8TDne094+yu".replace("\\n", ""); String decodeData = DesUtil.decode("F8E91A3C", data, Charset.forName("UTF-8")); System.out.println(JSONObject.parseObject(decodeData)); diff --git a/hai-service/src/main/java/com/hai/config/PayloService.java b/hai-service/src/main/java/com/hai/config/PayloService.java new file mode 100644 index 00000000..c67c1207 --- /dev/null +++ b/hai-service/src/main/java/com/hai/config/PayloService.java @@ -0,0 +1,201 @@ +package com.hai.config; + +import com.alibaba.fastjson.JSONObject; +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.common.utils.DateUtil; +import com.hai.common.utils.HttpsUtils; +import com.hai.common.utils.MD5Util; +import com.hai.enum_type.TripartiteReqLogReqType; +import com.hai.enum_type.TripartiteReqLogType; +import com.hai.service.BsTripartiteReqLogService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.*; + +/** + * 延长壳牌(四川)石油公司 paylo系统 + * @className: PayloService + * @author: HuRui + * @date: 2022/12/7 + **/ +@Component +public class PayloService { + + private static final String partnerId = "S0302207281600105753"; + private static final String ShellPlatMerchantKey = "wqisfmkzea6mwd7ogbyh3488jv0hqhdj"; + + @Resource + private BsTripartiteReqLogService reqLogService; + + /** + * 查询全量加油站 + * @param pageNum 当前页码 + * @param pageSize 每页数据量。最大值50 + * @return + */ + public JSONObject ycShellPageQueryAllStation(Integer pageNum, Integer pageSize) throws Exception { + Map param = new HashMap<>(); + param.put("pageNo", pageNum); + param.put("pageSize", pageSize); + return request(System.currentTimeMillis()+"","ycShellPageQueryAllStation", param); + } + + /** + * 查询单个油站全量信息 + * @param stationCode 油站编码 + * @return + */ + public JSONObject ycShellStationQueryDetail(String stationCode) { + try { + Map param = new HashMap<>(); + param.put("stationCode", stationCode); + return request(System.currentTimeMillis()+"","ycShellStationQueryDetail", param); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + + /** + * 【同步】油站付款 + * @param orderNo 订单号 + * @param stationCode 油站编码 + * @param finishTime 完成时间 + * @param oilPrice 加油金额 + * @param oilCode 油品编码 + * @param oilGun 油枪 + * @param settlementAmount 支付金额 + * @param channelFavourAmount 优惠金额 + * @return + */ + public JSONObject syncYcShellPaymentNotify(String orderNo, + String stationCode, + Date finishTime, + BigDecimal oilPrice, + String oilCode, + String oilGun, + BigDecimal settlementAmount, + BigDecimal channelFavourAmount) { + try { + Map param = new HashMap<>(); + param.put("stationCode", stationCode); + param.put("orderType", "OIL"); + param.put("finishTime", DateUtil.date2String(finishTime, "yyyy-MM-dd HH:mm:ss")); + param.put("channelFavourAmount", channelFavourAmount); + + Map tradeOilOrder = new HashMap<>(); + tradeOilOrder.put("amount", oilPrice); + tradeOilOrder.put("code", oilCode); + tradeOilOrder.put("oilGun", oilGun); + tradeOilOrder.put("channelSettlementAmount", settlementAmount); + param.put("tradeOilOrder", JSONObject.toJSONString(tradeOilOrder)); + return request(orderNo, "syncYcShellPaymentNotify", param); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 【同步】油站退款 + * @param finishTime 业务完成时间 + * @param tradeNo 交易流水号 + * @return + */ + public JSONObject syncYcShellRefundNotify(Date finishTime,String tradeNo) throws Exception { + Map param = new HashMap<>(); + param.put("finishTime", DateUtil.date2String(finishTime, "yyyy-MM-dd HH:mm:ss")); + param.put("tradeNo", tradeNo); + // 请求接口 + return request(System.currentTimeMillis()+"" ,"syncYcShellRefundNotify", param); + } + + /** + * 接口请求 + * @param map + * @return + * @throws Exception + */ + private JSONObject request(String logSerialNo, String service, Map map) throws Exception { + Map param = new HashMap<>(); + param.put("merchantOrderNo", logSerialNo); + param.put("partnerId", partnerId); + param.put("service", service); + param.put("version", "1.0.0"); + param.put("signType", "MD5"); + + for (Map.Entry entry : map.entrySet()) { + param.put(entry.getKey(), entry.getValue()); + } + param.put("sign", MD5Util.encode(generateSignature(param, ShellPlatMerchantKey).getBytes()).toLowerCase()); + + // 请求接口 + JSONObject object = HttpsUtils.doPost(CommonSysConst.getSysConfig().getShellGroupUrl(), param); + reqLogService.insert( + TripartiteReqLogType.type2, + logSerialNo, + TripartiteReqLogReqType.type1, + CommonSysConst.getSysConfig().getShellGroupUrl(), + this.generateParam(param), + object.toString() + ); + + if (object == null || !object.getString("status").equals("SUCCESS")) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object == null?"请求失败":object.getString("message")); + } + return object; + } + + /** + * 生成签名 + * @param data 数据 + * @param key 秘钥app_secret + * @return 加密结果 + */ + public static String generateSignature(final Map data, String key) { + Set keySet = data.keySet(); + String[] keyArray = keySet.toArray(new String[keySet.size()]); + Arrays.sort(keyArray); + StringBuilder sb = new StringBuilder(); + for (String k : keyArray) { + if (data.get(k) != null) { + if (StringUtils.isBlank(sb.toString())) { + sb.append(k).append("=").append(data.get(k)); + } else { + sb.append("&").append(k).append("=").append(data.get(k)); + } + } + } + sb.append(key); + return sb.toString(); + } + + /** + * 生成参数 + * @param data 数据 + * @return 加密结果 + */ + public static String generateParam(final Map data) { + Set keySet = data.keySet(); + String[] keyArray = keySet.toArray(new String[keySet.size()]); + StringBuilder sb = new StringBuilder(); + for (String k : keyArray) { + if (data.get(k) != null) { + if (StringUtils.isBlank(sb.toString())) { + sb.append(k).append("=").append(data.get(k)); + } else { + sb.append("&").append(k).append("=").append(data.get(k)); + } + } + } + return sb.toString(); + } + + +} diff --git a/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapper.java b/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapper.java new file mode 100644 index 00000000..204832c8 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapper.java @@ -0,0 +1,279 @@ +package com.hai.dao; + +import com.hai.entity.BsTradeOrder; +import com.hai.entity.BsTradeOrderExample; +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 BsTradeOrderMapper extends BsTradeOrderMapperExt { + @SelectProvider(type=BsTradeOrderSqlProvider.class, method="countByExample") + long countByExample(BsTradeOrderExample example); + + @DeleteProvider(type=BsTradeOrderSqlProvider.class, method="deleteByExample") + int deleteByExample(BsTradeOrderExample example); + + @Delete({ + "delete from bs_trade_order", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_trade_order (company_id, agent_id, ", + "salesman_id, salesman_name, ", + "mer_id, mer_name, mer_no, ", + "store_id, store_name, ", + "device_id, device_sn, ", + "qr_code_id, qr_code_sn, ", + "platform_type, platform_mer_no, ", + "platform_trade_no, platform_log_no, ", + "pay_user_id, pay_mode, ", + "out_trade_no, trade_amount, ", + "store_discount_satisfy, store_discount_id, ", + "store_discount_name, store_discount_type, ", + "store_discount_price, store_discount_actual_price, ", + "user_id, user_phone, ", + "user_discount_id, user_discount_name, ", + "user_discount_type, user_discount_price, ", + "user_discount_actual_price, trade_actual_amount, ", + "acc_trade_no, acc_mdiscount_amount, ", + "acc_discount_amount, acc_payment_code, ", + "card_type, `status`, ", + "pay_time, create_time, ", + "cancel_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ", + "#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ", + "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{merNo,jdbcType=VARCHAR}, ", + "#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ", + "#{deviceId,jdbcType=BIGINT}, #{deviceSn,jdbcType=VARCHAR}, ", + "#{qrCodeId,jdbcType=BIGINT}, #{qrCodeSn,jdbcType=VARCHAR}, ", + "#{platformType,jdbcType=INTEGER}, #{platformMerNo,jdbcType=VARCHAR}, ", + "#{platformTradeNo,jdbcType=VARCHAR}, #{platformLogNo,jdbcType=VARCHAR}, ", + "#{payUserId,jdbcType=VARCHAR}, #{payMode,jdbcType=VARCHAR}, ", + "#{outTradeNo,jdbcType=VARCHAR}, #{tradeAmount,jdbcType=DECIMAL}, ", + "#{storeDiscountSatisfy,jdbcType=INTEGER}, #{storeDiscountId,jdbcType=BIGINT}, ", + "#{storeDiscountName,jdbcType=VARCHAR}, #{storeDiscountType,jdbcType=INTEGER}, ", + "#{storeDiscountPrice,jdbcType=DECIMAL}, #{storeDiscountActualPrice,jdbcType=DECIMAL}, ", + "#{userId,jdbcType=INTEGER}, #{userPhone,jdbcType=VARCHAR}, ", + "#{userDiscountId,jdbcType=BIGINT}, #{userDiscountName,jdbcType=VARCHAR}, ", + "#{userDiscountType,jdbcType=INTEGER}, #{userDiscountPrice,jdbcType=DECIMAL}, ", + "#{userDiscountActualPrice,jdbcType=DECIMAL}, #{tradeActualAmount,jdbcType=DECIMAL}, ", + "#{accTradeNo,jdbcType=VARCHAR}, #{accMdiscountAmount,jdbcType=DECIMAL}, ", + "#{accDiscountAmount,jdbcType=DECIMAL}, #{accPaymentCode,jdbcType=VARCHAR}, ", + "#{cardType,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{payTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{cancelTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsTradeOrder record); + + @InsertProvider(type=BsTradeOrderSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsTradeOrder record); + + @SelectProvider(type=BsTradeOrderSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), + @Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT), + @Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="device_id", property="deviceId", jdbcType=JdbcType.BIGINT), + @Result(column="device_sn", property="deviceSn", jdbcType=JdbcType.VARCHAR), + @Result(column="qr_code_id", property="qrCodeId", jdbcType=JdbcType.BIGINT), + @Result(column="qr_code_sn", property="qrCodeSn", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), + @Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR), + @Result(column="pay_user_id", property="payUserId", jdbcType=JdbcType.VARCHAR), + @Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR), + @Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="trade_amount", property="tradeAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="store_discount_satisfy", property="storeDiscountSatisfy", jdbcType=JdbcType.INTEGER), + @Result(column="store_discount_id", property="storeDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="store_discount_name", property="storeDiscountName", jdbcType=JdbcType.VARCHAR), + @Result(column="store_discount_type", property="storeDiscountType", jdbcType=JdbcType.INTEGER), + @Result(column="store_discount_price", property="storeDiscountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="store_discount_actual_price", property="storeDiscountActualPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), + @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="user_discount_id", property="userDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="user_discount_name", property="userDiscountName", jdbcType=JdbcType.VARCHAR), + @Result(column="user_discount_type", property="userDiscountType", jdbcType=JdbcType.INTEGER), + @Result(column="user_discount_price", property="userDiscountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="user_discount_actual_price", property="userDiscountActualPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="trade_actual_amount", property="tradeActualAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_trade_no", property="accTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="acc_mdiscount_amount", property="accMdiscountAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_discount_amount", property="accDiscountAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_payment_code", property="accPaymentCode", jdbcType=JdbcType.VARCHAR), + @Result(column="card_type", property="cardType", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsTradeOrderExample example); + + @Select({ + "select", + "id, company_id, agent_id, salesman_id, salesman_name, mer_id, mer_name, mer_no, ", + "store_id, store_name, device_id, device_sn, qr_code_id, qr_code_sn, platform_type, ", + "platform_mer_no, platform_trade_no, platform_log_no, pay_user_id, pay_mode, ", + "out_trade_no, trade_amount, store_discount_satisfy, store_discount_id, store_discount_name, ", + "store_discount_type, store_discount_price, store_discount_actual_price, user_id, ", + "user_phone, user_discount_id, user_discount_name, user_discount_type, user_discount_price, ", + "user_discount_actual_price, trade_actual_amount, acc_trade_no, acc_mdiscount_amount, ", + "acc_discount_amount, acc_payment_code, card_type, `status`, pay_time, create_time, ", + "cancel_time, update_time, ext_1, ext_2, ext_3", + "from bs_trade_order", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), + @Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT), + @Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="device_id", property="deviceId", jdbcType=JdbcType.BIGINT), + @Result(column="device_sn", property="deviceSn", jdbcType=JdbcType.VARCHAR), + @Result(column="qr_code_id", property="qrCodeId", jdbcType=JdbcType.BIGINT), + @Result(column="qr_code_sn", property="qrCodeSn", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), + @Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR), + @Result(column="pay_user_id", property="payUserId", jdbcType=JdbcType.VARCHAR), + @Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR), + @Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="trade_amount", property="tradeAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="store_discount_satisfy", property="storeDiscountSatisfy", jdbcType=JdbcType.INTEGER), + @Result(column="store_discount_id", property="storeDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="store_discount_name", property="storeDiscountName", jdbcType=JdbcType.VARCHAR), + @Result(column="store_discount_type", property="storeDiscountType", jdbcType=JdbcType.INTEGER), + @Result(column="store_discount_price", property="storeDiscountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="store_discount_actual_price", property="storeDiscountActualPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), + @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="user_discount_id", property="userDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="user_discount_name", property="userDiscountName", jdbcType=JdbcType.VARCHAR), + @Result(column="user_discount_type", property="userDiscountType", jdbcType=JdbcType.INTEGER), + @Result(column="user_discount_price", property="userDiscountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="user_discount_actual_price", property="userDiscountActualPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="trade_actual_amount", property="tradeActualAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_trade_no", property="accTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="acc_mdiscount_amount", property="accMdiscountAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_discount_amount", property="accDiscountAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_payment_code", property="accPaymentCode", jdbcType=JdbcType.VARCHAR), + @Result(column="card_type", property="cardType", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsTradeOrder selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsTradeOrderSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsTradeOrder record, @Param("example") BsTradeOrderExample example); + + @UpdateProvider(type=BsTradeOrderSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsTradeOrder record, @Param("example") BsTradeOrderExample example); + + @UpdateProvider(type=BsTradeOrderSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsTradeOrder record); + + @Update({ + "update bs_trade_order", + "set company_id = #{companyId,jdbcType=BIGINT},", + "agent_id = #{agentId,jdbcType=BIGINT},", + "salesman_id = #{salesmanId,jdbcType=BIGINT},", + "salesman_name = #{salesmanName,jdbcType=VARCHAR},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "mer_no = #{merNo,jdbcType=VARCHAR},", + "store_id = #{storeId,jdbcType=BIGINT},", + "store_name = #{storeName,jdbcType=VARCHAR},", + "device_id = #{deviceId,jdbcType=BIGINT},", + "device_sn = #{deviceSn,jdbcType=VARCHAR},", + "qr_code_id = #{qrCodeId,jdbcType=BIGINT},", + "qr_code_sn = #{qrCodeSn,jdbcType=VARCHAR},", + "platform_type = #{platformType,jdbcType=INTEGER},", + "platform_mer_no = #{platformMerNo,jdbcType=VARCHAR},", + "platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR},", + "platform_log_no = #{platformLogNo,jdbcType=VARCHAR},", + "pay_user_id = #{payUserId,jdbcType=VARCHAR},", + "pay_mode = #{payMode,jdbcType=VARCHAR},", + "out_trade_no = #{outTradeNo,jdbcType=VARCHAR},", + "trade_amount = #{tradeAmount,jdbcType=DECIMAL},", + "store_discount_satisfy = #{storeDiscountSatisfy,jdbcType=INTEGER},", + "store_discount_id = #{storeDiscountId,jdbcType=BIGINT},", + "store_discount_name = #{storeDiscountName,jdbcType=VARCHAR},", + "store_discount_type = #{storeDiscountType,jdbcType=INTEGER},", + "store_discount_price = #{storeDiscountPrice,jdbcType=DECIMAL},", + "store_discount_actual_price = #{storeDiscountActualPrice,jdbcType=DECIMAL},", + "user_id = #{userId,jdbcType=INTEGER},", + "user_phone = #{userPhone,jdbcType=VARCHAR},", + "user_discount_id = #{userDiscountId,jdbcType=BIGINT},", + "user_discount_name = #{userDiscountName,jdbcType=VARCHAR},", + "user_discount_type = #{userDiscountType,jdbcType=INTEGER},", + "user_discount_price = #{userDiscountPrice,jdbcType=DECIMAL},", + "user_discount_actual_price = #{userDiscountActualPrice,jdbcType=DECIMAL},", + "trade_actual_amount = #{tradeActualAmount,jdbcType=DECIMAL},", + "acc_trade_no = #{accTradeNo,jdbcType=VARCHAR},", + "acc_mdiscount_amount = #{accMdiscountAmount,jdbcType=DECIMAL},", + "acc_discount_amount = #{accDiscountAmount,jdbcType=DECIMAL},", + "acc_payment_code = #{accPaymentCode,jdbcType=VARCHAR},", + "card_type = #{cardType,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "pay_time = #{payTime,jdbcType=TIMESTAMP},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "cancel_time = #{cancelTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsTradeOrder record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapperExt.java new file mode 100644 index 00000000..cc0d457d --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface BsTradeOrderMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/BsTradeOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/BsTradeOrderSqlProvider.java new file mode 100644 index 00000000..6dad1100 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsTradeOrderSqlProvider.java @@ -0,0 +1,850 @@ +package com.hai.dao; + +import com.hai.entity.BsTradeOrder; +import com.hai.entity.BsTradeOrderExample.Criteria; +import com.hai.entity.BsTradeOrderExample.Criterion; +import com.hai.entity.BsTradeOrderExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsTradeOrderSqlProvider { + + public String countByExample(BsTradeOrderExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_trade_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsTradeOrderExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_trade_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsTradeOrder record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_trade_order"); + + if (record.getCompanyId() != null) { + sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); + } + + if (record.getAgentId() != null) { + sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanId() != null) { + sql.VALUES("salesman_id", "#{salesmanId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanName() != null) { + sql.VALUES("salesman_name", "#{salesmanName,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerNo() != null) { + sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}"); + } + + if (record.getDeviceId() != null) { + sql.VALUES("device_id", "#{deviceId,jdbcType=BIGINT}"); + } + + if (record.getDeviceSn() != null) { + sql.VALUES("device_sn", "#{deviceSn,jdbcType=VARCHAR}"); + } + + if (record.getQrCodeId() != null) { + sql.VALUES("qr_code_id", "#{qrCodeId,jdbcType=BIGINT}"); + } + + if (record.getQrCodeSn() != null) { + sql.VALUES("qr_code_sn", "#{qrCodeSn,jdbcType=VARCHAR}"); + } + + if (record.getPlatformType() != null) { + sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}"); + } + + if (record.getPlatformMerNo() != null) { + sql.VALUES("platform_mer_no", "#{platformMerNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformTradeNo() != null) { + sql.VALUES("platform_trade_no", "#{platformTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformLogNo() != null) { + sql.VALUES("platform_log_no", "#{platformLogNo,jdbcType=VARCHAR}"); + } + + if (record.getPayUserId() != null) { + sql.VALUES("pay_user_id", "#{payUserId,jdbcType=VARCHAR}"); + } + + if (record.getPayMode() != null) { + sql.VALUES("pay_mode", "#{payMode,jdbcType=VARCHAR}"); + } + + if (record.getOutTradeNo() != null) { + sql.VALUES("out_trade_no", "#{outTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getTradeAmount() != null) { + sql.VALUES("trade_amount", "#{tradeAmount,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountSatisfy() != null) { + sql.VALUES("store_discount_satisfy", "#{storeDiscountSatisfy,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountId() != null) { + sql.VALUES("store_discount_id", "#{storeDiscountId,jdbcType=BIGINT}"); + } + + if (record.getStoreDiscountName() != null) { + sql.VALUES("store_discount_name", "#{storeDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getStoreDiscountType() != null) { + sql.VALUES("store_discount_type", "#{storeDiscountType,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountPrice() != null) { + sql.VALUES("store_discount_price", "#{storeDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountActualPrice() != null) { + sql.VALUES("store_discount_actual_price", "#{storeDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=INTEGER}"); + } + + if (record.getUserPhone() != null) { + sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountId() != null) { + sql.VALUES("user_discount_id", "#{userDiscountId,jdbcType=BIGINT}"); + } + + if (record.getUserDiscountName() != null) { + sql.VALUES("user_discount_name", "#{userDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountType() != null) { + sql.VALUES("user_discount_type", "#{userDiscountType,jdbcType=INTEGER}"); + } + + if (record.getUserDiscountPrice() != null) { + sql.VALUES("user_discount_price", "#{userDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserDiscountActualPrice() != null) { + sql.VALUES("user_discount_actual_price", "#{userDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getTradeActualAmount() != null) { + sql.VALUES("trade_actual_amount", "#{tradeActualAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccTradeNo() != null) { + sql.VALUES("acc_trade_no", "#{accTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getAccMdiscountAmount() != null) { + sql.VALUES("acc_mdiscount_amount", "#{accMdiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccDiscountAmount() != null) { + sql.VALUES("acc_discount_amount", "#{accDiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccPaymentCode() != null) { + sql.VALUES("acc_payment_code", "#{accPaymentCode,jdbcType=VARCHAR}"); + } + + if (record.getCardType() != null) { + sql.VALUES("card_type", "#{cardType,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.VALUES("pay_time", "#{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCancelTime() != null) { + sql.VALUES("cancel_time", "#{cancelTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(BsTradeOrderExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("company_id"); + sql.SELECT("agent_id"); + sql.SELECT("salesman_id"); + sql.SELECT("salesman_name"); + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("mer_no"); + sql.SELECT("store_id"); + sql.SELECT("store_name"); + sql.SELECT("device_id"); + sql.SELECT("device_sn"); + sql.SELECT("qr_code_id"); + sql.SELECT("qr_code_sn"); + sql.SELECT("platform_type"); + sql.SELECT("platform_mer_no"); + sql.SELECT("platform_trade_no"); + sql.SELECT("platform_log_no"); + sql.SELECT("pay_user_id"); + sql.SELECT("pay_mode"); + sql.SELECT("out_trade_no"); + sql.SELECT("trade_amount"); + sql.SELECT("store_discount_satisfy"); + sql.SELECT("store_discount_id"); + sql.SELECT("store_discount_name"); + sql.SELECT("store_discount_type"); + sql.SELECT("store_discount_price"); + sql.SELECT("store_discount_actual_price"); + sql.SELECT("user_id"); + sql.SELECT("user_phone"); + sql.SELECT("user_discount_id"); + sql.SELECT("user_discount_name"); + sql.SELECT("user_discount_type"); + sql.SELECT("user_discount_price"); + sql.SELECT("user_discount_actual_price"); + sql.SELECT("trade_actual_amount"); + sql.SELECT("acc_trade_no"); + sql.SELECT("acc_mdiscount_amount"); + sql.SELECT("acc_discount_amount"); + sql.SELECT("acc_payment_code"); + sql.SELECT("card_type"); + sql.SELECT("`status`"); + sql.SELECT("pay_time"); + sql.SELECT("create_time"); + sql.SELECT("cancel_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_trade_order"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsTradeOrder record = (BsTradeOrder) parameter.get("record"); + BsTradeOrderExample example = (BsTradeOrderExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_trade_order"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getCompanyId() != null) { + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + } + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanId() != null) { + sql.SET("salesman_id = #{record.salesmanId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanName() != null) { + sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + } + + if (record.getDeviceId() != null) { + sql.SET("device_id = #{record.deviceId,jdbcType=BIGINT}"); + } + + if (record.getDeviceSn() != null) { + sql.SET("device_sn = #{record.deviceSn,jdbcType=VARCHAR}"); + } + + if (record.getQrCodeId() != null) { + sql.SET("qr_code_id = #{record.qrCodeId,jdbcType=BIGINT}"); + } + + if (record.getQrCodeSn() != null) { + sql.SET("qr_code_sn = #{record.qrCodeSn,jdbcType=VARCHAR}"); + } + + if (record.getPlatformType() != null) { + sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}"); + } + + if (record.getPlatformMerNo() != null) { + sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformTradeNo() != null) { + sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformLogNo() != null) { + sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}"); + } + + if (record.getPayUserId() != null) { + sql.SET("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}"); + } + + if (record.getPayMode() != null) { + sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}"); + } + + if (record.getOutTradeNo() != null) { + sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getTradeAmount() != null) { + sql.SET("trade_amount = #{record.tradeAmount,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountSatisfy() != null) { + sql.SET("store_discount_satisfy = #{record.storeDiscountSatisfy,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountId() != null) { + sql.SET("store_discount_id = #{record.storeDiscountId,jdbcType=BIGINT}"); + } + + if (record.getStoreDiscountName() != null) { + sql.SET("store_discount_name = #{record.storeDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getStoreDiscountType() != null) { + sql.SET("store_discount_type = #{record.storeDiscountType,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountPrice() != null) { + sql.SET("store_discount_price = #{record.storeDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountActualPrice() != null) { + sql.SET("store_discount_actual_price = #{record.storeDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); + } + + if (record.getUserPhone() != null) { + sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountId() != null) { + sql.SET("user_discount_id = #{record.userDiscountId,jdbcType=BIGINT}"); + } + + if (record.getUserDiscountName() != null) { + sql.SET("user_discount_name = #{record.userDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountType() != null) { + sql.SET("user_discount_type = #{record.userDiscountType,jdbcType=INTEGER}"); + } + + if (record.getUserDiscountPrice() != null) { + sql.SET("user_discount_price = #{record.userDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserDiscountActualPrice() != null) { + sql.SET("user_discount_actual_price = #{record.userDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getTradeActualAmount() != null) { + sql.SET("trade_actual_amount = #{record.tradeActualAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccTradeNo() != null) { + sql.SET("acc_trade_no = #{record.accTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getAccMdiscountAmount() != null) { + sql.SET("acc_mdiscount_amount = #{record.accMdiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccDiscountAmount() != null) { + sql.SET("acc_discount_amount = #{record.accDiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccPaymentCode() != null) { + sql.SET("acc_payment_code = #{record.accPaymentCode,jdbcType=VARCHAR}"); + } + + if (record.getCardType() != null) { + sql.SET("card_type = #{record.cardType,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCancelTime() != null) { + sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_trade_order"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); + sql.SET("salesman_id = #{record.salesmanId,jdbcType=BIGINT}"); + sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + sql.SET("device_id = #{record.deviceId,jdbcType=BIGINT}"); + sql.SET("device_sn = #{record.deviceSn,jdbcType=VARCHAR}"); + sql.SET("qr_code_id = #{record.qrCodeId,jdbcType=BIGINT}"); + sql.SET("qr_code_sn = #{record.qrCodeSn,jdbcType=VARCHAR}"); + sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}"); + sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}"); + sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}"); + sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}"); + sql.SET("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}"); + sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}"); + sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}"); + sql.SET("trade_amount = #{record.tradeAmount,jdbcType=DECIMAL}"); + sql.SET("store_discount_satisfy = #{record.storeDiscountSatisfy,jdbcType=INTEGER}"); + sql.SET("store_discount_id = #{record.storeDiscountId,jdbcType=BIGINT}"); + sql.SET("store_discount_name = #{record.storeDiscountName,jdbcType=VARCHAR}"); + sql.SET("store_discount_type = #{record.storeDiscountType,jdbcType=INTEGER}"); + sql.SET("store_discount_price = #{record.storeDiscountPrice,jdbcType=DECIMAL}"); + sql.SET("store_discount_actual_price = #{record.storeDiscountActualPrice,jdbcType=DECIMAL}"); + sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); + sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); + sql.SET("user_discount_id = #{record.userDiscountId,jdbcType=BIGINT}"); + sql.SET("user_discount_name = #{record.userDiscountName,jdbcType=VARCHAR}"); + sql.SET("user_discount_type = #{record.userDiscountType,jdbcType=INTEGER}"); + sql.SET("user_discount_price = #{record.userDiscountPrice,jdbcType=DECIMAL}"); + sql.SET("user_discount_actual_price = #{record.userDiscountActualPrice,jdbcType=DECIMAL}"); + sql.SET("trade_actual_amount = #{record.tradeActualAmount,jdbcType=DECIMAL}"); + sql.SET("acc_trade_no = #{record.accTradeNo,jdbcType=VARCHAR}"); + sql.SET("acc_mdiscount_amount = #{record.accMdiscountAmount,jdbcType=DECIMAL}"); + sql.SET("acc_discount_amount = #{record.accDiscountAmount,jdbcType=DECIMAL}"); + sql.SET("acc_payment_code = #{record.accPaymentCode,jdbcType=VARCHAR}"); + sql.SET("card_type = #{record.cardType,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsTradeOrderExample example = (BsTradeOrderExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsTradeOrder record) { + SQL sql = new SQL(); + sql.UPDATE("bs_trade_order"); + + if (record.getCompanyId() != null) { + sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); + } + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{agentId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanId() != null) { + sql.SET("salesman_id = #{salesmanId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanName() != null) { + sql.SET("salesman_name = #{salesmanName,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{storeName,jdbcType=VARCHAR}"); + } + + if (record.getDeviceId() != null) { + sql.SET("device_id = #{deviceId,jdbcType=BIGINT}"); + } + + if (record.getDeviceSn() != null) { + sql.SET("device_sn = #{deviceSn,jdbcType=VARCHAR}"); + } + + if (record.getQrCodeId() != null) { + sql.SET("qr_code_id = #{qrCodeId,jdbcType=BIGINT}"); + } + + if (record.getQrCodeSn() != null) { + sql.SET("qr_code_sn = #{qrCodeSn,jdbcType=VARCHAR}"); + } + + if (record.getPlatformType() != null) { + sql.SET("platform_type = #{platformType,jdbcType=INTEGER}"); + } + + if (record.getPlatformMerNo() != null) { + sql.SET("platform_mer_no = #{platformMerNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformTradeNo() != null) { + sql.SET("platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformLogNo() != null) { + sql.SET("platform_log_no = #{platformLogNo,jdbcType=VARCHAR}"); + } + + if (record.getPayUserId() != null) { + sql.SET("pay_user_id = #{payUserId,jdbcType=VARCHAR}"); + } + + if (record.getPayMode() != null) { + sql.SET("pay_mode = #{payMode,jdbcType=VARCHAR}"); + } + + if (record.getOutTradeNo() != null) { + sql.SET("out_trade_no = #{outTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getTradeAmount() != null) { + sql.SET("trade_amount = #{tradeAmount,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountSatisfy() != null) { + sql.SET("store_discount_satisfy = #{storeDiscountSatisfy,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountId() != null) { + sql.SET("store_discount_id = #{storeDiscountId,jdbcType=BIGINT}"); + } + + if (record.getStoreDiscountName() != null) { + sql.SET("store_discount_name = #{storeDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getStoreDiscountType() != null) { + sql.SET("store_discount_type = #{storeDiscountType,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountPrice() != null) { + sql.SET("store_discount_price = #{storeDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountActualPrice() != null) { + sql.SET("store_discount_actual_price = #{storeDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=INTEGER}"); + } + + if (record.getUserPhone() != null) { + sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountId() != null) { + sql.SET("user_discount_id = #{userDiscountId,jdbcType=BIGINT}"); + } + + if (record.getUserDiscountName() != null) { + sql.SET("user_discount_name = #{userDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountType() != null) { + sql.SET("user_discount_type = #{userDiscountType,jdbcType=INTEGER}"); + } + + if (record.getUserDiscountPrice() != null) { + sql.SET("user_discount_price = #{userDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserDiscountActualPrice() != null) { + sql.SET("user_discount_actual_price = #{userDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getTradeActualAmount() != null) { + sql.SET("trade_actual_amount = #{tradeActualAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccTradeNo() != null) { + sql.SET("acc_trade_no = #{accTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getAccMdiscountAmount() != null) { + sql.SET("acc_mdiscount_amount = #{accMdiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccDiscountAmount() != null) { + sql.SET("acc_discount_amount = #{accDiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccPaymentCode() != null) { + sql.SET("acc_payment_code = #{accPaymentCode,jdbcType=VARCHAR}"); + } + + if (record.getCardType() != null) { + sql.SET("card_type = #{cardType,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCancelTime() != null) { + sql.SET("cancel_time = #{cancelTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsTradeOrderExample 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 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 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()); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountMapper.java b/hai-service/src/main/java/com/hai/dao/HighDiscountMapper.java index 065d24f5..af7a56eb 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountMapper.java @@ -39,7 +39,9 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into high_discount (company_id, discount_key, ", + "insert into high_discount (company_id, platform, ", + "mer_id, mer_name, store_id, ", + "store_name, discount_key, ", "using_range, use_scope, ", "discount_name, discount_img, ", "discount_carousel_img, discount_type, ", @@ -49,7 +51,9 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { "update_time, operator_id, ", "operator_name, `status`, ", "ext_1, ext_2, ext_3)", - "values (#{companyId,jdbcType=BIGINT}, #{discountKey,jdbcType=VARCHAR}, ", + "values (#{companyId,jdbcType=BIGINT}, #{platform,jdbcType=VARCHAR}, ", + "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, ", + "#{storeName,jdbcType=VARCHAR}, #{discountKey,jdbcType=VARCHAR}, ", "#{usingRange,jdbcType=INTEGER}, #{useScope,jdbcType=INTEGER}, ", "#{discountName,jdbcType=VARCHAR}, #{discountImg,jdbcType=VARCHAR}, ", "#{discountCarouselImg,jdbcType=VARCHAR}, #{discountType,jdbcType=INTEGER}, ", @@ -71,6 +75,11 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="platform", property="platform", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_key", property="discountKey", jdbcType=JdbcType.VARCHAR), @Result(column="using_range", property="usingRange", jdbcType=JdbcType.INTEGER), @Result(column="use_scope", property="useScope", jdbcType=JdbcType.INTEGER), @@ -96,16 +105,22 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { @Select({ "select", - "id, company_id, discount_key, using_range, use_scope, discount_name, discount_img, ", - "discount_carousel_img, discount_type, discount_condition, discount_price, receive_number, ", - "effective_day, sales_end_time, create_time, update_time, operator_id, operator_name, ", - "`status`, ext_1, ext_2, ext_3", + "id, company_id, platform, mer_id, mer_name, store_id, store_name, discount_key, ", + "using_range, use_scope, discount_name, discount_img, discount_carousel_img, ", + "discount_type, discount_condition, discount_price, receive_number, effective_day, ", + "sales_end_time, create_time, update_time, operator_id, operator_name, `status`, ", + "ext_1, ext_2, ext_3", "from high_discount", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="platform", property="platform", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_key", property="discountKey", jdbcType=JdbcType.VARCHAR), @Result(column="using_range", property="usingRange", jdbcType=JdbcType.INTEGER), @Result(column="use_scope", property="useScope", jdbcType=JdbcType.INTEGER), @@ -141,6 +156,11 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { @Update({ "update high_discount", "set company_id = #{companyId,jdbcType=BIGINT},", + "platform = #{platform,jdbcType=VARCHAR},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "store_id = #{storeId,jdbcType=BIGINT},", + "store_name = #{storeName,jdbcType=VARCHAR},", "discount_key = #{discountKey,jdbcType=VARCHAR},", "using_range = #{usingRange,jdbcType=INTEGER},", "use_scope = #{useScope,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighDiscountSqlProvider.java index 523d6f76..5d8a5121 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountSqlProvider.java @@ -32,6 +32,26 @@ public class HighDiscountSqlProvider { sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); } + if (record.getPlatform() != null) { + sql.VALUES("platform", "#{platform,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}"); + } + if (record.getDiscountKey() != null) { sql.VALUES("discount_key", "#{discountKey,jdbcType=VARCHAR}"); } @@ -123,6 +143,11 @@ public class HighDiscountSqlProvider { sql.SELECT("id"); } sql.SELECT("company_id"); + sql.SELECT("platform"); + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("store_id"); + sql.SELECT("store_name"); sql.SELECT("discount_key"); sql.SELECT("using_range"); sql.SELECT("use_scope"); @@ -168,6 +193,26 @@ public class HighDiscountSqlProvider { sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); } + if (record.getPlatform() != null) { + sql.SET("platform = #{record.platform,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + } + if (record.getDiscountKey() != null) { sql.SET("discount_key = #{record.discountKey,jdbcType=VARCHAR}"); } @@ -258,6 +303,11 @@ public class HighDiscountSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + sql.SET("platform = #{record.platform,jdbcType=VARCHAR}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); sql.SET("discount_key = #{record.discountKey,jdbcType=VARCHAR}"); sql.SET("using_range = #{record.usingRange,jdbcType=INTEGER}"); sql.SET("use_scope = #{record.useScope,jdbcType=INTEGER}"); @@ -292,6 +342,26 @@ public class HighDiscountSqlProvider { sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); } + if (record.getPlatform() != null) { + sql.SET("platform = #{platform,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{storeName,jdbcType=VARCHAR}"); + } + if (record.getDiscountKey() != null) { sql.SET("discount_key = #{discountKey,jdbcType=VARCHAR}"); } diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java index b030bbbd..9ce4277b 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java @@ -39,22 +39,22 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt int deleteByPrimaryKey(Long id); @Insert({ - "insert into high_discount_user_rel (discount_company_id, discount_id, ", - "discount_name, discount_img, ", - "discount_using_range, discount_use_scope, ", - "discount_type, discount_condition, ", - "discount_price, agent_id, ", - "discount_agent_code_id, user_id, ", - "`status`, use_time, ", + "insert into high_discount_user_rel (discount_company_id, discount_platform, ", + "discount_id, discount_name, ", + "discount_img, discount_using_range, ", + "discount_use_scope, discount_type, ", + "discount_condition, discount_price, ", + "agent_id, discount_agent_code_id, ", + "user_id, `status`, use_time, ", "create_time, use_end_time, ", "ext_1, ext_2, ext_3)", - "values (#{discountCompanyId,jdbcType=BIGINT}, #{discountId,jdbcType=BIGINT}, ", - "#{discountName,jdbcType=VARCHAR}, #{discountImg,jdbcType=VARCHAR}, ", - "#{discountUsingRange,jdbcType=INTEGER}, #{discountUseScope,jdbcType=INTEGER}, ", - "#{discountType,jdbcType=INTEGER}, #{discountCondition,jdbcType=DECIMAL}, ", - "#{discountPrice,jdbcType=DECIMAL}, #{agentId,jdbcType=BIGINT}, ", - "#{discountAgentCodeId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ", - "#{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", + "values (#{discountCompanyId,jdbcType=BIGINT}, #{discountPlatform,jdbcType=INTEGER}, ", + "#{discountId,jdbcType=BIGINT}, #{discountName,jdbcType=VARCHAR}, ", + "#{discountImg,jdbcType=VARCHAR}, #{discountUsingRange,jdbcType=INTEGER}, ", + "#{discountUseScope,jdbcType=INTEGER}, #{discountType,jdbcType=INTEGER}, ", + "#{discountCondition,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, ", + "#{agentId,jdbcType=BIGINT}, #{discountAgentCodeId,jdbcType=BIGINT}, ", + "#{userId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", "#{createTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @@ -69,6 +69,7 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="discount_company_id", property="discountCompanyId", jdbcType=JdbcType.BIGINT), + @Result(column="discount_platform", property="discountPlatform", jdbcType=JdbcType.INTEGER), @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), @@ -92,16 +93,17 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt @Select({ "select", - "id, discount_company_id, discount_id, discount_name, discount_img, discount_using_range, ", - "discount_use_scope, discount_type, discount_condition, discount_price, agent_id, ", - "discount_agent_code_id, user_id, `status`, use_time, create_time, use_end_time, ", - "ext_1, ext_2, ext_3", + "id, discount_company_id, discount_platform, discount_id, discount_name, discount_img, ", + "discount_using_range, discount_use_scope, discount_type, discount_condition, ", + "discount_price, agent_id, discount_agent_code_id, user_id, `status`, use_time, ", + "create_time, use_end_time, ext_1, ext_2, ext_3", "from high_discount_user_rel", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="discount_company_id", property="discountCompanyId", jdbcType=JdbcType.BIGINT), + @Result(column="discount_platform", property="discountPlatform", jdbcType=JdbcType.INTEGER), @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), @@ -135,6 +137,7 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt @Update({ "update high_discount_user_rel", "set discount_company_id = #{discountCompanyId,jdbcType=BIGINT},", + "discount_platform = #{discountPlatform,jdbcType=INTEGER},", "discount_id = #{discountId,jdbcType=BIGINT},", "discount_name = #{discountName,jdbcType=VARCHAR},", "discount_img = #{discountImg,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java index 6219ee6b..0c5f94cf 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java @@ -32,6 +32,10 @@ public class HighDiscountUserRelSqlProvider { sql.VALUES("discount_company_id", "#{discountCompanyId,jdbcType=BIGINT}"); } + if (record.getDiscountPlatform() != null) { + sql.VALUES("discount_platform", "#{discountPlatform,jdbcType=INTEGER}"); + } + if (record.getDiscountId() != null) { sql.VALUES("discount_id", "#{discountId,jdbcType=BIGINT}"); } @@ -115,6 +119,7 @@ public class HighDiscountUserRelSqlProvider { sql.SELECT("id"); } sql.SELECT("discount_company_id"); + sql.SELECT("discount_platform"); sql.SELECT("discount_id"); sql.SELECT("discount_name"); sql.SELECT("discount_img"); @@ -158,6 +163,10 @@ public class HighDiscountUserRelSqlProvider { sql.SET("discount_company_id = #{record.discountCompanyId,jdbcType=BIGINT}"); } + if (record.getDiscountPlatform() != null) { + sql.SET("discount_platform = #{record.discountPlatform,jdbcType=INTEGER}"); + } + if (record.getDiscountId() != null) { sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); } @@ -240,6 +249,7 @@ public class HighDiscountUserRelSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("discount_company_id = #{record.discountCompanyId,jdbcType=BIGINT}"); + sql.SET("discount_platform = #{record.discountPlatform,jdbcType=INTEGER}"); sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); sql.SET("discount_img = #{record.discountImg,jdbcType=VARCHAR}"); @@ -272,6 +282,10 @@ public class HighDiscountUserRelSqlProvider { sql.SET("discount_company_id = #{discountCompanyId,jdbcType=BIGINT}"); } + if (record.getDiscountPlatform() != null) { + sql.SET("discount_platform = #{discountPlatform,jdbcType=INTEGER}"); + } + if (record.getDiscountId() != null) { sql.SET("discount_id = #{discountId,jdbcType=BIGINT}"); } diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoMapper.java b/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoMapper.java index 644be208..6a726e4a 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoMapper.java @@ -45,7 +45,7 @@ public interface HighGasOilGunNoMapper extends HighGasOilGunNoMapperExt { "gun_no, `status`, create_time, ", "ext_1, ext_2, ext_3)", "values (#{gasOilPriceId,jdbcType=BIGINT}, #{storeId,jdbcType=BIGINT}, ", - "#{oilNo,jdbcType=INTEGER}, #{oilNoName,jdbcType=VARCHAR}, ", + "#{oilNo,jdbcType=VARCHAR}, #{oilNoName,jdbcType=VARCHAR}, ", "#{oilType,jdbcType=INTEGER}, #{oilTypeName,jdbcType=VARCHAR}, ", "#{gunNo,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" @@ -62,7 +62,7 @@ public interface HighGasOilGunNoMapper extends HighGasOilGunNoMapperExt { @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="gas_oil_price_id", property="gasOilPriceId", jdbcType=JdbcType.BIGINT), @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @@ -86,7 +86,7 @@ public interface HighGasOilGunNoMapper extends HighGasOilGunNoMapperExt { @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="gas_oil_price_id", property="gasOilPriceId", jdbcType=JdbcType.BIGINT), @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @@ -112,7 +112,7 @@ public interface HighGasOilGunNoMapper extends HighGasOilGunNoMapperExt { "update high_gas_oil_gun_no", "set gas_oil_price_id = #{gasOilPriceId,jdbcType=BIGINT},", "store_id = #{storeId,jdbcType=BIGINT},", - "oil_no = #{oilNo,jdbcType=INTEGER},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", "oil_no_name = #{oilNoName,jdbcType=VARCHAR},", "oil_type = #{oilType,jdbcType=INTEGER},", "oil_type_name = #{oilTypeName,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoSqlProvider.java index 58b2d6ef..b87029a3 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoSqlProvider.java @@ -37,7 +37,7 @@ public class HighGasOilGunNoSqlProvider { } if (record.getOilNo() != null) { - sql.VALUES("oil_no", "#{oilNo,jdbcType=INTEGER}"); + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -128,7 +128,7 @@ public class HighGasOilGunNoSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -178,7 +178,7 @@ public class HighGasOilGunNoSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("gas_oil_price_id = #{record.gasOilPriceId,jdbcType=BIGINT}"); sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}"); @@ -207,7 +207,7 @@ public class HighGasOilGunNoSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapper.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapper.java index a3bd8ee3..f40b2c20 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapper.java @@ -41,16 +41,16 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Insert({ "insert into high_gas_oil_price (merchant_store_id, oil_no, ", "oil_no_name, preferential_margin, ", - "gas_station_drop, price_vip, ", - "price_gun, price_official, ", - "price_cost, oil_type, ", + "gas_station_drop, price_cost, ", + "price_vip, price_gun, ", + "price_official, oil_type, ", "oil_type_name, `status`, ", "ext_1, ext_2, ext_3)", - "values (#{merchantStoreId,jdbcType=BIGINT}, #{oilNo,jdbcType=INTEGER}, ", + "values (#{merchantStoreId,jdbcType=BIGINT}, #{oilNo,jdbcType=VARCHAR}, ", "#{oilNoName,jdbcType=VARCHAR}, #{preferentialMargin,jdbcType=DECIMAL}, ", - "#{gasStationDrop,jdbcType=DECIMAL}, #{priceVip,jdbcType=DECIMAL}, ", - "#{priceGun,jdbcType=DECIMAL}, #{priceOfficial,jdbcType=DECIMAL}, ", - "#{priceCost,jdbcType=DECIMAL}, #{oilType,jdbcType=INTEGER}, ", + "#{gasStationDrop,jdbcType=DECIMAL}, #{priceCost,jdbcType=DECIMAL}, ", + "#{priceVip,jdbcType=DECIMAL}, #{priceGun,jdbcType=DECIMAL}, ", + "#{priceOfficial,jdbcType=DECIMAL}, #{oilType,jdbcType=INTEGER}, ", "#{oilTypeName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @@ -65,14 +65,14 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="preferential_margin", property="preferentialMargin", jdbcType=JdbcType.DECIMAL), @Result(column="gas_station_drop", property="gasStationDrop", jdbcType=JdbcType.DECIMAL), + @Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL), @Result(column="price_vip", property="priceVip", jdbcType=JdbcType.DECIMAL), @Result(column="price_gun", property="priceGun", jdbcType=JdbcType.DECIMAL), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), - @Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -85,7 +85,7 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Select({ "select", "id, merchant_store_id, oil_no, oil_no_name, preferential_margin, gas_station_drop, ", - "price_vip, price_gun, price_official, price_cost, oil_type, oil_type_name, `status`, ", + "price_cost, price_vip, price_gun, price_official, oil_type, oil_type_name, `status`, ", "ext_1, ext_2, ext_3", "from high_gas_oil_price", "where id = #{id,jdbcType=BIGINT}" @@ -93,14 +93,14 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="preferential_margin", property="preferentialMargin", jdbcType=JdbcType.DECIMAL), @Result(column="gas_station_drop", property="gasStationDrop", jdbcType=JdbcType.DECIMAL), + @Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL), @Result(column="price_vip", property="priceVip", jdbcType=JdbcType.DECIMAL), @Result(column="price_gun", property="priceGun", jdbcType=JdbcType.DECIMAL), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), - @Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -122,14 +122,14 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Update({ "update high_gas_oil_price", "set merchant_store_id = #{merchantStoreId,jdbcType=BIGINT},", - "oil_no = #{oilNo,jdbcType=INTEGER},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", "oil_no_name = #{oilNoName,jdbcType=VARCHAR},", "preferential_margin = #{preferentialMargin,jdbcType=DECIMAL},", "gas_station_drop = #{gasStationDrop,jdbcType=DECIMAL},", + "price_cost = #{priceCost,jdbcType=DECIMAL},", "price_vip = #{priceVip,jdbcType=DECIMAL},", "price_gun = #{priceGun,jdbcType=DECIMAL},", "price_official = #{priceOfficial,jdbcType=DECIMAL},", - "price_cost = #{priceCost,jdbcType=DECIMAL},", "oil_type = #{oilType,jdbcType=INTEGER},", "oil_type_name = #{oilTypeName,jdbcType=VARCHAR},", "`status` = #{status,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java index 5a2a8059..27715135 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java @@ -68,5 +68,5 @@ public interface HighGasOilPriceMapperExt { @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) }) - List selectPriceListByRegionAndOilNo(@Param("regionId") Long regionId, @Param("oilNo") Integer oilNo); + List selectPriceListByRegionAndOilNo(@Param("regionId") Long regionId, @Param("oilNo") String oilNo); } diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialMapper.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialMapper.java index 1b20316f..e05193ff 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialMapper.java @@ -45,7 +45,7 @@ public interface HighGasOilPriceOfficialMapper extends HighGasOilPriceOfficialMa "oil_type_name, `status`, ", "ext_1, ext_2, ext_3)", "values (#{regionId,jdbcType=BIGINT}, #{regionName,jdbcType=VARCHAR}, ", - "#{oilNo,jdbcType=INTEGER}, #{oilNoName,jdbcType=VARCHAR}, ", + "#{oilNo,jdbcType=VARCHAR}, #{oilNoName,jdbcType=VARCHAR}, ", "#{priceOfficial,jdbcType=DECIMAL}, #{oilType,jdbcType=INTEGER}, ", "#{oilTypeName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" @@ -62,7 +62,7 @@ public interface HighGasOilPriceOfficialMapper extends HighGasOilPriceOfficialMa @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @@ -85,7 +85,7 @@ public interface HighGasOilPriceOfficialMapper extends HighGasOilPriceOfficialMa @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @@ -110,7 +110,7 @@ public interface HighGasOilPriceOfficialMapper extends HighGasOilPriceOfficialMa "update high_gas_oil_price_official", "set region_id = #{regionId,jdbcType=BIGINT},", "region_name = #{regionName,jdbcType=VARCHAR},", - "oil_no = #{oilNo,jdbcType=INTEGER},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", "oil_no_name = #{oilNoName,jdbcType=VARCHAR},", "price_official = #{priceOfficial,jdbcType=DECIMAL},", "oil_type = #{oilType,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialSqlProvider.java index 540fa423..4a02c884 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialSqlProvider.java @@ -37,7 +37,7 @@ public class HighGasOilPriceOfficialSqlProvider { } if (record.getOilNo() != null) { - sql.VALUES("oil_no", "#{oilNo,jdbcType=INTEGER}"); + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -123,7 +123,7 @@ public class HighGasOilPriceOfficialSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -169,7 +169,7 @@ public class HighGasOilPriceOfficialSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}"); sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); @@ -197,7 +197,7 @@ public class HighGasOilPriceOfficialSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceSqlProvider.java index d2186faf..0fc52ec6 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceSqlProvider.java @@ -33,7 +33,7 @@ public class HighGasOilPriceSqlProvider { } if (record.getOilNo() != null) { - sql.VALUES("oil_no", "#{oilNo,jdbcType=INTEGER}"); + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -48,6 +48,10 @@ public class HighGasOilPriceSqlProvider { sql.VALUES("gas_station_drop", "#{gasStationDrop,jdbcType=DECIMAL}"); } + if (record.getPriceCost() != null) { + sql.VALUES("price_cost", "#{priceCost,jdbcType=DECIMAL}"); + } + if (record.getPriceVip() != null) { sql.VALUES("price_vip", "#{priceVip,jdbcType=DECIMAL}"); } @@ -60,10 +64,6 @@ public class HighGasOilPriceSqlProvider { sql.VALUES("price_official", "#{priceOfficial,jdbcType=DECIMAL}"); } - if (record.getPriceCost() != null) { - sql.VALUES("price_cost", "#{priceCost,jdbcType=DECIMAL}"); - } - if (record.getOilType() != null) { sql.VALUES("oil_type", "#{oilType,jdbcType=INTEGER}"); } @@ -103,10 +103,10 @@ public class HighGasOilPriceSqlProvider { sql.SELECT("oil_no_name"); sql.SELECT("preferential_margin"); sql.SELECT("gas_station_drop"); + sql.SELECT("price_cost"); sql.SELECT("price_vip"); sql.SELECT("price_gun"); sql.SELECT("price_official"); - sql.SELECT("price_cost"); sql.SELECT("oil_type"); sql.SELECT("oil_type_name"); sql.SELECT("`status`"); @@ -139,7 +139,7 @@ public class HighGasOilPriceSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -154,6 +154,10 @@ public class HighGasOilPriceSqlProvider { sql.SET("gas_station_drop = #{record.gasStationDrop,jdbcType=DECIMAL}"); } + if (record.getPriceCost() != null) { + sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}"); + } + if (record.getPriceVip() != null) { sql.SET("price_vip = #{record.priceVip,jdbcType=DECIMAL}"); } @@ -166,10 +170,6 @@ public class HighGasOilPriceSqlProvider { sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}"); } - if (record.getPriceCost() != null) { - sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}"); - } - if (record.getOilType() != null) { sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); } @@ -204,14 +204,14 @@ public class HighGasOilPriceSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("merchant_store_id = #{record.merchantStoreId,jdbcType=BIGINT}"); - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); sql.SET("preferential_margin = #{record.preferentialMargin,jdbcType=DECIMAL}"); sql.SET("gas_station_drop = #{record.gasStationDrop,jdbcType=DECIMAL}"); + sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}"); sql.SET("price_vip = #{record.priceVip,jdbcType=DECIMAL}"); sql.SET("price_gun = #{record.priceGun,jdbcType=DECIMAL}"); sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}"); - sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); @@ -233,7 +233,7 @@ public class HighGasOilPriceSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -248,6 +248,10 @@ public class HighGasOilPriceSqlProvider { sql.SET("gas_station_drop = #{gasStationDrop,jdbcType=DECIMAL}"); } + if (record.getPriceCost() != null) { + sql.SET("price_cost = #{priceCost,jdbcType=DECIMAL}"); + } + if (record.getPriceVip() != null) { sql.SET("price_vip = #{priceVip,jdbcType=DECIMAL}"); } @@ -260,10 +264,6 @@ public class HighGasOilPriceSqlProvider { sql.SET("price_official = #{priceOfficial,jdbcType=DECIMAL}"); } - if (record.getPriceCost() != null) { - sql.SET("price_cost = #{priceCost,jdbcType=DECIMAL}"); - } - if (record.getOilType() != null) { sql.SET("oil_type = #{oilType,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java index d10678e9..39dbba7a 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java @@ -54,7 +54,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt "#{merStoreKey,jdbcType=VARCHAR}, #{merStoreId,jdbcType=BIGINT}, ", "#{merStoreName,jdbcType=VARCHAR}, #{merStoreAddress,jdbcType=VARCHAR}, ", "#{oilType,jdbcType=INTEGER}, #{oilTypeName,jdbcType=VARCHAR}, ", - "#{oilNo,jdbcType=INTEGER}, #{oilNoName,jdbcType=VARCHAR}, ", + "#{oilNo,jdbcType=VARCHAR}, #{oilNoName,jdbcType=VARCHAR}, ", "#{priceType,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ", "#{executionType,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", @@ -80,7 +80,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt @Result(column="mer_store_address", property="merStoreAddress", jdbcType=JdbcType.VARCHAR), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="price_type", property="priceType", jdbcType=JdbcType.INTEGER), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @@ -116,7 +116,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt @Result(column="mer_store_address", property="merStoreAddress", jdbcType=JdbcType.VARCHAR), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="price_type", property="priceType", jdbcType=JdbcType.INTEGER), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @@ -152,7 +152,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt "mer_store_address = #{merStoreAddress,jdbcType=VARCHAR},", "oil_type = #{oilType,jdbcType=INTEGER},", "oil_type_name = #{oilTypeName,jdbcType=VARCHAR},", - "oil_no = #{oilNo,jdbcType=INTEGER},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", "oil_no_name = #{oilNoName,jdbcType=VARCHAR},", "price_type = #{priceType,jdbcType=INTEGER},", "price = #{price,jdbcType=DECIMAL},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java index 81386790..ca37e173 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java @@ -61,7 +61,7 @@ public class HighGasOilPriceTaskSqlProvider { } if (record.getOilNo() != null) { - sql.VALUES("oil_no", "#{oilNo,jdbcType=INTEGER}"); + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -202,7 +202,7 @@ public class HighGasOilPriceTaskSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -274,7 +274,7 @@ public class HighGasOilPriceTaskSqlProvider { sql.SET("mer_store_address = #{record.merStoreAddress,jdbcType=VARCHAR}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}"); - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); sql.SET("price_type = #{record.priceType,jdbcType=INTEGER}"); sql.SET("price = #{record.price,jdbcType=DECIMAL}"); @@ -331,7 +331,7 @@ public class HighGasOilPriceTaskSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { diff --git a/hai-service/src/main/java/com/hai/entity/BsTradeOrder.java b/hai-service/src/main/java/com/hai/entity/BsTradeOrder.java new file mode 100644 index 00000000..5b93712b --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/BsTradeOrder.java @@ -0,0 +1,829 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_trade_order + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsTradeOrder implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 公司id + */ + private Long companyId; + + /** + * 代理商id + */ + private Long agentId; + + /** + * 业务员id + */ + private Long salesmanId; + + /** + * 业务员名称 + */ + private String salesmanName; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户名称 + */ + private String merName; + + /** + * 商户号 + */ + private String merNo; + + /** + * 门店id + */ + private Long storeId; + + /** + * 门店名称 + */ + private String storeName; + + /** + * 设备id + */ + private Long deviceId; + + /** + * 设备编号SN + */ + private String deviceSn; + + /** + * 二维码id + */ + private Long qrCodeId; + + /** + * 二维序列号 + */ + private String qrCodeSn; + + /** + * 平台类型 1:拉卡拉 + */ + private Integer platformType; + + /** + * 平台商户号 + */ + private String platformMerNo; + + /** + * 平台流水号 + */ + private String platformTradeNo; + + /** + * 平台对账单流水号 + */ + private String platformLogNo; + + /** + * 支付用户id + */ + private String payUserId; + + /** + * 支付模式: +微信:WECHAT +支付宝:ALIPAY +银联:UQRCODEPAY +【建行】龙支付:DRAGON + */ + private String payMode; + + /** + * 商户交易流水 + */ + private String outTradeNo; + + /** + * 交易金额 + */ + private BigDecimal tradeAmount; + + /** + * 是否满足门店优惠条件 + */ + private Integer storeDiscountSatisfy; + + /** + * 门店优惠id + */ + private Long storeDiscountId; + + /** + * 门店优惠名称 + */ + private String storeDiscountName; + + /** + * 门店优惠类型 + */ + private Integer storeDiscountType; + + /** + * 门店优惠金额 + */ + private BigDecimal storeDiscountPrice; + + /** + * 门店实际优惠金额 + */ + private BigDecimal storeDiscountActualPrice; + + /** + * 客户id + */ + private Integer userId; + + /** + * 客户手机号 + */ + private String userPhone; + + /** + * 客户优惠券id + */ + private Long userDiscountId; + + /** + * 客户优惠券名称 + */ + private String userDiscountName; + + /** + * 客户优惠券类型 + */ + private Integer userDiscountType; + + /** + * 客户优惠券金额 + */ + private BigDecimal userDiscountPrice; + + /** + * 客户优惠券实际优惠金额 + */ + private BigDecimal userDiscountActualPrice; + + /** + * 交易实际金额 + */ + private BigDecimal tradeActualAmount; + + /** + * 账户端交易流水号 + */ + private String accTradeNo; + + /** + * 账户端商户优惠金额,单位分 + */ + private BigDecimal accMdiscountAmount; + + /** + * 账户端账户端优惠金额,单位分 + */ + private BigDecimal accDiscountAmount; + + /** + * 账户端付款码 + */ + private String accPaymentCode; + + /** + * 银行卡 00:借记 01:贷记 02:微信零钱 03:支付宝花呗 04:支付宝其他 05:数字货币 06:拉卡拉支付账户 99:未知 + */ + private String cardType; + + /** + * 状态 1:待支付 2:支付中 3:支付成功 4 :支付失败 5:已取消 6:已退款 + */ + private Integer status; + + /** + * 支付时间 + */ + private Date payTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 取消时间 + */ + private Date cancelTime; + + /** + * 更新时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getAgentId() { + return agentId; + } + + public void setAgentId(Long agentId) { + this.agentId = agentId; + } + + public Long getSalesmanId() { + return salesmanId; + } + + public void setSalesmanId(Long salesmanId) { + this.salesmanId = salesmanId; + } + + public String getSalesmanName() { + return salesmanName; + } + + public void setSalesmanName(String salesmanName) { + this.salesmanName = salesmanName; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public String getMerNo() { + return merNo; + } + + public void setMerNo(String merNo) { + this.merNo = merNo; + } + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + + public Long getDeviceId() { + return deviceId; + } + + public void setDeviceId(Long deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceSn() { + return deviceSn; + } + + public void setDeviceSn(String deviceSn) { + this.deviceSn = deviceSn; + } + + public Long getQrCodeId() { + return qrCodeId; + } + + public void setQrCodeId(Long qrCodeId) { + this.qrCodeId = qrCodeId; + } + + public String getQrCodeSn() { + return qrCodeSn; + } + + public void setQrCodeSn(String qrCodeSn) { + this.qrCodeSn = qrCodeSn; + } + + public Integer getPlatformType() { + return platformType; + } + + public void setPlatformType(Integer platformType) { + this.platformType = platformType; + } + + public String getPlatformMerNo() { + return platformMerNo; + } + + public void setPlatformMerNo(String platformMerNo) { + this.platformMerNo = platformMerNo; + } + + public String getPlatformTradeNo() { + return platformTradeNo; + } + + public void setPlatformTradeNo(String platformTradeNo) { + this.platformTradeNo = platformTradeNo; + } + + public String getPlatformLogNo() { + return platformLogNo; + } + + public void setPlatformLogNo(String platformLogNo) { + this.platformLogNo = platformLogNo; + } + + public String getPayUserId() { + return payUserId; + } + + public void setPayUserId(String payUserId) { + this.payUserId = payUserId; + } + + public String getPayMode() { + return payMode; + } + + public void setPayMode(String payMode) { + this.payMode = payMode; + } + + public String getOutTradeNo() { + return outTradeNo; + } + + public void setOutTradeNo(String outTradeNo) { + this.outTradeNo = outTradeNo; + } + + public BigDecimal getTradeAmount() { + return tradeAmount; + } + + public void setTradeAmount(BigDecimal tradeAmount) { + this.tradeAmount = tradeAmount; + } + + public Integer getStoreDiscountSatisfy() { + return storeDiscountSatisfy; + } + + public void setStoreDiscountSatisfy(Integer storeDiscountSatisfy) { + this.storeDiscountSatisfy = storeDiscountSatisfy; + } + + public Long getStoreDiscountId() { + return storeDiscountId; + } + + public void setStoreDiscountId(Long storeDiscountId) { + this.storeDiscountId = storeDiscountId; + } + + public String getStoreDiscountName() { + return storeDiscountName; + } + + public void setStoreDiscountName(String storeDiscountName) { + this.storeDiscountName = storeDiscountName; + } + + public Integer getStoreDiscountType() { + return storeDiscountType; + } + + public void setStoreDiscountType(Integer storeDiscountType) { + this.storeDiscountType = storeDiscountType; + } + + public BigDecimal getStoreDiscountPrice() { + return storeDiscountPrice; + } + + public void setStoreDiscountPrice(BigDecimal storeDiscountPrice) { + this.storeDiscountPrice = storeDiscountPrice; + } + + public BigDecimal getStoreDiscountActualPrice() { + return storeDiscountActualPrice; + } + + public void setStoreDiscountActualPrice(BigDecimal storeDiscountActualPrice) { + this.storeDiscountActualPrice = storeDiscountActualPrice; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + + public Long getUserDiscountId() { + return userDiscountId; + } + + public void setUserDiscountId(Long userDiscountId) { + this.userDiscountId = userDiscountId; + } + + public String getUserDiscountName() { + return userDiscountName; + } + + public void setUserDiscountName(String userDiscountName) { + this.userDiscountName = userDiscountName; + } + + public Integer getUserDiscountType() { + return userDiscountType; + } + + public void setUserDiscountType(Integer userDiscountType) { + this.userDiscountType = userDiscountType; + } + + public BigDecimal getUserDiscountPrice() { + return userDiscountPrice; + } + + public void setUserDiscountPrice(BigDecimal userDiscountPrice) { + this.userDiscountPrice = userDiscountPrice; + } + + public BigDecimal getUserDiscountActualPrice() { + return userDiscountActualPrice; + } + + public void setUserDiscountActualPrice(BigDecimal userDiscountActualPrice) { + this.userDiscountActualPrice = userDiscountActualPrice; + } + + public BigDecimal getTradeActualAmount() { + return tradeActualAmount; + } + + public void setTradeActualAmount(BigDecimal tradeActualAmount) { + this.tradeActualAmount = tradeActualAmount; + } + + public String getAccTradeNo() { + return accTradeNo; + } + + public void setAccTradeNo(String accTradeNo) { + this.accTradeNo = accTradeNo; + } + + public BigDecimal getAccMdiscountAmount() { + return accMdiscountAmount; + } + + public void setAccMdiscountAmount(BigDecimal accMdiscountAmount) { + this.accMdiscountAmount = accMdiscountAmount; + } + + public BigDecimal getAccDiscountAmount() { + return accDiscountAmount; + } + + public void setAccDiscountAmount(BigDecimal accDiscountAmount) { + this.accDiscountAmount = accDiscountAmount; + } + + public String getAccPaymentCode() { + return accPaymentCode; + } + + public void setAccPaymentCode(String accPaymentCode) { + this.accPaymentCode = accPaymentCode; + } + + public String getCardType() { + return cardType; + } + + public void setCardType(String cardType) { + this.cardType = cardType; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getPayTime() { + return payTime; + } + + public void setPayTime(Date payTime) { + this.payTime = payTime; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getCancelTime() { + return cancelTime; + } + + public void setCancelTime(Date cancelTime) { + this.cancelTime = cancelTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsTradeOrder other = (BsTradeOrder) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) + && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId())) + && (this.getSalesmanId() == null ? other.getSalesmanId() == null : this.getSalesmanId().equals(other.getSalesmanId())) + && (this.getSalesmanName() == null ? other.getSalesmanName() == null : this.getSalesmanName().equals(other.getSalesmanName())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) + && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) + && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) + && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId())) + && (this.getDeviceSn() == null ? other.getDeviceSn() == null : this.getDeviceSn().equals(other.getDeviceSn())) + && (this.getQrCodeId() == null ? other.getQrCodeId() == null : this.getQrCodeId().equals(other.getQrCodeId())) + && (this.getQrCodeSn() == null ? other.getQrCodeSn() == null : this.getQrCodeSn().equals(other.getQrCodeSn())) + && (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType())) + && (this.getPlatformMerNo() == null ? other.getPlatformMerNo() == null : this.getPlatformMerNo().equals(other.getPlatformMerNo())) + && (this.getPlatformTradeNo() == null ? other.getPlatformTradeNo() == null : this.getPlatformTradeNo().equals(other.getPlatformTradeNo())) + && (this.getPlatformLogNo() == null ? other.getPlatformLogNo() == null : this.getPlatformLogNo().equals(other.getPlatformLogNo())) + && (this.getPayUserId() == null ? other.getPayUserId() == null : this.getPayUserId().equals(other.getPayUserId())) + && (this.getPayMode() == null ? other.getPayMode() == null : this.getPayMode().equals(other.getPayMode())) + && (this.getOutTradeNo() == null ? other.getOutTradeNo() == null : this.getOutTradeNo().equals(other.getOutTradeNo())) + && (this.getTradeAmount() == null ? other.getTradeAmount() == null : this.getTradeAmount().equals(other.getTradeAmount())) + && (this.getStoreDiscountSatisfy() == null ? other.getStoreDiscountSatisfy() == null : this.getStoreDiscountSatisfy().equals(other.getStoreDiscountSatisfy())) + && (this.getStoreDiscountId() == null ? other.getStoreDiscountId() == null : this.getStoreDiscountId().equals(other.getStoreDiscountId())) + && (this.getStoreDiscountName() == null ? other.getStoreDiscountName() == null : this.getStoreDiscountName().equals(other.getStoreDiscountName())) + && (this.getStoreDiscountType() == null ? other.getStoreDiscountType() == null : this.getStoreDiscountType().equals(other.getStoreDiscountType())) + && (this.getStoreDiscountPrice() == null ? other.getStoreDiscountPrice() == null : this.getStoreDiscountPrice().equals(other.getStoreDiscountPrice())) + && (this.getStoreDiscountActualPrice() == null ? other.getStoreDiscountActualPrice() == null : this.getStoreDiscountActualPrice().equals(other.getStoreDiscountActualPrice())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) + && (this.getUserDiscountId() == null ? other.getUserDiscountId() == null : this.getUserDiscountId().equals(other.getUserDiscountId())) + && (this.getUserDiscountName() == null ? other.getUserDiscountName() == null : this.getUserDiscountName().equals(other.getUserDiscountName())) + && (this.getUserDiscountType() == null ? other.getUserDiscountType() == null : this.getUserDiscountType().equals(other.getUserDiscountType())) + && (this.getUserDiscountPrice() == null ? other.getUserDiscountPrice() == null : this.getUserDiscountPrice().equals(other.getUserDiscountPrice())) + && (this.getUserDiscountActualPrice() == null ? other.getUserDiscountActualPrice() == null : this.getUserDiscountActualPrice().equals(other.getUserDiscountActualPrice())) + && (this.getTradeActualAmount() == null ? other.getTradeActualAmount() == null : this.getTradeActualAmount().equals(other.getTradeActualAmount())) + && (this.getAccTradeNo() == null ? other.getAccTradeNo() == null : this.getAccTradeNo().equals(other.getAccTradeNo())) + && (this.getAccMdiscountAmount() == null ? other.getAccMdiscountAmount() == null : this.getAccMdiscountAmount().equals(other.getAccMdiscountAmount())) + && (this.getAccDiscountAmount() == null ? other.getAccDiscountAmount() == null : this.getAccDiscountAmount().equals(other.getAccDiscountAmount())) + && (this.getAccPaymentCode() == null ? other.getAccPaymentCode() == null : this.getAccPaymentCode().equals(other.getAccPaymentCode())) + && (this.getCardType() == null ? other.getCardType() == null : this.getCardType().equals(other.getCardType())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); + result = prime * result + ((getSalesmanId() == null) ? 0 : getSalesmanId().hashCode()); + result = prime * result + ((getSalesmanName() == null) ? 0 : getSalesmanName().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); + result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); + result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); + result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode()); + result = prime * result + ((getDeviceSn() == null) ? 0 : getDeviceSn().hashCode()); + result = prime * result + ((getQrCodeId() == null) ? 0 : getQrCodeId().hashCode()); + result = prime * result + ((getQrCodeSn() == null) ? 0 : getQrCodeSn().hashCode()); + result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode()); + result = prime * result + ((getPlatformMerNo() == null) ? 0 : getPlatformMerNo().hashCode()); + result = prime * result + ((getPlatformTradeNo() == null) ? 0 : getPlatformTradeNo().hashCode()); + result = prime * result + ((getPlatformLogNo() == null) ? 0 : getPlatformLogNo().hashCode()); + result = prime * result + ((getPayUserId() == null) ? 0 : getPayUserId().hashCode()); + result = prime * result + ((getPayMode() == null) ? 0 : getPayMode().hashCode()); + result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode()); + result = prime * result + ((getTradeAmount() == null) ? 0 : getTradeAmount().hashCode()); + result = prime * result + ((getStoreDiscountSatisfy() == null) ? 0 : getStoreDiscountSatisfy().hashCode()); + result = prime * result + ((getStoreDiscountId() == null) ? 0 : getStoreDiscountId().hashCode()); + result = prime * result + ((getStoreDiscountName() == null) ? 0 : getStoreDiscountName().hashCode()); + result = prime * result + ((getStoreDiscountType() == null) ? 0 : getStoreDiscountType().hashCode()); + result = prime * result + ((getStoreDiscountPrice() == null) ? 0 : getStoreDiscountPrice().hashCode()); + result = prime * result + ((getStoreDiscountActualPrice() == null) ? 0 : getStoreDiscountActualPrice().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); + result = prime * result + ((getUserDiscountId() == null) ? 0 : getUserDiscountId().hashCode()); + result = prime * result + ((getUserDiscountName() == null) ? 0 : getUserDiscountName().hashCode()); + result = prime * result + ((getUserDiscountType() == null) ? 0 : getUserDiscountType().hashCode()); + result = prime * result + ((getUserDiscountPrice() == null) ? 0 : getUserDiscountPrice().hashCode()); + result = prime * result + ((getUserDiscountActualPrice() == null) ? 0 : getUserDiscountActualPrice().hashCode()); + result = prime * result + ((getTradeActualAmount() == null) ? 0 : getTradeActualAmount().hashCode()); + result = prime * result + ((getAccTradeNo() == null) ? 0 : getAccTradeNo().hashCode()); + result = prime * result + ((getAccMdiscountAmount() == null) ? 0 : getAccMdiscountAmount().hashCode()); + result = prime * result + ((getAccDiscountAmount() == null) ? 0 : getAccDiscountAmount().hashCode()); + result = prime * result + ((getAccPaymentCode() == null) ? 0 : getAccPaymentCode().hashCode()); + result = prime * result + ((getCardType() == null) ? 0 : getCardType().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", agentId=").append(agentId); + sb.append(", salesmanId=").append(salesmanId); + sb.append(", salesmanName=").append(salesmanName); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + sb.append(", merNo=").append(merNo); + sb.append(", storeId=").append(storeId); + sb.append(", storeName=").append(storeName); + sb.append(", deviceId=").append(deviceId); + sb.append(", deviceSn=").append(deviceSn); + sb.append(", qrCodeId=").append(qrCodeId); + sb.append(", qrCodeSn=").append(qrCodeSn); + sb.append(", platformType=").append(platformType); + sb.append(", platformMerNo=").append(platformMerNo); + sb.append(", platformTradeNo=").append(platformTradeNo); + sb.append(", platformLogNo=").append(platformLogNo); + sb.append(", payUserId=").append(payUserId); + sb.append(", payMode=").append(payMode); + sb.append(", outTradeNo=").append(outTradeNo); + sb.append(", tradeAmount=").append(tradeAmount); + sb.append(", storeDiscountSatisfy=").append(storeDiscountSatisfy); + sb.append(", storeDiscountId=").append(storeDiscountId); + sb.append(", storeDiscountName=").append(storeDiscountName); + sb.append(", storeDiscountType=").append(storeDiscountType); + sb.append(", storeDiscountPrice=").append(storeDiscountPrice); + sb.append(", storeDiscountActualPrice=").append(storeDiscountActualPrice); + sb.append(", userId=").append(userId); + sb.append(", userPhone=").append(userPhone); + sb.append(", userDiscountId=").append(userDiscountId); + sb.append(", userDiscountName=").append(userDiscountName); + sb.append(", userDiscountType=").append(userDiscountType); + sb.append(", userDiscountPrice=").append(userDiscountPrice); + sb.append(", userDiscountActualPrice=").append(userDiscountActualPrice); + sb.append(", tradeActualAmount=").append(tradeActualAmount); + sb.append(", accTradeNo=").append(accTradeNo); + sb.append(", accMdiscountAmount=").append(accMdiscountAmount); + sb.append(", accDiscountAmount=").append(accDiscountAmount); + sb.append(", accPaymentCode=").append(accPaymentCode); + sb.append(", cardType=").append(cardType); + sb.append(", status=").append(status); + sb.append(", payTime=").append(payTime); + sb.append(", createTime=").append(createTime); + sb.append(", cancelTime=").append(cancelTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/BsTradeOrderExample.java b/hai-service/src/main/java/com/hai/entity/BsTradeOrderExample.java new file mode 100644 index 00000000..1beccf04 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/BsTradeOrderExample.java @@ -0,0 +1,3374 @@ +package com.hai.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsTradeOrderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsTradeOrderExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNull() { + addCriterion("agent_id is null"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNotNull() { + addCriterion("agent_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentIdEqualTo(Long value) { + addCriterion("agent_id =", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotEqualTo(Long value) { + addCriterion("agent_id <>", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThan(Long value) { + addCriterion("agent_id >", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_id >=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThan(Long value) { + addCriterion("agent_id <", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThanOrEqualTo(Long value) { + addCriterion("agent_id <=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdIn(List values) { + addCriterion("agent_id in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotIn(List values) { + addCriterion("agent_id not in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdBetween(Long value1, Long value2) { + addCriterion("agent_id between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotBetween(Long value1, Long value2) { + addCriterion("agent_id not between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdIsNull() { + addCriterion("salesman_id is null"); + return (Criteria) this; + } + + public Criteria andSalesmanIdIsNotNull() { + addCriterion("salesman_id is not null"); + return (Criteria) this; + } + + public Criteria andSalesmanIdEqualTo(Long value) { + addCriterion("salesman_id =", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdNotEqualTo(Long value) { + addCriterion("salesman_id <>", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdGreaterThan(Long value) { + addCriterion("salesman_id >", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdGreaterThanOrEqualTo(Long value) { + addCriterion("salesman_id >=", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdLessThan(Long value) { + addCriterion("salesman_id <", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdLessThanOrEqualTo(Long value) { + addCriterion("salesman_id <=", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdIn(List values) { + addCriterion("salesman_id in", values, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdNotIn(List values) { + addCriterion("salesman_id not in", values, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdBetween(Long value1, Long value2) { + addCriterion("salesman_id between", value1, value2, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdNotBetween(Long value1, Long value2) { + addCriterion("salesman_id not between", value1, value2, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanNameIsNull() { + addCriterion("salesman_name is null"); + return (Criteria) this; + } + + public Criteria andSalesmanNameIsNotNull() { + addCriterion("salesman_name is not null"); + return (Criteria) this; + } + + public Criteria andSalesmanNameEqualTo(String value) { + addCriterion("salesman_name =", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameNotEqualTo(String value) { + addCriterion("salesman_name <>", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameGreaterThan(String value) { + addCriterion("salesman_name >", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameGreaterThanOrEqualTo(String value) { + addCriterion("salesman_name >=", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameLessThan(String value) { + addCriterion("salesman_name <", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameLessThanOrEqualTo(String value) { + addCriterion("salesman_name <=", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameLike(String value) { + addCriterion("salesman_name like", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameNotLike(String value) { + addCriterion("salesman_name not like", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameIn(List values) { + addCriterion("salesman_name in", values, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameNotIn(List values) { + addCriterion("salesman_name not in", values, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameBetween(String value1, String value2) { + addCriterion("salesman_name between", value1, value2, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameNotBetween(String value1, String value2) { + addCriterion("salesman_name not between", value1, value2, "salesmanName"); + return (Criteria) this; + } + + public Criteria andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNoIsNull() { + addCriterion("mer_no is null"); + return (Criteria) this; + } + + public Criteria andMerNoIsNotNull() { + addCriterion("mer_no is not null"); + return (Criteria) this; + } + + public Criteria andMerNoEqualTo(String value) { + addCriterion("mer_no =", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotEqualTo(String value) { + addCriterion("mer_no <>", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThan(String value) { + addCriterion("mer_no >", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThanOrEqualTo(String value) { + addCriterion("mer_no >=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThan(String value) { + addCriterion("mer_no <", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThanOrEqualTo(String value) { + addCriterion("mer_no <=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLike(String value) { + addCriterion("mer_no like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotLike(String value) { + addCriterion("mer_no not like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoIn(List values) { + addCriterion("mer_no in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotIn(List values) { + addCriterion("mer_no not in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoBetween(String value1, String value2) { + addCriterion("mer_no between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotBetween(String value1, String value2) { + addCriterion("mer_no not between", value1, value2, "merNo"); + 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 values) { + addCriterion("store_id in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotIn(List 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 andStoreNameIsNull() { + addCriterion("store_name is null"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNotNull() { + addCriterion("store_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreNameEqualTo(String value) { + addCriterion("store_name =", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotEqualTo(String value) { + addCriterion("store_name <>", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThan(String value) { + addCriterion("store_name >", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThanOrEqualTo(String value) { + addCriterion("store_name >=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThan(String value) { + addCriterion("store_name <", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThanOrEqualTo(String value) { + addCriterion("store_name <=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLike(String value) { + addCriterion("store_name like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotLike(String value) { + addCriterion("store_name not like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameIn(List values) { + addCriterion("store_name in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotIn(List values) { + addCriterion("store_name not in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameBetween(String value1, String value2) { + addCriterion("store_name between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotBetween(String value1, String value2) { + addCriterion("store_name not between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNull() { + addCriterion("device_id is null"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNotNull() { + addCriterion("device_id is not null"); + return (Criteria) this; + } + + public Criteria andDeviceIdEqualTo(Long value) { + addCriterion("device_id =", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotEqualTo(Long value) { + addCriterion("device_id <>", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThan(Long value) { + addCriterion("device_id >", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThanOrEqualTo(Long value) { + addCriterion("device_id >=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThan(Long value) { + addCriterion("device_id <", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThanOrEqualTo(Long value) { + addCriterion("device_id <=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdIn(List values) { + addCriterion("device_id in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotIn(List values) { + addCriterion("device_id not in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdBetween(Long value1, Long value2) { + addCriterion("device_id between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotBetween(Long value1, Long value2) { + addCriterion("device_id not between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceSnIsNull() { + addCriterion("device_sn is null"); + return (Criteria) this; + } + + public Criteria andDeviceSnIsNotNull() { + addCriterion("device_sn is not null"); + return (Criteria) this; + } + + public Criteria andDeviceSnEqualTo(String value) { + addCriterion("device_sn =", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotEqualTo(String value) { + addCriterion("device_sn <>", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnGreaterThan(String value) { + addCriterion("device_sn >", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnGreaterThanOrEqualTo(String value) { + addCriterion("device_sn >=", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnLessThan(String value) { + addCriterion("device_sn <", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnLessThanOrEqualTo(String value) { + addCriterion("device_sn <=", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnLike(String value) { + addCriterion("device_sn like", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotLike(String value) { + addCriterion("device_sn not like", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnIn(List values) { + addCriterion("device_sn in", values, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotIn(List values) { + addCriterion("device_sn not in", values, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnBetween(String value1, String value2) { + addCriterion("device_sn between", value1, value2, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotBetween(String value1, String value2) { + addCriterion("device_sn not between", value1, value2, "deviceSn"); + return (Criteria) this; + } + + public Criteria andQrCodeIdIsNull() { + addCriterion("qr_code_id is null"); + return (Criteria) this; + } + + public Criteria andQrCodeIdIsNotNull() { + addCriterion("qr_code_id is not null"); + return (Criteria) this; + } + + public Criteria andQrCodeIdEqualTo(Long value) { + addCriterion("qr_code_id =", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdNotEqualTo(Long value) { + addCriterion("qr_code_id <>", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdGreaterThan(Long value) { + addCriterion("qr_code_id >", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdGreaterThanOrEqualTo(Long value) { + addCriterion("qr_code_id >=", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdLessThan(Long value) { + addCriterion("qr_code_id <", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdLessThanOrEqualTo(Long value) { + addCriterion("qr_code_id <=", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdIn(List values) { + addCriterion("qr_code_id in", values, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdNotIn(List values) { + addCriterion("qr_code_id not in", values, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdBetween(Long value1, Long value2) { + addCriterion("qr_code_id between", value1, value2, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdNotBetween(Long value1, Long value2) { + addCriterion("qr_code_id not between", value1, value2, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeSnIsNull() { + addCriterion("qr_code_sn is null"); + return (Criteria) this; + } + + public Criteria andQrCodeSnIsNotNull() { + addCriterion("qr_code_sn is not null"); + return (Criteria) this; + } + + public Criteria andQrCodeSnEqualTo(String value) { + addCriterion("qr_code_sn =", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnNotEqualTo(String value) { + addCriterion("qr_code_sn <>", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnGreaterThan(String value) { + addCriterion("qr_code_sn >", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnGreaterThanOrEqualTo(String value) { + addCriterion("qr_code_sn >=", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnLessThan(String value) { + addCriterion("qr_code_sn <", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnLessThanOrEqualTo(String value) { + addCriterion("qr_code_sn <=", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnLike(String value) { + addCriterion("qr_code_sn like", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnNotLike(String value) { + addCriterion("qr_code_sn not like", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnIn(List values) { + addCriterion("qr_code_sn in", values, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnNotIn(List values) { + addCriterion("qr_code_sn not in", values, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnBetween(String value1, String value2) { + addCriterion("qr_code_sn between", value1, value2, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnNotBetween(String value1, String value2) { + addCriterion("qr_code_sn not between", value1, value2, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIsNull() { + addCriterion("platform_type is null"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIsNotNull() { + addCriterion("platform_type is not null"); + return (Criteria) this; + } + + public Criteria andPlatformTypeEqualTo(Integer value) { + addCriterion("platform_type =", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotEqualTo(Integer value) { + addCriterion("platform_type <>", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeGreaterThan(Integer value) { + addCriterion("platform_type >", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("platform_type >=", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeLessThan(Integer value) { + addCriterion("platform_type <", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeLessThanOrEqualTo(Integer value) { + addCriterion("platform_type <=", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIn(List values) { + addCriterion("platform_type in", values, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotIn(List values) { + addCriterion("platform_type not in", values, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeBetween(Integer value1, Integer value2) { + addCriterion("platform_type between", value1, value2, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotBetween(Integer value1, Integer value2) { + addCriterion("platform_type not between", value1, value2, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoIsNull() { + addCriterion("platform_mer_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoIsNotNull() { + addCriterion("platform_mer_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoEqualTo(String value) { + addCriterion("platform_mer_no =", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotEqualTo(String value) { + addCriterion("platform_mer_no <>", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoGreaterThan(String value) { + addCriterion("platform_mer_no >", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_mer_no >=", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoLessThan(String value) { + addCriterion("platform_mer_no <", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoLessThanOrEqualTo(String value) { + addCriterion("platform_mer_no <=", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoLike(String value) { + addCriterion("platform_mer_no like", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotLike(String value) { + addCriterion("platform_mer_no not like", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoIn(List values) { + addCriterion("platform_mer_no in", values, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotIn(List values) { + addCriterion("platform_mer_no not in", values, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoBetween(String value1, String value2) { + addCriterion("platform_mer_no between", value1, value2, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotBetween(String value1, String value2) { + addCriterion("platform_mer_no not between", value1, value2, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoIsNull() { + addCriterion("platform_trade_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoIsNotNull() { + addCriterion("platform_trade_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoEqualTo(String value) { + addCriterion("platform_trade_no =", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotEqualTo(String value) { + addCriterion("platform_trade_no <>", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoGreaterThan(String value) { + addCriterion("platform_trade_no >", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_trade_no >=", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoLessThan(String value) { + addCriterion("platform_trade_no <", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoLessThanOrEqualTo(String value) { + addCriterion("platform_trade_no <=", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoLike(String value) { + addCriterion("platform_trade_no like", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotLike(String value) { + addCriterion("platform_trade_no not like", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoIn(List values) { + addCriterion("platform_trade_no in", values, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotIn(List values) { + addCriterion("platform_trade_no not in", values, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoBetween(String value1, String value2) { + addCriterion("platform_trade_no between", value1, value2, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotBetween(String value1, String value2) { + addCriterion("platform_trade_no not between", value1, value2, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoIsNull() { + addCriterion("platform_log_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoIsNotNull() { + addCriterion("platform_log_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoEqualTo(String value) { + addCriterion("platform_log_no =", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoNotEqualTo(String value) { + addCriterion("platform_log_no <>", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoGreaterThan(String value) { + addCriterion("platform_log_no >", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_log_no >=", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoLessThan(String value) { + addCriterion("platform_log_no <", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoLessThanOrEqualTo(String value) { + addCriterion("platform_log_no <=", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoLike(String value) { + addCriterion("platform_log_no like", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoNotLike(String value) { + addCriterion("platform_log_no not like", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoIn(List values) { + addCriterion("platform_log_no in", values, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoNotIn(List values) { + addCriterion("platform_log_no not in", values, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoBetween(String value1, String value2) { + addCriterion("platform_log_no between", value1, value2, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoNotBetween(String value1, String value2) { + addCriterion("platform_log_no not between", value1, value2, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPayUserIdIsNull() { + addCriterion("pay_user_id is null"); + return (Criteria) this; + } + + public Criteria andPayUserIdIsNotNull() { + addCriterion("pay_user_id is not null"); + return (Criteria) this; + } + + public Criteria andPayUserIdEqualTo(String value) { + addCriterion("pay_user_id =", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdNotEqualTo(String value) { + addCriterion("pay_user_id <>", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdGreaterThan(String value) { + addCriterion("pay_user_id >", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdGreaterThanOrEqualTo(String value) { + addCriterion("pay_user_id >=", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdLessThan(String value) { + addCriterion("pay_user_id <", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdLessThanOrEqualTo(String value) { + addCriterion("pay_user_id <=", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdLike(String value) { + addCriterion("pay_user_id like", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdNotLike(String value) { + addCriterion("pay_user_id not like", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdIn(List values) { + addCriterion("pay_user_id in", values, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdNotIn(List values) { + addCriterion("pay_user_id not in", values, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdBetween(String value1, String value2) { + addCriterion("pay_user_id between", value1, value2, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdNotBetween(String value1, String value2) { + addCriterion("pay_user_id not between", value1, value2, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayModeIsNull() { + addCriterion("pay_mode is null"); + return (Criteria) this; + } + + public Criteria andPayModeIsNotNull() { + addCriterion("pay_mode is not null"); + return (Criteria) this; + } + + public Criteria andPayModeEqualTo(String value) { + addCriterion("pay_mode =", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeNotEqualTo(String value) { + addCriterion("pay_mode <>", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeGreaterThan(String value) { + addCriterion("pay_mode >", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeGreaterThanOrEqualTo(String value) { + addCriterion("pay_mode >=", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeLessThan(String value) { + addCriterion("pay_mode <", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeLessThanOrEqualTo(String value) { + addCriterion("pay_mode <=", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeLike(String value) { + addCriterion("pay_mode like", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeNotLike(String value) { + addCriterion("pay_mode not like", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeIn(List values) { + addCriterion("pay_mode in", values, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeNotIn(List values) { + addCriterion("pay_mode not in", values, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeBetween(String value1, String value2) { + addCriterion("pay_mode between", value1, value2, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeNotBetween(String value1, String value2) { + addCriterion("pay_mode not between", value1, value2, "payMode"); + return (Criteria) this; + } + + public Criteria andOutTradeNoIsNull() { + addCriterion("out_trade_no is null"); + return (Criteria) this; + } + + public Criteria andOutTradeNoIsNotNull() { + addCriterion("out_trade_no is not null"); + return (Criteria) this; + } + + public Criteria andOutTradeNoEqualTo(String value) { + addCriterion("out_trade_no =", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoNotEqualTo(String value) { + addCriterion("out_trade_no <>", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoGreaterThan(String value) { + addCriterion("out_trade_no >", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoGreaterThanOrEqualTo(String value) { + addCriterion("out_trade_no >=", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoLessThan(String value) { + addCriterion("out_trade_no <", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoLessThanOrEqualTo(String value) { + addCriterion("out_trade_no <=", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoLike(String value) { + addCriterion("out_trade_no like", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoNotLike(String value) { + addCriterion("out_trade_no not like", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoIn(List values) { + addCriterion("out_trade_no in", values, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoNotIn(List values) { + addCriterion("out_trade_no not in", values, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoBetween(String value1, String value2) { + addCriterion("out_trade_no between", value1, value2, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoNotBetween(String value1, String value2) { + addCriterion("out_trade_no not between", value1, value2, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andTradeAmountIsNull() { + addCriterion("trade_amount is null"); + return (Criteria) this; + } + + public Criteria andTradeAmountIsNotNull() { + addCriterion("trade_amount is not null"); + return (Criteria) this; + } + + public Criteria andTradeAmountEqualTo(BigDecimal value) { + addCriterion("trade_amount =", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountNotEqualTo(BigDecimal value) { + addCriterion("trade_amount <>", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountGreaterThan(BigDecimal value) { + addCriterion("trade_amount >", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("trade_amount >=", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountLessThan(BigDecimal value) { + addCriterion("trade_amount <", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("trade_amount <=", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountIn(List values) { + addCriterion("trade_amount in", values, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountNotIn(List values) { + addCriterion("trade_amount not in", values, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_amount between", value1, value2, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_amount not between", value1, value2, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyIsNull() { + addCriterion("store_discount_satisfy is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyIsNotNull() { + addCriterion("store_discount_satisfy is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyEqualTo(Integer value) { + addCriterion("store_discount_satisfy =", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyNotEqualTo(Integer value) { + addCriterion("store_discount_satisfy <>", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyGreaterThan(Integer value) { + addCriterion("store_discount_satisfy >", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyGreaterThanOrEqualTo(Integer value) { + addCriterion("store_discount_satisfy >=", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyLessThan(Integer value) { + addCriterion("store_discount_satisfy <", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyLessThanOrEqualTo(Integer value) { + addCriterion("store_discount_satisfy <=", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyIn(List values) { + addCriterion("store_discount_satisfy in", values, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyNotIn(List values) { + addCriterion("store_discount_satisfy not in", values, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyBetween(Integer value1, Integer value2) { + addCriterion("store_discount_satisfy between", value1, value2, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyNotBetween(Integer value1, Integer value2) { + addCriterion("store_discount_satisfy not between", value1, value2, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdIsNull() { + addCriterion("store_discount_id is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdIsNotNull() { + addCriterion("store_discount_id is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdEqualTo(Long value) { + addCriterion("store_discount_id =", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdNotEqualTo(Long value) { + addCriterion("store_discount_id <>", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdGreaterThan(Long value) { + addCriterion("store_discount_id >", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdGreaterThanOrEqualTo(Long value) { + addCriterion("store_discount_id >=", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdLessThan(Long value) { + addCriterion("store_discount_id <", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdLessThanOrEqualTo(Long value) { + addCriterion("store_discount_id <=", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdIn(List values) { + addCriterion("store_discount_id in", values, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdNotIn(List values) { + addCriterion("store_discount_id not in", values, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdBetween(Long value1, Long value2) { + addCriterion("store_discount_id between", value1, value2, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdNotBetween(Long value1, Long value2) { + addCriterion("store_discount_id not between", value1, value2, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameIsNull() { + addCriterion("store_discount_name is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameIsNotNull() { + addCriterion("store_discount_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameEqualTo(String value) { + addCriterion("store_discount_name =", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameNotEqualTo(String value) { + addCriterion("store_discount_name <>", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameGreaterThan(String value) { + addCriterion("store_discount_name >", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameGreaterThanOrEqualTo(String value) { + addCriterion("store_discount_name >=", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameLessThan(String value) { + addCriterion("store_discount_name <", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameLessThanOrEqualTo(String value) { + addCriterion("store_discount_name <=", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameLike(String value) { + addCriterion("store_discount_name like", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameNotLike(String value) { + addCriterion("store_discount_name not like", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameIn(List values) { + addCriterion("store_discount_name in", values, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameNotIn(List values) { + addCriterion("store_discount_name not in", values, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameBetween(String value1, String value2) { + addCriterion("store_discount_name between", value1, value2, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameNotBetween(String value1, String value2) { + addCriterion("store_discount_name not between", value1, value2, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeIsNull() { + addCriterion("store_discount_type is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeIsNotNull() { + addCriterion("store_discount_type is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeEqualTo(Integer value) { + addCriterion("store_discount_type =", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeNotEqualTo(Integer value) { + addCriterion("store_discount_type <>", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeGreaterThan(Integer value) { + addCriterion("store_discount_type >", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("store_discount_type >=", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeLessThan(Integer value) { + addCriterion("store_discount_type <", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeLessThanOrEqualTo(Integer value) { + addCriterion("store_discount_type <=", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeIn(List values) { + addCriterion("store_discount_type in", values, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeNotIn(List values) { + addCriterion("store_discount_type not in", values, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeBetween(Integer value1, Integer value2) { + addCriterion("store_discount_type between", value1, value2, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeNotBetween(Integer value1, Integer value2) { + addCriterion("store_discount_type not between", value1, value2, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceIsNull() { + addCriterion("store_discount_price is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceIsNotNull() { + addCriterion("store_discount_price is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceEqualTo(BigDecimal value) { + addCriterion("store_discount_price =", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceNotEqualTo(BigDecimal value) { + addCriterion("store_discount_price <>", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceGreaterThan(BigDecimal value) { + addCriterion("store_discount_price >", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("store_discount_price >=", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceLessThan(BigDecimal value) { + addCriterion("store_discount_price <", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("store_discount_price <=", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceIn(List values) { + addCriterion("store_discount_price in", values, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceNotIn(List values) { + addCriterion("store_discount_price not in", values, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("store_discount_price between", value1, value2, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("store_discount_price not between", value1, value2, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceIsNull() { + addCriterion("store_discount_actual_price is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceIsNotNull() { + addCriterion("store_discount_actual_price is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceEqualTo(BigDecimal value) { + addCriterion("store_discount_actual_price =", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceNotEqualTo(BigDecimal value) { + addCriterion("store_discount_actual_price <>", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceGreaterThan(BigDecimal value) { + addCriterion("store_discount_actual_price >", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("store_discount_actual_price >=", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceLessThan(BigDecimal value) { + addCriterion("store_discount_actual_price <", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("store_discount_actual_price <=", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceIn(List values) { + addCriterion("store_discount_actual_price in", values, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceNotIn(List values) { + addCriterion("store_discount_actual_price not in", values, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("store_discount_actual_price between", value1, value2, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("store_discount_actual_price not between", value1, value2, "storeDiscountActualPrice"); + 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(Integer value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Integer value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Integer value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Integer value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Integer value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Integer value1, Integer value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Integer value1, Integer value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserPhoneIsNull() { + addCriterion("user_phone is null"); + return (Criteria) this; + } + + public Criteria andUserPhoneIsNotNull() { + addCriterion("user_phone is not null"); + return (Criteria) this; + } + + public Criteria andUserPhoneEqualTo(String value) { + addCriterion("user_phone =", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotEqualTo(String value) { + addCriterion("user_phone <>", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneGreaterThan(String value) { + addCriterion("user_phone >", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneGreaterThanOrEqualTo(String value) { + addCriterion("user_phone >=", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLessThan(String value) { + addCriterion("user_phone <", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLessThanOrEqualTo(String value) { + addCriterion("user_phone <=", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLike(String value) { + addCriterion("user_phone like", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotLike(String value) { + addCriterion("user_phone not like", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneIn(List values) { + addCriterion("user_phone in", values, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotIn(List values) { + addCriterion("user_phone not in", values, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneBetween(String value1, String value2) { + addCriterion("user_phone between", value1, value2, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotBetween(String value1, String value2) { + addCriterion("user_phone not between", value1, value2, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdIsNull() { + addCriterion("user_discount_id is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdIsNotNull() { + addCriterion("user_discount_id is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdEqualTo(Long value) { + addCriterion("user_discount_id =", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdNotEqualTo(Long value) { + addCriterion("user_discount_id <>", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdGreaterThan(Long value) { + addCriterion("user_discount_id >", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_discount_id >=", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdLessThan(Long value) { + addCriterion("user_discount_id <", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdLessThanOrEqualTo(Long value) { + addCriterion("user_discount_id <=", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdIn(List values) { + addCriterion("user_discount_id in", values, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdNotIn(List values) { + addCriterion("user_discount_id not in", values, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdBetween(Long value1, Long value2) { + addCriterion("user_discount_id between", value1, value2, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdNotBetween(Long value1, Long value2) { + addCriterion("user_discount_id not between", value1, value2, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameIsNull() { + addCriterion("user_discount_name is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameIsNotNull() { + addCriterion("user_discount_name is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameEqualTo(String value) { + addCriterion("user_discount_name =", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameNotEqualTo(String value) { + addCriterion("user_discount_name <>", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameGreaterThan(String value) { + addCriterion("user_discount_name >", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameGreaterThanOrEqualTo(String value) { + addCriterion("user_discount_name >=", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameLessThan(String value) { + addCriterion("user_discount_name <", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameLessThanOrEqualTo(String value) { + addCriterion("user_discount_name <=", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameLike(String value) { + addCriterion("user_discount_name like", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameNotLike(String value) { + addCriterion("user_discount_name not like", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameIn(List values) { + addCriterion("user_discount_name in", values, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameNotIn(List values) { + addCriterion("user_discount_name not in", values, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameBetween(String value1, String value2) { + addCriterion("user_discount_name between", value1, value2, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameNotBetween(String value1, String value2) { + addCriterion("user_discount_name not between", value1, value2, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeIsNull() { + addCriterion("user_discount_type is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeIsNotNull() { + addCriterion("user_discount_type is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeEqualTo(Integer value) { + addCriterion("user_discount_type =", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeNotEqualTo(Integer value) { + addCriterion("user_discount_type <>", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeGreaterThan(Integer value) { + addCriterion("user_discount_type >", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("user_discount_type >=", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeLessThan(Integer value) { + addCriterion("user_discount_type <", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeLessThanOrEqualTo(Integer value) { + addCriterion("user_discount_type <=", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeIn(List values) { + addCriterion("user_discount_type in", values, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeNotIn(List values) { + addCriterion("user_discount_type not in", values, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeBetween(Integer value1, Integer value2) { + addCriterion("user_discount_type between", value1, value2, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeNotBetween(Integer value1, Integer value2) { + addCriterion("user_discount_type not between", value1, value2, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceIsNull() { + addCriterion("user_discount_price is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceIsNotNull() { + addCriterion("user_discount_price is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceEqualTo(BigDecimal value) { + addCriterion("user_discount_price =", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceNotEqualTo(BigDecimal value) { + addCriterion("user_discount_price <>", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceGreaterThan(BigDecimal value) { + addCriterion("user_discount_price >", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("user_discount_price >=", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceLessThan(BigDecimal value) { + addCriterion("user_discount_price <", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("user_discount_price <=", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceIn(List values) { + addCriterion("user_discount_price in", values, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceNotIn(List values) { + addCriterion("user_discount_price not in", values, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("user_discount_price between", value1, value2, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("user_discount_price not between", value1, value2, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceIsNull() { + addCriterion("user_discount_actual_price is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceIsNotNull() { + addCriterion("user_discount_actual_price is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceEqualTo(BigDecimal value) { + addCriterion("user_discount_actual_price =", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceNotEqualTo(BigDecimal value) { + addCriterion("user_discount_actual_price <>", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceGreaterThan(BigDecimal value) { + addCriterion("user_discount_actual_price >", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("user_discount_actual_price >=", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceLessThan(BigDecimal value) { + addCriterion("user_discount_actual_price <", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("user_discount_actual_price <=", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceIn(List values) { + addCriterion("user_discount_actual_price in", values, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceNotIn(List values) { + addCriterion("user_discount_actual_price not in", values, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("user_discount_actual_price between", value1, value2, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("user_discount_actual_price not between", value1, value2, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountIsNull() { + addCriterion("trade_actual_amount is null"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountIsNotNull() { + addCriterion("trade_actual_amount is not null"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountEqualTo(BigDecimal value) { + addCriterion("trade_actual_amount =", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountNotEqualTo(BigDecimal value) { + addCriterion("trade_actual_amount <>", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountGreaterThan(BigDecimal value) { + addCriterion("trade_actual_amount >", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("trade_actual_amount >=", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountLessThan(BigDecimal value) { + addCriterion("trade_actual_amount <", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("trade_actual_amount <=", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountIn(List values) { + addCriterion("trade_actual_amount in", values, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountNotIn(List values) { + addCriterion("trade_actual_amount not in", values, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_actual_amount between", value1, value2, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_actual_amount not between", value1, value2, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andAccTradeNoIsNull() { + addCriterion("acc_trade_no is null"); + return (Criteria) this; + } + + public Criteria andAccTradeNoIsNotNull() { + addCriterion("acc_trade_no is not null"); + return (Criteria) this; + } + + public Criteria andAccTradeNoEqualTo(String value) { + addCriterion("acc_trade_no =", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoNotEqualTo(String value) { + addCriterion("acc_trade_no <>", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoGreaterThan(String value) { + addCriterion("acc_trade_no >", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoGreaterThanOrEqualTo(String value) { + addCriterion("acc_trade_no >=", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoLessThan(String value) { + addCriterion("acc_trade_no <", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoLessThanOrEqualTo(String value) { + addCriterion("acc_trade_no <=", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoLike(String value) { + addCriterion("acc_trade_no like", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoNotLike(String value) { + addCriterion("acc_trade_no not like", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoIn(List values) { + addCriterion("acc_trade_no in", values, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoNotIn(List values) { + addCriterion("acc_trade_no not in", values, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoBetween(String value1, String value2) { + addCriterion("acc_trade_no between", value1, value2, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoNotBetween(String value1, String value2) { + addCriterion("acc_trade_no not between", value1, value2, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountIsNull() { + addCriterion("acc_mdiscount_amount is null"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountIsNotNull() { + addCriterion("acc_mdiscount_amount is not null"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountEqualTo(BigDecimal value) { + addCriterion("acc_mdiscount_amount =", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountNotEqualTo(BigDecimal value) { + addCriterion("acc_mdiscount_amount <>", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountGreaterThan(BigDecimal value) { + addCriterion("acc_mdiscount_amount >", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("acc_mdiscount_amount >=", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountLessThan(BigDecimal value) { + addCriterion("acc_mdiscount_amount <", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("acc_mdiscount_amount <=", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountIn(List values) { + addCriterion("acc_mdiscount_amount in", values, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountNotIn(List values) { + addCriterion("acc_mdiscount_amount not in", values, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("acc_mdiscount_amount between", value1, value2, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("acc_mdiscount_amount not between", value1, value2, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountIsNull() { + addCriterion("acc_discount_amount is null"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountIsNotNull() { + addCriterion("acc_discount_amount is not null"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountEqualTo(BigDecimal value) { + addCriterion("acc_discount_amount =", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountNotEqualTo(BigDecimal value) { + addCriterion("acc_discount_amount <>", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountGreaterThan(BigDecimal value) { + addCriterion("acc_discount_amount >", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("acc_discount_amount >=", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountLessThan(BigDecimal value) { + addCriterion("acc_discount_amount <", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("acc_discount_amount <=", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountIn(List values) { + addCriterion("acc_discount_amount in", values, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountNotIn(List values) { + addCriterion("acc_discount_amount not in", values, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("acc_discount_amount between", value1, value2, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("acc_discount_amount not between", value1, value2, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeIsNull() { + addCriterion("acc_payment_code is null"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeIsNotNull() { + addCriterion("acc_payment_code is not null"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeEqualTo(String value) { + addCriterion("acc_payment_code =", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeNotEqualTo(String value) { + addCriterion("acc_payment_code <>", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeGreaterThan(String value) { + addCriterion("acc_payment_code >", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeGreaterThanOrEqualTo(String value) { + addCriterion("acc_payment_code >=", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeLessThan(String value) { + addCriterion("acc_payment_code <", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeLessThanOrEqualTo(String value) { + addCriterion("acc_payment_code <=", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeLike(String value) { + addCriterion("acc_payment_code like", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeNotLike(String value) { + addCriterion("acc_payment_code not like", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeIn(List values) { + addCriterion("acc_payment_code in", values, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeNotIn(List values) { + addCriterion("acc_payment_code not in", values, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeBetween(String value1, String value2) { + addCriterion("acc_payment_code between", value1, value2, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeNotBetween(String value1, String value2) { + addCriterion("acc_payment_code not between", value1, value2, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andCardTypeIsNull() { + addCriterion("card_type is null"); + return (Criteria) this; + } + + public Criteria andCardTypeIsNotNull() { + addCriterion("card_type is not null"); + return (Criteria) this; + } + + public Criteria andCardTypeEqualTo(String value) { + addCriterion("card_type =", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeNotEqualTo(String value) { + addCriterion("card_type <>", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeGreaterThan(String value) { + addCriterion("card_type >", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeGreaterThanOrEqualTo(String value) { + addCriterion("card_type >=", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeLessThan(String value) { + addCriterion("card_type <", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeLessThanOrEqualTo(String value) { + addCriterion("card_type <=", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeLike(String value) { + addCriterion("card_type like", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeNotLike(String value) { + addCriterion("card_type not like", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeIn(List values) { + addCriterion("card_type in", values, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeNotIn(List values) { + addCriterion("card_type not in", values, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeBetween(String value1, String value2) { + addCriterion("card_type between", value1, value2, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeNotBetween(String value1, String value2) { + addCriterion("card_type not between", value1, value2, "cardType"); + 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 values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List 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 andPayTimeIsNull() { + addCriterion("pay_time is null"); + return (Criteria) this; + } + + public Criteria andPayTimeIsNotNull() { + addCriterion("pay_time is not null"); + return (Criteria) this; + } + + public Criteria andPayTimeEqualTo(Date value) { + addCriterion("pay_time =", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotEqualTo(Date value) { + addCriterion("pay_time <>", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThan(Date value) { + addCriterion("pay_time >", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThanOrEqualTo(Date value) { + addCriterion("pay_time >=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThan(Date value) { + addCriterion("pay_time <", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThanOrEqualTo(Date value) { + addCriterion("pay_time <=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeIn(List values) { + addCriterion("pay_time in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotIn(List values) { + addCriterion("pay_time not in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeBetween(Date value1, Date value2) { + addCriterion("pay_time between", value1, value2, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotBetween(Date value1, Date value2) { + addCriterion("pay_time not between", value1, value2, "payTime"); + 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 values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List 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 andCancelTimeIsNull() { + addCriterion("cancel_time is null"); + return (Criteria) this; + } + + public Criteria andCancelTimeIsNotNull() { + addCriterion("cancel_time is not null"); + return (Criteria) this; + } + + public Criteria andCancelTimeEqualTo(Date value) { + addCriterion("cancel_time =", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeNotEqualTo(Date value) { + addCriterion("cancel_time <>", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeGreaterThan(Date value) { + addCriterion("cancel_time >", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeGreaterThanOrEqualTo(Date value) { + addCriterion("cancel_time >=", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeLessThan(Date value) { + addCriterion("cancel_time <", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeLessThanOrEqualTo(Date value) { + addCriterion("cancel_time <=", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeIn(List values) { + addCriterion("cancel_time in", values, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeNotIn(List values) { + addCriterion("cancel_time not in", values, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeBetween(Date value1, Date value2) { + addCriterion("cancel_time between", value1, value2, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeNotBetween(Date value1, Date value2) { + addCriterion("cancel_time not between", value1, value2, "cancelTime"); + 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 values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List 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 values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List 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 values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List 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); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscount.java b/hai-service/src/main/java/com/hai/entity/HighDiscount.java index b577a2e5..f5f40a63 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscount.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscount.java @@ -24,6 +24,31 @@ public class HighDiscount implements Serializable { */ private Long companyId; + /** + * 平台类型 HSG: 嗨森逛 GRATIA-PAY:惠支付 + */ + private String platform; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户名称 + */ + private String merName; + + /** + * 门店id + */ + private Long storeId; + + /** + * 门店名称 + */ + private String storeName; + /** * 卡券编号 */ @@ -133,6 +158,46 @@ public class HighDiscount implements Serializable { this.companyId = companyId; } + public String getPlatform() { + return platform; + } + + public void setPlatform(String platform) { + this.platform = platform; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + public String getDiscountKey() { return discountKey; } @@ -307,6 +372,11 @@ public class HighDiscount implements Serializable { HighDiscount other = (HighDiscount) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) + && (this.getPlatform() == null ? other.getPlatform() == null : this.getPlatform().equals(other.getPlatform())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) + && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) && (this.getDiscountKey() == null ? other.getDiscountKey() == null : this.getDiscountKey().equals(other.getDiscountKey())) && (this.getUsingRange() == null ? other.getUsingRange() == null : this.getUsingRange().equals(other.getUsingRange())) && (this.getUseScope() == null ? other.getUseScope() == null : this.getUseScope().equals(other.getUseScope())) @@ -335,6 +405,11 @@ public class HighDiscount implements Serializable { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + result = prime * result + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); + result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); result = prime * result + ((getDiscountKey() == null) ? 0 : getDiscountKey().hashCode()); result = prime * result + ((getUsingRange() == null) ? 0 : getUsingRange().hashCode()); result = prime * result + ((getUseScope() == null) ? 0 : getUseScope().hashCode()); @@ -366,6 +441,11 @@ public class HighDiscount implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", companyId=").append(companyId); + sb.append(", platform=").append(platform); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + sb.append(", storeId=").append(storeId); + sb.append(", storeName=").append(storeName); sb.append(", discountKey=").append(discountKey); sb.append(", usingRange=").append(usingRange); sb.append(", useScope=").append(useScope); diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountExample.java b/hai-service/src/main/java/com/hai/entity/HighDiscountExample.java index f5708b9d..10717983 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountExample.java @@ -246,6 +246,336 @@ public class HighDiscountExample { return (Criteria) this; } + public Criteria andPlatformIsNull() { + addCriterion("platform is null"); + return (Criteria) this; + } + + public Criteria andPlatformIsNotNull() { + addCriterion("platform is not null"); + return (Criteria) this; + } + + public Criteria andPlatformEqualTo(String value) { + addCriterion("platform =", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotEqualTo(String value) { + addCriterion("platform <>", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThan(String value) { + addCriterion("platform >", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThanOrEqualTo(String value) { + addCriterion("platform >=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThan(String value) { + addCriterion("platform <", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThanOrEqualTo(String value) { + addCriterion("platform <=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLike(String value) { + addCriterion("platform like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotLike(String value) { + addCriterion("platform not like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformIn(List values) { + addCriterion("platform in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotIn(List values) { + addCriterion("platform not in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformBetween(String value1, String value2) { + addCriterion("platform between", value1, value2, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotBetween(String value1, String value2) { + addCriterion("platform not between", value1, value2, "platform"); + return (Criteria) this; + } + + public Criteria andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + 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 values) { + addCriterion("store_id in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotIn(List 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 andStoreNameIsNull() { + addCriterion("store_name is null"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNotNull() { + addCriterion("store_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreNameEqualTo(String value) { + addCriterion("store_name =", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotEqualTo(String value) { + addCriterion("store_name <>", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThan(String value) { + addCriterion("store_name >", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThanOrEqualTo(String value) { + addCriterion("store_name >=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThan(String value) { + addCriterion("store_name <", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThanOrEqualTo(String value) { + addCriterion("store_name <=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLike(String value) { + addCriterion("store_name like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotLike(String value) { + addCriterion("store_name not like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameIn(List values) { + addCriterion("store_name in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotIn(List values) { + addCriterion("store_name not in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameBetween(String value1, String value2) { + addCriterion("store_name between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotBetween(String value1, String value2) { + addCriterion("store_name not between", value1, value2, "storeName"); + return (Criteria) this; + } + public Criteria andDiscountKeyIsNull() { addCriterion("discount_key is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java index 36c07a4a..5d2b0a27 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java @@ -26,6 +26,11 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser */ private Long discountCompanyId; + /** + * 优惠券平台 平台类型 1: 嗨森逛 2:惠支付 + */ + private Integer discountPlatform; + /** * 优惠券id */ @@ -125,6 +130,14 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser this.discountCompanyId = discountCompanyId; } + public Integer getDiscountPlatform() { + return discountPlatform; + } + + public void setDiscountPlatform(Integer discountPlatform) { + this.discountPlatform = discountPlatform; + } + public Long getDiscountId() { return discountId; } @@ -283,6 +296,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser HighDiscountUserRel other = (HighDiscountUserRel) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getDiscountCompanyId() == null ? other.getDiscountCompanyId() == null : this.getDiscountCompanyId().equals(other.getDiscountCompanyId())) + && (this.getDiscountPlatform() == null ? other.getDiscountPlatform() == null : this.getDiscountPlatform().equals(other.getDiscountPlatform())) && (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId())) && (this.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName())) && (this.getDiscountImg() == null ? other.getDiscountImg() == null : this.getDiscountImg().equals(other.getDiscountImg())) @@ -309,6 +323,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getDiscountCompanyId() == null) ? 0 : getDiscountCompanyId().hashCode()); + result = prime * result + ((getDiscountPlatform() == null) ? 0 : getDiscountPlatform().hashCode()); result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode()); result = prime * result + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode()); result = prime * result + ((getDiscountImg() == null) ? 0 : getDiscountImg().hashCode()); @@ -338,6 +353,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", discountCompanyId=").append(discountCompanyId); + sb.append(", discountPlatform=").append(discountPlatform); sb.append(", discountId=").append(discountId); sb.append(", discountName=").append(discountName); sb.append(", discountImg=").append(discountImg); diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java index 5aa9dfa3..91688078 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java @@ -246,6 +246,66 @@ public class HighDiscountUserRelExample { return (Criteria) this; } + public Criteria andDiscountPlatformIsNull() { + addCriterion("discount_platform is null"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformIsNotNull() { + addCriterion("discount_platform is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformEqualTo(Integer value) { + addCriterion("discount_platform =", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformNotEqualTo(Integer value) { + addCriterion("discount_platform <>", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformGreaterThan(Integer value) { + addCriterion("discount_platform >", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformGreaterThanOrEqualTo(Integer value) { + addCriterion("discount_platform >=", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformLessThan(Integer value) { + addCriterion("discount_platform <", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformLessThanOrEqualTo(Integer value) { + addCriterion("discount_platform <=", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformIn(List values) { + addCriterion("discount_platform in", values, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformNotIn(List values) { + addCriterion("discount_platform not in", values, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformBetween(Integer value1, Integer value2) { + addCriterion("discount_platform between", value1, value2, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformNotBetween(Integer value1, Integer value2) { + addCriterion("discount_platform not between", value1, value2, "discountPlatform"); + return (Criteria) this; + } + public Criteria andDiscountIdIsNull() { addCriterion("discount_id is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilGunNo.java b/hai-service/src/main/java/com/hai/entity/HighGasOilGunNo.java index f4619c2f..5bdb6d65 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilGunNo.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilGunNo.java @@ -14,7 +14,7 @@ import java.util.Date; **/ public class HighGasOilGunNo implements Serializable { /** - * 主键 + * 主键r */ private Long id; @@ -31,7 +31,7 @@ public class HighGasOilGunNo implements Serializable { /** * 油号 */ - private Integer oilNo; + private String oilNo; /** * 油品名称 @@ -95,11 +95,11 @@ public class HighGasOilGunNo implements Serializable { this.storeId = storeId; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilGunNoExample.java b/hai-service/src/main/java/com/hai/entity/HighGasOilGunNoExample.java index 3727950e..e0765e89 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilGunNoExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilGunNoExample.java @@ -315,52 +315,62 @@ public class HighGasOilGunNoExample { return (Criteria) this; } - public Criteria andOilNoEqualTo(Integer value) { + public Criteria andOilNoEqualTo(String value) { addCriterion("oil_no =", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotEqualTo(Integer value) { + public Criteria andOilNoNotEqualTo(String value) { addCriterion("oil_no <>", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThan(Integer value) { + public Criteria andOilNoGreaterThan(String value) { addCriterion("oil_no >", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThanOrEqualTo(Integer value) { + public Criteria andOilNoGreaterThanOrEqualTo(String value) { addCriterion("oil_no >=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThan(Integer value) { + public Criteria andOilNoLessThan(String value) { addCriterion("oil_no <", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThanOrEqualTo(Integer value) { + public Criteria andOilNoLessThanOrEqualTo(String value) { addCriterion("oil_no <=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoIn(List values) { + public Criteria andOilNoLike(String value) { + addCriterion("oil_no like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotLike(String value) { + addCriterion("oil_no not like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoIn(List values) { addCriterion("oil_no in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotIn(List values) { + public Criteria andOilNoNotIn(List values) { addCriterion("oil_no not in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoBetween(Integer value1, Integer value2) { + public Criteria andOilNoBetween(String value1, String value2) { addCriterion("oil_no between", value1, value2, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotBetween(Integer value1, Integer value2) { + public Criteria andOilNoNotBetween(String value1, String value2) { addCriterion("oil_no not between", value1, value2, "oilNo"); return (Criteria) this; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPrice.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPrice.java index 5e2eb4a5..a2c6fa57 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPrice.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPrice.java @@ -26,7 +26,7 @@ public class HighGasOilPrice implements Serializable { /** * 油号 */ - private Integer oilNo; + private String oilNo; /** * 油品名称 @@ -43,6 +43,11 @@ public class HighGasOilPrice implements Serializable { */ private BigDecimal gasStationDrop; + /** + * 成本价 + */ + private BigDecimal priceCost; + /** * 优惠价 */ @@ -58,11 +63,6 @@ public class HighGasOilPrice implements Serializable { */ private BigDecimal priceOfficial; - /** - * 成本价 - */ - private BigDecimal priceCost; - /** * 油品类型 1:汽油:2:柴油;3:天然气 */ @@ -102,11 +102,11 @@ public class HighGasOilPrice implements Serializable { this.merchantStoreId = merchantStoreId; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } @@ -134,6 +134,14 @@ public class HighGasOilPrice implements Serializable { this.gasStationDrop = gasStationDrop; } + public BigDecimal getPriceCost() { + return priceCost; + } + + public void setPriceCost(BigDecimal priceCost) { + this.priceCost = priceCost; + } + public BigDecimal getPriceVip() { return priceVip; } @@ -158,14 +166,6 @@ public class HighGasOilPrice implements Serializable { this.priceOfficial = priceOfficial; } - public BigDecimal getPriceCost() { - return priceCost; - } - - public void setPriceCost(BigDecimal priceCost) { - this.priceCost = priceCost; - } - public Integer getOilType() { return oilType; } @@ -232,10 +232,10 @@ public class HighGasOilPrice implements Serializable { && (this.getOilNoName() == null ? other.getOilNoName() == null : this.getOilNoName().equals(other.getOilNoName())) && (this.getPreferentialMargin() == null ? other.getPreferentialMargin() == null : this.getPreferentialMargin().equals(other.getPreferentialMargin())) && (this.getGasStationDrop() == null ? other.getGasStationDrop() == null : this.getGasStationDrop().equals(other.getGasStationDrop())) + && (this.getPriceCost() == null ? other.getPriceCost() == null : this.getPriceCost().equals(other.getPriceCost())) && (this.getPriceVip() == null ? other.getPriceVip() == null : this.getPriceVip().equals(other.getPriceVip())) && (this.getPriceGun() == null ? other.getPriceGun() == null : this.getPriceGun().equals(other.getPriceGun())) && (this.getPriceOfficial() == null ? other.getPriceOfficial() == null : this.getPriceOfficial().equals(other.getPriceOfficial())) - && (this.getPriceCost() == null ? other.getPriceCost() == null : this.getPriceCost().equals(other.getPriceCost())) && (this.getOilType() == null ? other.getOilType() == null : this.getOilType().equals(other.getOilType())) && (this.getOilTypeName() == null ? other.getOilTypeName() == null : this.getOilTypeName().equals(other.getOilTypeName())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) @@ -254,10 +254,10 @@ public class HighGasOilPrice implements Serializable { result = prime * result + ((getOilNoName() == null) ? 0 : getOilNoName().hashCode()); result = prime * result + ((getPreferentialMargin() == null) ? 0 : getPreferentialMargin().hashCode()); result = prime * result + ((getGasStationDrop() == null) ? 0 : getGasStationDrop().hashCode()); + result = prime * result + ((getPriceCost() == null) ? 0 : getPriceCost().hashCode()); result = prime * result + ((getPriceVip() == null) ? 0 : getPriceVip().hashCode()); result = prime * result + ((getPriceGun() == null) ? 0 : getPriceGun().hashCode()); result = prime * result + ((getPriceOfficial() == null) ? 0 : getPriceOfficial().hashCode()); - result = prime * result + ((getPriceCost() == null) ? 0 : getPriceCost().hashCode()); result = prime * result + ((getOilType() == null) ? 0 : getOilType().hashCode()); result = prime * result + ((getOilTypeName() == null) ? 0 : getOilTypeName().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); @@ -279,10 +279,10 @@ public class HighGasOilPrice implements Serializable { sb.append(", oilNoName=").append(oilNoName); sb.append(", preferentialMargin=").append(preferentialMargin); sb.append(", gasStationDrop=").append(gasStationDrop); + sb.append(", priceCost=").append(priceCost); sb.append(", priceVip=").append(priceVip); sb.append(", priceGun=").append(priceGun); sb.append(", priceOfficial=").append(priceOfficial); - sb.append(", priceCost=").append(priceCost); sb.append(", oilType=").append(oilType); sb.append(", oilTypeName=").append(oilTypeName); sb.append(", status=").append(status); diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceExample.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceExample.java index 59f713d7..1b816d10 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceExample.java @@ -255,52 +255,62 @@ public class HighGasOilPriceExample { return (Criteria) this; } - public Criteria andOilNoEqualTo(Integer value) { + public Criteria andOilNoEqualTo(String value) { addCriterion("oil_no =", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotEqualTo(Integer value) { + public Criteria andOilNoNotEqualTo(String value) { addCriterion("oil_no <>", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThan(Integer value) { + public Criteria andOilNoGreaterThan(String value) { addCriterion("oil_no >", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThanOrEqualTo(Integer value) { + public Criteria andOilNoGreaterThanOrEqualTo(String value) { addCriterion("oil_no >=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThan(Integer value) { + public Criteria andOilNoLessThan(String value) { addCriterion("oil_no <", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThanOrEqualTo(Integer value) { + public Criteria andOilNoLessThanOrEqualTo(String value) { addCriterion("oil_no <=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoIn(List values) { + public Criteria andOilNoLike(String value) { + addCriterion("oil_no like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotLike(String value) { + addCriterion("oil_no not like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoIn(List values) { addCriterion("oil_no in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotIn(List values) { + public Criteria andOilNoNotIn(List values) { addCriterion("oil_no not in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoBetween(Integer value1, Integer value2) { + public Criteria andOilNoBetween(String value1, String value2) { addCriterion("oil_no between", value1, value2, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotBetween(Integer value1, Integer value2) { + public Criteria andOilNoNotBetween(String value1, String value2) { addCriterion("oil_no not between", value1, value2, "oilNo"); return (Criteria) this; } @@ -495,6 +505,66 @@ public class HighGasOilPriceExample { return (Criteria) this; } + public Criteria andPriceCostIsNull() { + addCriterion("price_cost is null"); + return (Criteria) this; + } + + public Criteria andPriceCostIsNotNull() { + addCriterion("price_cost is not null"); + return (Criteria) this; + } + + public Criteria andPriceCostEqualTo(BigDecimal value) { + addCriterion("price_cost =", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostNotEqualTo(BigDecimal value) { + addCriterion("price_cost <>", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostGreaterThan(BigDecimal value) { + addCriterion("price_cost >", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("price_cost >=", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostLessThan(BigDecimal value) { + addCriterion("price_cost <", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostLessThanOrEqualTo(BigDecimal value) { + addCriterion("price_cost <=", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostIn(List values) { + addCriterion("price_cost in", values, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostNotIn(List values) { + addCriterion("price_cost not in", values, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price_cost between", value1, value2, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price_cost not between", value1, value2, "priceCost"); + return (Criteria) this; + } + public Criteria andPriceVipIsNull() { addCriterion("price_vip is null"); return (Criteria) this; @@ -675,66 +745,6 @@ public class HighGasOilPriceExample { return (Criteria) this; } - public Criteria andPriceCostIsNull() { - addCriterion("price_cost is null"); - return (Criteria) this; - } - - public Criteria andPriceCostIsNotNull() { - addCriterion("price_cost is not null"); - return (Criteria) this; - } - - public Criteria andPriceCostEqualTo(BigDecimal value) { - addCriterion("price_cost =", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostNotEqualTo(BigDecimal value) { - addCriterion("price_cost <>", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostGreaterThan(BigDecimal value) { - addCriterion("price_cost >", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("price_cost >=", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostLessThan(BigDecimal value) { - addCriterion("price_cost <", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostLessThanOrEqualTo(BigDecimal value) { - addCriterion("price_cost <=", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostIn(List values) { - addCriterion("price_cost in", values, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostNotIn(List values) { - addCriterion("price_cost not in", values, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("price_cost between", value1, value2, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("price_cost not between", value1, value2, "priceCost"); - return (Criteria) this; - } - public Criteria andOilTypeIsNull() { addCriterion("oil_type is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficial.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficial.java index 9354ddac..372cf6f8 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficial.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficial.java @@ -31,7 +31,7 @@ public class HighGasOilPriceOfficial implements Serializable { /** * 油号 */ - private Integer oilNo; + private String oilNo; /** * 油品名称 @@ -90,11 +90,11 @@ public class HighGasOilPriceOfficial implements Serializable { this.regionName = regionName; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficialExample.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficialExample.java index 1f03fb63..ec0a3379 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficialExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficialExample.java @@ -325,52 +325,62 @@ public class HighGasOilPriceOfficialExample { return (Criteria) this; } - public Criteria andOilNoEqualTo(Integer value) { + public Criteria andOilNoEqualTo(String value) { addCriterion("oil_no =", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotEqualTo(Integer value) { + public Criteria andOilNoNotEqualTo(String value) { addCriterion("oil_no <>", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThan(Integer value) { + public Criteria andOilNoGreaterThan(String value) { addCriterion("oil_no >", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThanOrEqualTo(Integer value) { + public Criteria andOilNoGreaterThanOrEqualTo(String value) { addCriterion("oil_no >=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThan(Integer value) { + public Criteria andOilNoLessThan(String value) { addCriterion("oil_no <", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThanOrEqualTo(Integer value) { + public Criteria andOilNoLessThanOrEqualTo(String value) { addCriterion("oil_no <=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoIn(List values) { + public Criteria andOilNoLike(String value) { + addCriterion("oil_no like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotLike(String value) { + addCriterion("oil_no not like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoIn(List values) { addCriterion("oil_no in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotIn(List values) { + public Criteria andOilNoNotIn(List values) { addCriterion("oil_no not in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoBetween(Integer value1, Integer value2) { + public Criteria andOilNoBetween(String value1, String value2) { addCriterion("oil_no between", value1, value2, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotBetween(Integer value1, Integer value2) { + public Criteria andOilNoNotBetween(String value1, String value2) { addCriterion("oil_no not between", value1, value2, "oilNo"); return (Criteria) this; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java index d1f65131..3e9ed372 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java @@ -62,7 +62,7 @@ public class HighGasOilPriceTask implements Serializable { /** * 油号 */ - private Integer oilNo; + private String oilNo; /** * 油品名称 @@ -194,11 +194,11 @@ public class HighGasOilPriceTask implements Serializable { this.oilTypeName = oilTypeName; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java index 4527ab1a..969417b2 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java @@ -726,52 +726,62 @@ public class HighGasOilPriceTaskExample { return (Criteria) this; } - public Criteria andOilNoEqualTo(Integer value) { + public Criteria andOilNoEqualTo(String value) { addCriterion("oil_no =", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotEqualTo(Integer value) { + public Criteria andOilNoNotEqualTo(String value) { addCriterion("oil_no <>", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThan(Integer value) { + public Criteria andOilNoGreaterThan(String value) { addCriterion("oil_no >", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThanOrEqualTo(Integer value) { + public Criteria andOilNoGreaterThanOrEqualTo(String value) { addCriterion("oil_no >=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThan(Integer value) { + public Criteria andOilNoLessThan(String value) { addCriterion("oil_no <", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThanOrEqualTo(Integer value) { + public Criteria andOilNoLessThanOrEqualTo(String value) { addCriterion("oil_no <=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoIn(List values) { + public Criteria andOilNoLike(String value) { + addCriterion("oil_no like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotLike(String value) { + addCriterion("oil_no not like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoIn(List values) { addCriterion("oil_no in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotIn(List values) { + public Criteria andOilNoNotIn(List values) { addCriterion("oil_no not in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoBetween(Integer value1, Integer value2) { + public Criteria andOilNoBetween(String value1, String value2) { addCriterion("oil_no between", value1, value2, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotBetween(Integer value1, Integer value2) { + public Criteria andOilNoNotBetween(String value1, String value2) { addCriterion("oil_no not between", value1, value2, "oilNo"); return (Criteria) this; } diff --git a/hai-service/src/main/java/com/hai/enum_type/DiscountPlatform.java b/hai-service/src/main/java/com/hai/enum_type/DiscountPlatform.java new file mode 100644 index 00000000..0ec768e4 --- /dev/null +++ b/hai-service/src/main/java/com/hai/enum_type/DiscountPlatform.java @@ -0,0 +1,55 @@ +package com.hai.enum_type; + +import java.util.Objects; + +/** + * 优惠券平台类型 + */ +public enum DiscountPlatform { + HSG(1, "HSG", "嗨森逛"), + GRATIA_PAY(2, "GRATIA_PAY","惠支付"), + ; + + private Integer number; + + private String code; + + private String name; + + DiscountPlatform(int number, String code,String name) { + this.number = number; + this.code = code; + this.name = name; + } + + public static DiscountPlatform getPlatformByCode(String code) { + for (DiscountPlatform ele : values()) { + if(Objects.equals(code,ele.getCode())) return ele; + } + return null; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } +} diff --git a/hai-service/src/main/java/com/hai/enum_type/JinZhuJiaYouOilNo.java b/hai-service/src/main/java/com/hai/enum_type/JinZhuJiaYouOilNo.java index bf095719..cd8d5bc5 100644 --- a/hai-service/src/main/java/com/hai/enum_type/JinZhuJiaYouOilNo.java +++ b/hai-service/src/main/java/com/hai/enum_type/JinZhuJiaYouOilNo.java @@ -7,19 +7,19 @@ import java.util.Objects; */ public enum JinZhuJiaYouOilNo { - NO_0("NO_0",0, "0#",1, "柴油"), - NO_92("NO_92",92, "92#",2, "汽油"), - NO_95("NO_95",95, "95#",2, "汽油"), - NO_98("NO_98",98, "98#",2, "汽油"), + NO_0("NO_0","0", "0#",1, "柴油"), + NO_92("NO_92","92", "92#",2, "汽油"), + NO_95("NO_95","95", "95#",2, "汽油"), + NO_98("NO_98","98", "98#",2, "汽油"), ; private String oilNoCode; - private Integer oilNo; + private String oilNo; private String oilNoName; private Integer oilType; private String oilTypeName; - JinZhuJiaYouOilNo(String oilNoCode,Integer oilNo,String oilNoName,Integer oilType,String oilTypeName) { + JinZhuJiaYouOilNo(String oilNoCode,String oilNo,String oilNoName,Integer oilType,String oilTypeName) { this.oilNoCode = oilNoCode; this.oilNo = oilNo; this.oilNoName = oilNoName; @@ -49,11 +49,11 @@ public enum JinZhuJiaYouOilNo { this.oilNoCode = oilNoCode; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } diff --git a/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java b/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java index a4aa0f53..dc7b8bfa 100644 --- a/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java +++ b/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java @@ -9,6 +9,7 @@ public enum MerchantStoreSourceType { type2(2, "团油门店"), type3(3, "加好油"), type4(4, "金猪加油"), + type5(5, "paylo"), ; private Integer number; diff --git a/hai-service/src/main/java/com/hai/order/service/OrderRefundService.java b/hai-service/src/main/java/com/hai/order/service/OrderRefundService.java index 0fd7fd86..f92c389e 100644 --- a/hai-service/src/main/java/com/hai/order/service/OrderRefundService.java +++ b/hai-service/src/main/java/com/hai/order/service/OrderRefundService.java @@ -65,5 +65,4 @@ public interface OrderRefundService { */ List getRefundByRefundNo(String refundOrderNo); - } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java index bef1750d..200b36c8 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java @@ -163,7 +163,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { String childOrderNo = OrderUtil.generateChildOrderNo(); // 如果不是来源不是贵州中石化,需要校验库存 - if (!coupon.getCouponSource().equals(4)) { + if (!coupon.getCouponSource().equals(4) || !coupon.getCouponSource().equals(5)) { if (couponService.assignOrderStock(coupon.getId(), childOrderNo) == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "库存不足"); } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayService.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayService.java index 168d767f..e67e3635 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayService.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayService.java @@ -20,11 +20,19 @@ public interface OrderPayService { HighOrder hltCardPay(HighOrder order, HighUserCard userCard) throws Exception; /** - * 嗨森逛油卡支付 + * 嗨森逛个人油卡支付 * @param order 订单数据 * @param userCard 用户卡号 * @return */ HighOrder oilCardPay(HighOrder order, HighUserCard userCard); + /** + * 嗨森逛车队油卡支付 + * @param order 订单数据 + * @param userCard 用户卡号 + * @return + */ + HighOrder oilCardFleetPay(HighOrder order, HighUserCard userCard); + } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayServiceImpl.java index 414a959e..ba59b694 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayServiceImpl.java @@ -18,6 +18,7 @@ import com.hai.order.type.OrderChildStatus; import com.hai.order.type.OrderPayType; import com.hai.order.type.OrderProductType; import com.hai.order.type.OrderStatus; +import com.hai.service.HighFleetOilCardService; import com.hai.service.HighOilCardService; import com.hai.service.HighUserCardService; import org.springframework.stereotype.Service; @@ -44,6 +45,9 @@ public class OrderPayServiceImpl implements OrderPayService { @Resource private HighOilCardService oilCardService; + @Resource + private HighFleetOilCardService fleetOilCardService; + @Resource private OrderService orderService; @@ -115,4 +119,24 @@ public class OrderPayServiceImpl implements OrderPayService { order.getPayPrice(), userCard); } + + @Override + public HighOrder oilCardFleetPay(HighOrder order, HighUserCard userCard) { + // 油卡扣款 + Map consumeMap = new HashMap<>(); + consumeMap.put("sourceType", OilCardRecordSourceTypeEnum.type2.getType()); + consumeMap.put("sourceId", order.getId()); + consumeMap.put("sourceOrderNo", order.getOrderNo()); + consumeMap.put("sourceContent", "订单号:" + order.getOrderNo() + ",消费:¥" + order.getPayPrice()); + fleetOilCardService.consume(userCard.getCardNo(), order.getMemPhone(), order.getPayPrice(), consumeMap); + + // 处理订单业务 + return orderPaySuccessService.orderPaySuccessHandle( + order.getOrderNo(), + OrderPayType.PAY_TYPE8, + null, + order.getPayPrice(), + userCard); + } + } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java index 7bef96e0..b2bbd856 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java @@ -71,6 +71,9 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { @Resource private JinZhuJiaYouService jinZhuJiaYouService; + @Resource + private PayloService payloService; + @Resource private HighGasOrderPushMapper highGasOrderPushMapper; @@ -315,6 +318,17 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { // 推送金猪加油 jinZhuJiaYouService.payOrder(order.getOrderNo(), gasOrder.getGasPriceChannelPay()); + } else if (gasOrder.getChannelType().equals(MerchantStoreSourceType.type5.getNumber())) { + // 推送paylo四川壳牌 + payloService.syncYcShellPaymentNotify(order.getOrderNo(), + store.getStoreKey(), + gasOrder.getPayTime(), + order.getTotalPrice(), + gasOrder.getGasOilNo(), + gasOrder.getGasGunNo(), + order.getPayablePrice(), + order.getTotalDeductionPrice() + ); } } } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java index 6c93b19e..d5a06170 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java @@ -19,6 +19,7 @@ import com.hai.order.service.OrderRefundService; import com.hai.order.service.OrderService; import com.hai.order.type.*; import com.hai.order.utils.OrderUtil; +import com.hai.service.HighFleetOilCardService; import com.hai.service.HighOilCardService; import com.hai.service.HighUserService; import org.apache.commons.collections4.MapUtils; @@ -55,6 +56,9 @@ public class OrderRefundServiceImpl implements OrderRefundService { @Resource private HighOilCardService oilCardService; + @Resource + private HighFleetOilCardService fleetOilCardService; + @Override public void update(HighOrderRefund orderRefund) { orderRefundMapper.updateByPrimaryKey(orderRefund); @@ -204,6 +208,11 @@ public class OrderRefundServiceImpl implements OrderRefundService { // 油卡退款 oilCardService.refund(order.getOrderNo()); refundPriceModel.setRefundSuccess(true); + + } else if (orderPayType.getNumber().equals(OrderPayType.PAY_TYPE8.getNumber())) { + // 油卡退款 + fleetOilCardService.refund(order.getOrderNo()); + refundPriceModel.setRefundSuccess(true); } } catch (Exception e) { @@ -269,9 +278,10 @@ public class OrderRefundServiceImpl implements OrderRefundService { } @Override - public List getRefundByRefundNo(String refundOrderNo) { + public List getRefundByRefundNo(String refundOrderNo) { HighOrderRefundExample example = new HighOrderRefundExample(); example.createCriteria().andRefundOrderNoEqualTo(refundOrderNo); + example.setOrderByClause("create_time desc"); return orderRefundMapper.selectByExample(example); } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java index af83de26..b5a8b376 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java @@ -172,7 +172,7 @@ public class OrderServiceImpl implements OrderService { // 购买卡券 if (child.getGoodsType().equals(OrderChildGoodsType.TYPE1.getNumber())) { order.setProductType(OrderProductType.PRODUCT_TYPE5.getNumber()); - // 创建积分充值订单业务 + // 创建购买卡券业务 List couponOrderList = orderCreateHandleService.couponHandle(discountUserRel, child); childOrderList = couponOrderList; for (HighChildOrder childOrder : couponOrderList) { diff --git a/hai-service/src/main/java/com/hai/order/type/OrderPayType.java b/hai-service/src/main/java/com/hai/order/type/OrderPayType.java index 95a25155..830a7607 100644 --- a/hai-service/src/main/java/com/hai/order/type/OrderPayType.java +++ b/hai-service/src/main/java/com/hai/order/type/OrderPayType.java @@ -15,7 +15,8 @@ public enum OrderPayType { PAY_TYPE4(4, "贵州汇联通工会卡"), PAY_TYPE5(5, "银联"), PAY_TYPE6(6, "银联分期"), - PAY_TYPE7(7, "嗨森逛油卡"), + PAY_TYPE7(7, "嗨森逛个人油卡"), + PAY_TYPE8(8, "嗨森逛车队油卡"), ; private Integer number; diff --git a/hai-service/src/main/java/com/hai/service/HighFleetOilCardUserService.java b/hai-service/src/main/java/com/hai/service/HighFleetOilCardUserService.java index 830972f1..8aef95c9 100644 --- a/hai-service/src/main/java/com/hai/service/HighFleetOilCardUserService.java +++ b/hai-service/src/main/java/com/hai/service/HighFleetOilCardUserService.java @@ -23,7 +23,7 @@ public interface HighFleetOilCardUserService { * * @param fleetOilCardUserList */ - void importData(HighFleetOilCard fleetOilCard, List fleetOilCardUserList); + void importData(HighFleetOilCard fleetOilCard, List fleetOilCardUserList) throws Exception; /** * 根据iD查询详情 diff --git a/hai-service/src/main/java/com/hai/service/HighGasOilPriceOfficialService.java b/hai-service/src/main/java/com/hai/service/HighGasOilPriceOfficialService.java index 48821757..b9ce9dec 100644 --- a/hai-service/src/main/java/com/hai/service/HighGasOilPriceOfficialService.java +++ b/hai-service/src/main/java/com/hai/service/HighGasOilPriceOfficialService.java @@ -17,7 +17,7 @@ public interface HighGasOilPriceOfficialService { * @param regionId * @param oilNo */ - void editPrice(Long regionId, Integer oilNo, BigDecimal price); + void editPrice(Long regionId, String oilNo, BigDecimal price); /** * 查询价格 @@ -25,7 +25,7 @@ public interface HighGasOilPriceOfficialService { * @param oilNo * @return */ - HighGasOilPriceOfficial getPrice(Long regionId, Integer oilNo); + HighGasOilPriceOfficial getPrice(Long regionId, String oilNo); /** * 查询价格列表 @@ -44,5 +44,5 @@ public interface HighGasOilPriceOfficialService { * @param regionId 区域 * @param oilNo 油品 */ - void refreshGasPriceOfficial(Long regionId, Integer oilNo); + void refreshGasPriceOfficial(Long regionId, String oilNo); } diff --git a/hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java b/hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java index 62af2ade..11c0df1a 100644 --- a/hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java +++ b/hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java @@ -26,7 +26,7 @@ public interface HighGasOilPriceService { * @param oilNo * @return */ - HighGasOilPrice getGasOilPriceByStoreAndOilNo(Long storeId,Integer oilNo); + HighGasOilPrice getGasOilPriceByStoreAndOilNo(Long storeId,String oilNo); /** * 根据门店id 查询 @@ -41,7 +41,7 @@ public interface HighGasOilPriceService { * @param oilNo * @return */ - List getPriceListByRegionAndOilNo(Long regionId, Integer oilNo); + List getPriceListByRegionAndOilNo(Long regionId, String oilNo); /** * 根据区域和油号查询门店 diff --git a/hai-service/src/main/java/com/hai/service/HighGasService.java b/hai-service/src/main/java/com/hai/service/HighGasService.java index 51c360e7..5cc098f6 100644 --- a/hai-service/src/main/java/com/hai/service/HighGasService.java +++ b/hai-service/src/main/java/com/hai/service/HighGasService.java @@ -14,6 +14,12 @@ public interface HighGasService { */ void getJiaHaoYouAllStation() throws Exception; + /** + * 四川壳牌 + * 获取渠道商【Paylo】全量加油站 + */ + void getPayloAllStation() throws Exception; + /** * 获取渠道商【金猪加油】全量加油站 */ diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java index 3c7d2d18..f1edf1bd 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java @@ -337,6 +337,12 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "手机号格式错误"); } + // 预发码 + JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(coupon.getCouponKey(), couponAgentCode.getConvertCode(), 1, phone); + if (!preSendCoupon.getInteger("status").equals(1)) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "发码失败,请稍后重试!"); + } + // 给用户发码 JSONObject response = ChongQingCNPCService.sendCNPCTicket(coupon.getCouponKey(), couponAgentCode.getConvertCode(), 1, phone); JSONObject couponDetail = response.getJSONObject("ticketDetail"); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java index bbec1ecf..5d56d5c2 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java @@ -8,12 +8,14 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.utils.DateUtil; import com.hai.common.utils.IDGenerator; +import com.hai.config.ChongQingCNPCService; import com.hai.config.HuiLianTongConfig; import com.hai.config.HuiLianTongUnionCardConfig; import com.hai.dao.HighChildOrderMapper; import com.hai.dao.HighCouponCodeMapper; import com.hai.dao.HighCouponCodeMapperExt; import com.hai.entity.*; +import com.hai.enum_type.OrderPushType; import com.hai.model.GzSinopecModel; import com.hai.model.UserInfoModel; import com.hai.service.*; @@ -358,6 +360,42 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService { highUserCouponService.insertUserCoupon(highUserCoupon); } } + } else if (coupon.getCouponSource().equals(5)) { + // 预发码 + JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(coupon.getCouponKey(), order.getOrderNo(), childOrder.getSaleCount(), order.getMemPhone()); + if (preSendCoupon.getInteger("status").equals(1)) { + // 给用户发码 + JSONObject response = ChongQingCNPCService.sendCNPCTicket(coupon.getCouponKey(), order.getOrderNo(), childOrder.getSaleCount(), order.getMemPhone()); + JSONObject couponDetail = response.getJSONObject("ticketDetail"); + JSONArray codeList = response.getJSONArray("codeList"); + for (Object data : codeList) { + HighCouponCodeOther couponCodeOther = new HighCouponCodeOther(); + couponCodeOther.setType(2); + couponCodeOther.setOrderId(order.getId()); + couponCodeOther.setChildOrderId(childOrder.getId()); + couponCodeOther.setCouTypeCode(couponDetail.getString("requestCode")); + couponCodeOther.setCouNo(ChongQingCNPCService.decryptCouponCode(String.valueOf(data))); + couponCodeOther.setActiveTime(DateUtil.format(couponDetail.getString("effectiveTime"), "yyyy-MM-dd")); + couponCodeOther.setValidStartDate(DateUtil.format(couponDetail.getString("effectiveTime"), "yyyy-MM-dd")); + couponCodeOther.setValidEndDate(DateUtil.format(couponDetail.getString("expiredDate"), "yyyy-MM-dd")); + couponCodeOther.setStatus(20); + couponCodeOther.setCreateTime(new Date()); + couponCodeOtherService.insertCouponCodeOther(couponCodeOther); + + // 卡卷关联用户 + HighUserCoupon highUserCoupon = new HighUserCoupon(); + highUserCoupon.setMerchantId(coupon.getMerchantId()); + highUserCoupon.setCouponId(coupon.getId()); + highUserCoupon.setOrderId(order.getId()); + highUserCoupon.setChildOrderId(childOrder.getId()); + highUserCoupon.setUserId(order.getMemId()); + highUserCoupon.setCreateTime(new Date()); + highUserCoupon.setQrCodeImg(couponCodeOther.getCouNo()); + highUserCoupon.setUseEndTime(couponCodeOther.getValidEndDate()); + highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用 + highUserCouponService.insertUserCoupon(highUserCoupon); + } + } } else { // 查询子订单的兑换码 HighCouponCode code = getCodeByChildOrderNo(childOrder.getChildOrderNo()); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java index 86dc8316..69c01860 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java @@ -231,6 +231,11 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券未配置重庆中石油卡券"); } String tradeId = discountAgentCode.getId()+""+System.currentTimeMillis()+""; + // 预发码 + JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(couponList.get(0).getHighCoupon().getCouponKey(), tradeId, 1, userModel.getHighUser().getPhone()); + if (!preSendCoupon.getInteger("status").equals(1)) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "领取优惠券失败,请稍后重试"); + } // 给用户发码 JSONObject response = ChongQingCNPCService.sendCNPCTicket( couponList.get(0).getHighCoupon().getCouponKey(), diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java index f3cd8466..d997906a 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java @@ -5,8 +5,10 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.dao.HighDiscountUserRelMapper; import com.hai.entity.*; +import com.hai.enum_type.DiscountPlatform; import com.hai.service.*; import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.annotation.Isolation; @@ -94,6 +96,7 @@ public class HighDiscountUserRelServiceImpl implements HighDiscountUserRelServic }*/ HighDiscountUserRel userRel = new HighDiscountUserRel(); + userRel.setDiscountPlatform(DiscountPlatform.getPlatformByCode(discount.getPlatform()).getNumber()); userRel.setDiscountCompanyId(discount.getCompanyId()); userRel.setDiscountId(rel.getDiscountId()); userRel.setDiscountName(discount.getDiscountName()); @@ -158,6 +161,7 @@ public class HighDiscountUserRelServiceImpl implements HighDiscountUserRelServic highDiscountAgentRelService.updateDiscountAgentRel(discountAgentRel); HighDiscountUserRel userRel = new HighDiscountUserRel(); + userRel.setDiscountPlatform(DiscountPlatform.getPlatformByCode(discount.getPlatform()).getNumber()); userRel.setDiscountId(discountAgentRel.getDiscountId()); userRel.setAgentId(discountAgentRel.getAgentId()); userRel.setUserId(userId); @@ -237,6 +241,10 @@ public class HighDiscountUserRelServiceImpl implements HighDiscountUserRelServic criteria.andUserIdEqualTo(MapUtils.getLong(map, "userId")); } + if (MapUtils.getInteger(map, "discountPlatform") != null) { + criteria.andDiscountPlatformEqualTo(MapUtils.getInteger(map, "discountPlatform")); + } + if (MapUtils.getInteger(map, "status") != null) { criteria.andStatusEqualTo(MapUtils.getInteger(map, "status")); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardServiceImpl.java index aa20f147..00c09973 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardServiceImpl.java @@ -11,6 +11,7 @@ import com.hai.entity.*; import com.hai.enum_type.*; import com.hai.model.OilCardOrderModel; import com.hai.model.UserInfoModel; +import com.hai.order.service.OrderService; import com.hai.service.*; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; @@ -52,7 +53,7 @@ public class HighFleetOilCardServiceImpl implements HighFleetOilCardService { private BsOrganizationService organizationService; @Resource - private HighOrderService orderService; + private OrderService orderService; @Autowired private RedisTemplate redisTemplate; @@ -268,27 +269,42 @@ public class HighFleetOilCardServiceImpl implements HighFleetOilCardService { @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void refund(String orderNo) { - HighOrder order = orderService.getOrderByOrderNo(orderNo); + HighOrder order = orderService.getOrderDetailByNo(orderNo); if (order == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的的订单"); } + if (!order.getOrderStatus().equals(OrderStatusEnum.type2.getType()) + || !order.getOrderStatus().equals(OrderStatusEnum.type3.getType()) + || !order.getOrderStatus().equals(OrderStatusEnum.type7.getType()) + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单当前状态无法退款"); + } if (!order.getPayType().equals(OrderPayTypeEnum.type7.getType())) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付方式,不是油卡"); } if (StringUtils.isBlank(order.getMemCardNo())) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的油卡卡号"); } + // 获取锁 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(LOCK_KEY+order.getMemCardNo(), ""); + if (!lock) { + try { + Thread.sleep(100); + } catch (Exception e) { + e.printStackTrace(); + } + refund(orderNo); + } + // 查询油卡卡号 HighFleetOilCard oilCard = getFleetOilCardByCardNo(order.getMemCardNo()); if (oilCard == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的油卡卡号"); } - // 订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消 6.退款中 7.拒绝退款 - if (order.getOrderStatus() == 2 || order.getOrderStatus() == 3 || order.getOrderStatus() == 6 || order.getOrderStatus() == 7) { + try { order.setOrderStatus(4); order.setRefundTime(new Date()); -// order.setRefundPrice(order.getPayRealPrice()); - orderService.updateOrderDetail(order); + orderService.updateOrderData(order); // 变更前金额 BigDecimal beforeAmount = oilCard.getAmount(); @@ -315,9 +331,10 @@ public class HighFleetOilCardServiceImpl implements HighFleetOilCardService { } record.setSourceContent("订单号:" + orderNo + ",退款金额:" + order.getPayRealPrice()); fleetOilCardRecordService.insertRecord(record); - return; + + } finally { + redisTemplate.delete(LOCK_KEY+ oilCard.getCardNo()); } - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态异常"); } @Override diff --git a/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardUserServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardUserServiceImpl.java index 42a37d58..77979582 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardUserServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardUserServiceImpl.java @@ -52,7 +52,7 @@ public class HighFleetOilCardUserServiceImpl implements HighFleetOilCardUserServ @Override @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) - public void importData(HighFleetOilCard fleetOilCard, List fleetOilCardUserList) { + public void importData(HighFleetOilCard fleetOilCard, List fleetOilCardUserList) throws Exception { for (HighFleetOilCardUser fleetOilCardUser : fleetOilCardUserList) { if (StringUtils.isBlank(fleetOilCardUser.getContactName()) || StringUtils.isBlank(fleetOilCardUser.getContactPhone())) { @@ -78,6 +78,7 @@ public class HighFleetOilCardUserServiceImpl implements HighFleetOilCardUserServ // 1:需要填写用户信息 // 2:需要填写手机号 user.setInfoCompleteStatus(1); + // TODO 需要修改 userService.insertUser(user , null); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java index f11608de..7d71b985 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java @@ -135,7 +135,7 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri discount = discount.divide(new BigDecimal("100")); // 查询油站价格 - HighGasOilPrice gasOilPrice = gasOilPriceService.getGasOilPriceByStoreAndOilNo(goodsId, Integer.parseInt(oilNo)); + HighGasOilPrice gasOilPrice = gasOilPriceService.getGasOilPriceByStoreAndOilNo(goodsId, oilNo); if (gasOilPrice == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油站价格"); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java index d53fcbfd..b8454f7d 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java @@ -32,7 +32,7 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici private CommonService commonService; @Override - public void editPrice(Long regionId, Integer oilNo, BigDecimal price) { + public void editPrice(Long regionId, String oilNo, BigDecimal price) { HighGasOilPriceOfficial priceOfficial = getPrice(regionId, oilNo); if (priceOfficial != null) { priceOfficial.setPriceOfficial(price); @@ -44,7 +44,7 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici priceOfficial = new HighGasOilPriceOfficial(); priceOfficial.setRegionId(region.getRegionId()); priceOfficial.setRegionName(region.getRegionName()); - priceOfficial.setOilNo(Integer.valueOf(oil.getCodeValue())); + priceOfficial.setOilNo(oil.getCodeValue()); priceOfficial.setOilNoName(oil.getCodeName()); priceOfficial.setPriceOfficial(price); priceOfficial.setOilType(Integer.valueOf(oil.getExt1())); @@ -55,7 +55,7 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici } @Override - public HighGasOilPriceOfficial getPrice(Long regionId, Integer oilNo) { + public HighGasOilPriceOfficial getPrice(Long regionId, String oilNo) { HighGasOilPriceOfficialExample example = new HighGasOilPriceOfficialExample(); example.createCriteria().andRegionIdEqualTo(regionId).andOilNoEqualTo(oilNo); List list = gasOilPriceOfficialMapper.selectByExample(example); @@ -78,8 +78,8 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici criteria.andRegionIdEqualTo(MapUtils.getLong(param, "regionId")); } - if (MapUtils.getInteger(param, "oilNo") != null) { - criteria.andOilNoEqualTo(MapUtils.getInteger(param, "oilNo")); + if (StringUtils.isNotBlank(MapUtils.getString(param, "oilNo"))) { + criteria.andOilNoEqualTo(MapUtils.getString(param, "oilNo")); } if (MapUtils.getInteger(param, "oilType") != null) { @@ -107,22 +107,22 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici if (region != null) { BigDecimal oilNo92 = oilObject.getBigDecimal("p92"); if (oilNo92 != null) { - editPrice(region.getRegionId(), 92, oilNo92); + editPrice(region.getRegionId(), "92", oilNo92); } BigDecimal oilNo95 = oilObject.getBigDecimal("p95"); if (oilNo95 != null) { - editPrice(region.getRegionId(), 95, oilNo95); + editPrice(region.getRegionId(), "95", oilNo95); } BigDecimal oilNo98 = oilObject.getBigDecimal("p98"); if (oilNo98 != null) { - editPrice(region.getRegionId(), 98, oilNo98); + editPrice(region.getRegionId(), "98", oilNo98); } BigDecimal oilNo0 = oilObject.getBigDecimal("p0"); if (oilNo0 != null) { - editPrice(region.getRegionId(), 0, oilNo0); + editPrice(region.getRegionId(), "0", oilNo0); } } @@ -131,7 +131,7 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici } @Override - public void refreshGasPriceOfficial(Long regionId, Integer oilNo) { + public void refreshGasPriceOfficial(Long regionId, String oilNo) { Map param = new HashMap<>(); param.put("regionId", regionId); param.put("oilNo", oilNo); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java index cc68ce89..6c977417 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java @@ -33,7 +33,7 @@ public class HighGasOilPriceServiceImpl implements HighGasOilPriceService { } @Override - public HighGasOilPrice getGasOilPriceByStoreAndOilNo(Long storeId, Integer oilNo) { + public HighGasOilPrice getGasOilPriceByStoreAndOilNo(Long storeId, String oilNo) { HighGasOilPriceExample example = new HighGasOilPriceExample(); example.createCriteria().andMerchantStoreIdEqualTo(storeId).andOilNoEqualTo(oilNo).andStatusNotEqualTo(0); List list = highGasOilPriceMapper.selectByExample(example); @@ -51,7 +51,7 @@ public class HighGasOilPriceServiceImpl implements HighGasOilPriceService { } @Override - public List getPriceListByRegionAndOilNo(Long regionId, Integer oilNo) { + public List getPriceListByRegionAndOilNo(Long regionId, String oilNo) { return highGasOilPriceMapper.selectPriceListByRegionAndOilNo(regionId,oilNo); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java index 83be2968..1e4da558 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java @@ -190,8 +190,8 @@ public class HighGasOilPriceTaskServiceImpl implements HighGasOilPriceTaskServic criteria.andOilTypeEqualTo(MapUtils.getInteger(param, "oilType")); } - if (MapUtils.getInteger(param, "oilNo") != null) { - criteria.andOilNoEqualTo(MapUtils.getInteger(param, "oilNo")); + if (StringUtils.isNotBlank(MapUtils.getString(param, "oilNo"))) { + criteria.andOilNoEqualTo(MapUtils.getString(param, "oilNo")); } if (MapUtils.getInteger(param, "priceType") != null) { diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java index 991d6c5b..19ef21c7 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java @@ -8,6 +8,7 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.config.CommonSysConst; import com.hai.config.JinZhuJiaYouService; +import com.hai.config.PayloService; import com.hai.config.ShellGroupService; import com.hai.entity.*; import com.hai.enum_type.JinZhuJiaYouOilNo; @@ -15,6 +16,7 @@ import com.hai.enum_type.MerchantStoreSourceType; import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantStoreModel; import com.hai.service.*; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -46,6 +48,9 @@ public class HighGasServiceImpl implements HighGasService { @Resource private HighGasOilGunNoService gasOilGunNoService; + @Resource + private PayloService payloService; + @Resource private CommonService commonService; @@ -91,11 +96,11 @@ public class HighGasServiceImpl implements HighGasService { for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 - HighGasOilPrice highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getInteger("goodsCode")); + HighGasOilPrice highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("goodsCode")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("goodsCode")); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); @@ -134,7 +139,7 @@ public class HighGasServiceImpl implements HighGasService { } else { highGasOilPrice.setMerchantStoreId(store.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("goodsCode")); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); @@ -202,7 +207,7 @@ public class HighGasServiceImpl implements HighGasService { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); HighGasOilPrice highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("goodsCode")); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); highGasOilPrice.setPreferentialMargin(new BigDecimal("0")); highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); @@ -242,6 +247,204 @@ public class HighGasServiceImpl implements HighGasService { } } + @Override + public void getPayloAllStation() throws Exception { + HighMerchantModel merchant = highMerchantService.getDetailByKey("HF0801103822"); + + JSONObject pObject = payloService.ycShellPageQueryAllStation(1, 50); + JSONObject pageInfo = JSON.parseObject(pObject.getString("pageInfo"), JSONObject.class); + + // 总页数 + Integer totalPageNo = pageInfo.getBigDecimal("totalCount").divide(pageInfo.getBigDecimal("pageSize"),0, BigDecimal.ROUND_CEILING).intValue(); + for (int pageNum = 1; pageNum <= totalPageNo; pageNum++) { + // 查询加油站列表 + JSONObject respObject = payloService.ycShellPageQueryAllStation(pageNum, 50); + JSONArray stationArray = JSONObject.parseObject(respObject.getString("infoList"), JSONArray.class); + for (Object stationObject : stationArray) { + JSONObject station = (JSONObject) stationObject; + + // 查询油站 + HighMerchantStore store = highMerchantStoreService.getMerStoreDetailByKey(station.getString("stationCode")); + + if (store != null) { + store.setPrestoreType(0); + store.setMerchantId(merchant.getId()); + store.setCompanyId(merchant.getCompanyId()); + store.setStoreKey(station.getString("stationCode")); + store.setStoreName(station.getString("stationName")); + store.setStoreLogo(CommonSysConst.getSysConfig().getGasDefaultOilStationImg()); + store.setRegionId(station.getLong("provinceId")); + store.setRegionName(station.getString("provinceName")); + store.setAddress(station.getString("stationAddress")); + store.setLongitude(station.getString("longitude")); + store.setLatitude(station.getString("latitude")); + store.setStatus(station.getString("status").equals("ABLE")?1:2); + store.setOperatorId(0L); + store.setOperatorName("系统创建"); + store.setUpdateTime(new Date()); + highMerchantStoreService.updateMerchantStoreDetail(store); + + JSONArray oilPriceList = station.getJSONArray("oilPriceList"); + for (Object oilPrice : oilPriceList) { + JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); + // 查询门店油号 + HighGasOilPrice highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("goodsCode")); + if (highGasOilPrice == null) { + highGasOilPrice = new HighGasOilPrice(); + highGasOilPrice.setMerchantStoreId(store.getId()); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); + highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); + highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); + highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + + // 油品类型 1:汽油:2:柴油;3:天然气 + if (StringUtils.isNotBlank(oilPriceObject.getString("goodsGroupType"))) { + if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { + highGasOilPrice.setOilType(1); + highGasOilPrice.setOilTypeName("汽油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("DIESEL_OIL")) { + highGasOilPrice.setOilType(2); + highGasOilPrice.setOilTypeName("柴油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("NATURAL_GAS")) { + highGasOilPrice.setOilType(3); + highGasOilPrice.setOilTypeName("天然气"); + } + highGasOilPriceService.editGasOilPrice(highGasOilPrice); + } + + JSONArray oilGunNoList = oilPriceObject.getJSONArray("oilGunNoList"); + for (Object o : oilGunNoList) { + HighGasOilGunNo gasOilGunNo = gasOilGunNoService.getDetailByStoreAndGunNo(highGasOilPrice.getMerchantStoreId(), Integer.parseInt(o.toString())); + if (gasOilGunNo == null) { + gasOilGunNo = new HighGasOilGunNo(); + gasOilGunNo.setGasOilPriceId(highGasOilPrice.getId()); + gasOilGunNo.setStoreId(highGasOilPrice.getMerchantStoreId()); + gasOilGunNo.setOilNo(highGasOilPrice.getOilNo()); + gasOilGunNo.setOilNoName(highGasOilPrice.getOilNoName()); + gasOilGunNo.setOilType(highGasOilPrice.getOilType()); + gasOilGunNo.setOilTypeName(highGasOilPrice.getOilTypeName()); + gasOilGunNo.setGunNo(Integer.parseInt(o.toString())); + gasOilGunNo.setStatus(1); + gasOilGunNoService.editGunNo(gasOilGunNo); + } + } + + } else { + highGasOilPrice.setMerchantStoreId(store.getId()); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); + highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); + highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); + highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + + // 油品类型 1:汽油:2:柴油;3:天然气 + if (StringUtils.isNotBlank(oilPriceObject.getString("goodsGroupType"))) { + if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { + highGasOilPrice.setOilType(1); + highGasOilPrice.setOilTypeName("汽油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("DIESEL_OIL")) { + highGasOilPrice.setOilType(2); + highGasOilPrice.setOilTypeName("柴油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("NATURAL_GAS")) { + highGasOilPrice.setOilType(3); + highGasOilPrice.setOilTypeName("天然气"); + } + highGasOilPriceService.editGasOilPrice(highGasOilPrice); + } + + JSONArray oilGunNoList = oilPriceObject.getJSONArray("oilGunNoList"); + for (Object o : oilGunNoList) { + HighGasOilGunNo gasOilGunNo = gasOilGunNoService.getDetailByStoreAndGunNo(highGasOilPrice.getMerchantStoreId(), Integer.parseInt(o.toString())); + if (gasOilGunNo == null) { + gasOilGunNo = new HighGasOilGunNo(); + gasOilGunNo.setGasOilPriceId(highGasOilPrice.getId()); + gasOilGunNo.setStoreId(highGasOilPrice.getMerchantStoreId()); + gasOilGunNo.setOilNo(highGasOilPrice.getOilNo()); + gasOilGunNo.setOilNoName(highGasOilPrice.getOilNoName()); + gasOilGunNo.setOilType(highGasOilPrice.getOilType()); + gasOilGunNo.setOilTypeName(highGasOilPrice.getOilTypeName()); + gasOilGunNo.setGunNo(Integer.parseInt(o.toString())); + gasOilGunNo.setStatus(1); + gasOilGunNoService.editGunNo(gasOilGunNo); + } + } + } + } + } else { + store = new HighMerchantStore(); + store.setPrestoreType(0); + store.setType(1); + store.setSourceType(MerchantStoreSourceType.type5.getNumber()); + store.setMerchantId(merchant.getId()); + store.setCompanyId(merchant.getCompanyId()); + store.setStoreKey(station.getString("stationCode")); + store.setStoreName(station.getString("stationName")); + store.setStoreLogo(CommonSysConst.getSysConfig().getGasDefaultOilStationImg()); + store.setRegionId(station.getLong("provinceId")); + store.setRegionName(station.getString("provinceName")); + store.setAddress(station.getString("stationAddress")); + store.setLongitude(station.getString("longitude")); + store.setLatitude(station.getString("latitude")); + store.setStatus(station.getString("status").equals("ABLE")?1:2); + store.setOperatorId(0L); + store.setOperatorName("系统创建"); + store.setCreateTime(new Date()); + store.setUpdateTime(new Date()); + + HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel(); + BeanUtils.copyProperties(store, merchantStoreModel); + highMerchantStoreService.insertMerchantStore(merchantStoreModel); + + JSONArray oilPriceList = station.getJSONArray("oilPriceList"); + for (Object oilPrice : oilPriceList) { + JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); + HighGasOilPrice highGasOilPrice = new HighGasOilPrice(); + highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); + highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); + highGasOilPrice.setPreferentialMargin(new BigDecimal("0")); + highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); + highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + + // 油品类型 1:汽油:2:柴油;3:天然气 + if (StringUtils.isNotBlank(oilPriceObject.getString("goodsGroupType"))) { + if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { + highGasOilPrice.setOilType(1); + highGasOilPrice.setOilTypeName("汽油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("DIESEL_OIL")) { + highGasOilPrice.setOilType(2); + highGasOilPrice.setOilTypeName("柴油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("NATURAL_GAS")) { + highGasOilPrice.setOilType(3); + highGasOilPrice.setOilTypeName("天然气"); + } + highGasOilPriceService.editGasOilPrice(highGasOilPrice); + } + + JSONArray oilGunNoList = oilPriceObject.getJSONArray("oilGunNoList"); + for (Object o : oilGunNoList) { + HighGasOilGunNo gasOilGunNo = new HighGasOilGunNo(); + gasOilGunNo.setGasOilPriceId(highGasOilPrice.getId()); + gasOilGunNo.setStoreId(highGasOilPrice.getMerchantStoreId()); + gasOilGunNo.setOilNo(highGasOilPrice.getOilNo()); + gasOilGunNo.setOilNoName(highGasOilPrice.getOilNoName()); + gasOilGunNo.setOilType(highGasOilPrice.getOilType()); + gasOilGunNo.setOilTypeName(highGasOilPrice.getOilTypeName()); + gasOilGunNo.setGunNo(Integer.parseInt(o.toString())); + gasOilGunNo.setStatus(1); + gasOilGunNoService.editGunNo(gasOilGunNo); + } + } + } + } + } + } + @Override public void getJinZhuAllStation() throws Exception { HighMerchantModel merchant = highMerchantService.getDetailByKey("HF0802153624"); diff --git a/hai-user/src/main/java/com/web/config/AuthConfig.java b/hai-user/src/main/java/com/web/config/AuthConfig.java index ff6367b1..8b35c5c7 100644 --- a/hai-user/src/main/java/com/web/config/AuthConfig.java +++ b/hai-user/src/main/java/com/web/config/AuthConfig.java @@ -90,6 +90,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/**/springfox-swagger-ui/**") .excludePathPatterns("/**/swagger-ui.html") .excludePathPatterns("/login/*") + .excludePathPatterns("/wechat/*") .excludePathPatterns("/sms/*") ; } diff --git a/hai-user/src/main/java/com/web/controller/DiscountController.java b/hai-user/src/main/java/com/web/controller/DiscountController.java index b09bbf72..e5328409 100644 --- a/hai-user/src/main/java/com/web/controller/DiscountController.java +++ b/hai-user/src/main/java/com/web/controller/DiscountController.java @@ -1,5 +1,6 @@ package com.web.controller; +import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.hai.common.exception.ErrorCode; @@ -7,6 +8,7 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.security.UserCenter; import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.HighDiscountUserRel; import com.hai.model.HighUserModel; import com.hai.model.ResponseData; import com.hai.service.*; @@ -67,4 +69,125 @@ public class DiscountController { } } + @RequestMapping(value="/getUserDiscountDetail",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询用户优惠券详情") + public ResponseData getUserDiscountDetail(@RequestParam(name = "userDiscountId", required = true) Long userDiscountId) { + try { + + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + HighDiscountUserRel rel = discountUserRelService.getRelById(userDiscountId); + if (rel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的优惠券"); + } + JSONObject param = new JSONObject(); + param.put("id", rel.getId()); + param.put("userId", rel.getUserId()); + param.put("discountPlatform", rel.getHighDiscount().getPlatform()); + param.put("discountId", rel.getDiscountId()); + param.put("discountName", rel.getDiscountName()); + param.put("discountType", rel.getDiscountType()); + param.put("discountCondition", rel.getDiscountCondition()); + param.put("discountPrice", rel.getDiscountPrice()); + param.put("receiveTime", rel.getCreateTime()); + param.put("status", rel.getStatus()); + return ResponseMsgUtil.success(param); + + } catch (Exception e) { + log.error("HighDiscountController -> getUserDiscountDetail() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/useUserDiscount",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "使用优惠券") + public ResponseData useUserDiscount(@RequestParam(name = "userDiscountId", required = true) Long userDiscountId) { + try { + + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + HighDiscountUserRel rel = discountUserRelService.getRelById(userDiscountId); + if (rel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的优惠券"); + } + return ResponseMsgUtil.success(rel); + + } catch (Exception e) { + log.error("HighDiscountController -> getUserDiscountDetail() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/cancelUserDiscount",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "取消使用优惠券") + public ResponseData cancelUserDiscount(@RequestParam(name = "userDiscountId", required = true) Long userDiscountId) { + try { + + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + HighDiscountUserRel rel = discountUserRelService.getRelById(userDiscountId); + if (rel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的优惠券"); + } + JSONObject param = new JSONObject(); + param.put("id", rel.getId()); + param.put("userId", rel.getUserId()); + param.put("discountId", rel.getDiscountId()); + param.put("discountName", rel.getDiscountName()); + param.put("discountType", rel.getDiscountType()); + param.put("discountCondition", rel.getDiscountCondition()); + param.put("discountPrice", rel.getDiscountPrice()); + param.put("receiveTime", rel.getCreateTime()); + param.put("status", rel.getStatus()); + return ResponseMsgUtil.success(param); + + } catch (Exception e) { + log.error("HighDiscountController -> getUserDiscountDetail() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/queryUserDiscountList",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询用户优惠券列表") + public ResponseData queryUserDiscountList(@RequestParam(name = "platform", required = false) Integer platform, + @RequestParam(name = "storeNo", required = false) String storeNo, + @RequestParam(name = "useScope", required = false) Integer useScope, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + Map param = new HashMap<>(); + param.put("userId", userInfoModel.getHighUser().getId()); + param.put("platform", platform); + param.put("storeNo", storeNo); + param.put("useScope", useScope); + param.put("status", status); + + PageHelper.startPage(pageNum,pageSize); + PageInfo pageInfo = new PageInfo<>(discountUserRelService.getDiscountList(param)); + + + + return ResponseMsgUtil.success(pageInfo); + + } catch (Exception e) { + log.error("HighDiscountController -> getUserDiscountList() error!",e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/hai-user/src/main/java/com/web/controller/WechatController.java b/hai-user/src/main/java/com/web/controller/WechatController.java new file mode 100644 index 00000000..e8c52527 --- /dev/null +++ b/hai-user/src/main/java/com/web/controller/WechatController.java @@ -0,0 +1,38 @@ +package com.web.controller; + +import com.hai.common.utils.*; +import com.hai.model.ResponseData; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.HashMap; +import java.util.Map; + +@Controller +@RequestMapping(value = "/wechat") +@Api(value = "微信授权") +public class WechatController { + + @RequestMapping(value = "/getH5AccessToken", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "【H5】获取AccessToken") + public ResponseData getH5AccessToken(@RequestParam(value = "code", required = true) String code) { + try { + Map params = new HashMap<>(); + params.put("appid", "wxa075e8509802f826"); + params.put("secret", "0e606fc1378d35e359fcf3f15570b2c5"); + params.put("code", code); + params.put("grant_type", "authorization_code"); + return ResponseMsgUtil.success(HttpsUtils.doGet("https://api.weixin.qq.com/sns/oauth2/access_token", params)); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/hai-user/target/classes/com/web/config/AuthConfig.class b/hai-user/target/classes/com/web/config/AuthConfig.class index ef3f953b..c1ee891f 100644 Binary files a/hai-user/target/classes/com/web/config/AuthConfig.class and b/hai-user/target/classes/com/web/config/AuthConfig.class differ diff --git a/hai-user/target/classes/com/web/controller/DiscountController.class b/hai-user/target/classes/com/web/controller/DiscountController.class index 9eb7b7ca..1c58988d 100644 Binary files a/hai-user/target/classes/com/web/controller/DiscountController.class and b/hai-user/target/classes/com/web/controller/DiscountController.class differ diff --git a/hai-user/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/hai-user/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst index 5463c603..9c486822 100644 --- a/hai-user/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ b/hai-user/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -17,3 +17,4 @@ com/web/controller/LoginLogController.class com/web/config/MultipartConfig.class com/web/config/SwaggerConfig.class com/web/config/AuthConfig.class +com/web/controller/WechatController.class diff --git a/hai-user/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/hai-user/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst index f9c06f43..41cf9fdb 100644 --- a/hai-user/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ b/hai-user/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -12,6 +12,7 @@ /Volumes/work/code/high-work/high-service/hai-user/src/main/java/com/web/controller/UserController.java /Volumes/work/code/high-work/high-service/hai-user/src/main/java/com/web/config/MultipartConfig.java /Volumes/work/code/high-work/high-service/hai-user/src/main/java/com/web/controller/LoginLogController.java +/Volumes/work/code/high-work/high-service/hai-user/src/main/java/com/web/controller/WechatController.java /Volumes/work/code/high-work/high-service/hai-user/src/main/java/com/web/type/LoginType.java /Volumes/work/code/high-work/high-service/hai-user/src/main/java/com/web/config/CorsConfig.java /Volumes/work/code/high-work/high-service/hai-user/src/main/java/com/web/config/SysConfig.java