diff --git a/bweb/src/main/java/com/bweb/config/AuthConfig.java b/bweb/src/main/java/com/bweb/config/AuthConfig.java index 2b5bfce..8fafbf9 100644 --- a/bweb/src/main/java/com/bweb/config/AuthConfig.java +++ b/bweb/src/main/java/com/bweb/config/AuthConfig.java @@ -92,6 +92,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/secUser/login") .excludePathPatterns("/secUser/loginOut") .excludePathPatterns("/agentMer/*") + .excludePathPatterns("/newLinkNotify/*") .excludePathPatterns("/merchantPayConfig/editConfig") ; } diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOrderReceiptController.java b/bweb/src/main/java/com/bweb/controller/BsGasOrderReceiptController.java new file mode 100644 index 0000000..32db4ca --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/BsGasOrderReceiptController.java @@ -0,0 +1,105 @@ +package com.bweb.controller; + +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.model.ResponseData; +import com.hfkj.model.UserSessionObject; +import com.hfkj.service.gas.BsGasOrderReceiptService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Controller +@RequestMapping(value = "/gasOrderReceipt") +@Api(value = "加油订单业务") +public class BsGasOrderReceiptController { + private static Logger log = LoggerFactory.getLogger(BsGasOrderReceiptController.class); + @Resource + private BsGasOrderReceiptService gasOrderReceiptService; + + @RequestMapping(value="/success",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "开票成功") + public ResponseData success(@RequestBody JSONObject body) { + try { + if (body == null + || StringUtils.isBlank(body.getString("applyNo"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + gasOrderReceiptService.success(body.getString("applyNo")); + + return ResponseMsgUtil.success("申请成功"); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/fail",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "开票失败") + public ResponseData fail(@RequestBody JSONObject body) { + try { + if (body == null + || StringUtils.isBlank(body.getString("applyNo")) + || StringUtils.isBlank(body.getString("remark")) + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + gasOrderReceiptService.fail(body.getString("applyNo"),body.getString("remark")); + + return ResponseMsgUtil.success("申请成功"); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/queryReceiptList",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询申请列表") + public ResponseData queryReceiptList(@RequestParam(name = "orderNo", required = false) String orderNo, + @RequestParam(name = "contactsPhone", required = false) String contactsPhone, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "createTimeS", required = false) Long createTimeS, + @RequestParam(name = "createTimeE", required = false) Long createTimeE, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + Map param = new HashMap<>(); + param.put("orderNo", orderNo); + param.put("contactsPhone", contactsPhone); + param.put("status", status); + param.put("createTimeS", createTimeS); + param.put("createTimeE", createTimeE); + + PageHelper.startPage(pageNum,pageSize); + return ResponseMsgUtil.success(new PageInfo<>(gasOrderReceiptService.getList(param))); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + + +} diff --git a/bweb/src/main/java/com/bweb/controller/BsOrderRefundController.java b/bweb/src/main/java/com/bweb/controller/BsOrderRefundController.java index 178fe9b..d5950c3 100644 --- a/bweb/src/main/java/com/bweb/controller/BsOrderRefundController.java +++ b/bweb/src/main/java/com/bweb/controller/BsOrderRefundController.java @@ -112,6 +112,7 @@ public class BsOrderRefundController { return ResponseMsgUtil.success(orderRefundService.tradeOrderChildRefund( body.getString("childOrderNo"), + true, body.getInteger("productCount"), body.getString("remark") )); diff --git a/bweb/src/main/java/com/bweb/controller/notify/NewLinkNotify.java b/bweb/src/main/java/com/bweb/controller/notify/NewLinkNotify.java new file mode 100644 index 0000000..bfee601 --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/notify/NewLinkNotify.java @@ -0,0 +1,89 @@ +package com.bweb.controller.notify; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.channel.gas.newlink.NewLinkGasService; +import com.hfkj.channel.gas.newlink.NewLinkRequestService; +import com.hfkj.common.security.AESEncodeUtil; +import com.hfkj.entity.BsGasOrder; +import com.hfkj.entity.BsOrderRefund; +import com.hfkj.service.gas.BsGasOrderService; +import com.hfkj.service.order.BsOrderRefundService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.annotation.Resource; + +/** + * @className: NewLinkNotify + * @author: HuRui + * @date: 2024/7/26 + **/ +@Controller +@RequestMapping(value = "/newLinkNotify") +@Api(value = "加油订单业务") +public class NewLinkNotify { + + @Resource + private NewLinkGasService newLinkGasService; + @Resource + private BsOrderRefundService orderRefundService; + @Resource + private BsGasOrderService gasOrderService; + + @RequestMapping(value="/merChange",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "商户变更") + public String merChange(@RequestBody JSONObject body) { + try { + System.out.println("================团油商户变更通知=================="); + System.out.println(body); + String bodyData = body.getString("data"); + // 解密参数 + JSONObject data = JSONObject.parseObject(AESEncodeUtil.aesDecryptByBytes(AESEncodeUtil.base64Decode(bodyData), NewLinkRequestService.APP_SECRET)); + if ("001".equals(data.getString("type"))) { + // 油站更新 + newLinkGasService.merChange(data.getString("value")); + } + } catch (Exception e) { + System.out.println("变更异常:" + e.getMessage()); + } finally { + System.out.println("================团油商户变更通知=================="); + } + return "success"; + } + + + @RequestMapping(value="/orderRefund",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "订单退款") + public String orderRefund(@RequestBody JSONObject body) { + try { + System.out.println("================团油交易退款通知=================="); + System.out.println(body); + String bodyData = body.getString("data"); + // 解密参数 + JSONObject data = JSONObject.parseObject(AESEncodeUtil.aesDecryptByBytes(AESEncodeUtil.base64Decode(bodyData), NewLinkRequestService.APP_SECRET)); + if (data.getBoolean("refundResult").equals(true)) { + // 查询加油订单 + BsGasOrder gasOrder = gasOrderService.getDetailByOrderNo(data.getString("thirdOrderNo")); + if (gasOrder != null) { + // 退款 + orderRefundService.tradeOrderChildRefund(gasOrder.getChannelOrderNo(), false,1, data.getString("refundFailReason")); + } + } + + } catch (Exception e) { + System.out.println("变更异常:" + e.getMessage()); + } finally { + System.out.println("================团油交易退款通知=================="); + } + return "success"; + } + +} + diff --git a/cweb/src/main/java/com/cweb/controller/BsUserReceiptController.java b/cweb/src/main/java/com/cweb/controller/BsUserReceiptController.java new file mode 100644 index 0000000..557db3a --- /dev/null +++ b/cweb/src/main/java/com/cweb/controller/BsUserReceiptController.java @@ -0,0 +1,124 @@ +package com.cweb.controller; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.security.UserCenter; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.entity.BsUserReceipt; +import com.hfkj.model.ResponseData; +import com.hfkj.model.UserSessionObject; +import com.hfkj.service.user.BsUserReceiptService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.Map; + +/** + * @className: BsUserReceiptController + * @author: HuRui + * @date: 2024/7/24 + **/ +@Controller +@RequestMapping(value = "/userReceipt") +@Api(value = "用户收据") +public class BsUserReceiptController { + + private static Logger log = LoggerFactory.getLogger(BsUserReceiptController.class); + @Resource + private UserCenter userCenter; + @Resource + private BsUserReceiptService userReceiptService; + + @RequestMapping(value = "/editReceipt", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "编辑收据") + public ResponseData editReceipt(@RequestBody BsUserReceipt body) { + try { + UserSessionObject sessionObject = userCenter.getSessionModel(UserSessionObject.class); + if (sessionObject == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, ""); + } + if (body == null + || StringUtils.isBlank(body.getCompanyName()) + || StringUtils.isBlank(body.getTaxNo()) + || StringUtils.isBlank(body.getContactsPhone()) + || StringUtils.isBlank(body.getEmail()) + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + BsUserReceipt receipt = null; + if (body.getId() != null) { + // 查询数据 + receipt = userReceiptService.getDetail(body.getId()); + if (receipt == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的数据"); + } + } else { + receipt = new BsUserReceipt(); + receipt.setUserId(sessionObject.getUser().getId()); + receipt.setStatus(1); + } + receipt.setType(1); + receipt.setCompanyName(body.getCompanyName()); + receipt.setTaxNo(body.getTaxNo()); + receipt.setContactsPhone(body.getContactsPhone()); + receipt.setEmail(body.getEmail()); + userReceiptService.editData(receipt); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/queryDetail",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询详情") + public ResponseData queryDetail(@RequestParam(name = "id", required = true) Long id) { + try { + + return ResponseMsgUtil.success(userReceiptService.getDetail(id)); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/queryUserReceiptList",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询用户票据") + public ResponseData queryUserReceiptList(@RequestParam(name = "status", required = false) String status, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + UserSessionObject sessionObject = userCenter.getSessionModel(UserSessionObject.class); + if (sessionObject == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, ""); + } + + Map param = new HashMap<>(); + param.put("userId", sessionObject.getUser().getId()); + param.put("status", status); + + PageHelper.startPage(pageNum,pageSize); + return ResponseMsgUtil.success(new PageInfo<>(userReceiptService.getList(param))); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/cweb/src/main/java/com/cweb/controller/order/GasOrderController.java b/cweb/src/main/java/com/cweb/controller/order/GasOrderController.java index 81c64e1..a77c8e6 100644 --- a/cweb/src/main/java/com/cweb/controller/order/GasOrderController.java +++ b/cweb/src/main/java/com/cweb/controller/order/GasOrderController.java @@ -36,7 +36,10 @@ public class GasOrderController { @ResponseBody @ApiOperation(value = "查询用户加油订单") public ResponseData queryUserOilOrder(@RequestParam(name = "orderNo", required = false) String orderNo, + @RequestParam(name = "receiptStatus", required = false) String receiptStatus, @RequestParam(name = "orderStatus", required = false) Integer orderStatus, + @RequestParam(name = "payTimeS", required = false) Long payTimeS, + @RequestParam(name = "payTimeE", required = false) Long payTimeE, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { @@ -48,6 +51,9 @@ public class GasOrderController { param.put("userId", userSession.getUser().getId()); param.put("orderNo", orderNo); param.put("status", orderStatus); + param.put("receiptStatus", receiptStatus); + param.put("payTimeS", payTimeS); + param.put("payTimeE", payTimeE); PageHelper.startPage(pageNum,pageSize); return ResponseMsgUtil.success(new PageInfo<>(gasOrderService.getGasOrderList(param))); diff --git a/cweb/src/main/java/com/cweb/controller/order/GasOrderReceiptController.java b/cweb/src/main/java/com/cweb/controller/order/GasOrderReceiptController.java new file mode 100644 index 0000000..395dc83 --- /dev/null +++ b/cweb/src/main/java/com/cweb/controller/order/GasOrderReceiptController.java @@ -0,0 +1,57 @@ +package com.cweb.controller.order; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.security.UserCenter; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.model.ResponseData; +import com.hfkj.service.gas.BsGasOrderReceiptService; +import com.hfkj.service.gas.BsGasOrderService; +import com.hfkj.service.user.BsUserReceiptService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; +import java.util.stream.Collectors; + +@Controller +@RequestMapping(value = "/gasOrderReceipt") +@Api(value = "加油订单业务") +public class GasOrderReceiptController { + private static Logger log = LoggerFactory.getLogger(GasOrderReceiptController.class); + @Resource + private BsGasOrderReceiptService gasOrderReceiptService; + + @RequestMapping(value="/applyReceipt",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "申请收据") + public ResponseData applyReceipt(@RequestBody JSONObject body) { + try { + if (body == null + || body.getLong("userReceiptId") == null + || body.getJSONArray("orderNo") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + List orderNoList = body.getJSONArray("orderNo") + .stream().map(Object::toString) + .collect(Collectors.toList()); + + gasOrderReceiptService.applyReceipt(body.getLong("userReceiptId"), orderNoList); + + return ResponseMsgUtil.success("申请成功"); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java b/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java index dcf57b0..1227ab8 100644 --- a/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java +++ b/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java @@ -115,7 +115,7 @@ public class OrderPayController { payMerKey = payConfig.getChannelMerKey(); ledgerAccountFlag = payConfig.getLedgerAccountFlag(); } - order.setPayType(OrderPayTypeEnum.type1.getCode()); + order.setPayType(OrderPayTypeEnum.type2.getCode()); // appIdType 1: 公众号 2:小程序 if (body.getInteger("appIdType") != null && body.getInteger("appIdType") == 2) { @@ -202,7 +202,7 @@ public class OrderPayController { payMerKey = payConfig.getChannelMerKey(); ledgerAccountFlag = payConfig.getLedgerAccountFlag(); } - order.setPayType(OrderPayTypeEnum.type2.getCode()); + order.setPayType(OrderPayTypeEnum.type1.getCode()); // 请求支付渠道 Map preorder = HuiPayService.preorder(payMerNo, payMerKey, null, body.getString("userId"), ledgerAccountFlag, order); diff --git a/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java b/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java index cd93a73..3a36ed5 100644 --- a/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java +++ b/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java @@ -228,6 +228,137 @@ public class NewLinkGasService { System.out.println("本次更新任务结束,共计用时"+useTime+"毫秒"); } + /** + * 油站更新 + * @param merNo + */ + public void merChange(String merNo) throws Exception { + // 渠道查询信息 + JSONObject response = NewLinkRequestService.queryGasInfoByGasId(merNo); + if ("200".equals(response.getString("code"))) { + // 获取加油站数据 + JSONObject gasData = response.getJSONObject("result"); + // 查询商户 + BsMerchant merchant = merchantService.getMerchant(gasData.getString("gasId")); + if (merchant == null) { + merchant = new BsMerchant(); + } + merchant.setStatus(MerchantStatusEnum.status1.getNumber()); + merchant.setSourceType(MerchantSourceTypeEnum.type2.getNumber()); + merchant.setProvinceCode(gasData.getLong("provinceCode")); + merchant.setProvinceName(gasData.getString("provinceName")); + merchant.setCityCode(gasData.getLong("cityCode")); + merchant.setCityName(gasData.getString("cityName")); + merchant.setAreaCode(gasData.getLong("countyCode")); + merchant.setAreaName(gasData.getString("countyName")); + merchant.setMerNo(gasData.getString("gasId")); + merchant.setMerName(gasData.getString("gasName")); + merchant.setMerLogo("https://oil.dctpay.com/filesystem/gas_logo_default.jpg"); + merchant.setAddress(gasData.getString("gasAddress")); + merchant.setLongitude(gasData.getString("gasAddressLongitude")); + merchant.setLatitude(gasData.getString("gasAddressLatitude")); + merchant.setContactsName(merchant.getMerName()); + merchant.setContactsTel(merchant.getMerNo()); + merchant.setCustomerServiceTel("400-0236806"); + merchant.setMerLabel(StringUtils.join(gasData.getJSONArray("gasFeatureList"),",")); + if (merchant.getId() == null) { + merchantService.createMerchant(merchant); + } else { + merchantService.updateMerchant(merchant); + } + + // 查询油站油价 + List gasOilPriceList = gasOilPriceService.getGasOilPriceList(merchant.getId()); + if (!gasOilPriceList.isEmpty()) { + BsGasOilPrice oilPriceExample = new BsGasOilPrice(); + oilPriceExample.setStatus(GasOilPriceStatusEnum.status2.getNumber()); + gasOilPriceService.batchUpdate(merchant.getMerNo(), oilPriceExample); + } + // 查询油站抢号 + List oilGunNoList = gasOilGunNoService.getOilGunNoList(merchant.getMerNo()); + for (BsGasOilGunNo gunNo : oilGunNoList) { + gunNo.setStatus(0); + } + + JSONArray oilPriceList = gasData.getJSONArray("oilPriceList"); + for (Object oilPrice : oilPriceList) { + JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); + // 查询油站油价 + List oilPriceCollect = gasOilPriceList.stream().filter(o -> o.getOilNo().equals(oilPriceObject.getString("oilNo"))).collect(Collectors.toList()); + BsGasOilPrice gasOilPrice = null; + if (oilPriceCollect.isEmpty()) { + gasOilPrice = new BsGasOilPrice(); + gasOilPrice.setMerId(merchant.getId()); + gasOilPrice.setMerNo(merchant.getMerNo()); + gasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); + gasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); + gasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); + gasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); + gasOilPrice.setStatus(GasOilPriceStatusEnum.status1.getNumber()); + } else { + gasOilPrice = oilPriceCollect.get(0); + gasOilPrice.setStatus(GasOilPriceStatusEnum.status1.getNumber()); + } + // 平台优惠 + gasOilPrice.setPreferentialMargin(new BigDecimal("0")); + // 国标价 - 油站价 = 油站直降 + gasOilPrice.setGasStationDrop(oilPriceObject.getBigDecimal("priceOfficial").subtract(oilPriceObject.getBigDecimal("priceGun"))); + gasOilPrice.setPriceCost(oilPriceObject.getBigDecimal("priceVip")); + gasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); + gasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); + gasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); + gasOilPriceService.editOilPrice(gasOilPrice); + + for (Object gunNo : gasData.getJSONArray("gasGunList")) { + JSONObject gunNoObject = (JSONObject) gunNo; + // 查询抢号 + List gunNoCollect = oilGunNoList.stream() + .filter(o -> o.getOilNo().equals(gunNoObject.getString("oilNo")) && o.getGunNo().equals(gunNoObject.getString("gunNo"))) + .collect(Collectors.toList()); + // 如果没有找到抢号就新增一个 + BsGasOilGunNo gasOilGunNo = null; + if (gunNoCollect.isEmpty()) { + gasOilGunNo = new BsGasOilGunNo(); + gasOilGunNo.setGasOilPriceId(gasOilPrice.getId()); + gasOilGunNo.setMerId(gasOilPrice.getMerId()); + gasOilGunNo.setMerNo(gasOilPrice.getMerNo()); + gasOilGunNo.setOilNo(gasOilPrice.getOilNo()); + gasOilGunNo.setOilNoName(gasOilPrice.getOilNoName()); + gasOilGunNo.setOilType(gasOilPrice.getOilType()); + gasOilGunNo.setOilTypeName(gasOilPrice.getOilTypeName()); + gasOilGunNo.setGunNo(gunNoObject.getString("gunNo")); + gasOilGunNo.setStatus(1); + gasOilGunNo.setCreateTime(new Date()); + oilGunNoList.add(gasOilGunNo); + } else { + gasOilGunNo = gunNoCollect.get(0); + gasOilGunNo.setStatus(1); + } + } + } + + // 添加 + gasOilGunNoService.batchInsert(oilGunNoList.stream().filter(o-> o.getId() == null).collect(Collectors.toList())); + // 更新 + gasOilGunNoService.batchUpdate(oilGunNoList.stream().filter(o-> o.getId() != null && o.getStatus().equals(0)).collect(Collectors.toList())); + // 删除缓存 + gasOilGunNoService.cleanCache(merchant.getMerNo()); + // 清除油站缓存 + gasService.clean(merchant.getMerNo()); + } + else if ("120000".equals(response.getString("code"))) { + /*** 油站下线 ***/ + // 获取加油站数据 + JSONObject gasData = response.getJSONObject("result"); + // 查询商户 + BsMerchant merchant = merchantService.getMerchant(gasData.getString("gasId")); + if (merchant != null) { + merchant.setStatus(MerchantStatusEnum.status2.getNumber()); + // 修改商户信息 + merchantService.updateMerchant(merchant); + } + } + } /** * 拆分集合 diff --git a/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkRequestService.java b/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkRequestService.java index a6e5304..a75d7cb 100644 --- a/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkRequestService.java +++ b/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkRequestService.java @@ -20,7 +20,7 @@ public class NewLinkRequestService { private static final Logger log = LoggerFactory.getLogger(NewLinkRequestService.class); private static final String REQ_URL = CommonSysConst.getSysConfig().getNewLinkReqUrl(); private static final String APP_KEY = CommonSysConst.getSysConfig().getNewLinkAppKey(); - private static final String APP_SECRET = CommonSysConst.getSysConfig().getNewLinkAppSecret(); + public static final String APP_SECRET = CommonSysConst.getSysConfig().getNewLinkAppSecret(); /** * 分页获取(全量)油站信息 diff --git a/service/src/main/java/com/hfkj/channel/gas/shell/ScShellPetroleumRequestService.java b/service/src/main/java/com/hfkj/channel/gas/shell/ScShellPetroleumRequestService.java new file mode 100644 index 0000000..f5ce015 --- /dev/null +++ b/service/src/main/java/com/hfkj/channel/gas/shell/ScShellPetroleumRequestService.java @@ -0,0 +1,183 @@ +package com.hfkj.channel.gas.shell; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.DateUtil; +import com.hfkj.common.utils.HttpsUtils; +import com.hfkj.common.utils.MD5Util; +import com.hfkj.config.CommonSysConst; +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: 2024/7/24 + **/ +@Component +public class ScShellPetroleumRequestService { + + private final static String REQ_URL = CommonSysConst.getSysConfig().getScShellReqUrl(); + private static final String PARTNER_ID = CommonSysConst.getSysConfig().getScShellPartnerId(); + private static final String PLAT_MERCHANT_KEY = CommonSysConst.getSysConfig().getScShellPlatMerchantKey(); + + /** + * 查询全量加油站 + * @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) throws Exception { + 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); + } + + /** + * 【同步】油站退款 + * @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", PARTNER_ID); + 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, PLAT_MERCHANT_KEY).getBytes()).toLowerCase()); + + // 请求接口 + JSONObject object = HttpsUtils.doPost(REQ_URL, param); + 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/service/src/main/java/com/hfkj/config/CommonSysConfig.java b/service/src/main/java/com/hfkj/config/CommonSysConfig.java index 51e2934..1f84c67 100644 --- a/service/src/main/java/com/hfkj/config/CommonSysConfig.java +++ b/service/src/main/java/com/hfkj/config/CommonSysConfig.java @@ -54,6 +54,18 @@ public class CommonSysConfig { */ private String cqShellPlatMerchantKey; + /** + * paylo【四川壳牌】请求地址 + */ + private String scShellReqUrl; + /** + * paylo【四川壳牌】壳牌合作伙伴id + */ + private String scShellPartnerId; + /** + * paylo【四川壳牌】平台商key + */ + private String scShellPlatMerchantKey; /** * 【惠支付】支付渠道回调地址 diff --git a/service/src/main/java/com/hfkj/dao/BsGasOrderMapper.java b/service/src/main/java/com/hfkj/dao/BsGasOrderMapper.java index 5570093..ec99040 100644 --- a/service/src/main/java/com/hfkj/dao/BsGasOrderMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderMapper.java @@ -60,6 +60,7 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { "gas_staff_id, gas_staff_name, ", "pay_type, pay_serial_no, ", "pay_channel_order_no, `status`, ", + "receipt_status, receipt_fail_remark, ", "create_time, cancel_time, ", "pay_time, refund_time, ", "refund_remarks, abnormal, ", @@ -87,6 +88,7 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { "#{gasStaffId,jdbcType=BIGINT}, #{gasStaffName,jdbcType=VARCHAR}, ", "#{payType,jdbcType=INTEGER}, #{paySerialNo,jdbcType=VARCHAR}, ", "#{payChannelOrderNo,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{receiptStatus,jdbcType=INTEGER}, #{receiptFailRemark,jdbcType=VARCHAR}, ", "#{createTime,jdbcType=TIMESTAMP}, #{cancelTime,jdbcType=TIMESTAMP}, ", "#{payTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, ", "#{refundRemarks,jdbcType=VARCHAR}, #{abnormal,jdbcType=BIT}, ", @@ -147,6 +149,8 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="pay_channel_order_no", property="payChannelOrderNo", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="receipt_status", property="receiptStatus", jdbcType=JdbcType.INTEGER), + @Result(column="receipt_fail_remark", property="receiptFailRemark", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @@ -173,9 +177,9 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { "gas_price_platform, gas_price_cost, gas_oil_liters, gas_discount, gas_oil_subsidy, ", "gas_liters_preferences, gas_price_preferences, gas_class_group_id, gas_class_group_name, ", "gas_class_group_task_id, gas_staff_id, gas_staff_name, pay_type, pay_serial_no, ", - "pay_channel_order_no, `status`, create_time, cancel_time, pay_time, refund_time, ", - "refund_remarks, abnormal, abnormal_content, ext_1, ext_2, ext_3, ext_4, ext_5, ", - "ext_6", + "pay_channel_order_no, `status`, receipt_status, receipt_fail_remark, create_time, ", + "cancel_time, pay_time, refund_time, refund_remarks, abnormal, abnormal_content, ", + "ext_1, ext_2, ext_3, ext_4, ext_5, ext_6", "from bs_gas_order", "where id = #{id,jdbcType=BIGINT}" }) @@ -224,6 +228,8 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), @Result(column="pay_channel_order_no", property="payChannelOrderNo", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="receipt_status", property="receiptStatus", jdbcType=JdbcType.INTEGER), + @Result(column="receipt_fail_remark", property="receiptFailRemark", jdbcType=JdbcType.VARCHAR), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), @@ -294,6 +300,8 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { "pay_serial_no = #{paySerialNo,jdbcType=VARCHAR},", "pay_channel_order_no = #{payChannelOrderNo,jdbcType=VARCHAR},", "`status` = #{status,jdbcType=INTEGER},", + "receipt_status = #{receiptStatus,jdbcType=INTEGER},", + "receipt_fail_remark = #{receiptFailRemark,jdbcType=VARCHAR},", "create_time = #{createTime,jdbcType=TIMESTAMP},", "cancel_time = #{cancelTime,jdbcType=TIMESTAMP},", "pay_time = #{payTime,jdbcType=TIMESTAMP},", diff --git a/service/src/main/java/com/hfkj/dao/BsGasOrderReceiptMapper.java b/service/src/main/java/com/hfkj/dao/BsGasOrderReceiptMapper.java new file mode 100644 index 0000000..955a9e5 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderReceiptMapper.java @@ -0,0 +1,150 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasOrderReceipt; +import com.hfkj.entity.BsGasOrderReceiptExample; +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 BsGasOrderReceiptMapper extends BsGasOrderReceiptMapperExt { + @SelectProvider(type=BsGasOrderReceiptSqlProvider.class, method="countByExample") + long countByExample(BsGasOrderReceiptExample example); + + @DeleteProvider(type=BsGasOrderReceiptSqlProvider.class, method="deleteByExample") + int deleteByExample(BsGasOrderReceiptExample example); + + @Delete({ + "delete from bs_gas_order_receipt", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_gas_order_receipt (apply_no, user_receipt_id, ", + "company_name, tax_no, ", + "contacts_phone, email, ", + "order_no, order_child_no, ", + "oil_no, amount, `status`, ", + "fail_remark, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", + "values (#{applyNo,jdbcType=VARCHAR}, #{userReceiptId,jdbcType=BIGINT}, ", + "#{companyName,jdbcType=VARCHAR}, #{taxNo,jdbcType=VARCHAR}, ", + "#{contactsPhone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, ", + "#{orderNo,jdbcType=VARCHAR}, #{orderChildNo,jdbcType=VARCHAR}, ", + "#{oilNo,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", + "#{failRemark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsGasOrderReceipt record); + + @InsertProvider(type=BsGasOrderReceiptSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsGasOrderReceipt record); + + @SelectProvider(type=BsGasOrderReceiptSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR), + @Result(column="user_receipt_id", property="userReceiptId", jdbcType=JdbcType.BIGINT), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="tax_no", property="taxNo", jdbcType=JdbcType.VARCHAR), + @Result(column="contacts_phone", property="contactsPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="order_child_no", property="orderChildNo", jdbcType=JdbcType.VARCHAR), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="fail_remark", property="failRemark", jdbcType=JdbcType.VARCHAR), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsGasOrderReceiptExample example); + + @Select({ + "select", + "id, apply_no, user_receipt_id, company_name, tax_no, contacts_phone, email, ", + "order_no, order_child_no, oil_no, amount, `status`, fail_remark, create_time, ", + "update_time, ext_1, ext_2, ext_3", + "from bs_gas_order_receipt", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR), + @Result(column="user_receipt_id", property="userReceiptId", jdbcType=JdbcType.BIGINT), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="tax_no", property="taxNo", jdbcType=JdbcType.VARCHAR), + @Result(column="contacts_phone", property="contactsPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="order_child_no", property="orderChildNo", jdbcType=JdbcType.VARCHAR), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="fail_remark", property="failRemark", jdbcType=JdbcType.VARCHAR), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsGasOrderReceipt selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsGasOrderReceiptSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsGasOrderReceipt record, @Param("example") BsGasOrderReceiptExample example); + + @UpdateProvider(type=BsGasOrderReceiptSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsGasOrderReceipt record, @Param("example") BsGasOrderReceiptExample example); + + @UpdateProvider(type=BsGasOrderReceiptSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsGasOrderReceipt record); + + @Update({ + "update bs_gas_order_receipt", + "set apply_no = #{applyNo,jdbcType=VARCHAR},", + "user_receipt_id = #{userReceiptId,jdbcType=BIGINT},", + "company_name = #{companyName,jdbcType=VARCHAR},", + "tax_no = #{taxNo,jdbcType=VARCHAR},", + "contacts_phone = #{contactsPhone,jdbcType=VARCHAR},", + "email = #{email,jdbcType=VARCHAR},", + "order_no = #{orderNo,jdbcType=VARCHAR},", + "order_child_no = #{orderChildNo,jdbcType=VARCHAR},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", + "amount = #{amount,jdbcType=DECIMAL},", + "`status` = #{status,jdbcType=INTEGER},", + "fail_remark = #{failRemark,jdbcType=VARCHAR},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsGasOrderReceipt record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasOrderReceiptMapperExt.java b/service/src/main/java/com/hfkj/dao/BsGasOrderReceiptMapperExt.java new file mode 100644 index 0000000..f4cecd9 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderReceiptMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsGasOrderReceiptMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasOrderReceiptSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsGasOrderReceiptSqlProvider.java new file mode 100644 index 0000000..bb126f0 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderReceiptSqlProvider.java @@ -0,0 +1,416 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasOrderReceipt; +import com.hfkj.entity.BsGasOrderReceiptExample.Criteria; +import com.hfkj.entity.BsGasOrderReceiptExample.Criterion; +import com.hfkj.entity.BsGasOrderReceiptExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsGasOrderReceiptSqlProvider { + + public String countByExample(BsGasOrderReceiptExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_gas_order_receipt"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsGasOrderReceiptExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_gas_order_receipt"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsGasOrderReceipt record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_gas_order_receipt"); + + if (record.getApplyNo() != null) { + sql.VALUES("apply_no", "#{applyNo,jdbcType=VARCHAR}"); + } + + if (record.getUserReceiptId() != null) { + sql.VALUES("user_receipt_id", "#{userReceiptId,jdbcType=BIGINT}"); + } + + if (record.getCompanyName() != null) { + sql.VALUES("company_name", "#{companyName,jdbcType=VARCHAR}"); + } + + if (record.getTaxNo() != null) { + sql.VALUES("tax_no", "#{taxNo,jdbcType=VARCHAR}"); + } + + if (record.getContactsPhone() != null) { + sql.VALUES("contacts_phone", "#{contactsPhone,jdbcType=VARCHAR}"); + } + + if (record.getEmail() != null) { + sql.VALUES("email", "#{email,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getOrderChildNo() != null) { + sql.VALUES("order_child_no", "#{orderChildNo,jdbcType=VARCHAR}"); + } + + if (record.getOilNo() != null) { + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); + } + + if (record.getAmount() != null) { + sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getFailRemark() != null) { + sql.VALUES("fail_remark", "#{failRemark,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.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(BsGasOrderReceiptExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("apply_no"); + sql.SELECT("user_receipt_id"); + sql.SELECT("company_name"); + sql.SELECT("tax_no"); + sql.SELECT("contacts_phone"); + sql.SELECT("email"); + sql.SELECT("order_no"); + sql.SELECT("order_child_no"); + sql.SELECT("oil_no"); + sql.SELECT("amount"); + sql.SELECT("`status`"); + sql.SELECT("fail_remark"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_gas_order_receipt"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsGasOrderReceipt record = (BsGasOrderReceipt) parameter.get("record"); + BsGasOrderReceiptExample example = (BsGasOrderReceiptExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_gas_order_receipt"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getApplyNo() != null) { + sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}"); + } + + if (record.getUserReceiptId() != null) { + sql.SET("user_receipt_id = #{record.userReceiptId,jdbcType=BIGINT}"); + } + + if (record.getCompanyName() != null) { + sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); + } + + if (record.getTaxNo() != null) { + sql.SET("tax_no = #{record.taxNo,jdbcType=VARCHAR}"); + } + + if (record.getContactsPhone() != null) { + sql.SET("contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR}"); + } + + if (record.getEmail() != null) { + sql.SET("email = #{record.email,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + } + + if (record.getOrderChildNo() != null) { + sql.SET("order_child_no = #{record.orderChildNo,jdbcType=VARCHAR}"); + } + + if (record.getOilNo() != null) { + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); + } + + if (record.getAmount() != null) { + sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getFailRemark() != null) { + sql.SET("fail_remark = #{record.failRemark,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.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_gas_order_receipt"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}"); + sql.SET("user_receipt_id = #{record.userReceiptId,jdbcType=BIGINT}"); + sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); + sql.SET("tax_no = #{record.taxNo,jdbcType=VARCHAR}"); + sql.SET("contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR}"); + sql.SET("email = #{record.email,jdbcType=VARCHAR}"); + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + sql.SET("order_child_no = #{record.orderChildNo,jdbcType=VARCHAR}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); + sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("fail_remark = #{record.failRemark,jdbcType=VARCHAR}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsGasOrderReceiptExample example = (BsGasOrderReceiptExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsGasOrderReceipt record) { + SQL sql = new SQL(); + sql.UPDATE("bs_gas_order_receipt"); + + if (record.getApplyNo() != null) { + sql.SET("apply_no = #{applyNo,jdbcType=VARCHAR}"); + } + + if (record.getUserReceiptId() != null) { + sql.SET("user_receipt_id = #{userReceiptId,jdbcType=BIGINT}"); + } + + if (record.getCompanyName() != null) { + sql.SET("company_name = #{companyName,jdbcType=VARCHAR}"); + } + + if (record.getTaxNo() != null) { + sql.SET("tax_no = #{taxNo,jdbcType=VARCHAR}"); + } + + if (record.getContactsPhone() != null) { + sql.SET("contacts_phone = #{contactsPhone,jdbcType=VARCHAR}"); + } + + if (record.getEmail() != null) { + sql.SET("email = #{email,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getOrderChildNo() != null) { + sql.SET("order_child_no = #{orderChildNo,jdbcType=VARCHAR}"); + } + + if (record.getOilNo() != null) { + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); + } + + if (record.getAmount() != null) { + sql.SET("amount = #{amount,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getFailRemark() != null) { + sql.SET("fail_remark = #{failRemark,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.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, BsGasOrderReceiptExample 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/service/src/main/java/com/hfkj/dao/BsGasOrderSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsGasOrderSqlProvider.java index 3ec71d3..77e34dc 100644 --- a/service/src/main/java/com/hfkj/dao/BsGasOrderSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderSqlProvider.java @@ -200,6 +200,14 @@ public class BsGasOrderSqlProvider { sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); } + if (record.getReceiptStatus() != null) { + sql.VALUES("receipt_status", "#{receiptStatus,jdbcType=INTEGER}"); + } + + if (record.getReceiptFailRemark() != null) { + sql.VALUES("receipt_fail_remark", "#{receiptFailRemark,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); } @@ -305,6 +313,8 @@ public class BsGasOrderSqlProvider { sql.SELECT("pay_serial_no"); sql.SELECT("pay_channel_order_no"); sql.SELECT("`status`"); + sql.SELECT("receipt_status"); + sql.SELECT("receipt_fail_remark"); sql.SELECT("create_time"); sql.SELECT("cancel_time"); sql.SELECT("pay_time"); @@ -511,6 +521,14 @@ public class BsGasOrderSqlProvider { sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); } + if (record.getReceiptStatus() != null) { + sql.SET("receipt_status = #{record.receiptStatus,jdbcType=INTEGER}"); + } + + if (record.getReceiptFailRemark() != null) { + sql.SET("receipt_fail_remark = #{record.receiptFailRemark,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); } @@ -615,6 +633,8 @@ public class BsGasOrderSqlProvider { sql.SET("pay_serial_no = #{record.paySerialNo,jdbcType=VARCHAR}"); sql.SET("pay_channel_order_no = #{record.payChannelOrderNo,jdbcType=VARCHAR}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("receipt_status = #{record.receiptStatus,jdbcType=INTEGER}"); + sql.SET("receipt_fail_remark = #{record.receiptFailRemark,jdbcType=VARCHAR}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}"); sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); @@ -810,6 +830,14 @@ public class BsGasOrderSqlProvider { sql.SET("`status` = #{status,jdbcType=INTEGER}"); } + if (record.getReceiptStatus() != null) { + sql.SET("receipt_status = #{receiptStatus,jdbcType=INTEGER}"); + } + + if (record.getReceiptFailRemark() != null) { + sql.SET("receipt_fail_remark = #{receiptFailRemark,jdbcType=VARCHAR}"); + } + if (record.getCreateTime() != null) { sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); } diff --git a/service/src/main/java/com/hfkj/dao/BsUserReceiptMapper.java b/service/src/main/java/com/hfkj/dao/BsUserReceiptMapper.java new file mode 100644 index 0000000..dbef033 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsUserReceiptMapper.java @@ -0,0 +1,130 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsUserReceipt; +import com.hfkj.entity.BsUserReceiptExample; +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 BsUserReceiptMapper extends BsUserReceiptMapperExt { + @SelectProvider(type=BsUserReceiptSqlProvider.class, method="countByExample") + long countByExample(BsUserReceiptExample example); + + @DeleteProvider(type=BsUserReceiptSqlProvider.class, method="deleteByExample") + int deleteByExample(BsUserReceiptExample example); + + @Delete({ + "delete from bs_user_receipt", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_user_receipt (user_id, `type`, ", + "company_name, tax_no, ", + "contacts_phone, email, ", + "`status`, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", + "values (#{userId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, ", + "#{companyName,jdbcType=VARCHAR}, #{taxNo,jdbcType=VARCHAR}, ", + "#{contactsPhone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsUserReceipt record); + + @InsertProvider(type=BsUserReceiptSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsUserReceipt record); + + @SelectProvider(type=BsUserReceiptSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="tax_no", property="taxNo", jdbcType=JdbcType.VARCHAR), + @Result(column="contacts_phone", property="contactsPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsUserReceiptExample example); + + @Select({ + "select", + "id, user_id, `type`, company_name, tax_no, contacts_phone, email, `status`, ", + "create_time, update_time, ext_1, ext_2, ext_3", + "from bs_user_receipt", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="tax_no", property="taxNo", jdbcType=JdbcType.VARCHAR), + @Result(column="contacts_phone", property="contactsPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="email", property="email", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsUserReceipt selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsUserReceiptSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsUserReceipt record, @Param("example") BsUserReceiptExample example); + + @UpdateProvider(type=BsUserReceiptSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsUserReceipt record, @Param("example") BsUserReceiptExample example); + + @UpdateProvider(type=BsUserReceiptSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsUserReceipt record); + + @Update({ + "update bs_user_receipt", + "set user_id = #{userId,jdbcType=BIGINT},", + "`type` = #{type,jdbcType=INTEGER},", + "company_name = #{companyName,jdbcType=VARCHAR},", + "tax_no = #{taxNo,jdbcType=VARCHAR},", + "contacts_phone = #{contactsPhone,jdbcType=VARCHAR},", + "email = #{email,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsUserReceipt record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsUserReceiptMapperExt.java b/service/src/main/java/com/hfkj/dao/BsUserReceiptMapperExt.java new file mode 100644 index 0000000..4640767 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsUserReceiptMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsUserReceiptMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsUserReceiptSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsUserReceiptSqlProvider.java new file mode 100644 index 0000000..25c81d7 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsUserReceiptSqlProvider.java @@ -0,0 +1,346 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsUserReceipt; +import com.hfkj.entity.BsUserReceiptExample.Criteria; +import com.hfkj.entity.BsUserReceiptExample.Criterion; +import com.hfkj.entity.BsUserReceiptExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsUserReceiptSqlProvider { + + public String countByExample(BsUserReceiptExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_user_receipt"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsUserReceiptExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_user_receipt"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsUserReceipt record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_user_receipt"); + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); + } + + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + + if (record.getCompanyName() != null) { + sql.VALUES("company_name", "#{companyName,jdbcType=VARCHAR}"); + } + + if (record.getTaxNo() != null) { + sql.VALUES("tax_no", "#{taxNo,jdbcType=VARCHAR}"); + } + + if (record.getContactsPhone() != null) { + sql.VALUES("contacts_phone", "#{contactsPhone,jdbcType=VARCHAR}"); + } + + if (record.getEmail() != null) { + sql.VALUES("email", "#{email,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(BsUserReceiptExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("user_id"); + sql.SELECT("`type`"); + sql.SELECT("company_name"); + sql.SELECT("tax_no"); + sql.SELECT("contacts_phone"); + sql.SELECT("email"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_user_receipt"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsUserReceipt record = (BsUserReceipt) parameter.get("record"); + BsUserReceiptExample example = (BsUserReceiptExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_user_receipt"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + + if (record.getCompanyName() != null) { + sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); + } + + if (record.getTaxNo() != null) { + sql.SET("tax_no = #{record.taxNo,jdbcType=VARCHAR}"); + } + + if (record.getContactsPhone() != null) { + sql.SET("contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR}"); + } + + if (record.getEmail() != null) { + sql.SET("email = #{record.email,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_user_receipt"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); + sql.SET("tax_no = #{record.taxNo,jdbcType=VARCHAR}"); + sql.SET("contacts_phone = #{record.contactsPhone,jdbcType=VARCHAR}"); + sql.SET("email = #{record.email,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsUserReceiptExample example = (BsUserReceiptExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsUserReceipt record) { + SQL sql = new SQL(); + sql.UPDATE("bs_user_receipt"); + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=BIGINT}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getCompanyName() != null) { + sql.SET("company_name = #{companyName,jdbcType=VARCHAR}"); + } + + if (record.getTaxNo() != null) { + sql.SET("tax_no = #{taxNo,jdbcType=VARCHAR}"); + } + + if (record.getContactsPhone() != null) { + sql.SET("contacts_phone = #{contactsPhone,jdbcType=VARCHAR}"); + } + + if (record.getEmail() != null) { + sql.SET("email = #{email,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsUserReceiptExample 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/service/src/main/java/com/hfkj/entity/BsGasOrder.java b/service/src/main/java/com/hfkj/entity/BsGasOrder.java index 4f7a3e5..e999376 100644 --- a/service/src/main/java/com/hfkj/entity/BsGasOrder.java +++ b/service/src/main/java/com/hfkj/entity/BsGasOrder.java @@ -240,6 +240,16 @@ public class BsGasOrder implements Serializable { */ private Integer status; + /** + * 收据状态:0:未开票 1:处理中 2:开票成功 3:开票失败 + */ + private Integer receiptStatus; + + /** + * 开票失败备注 + */ + private String receiptFailRemark; + /** * 创建时间 */ @@ -641,6 +651,22 @@ public class BsGasOrder implements Serializable { this.status = status; } + public Integer getReceiptStatus() { + return receiptStatus; + } + + public void setReceiptStatus(Integer receiptStatus) { + this.receiptStatus = receiptStatus; + } + + public String getReceiptFailRemark() { + return receiptFailRemark; + } + + public void setReceiptFailRemark(String receiptFailRemark) { + this.receiptFailRemark = receiptFailRemark; + } + public Date getCreateTime() { return createTime; } @@ -801,6 +827,8 @@ public class BsGasOrder implements Serializable { && (this.getPaySerialNo() == null ? other.getPaySerialNo() == null : this.getPaySerialNo().equals(other.getPaySerialNo())) && (this.getPayChannelOrderNo() == null ? other.getPayChannelOrderNo() == null : this.getPayChannelOrderNo().equals(other.getPayChannelOrderNo())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getReceiptStatus() == null ? other.getReceiptStatus() == null : this.getReceiptStatus().equals(other.getReceiptStatus())) + && (this.getReceiptFailRemark() == null ? other.getReceiptFailRemark() == null : this.getReceiptFailRemark().equals(other.getReceiptFailRemark())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime())) && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime())) @@ -864,6 +892,8 @@ public class BsGasOrder implements Serializable { result = prime * result + ((getPaySerialNo() == null) ? 0 : getPaySerialNo().hashCode()); result = prime * result + ((getPayChannelOrderNo() == null) ? 0 : getPayChannelOrderNo().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getReceiptStatus() == null) ? 0 : getReceiptStatus().hashCode()); + result = prime * result + ((getReceiptFailRemark() == null) ? 0 : getReceiptFailRemark().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode()); result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode()); @@ -930,6 +960,8 @@ public class BsGasOrder implements Serializable { sb.append(", paySerialNo=").append(paySerialNo); sb.append(", payChannelOrderNo=").append(payChannelOrderNo); sb.append(", status=").append(status); + sb.append(", receiptStatus=").append(receiptStatus); + sb.append(", receiptFailRemark=").append(receiptFailRemark); sb.append(", createTime=").append(createTime); sb.append(", cancelTime=").append(cancelTime); sb.append(", payTime=").append(payTime); diff --git a/service/src/main/java/com/hfkj/entity/BsGasOrderExample.java b/service/src/main/java/com/hfkj/entity/BsGasOrderExample.java index 53a1a5a..5802c1d 100644 --- a/service/src/main/java/com/hfkj/entity/BsGasOrderExample.java +++ b/service/src/main/java/com/hfkj/entity/BsGasOrderExample.java @@ -2916,6 +2916,136 @@ public class BsGasOrderExample { return (Criteria) this; } + public Criteria andReceiptStatusIsNull() { + addCriterion("receipt_status is null"); + return (Criteria) this; + } + + public Criteria andReceiptStatusIsNotNull() { + addCriterion("receipt_status is not null"); + return (Criteria) this; + } + + public Criteria andReceiptStatusEqualTo(Integer value) { + addCriterion("receipt_status =", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusNotEqualTo(Integer value) { + addCriterion("receipt_status <>", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusGreaterThan(Integer value) { + addCriterion("receipt_status >", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("receipt_status >=", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusLessThan(Integer value) { + addCriterion("receipt_status <", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusLessThanOrEqualTo(Integer value) { + addCriterion("receipt_status <=", value, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusIn(List values) { + addCriterion("receipt_status in", values, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusNotIn(List values) { + addCriterion("receipt_status not in", values, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusBetween(Integer value1, Integer value2) { + addCriterion("receipt_status between", value1, value2, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptStatusNotBetween(Integer value1, Integer value2) { + addCriterion("receipt_status not between", value1, value2, "receiptStatus"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkIsNull() { + addCriterion("receipt_fail_remark is null"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkIsNotNull() { + addCriterion("receipt_fail_remark is not null"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkEqualTo(String value) { + addCriterion("receipt_fail_remark =", value, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkNotEqualTo(String value) { + addCriterion("receipt_fail_remark <>", value, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkGreaterThan(String value) { + addCriterion("receipt_fail_remark >", value, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkGreaterThanOrEqualTo(String value) { + addCriterion("receipt_fail_remark >=", value, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkLessThan(String value) { + addCriterion("receipt_fail_remark <", value, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkLessThanOrEqualTo(String value) { + addCriterion("receipt_fail_remark <=", value, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkLike(String value) { + addCriterion("receipt_fail_remark like", value, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkNotLike(String value) { + addCriterion("receipt_fail_remark not like", value, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkIn(List values) { + addCriterion("receipt_fail_remark in", values, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkNotIn(List values) { + addCriterion("receipt_fail_remark not in", values, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkBetween(String value1, String value2) { + addCriterion("receipt_fail_remark between", value1, value2, "receiptFailRemark"); + return (Criteria) this; + } + + public Criteria andReceiptFailRemarkNotBetween(String value1, String value2) { + addCriterion("receipt_fail_remark not between", value1, value2, "receiptFailRemark"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; diff --git a/service/src/main/java/com/hfkj/entity/BsGasOrderReceipt.java b/service/src/main/java/com/hfkj/entity/BsGasOrderReceipt.java new file mode 100644 index 0000000..878822c --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasOrderReceipt.java @@ -0,0 +1,326 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_gas_order_receipt + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsGasOrderReceipt implements Serializable { + private Long id; + + /** + * 申请单号 + */ + private String applyNo; + + /** + * 用户收据信息id + */ + private Long userReceiptId; + + /** + * 公司名称 + */ + private String companyName; + + /** + * 税号 + */ + private String taxNo; + + /** + * 联系人手机号 + */ + private String contactsPhone; + + /** + * 邮箱 + */ + private String email; + + /** + * 交易订单号 + */ + private String orderNo; + + /** + * 商品订单号 + */ + private String orderChildNo; + + /** + * 油号 + */ + private String oilNo; + + /** + * 收据金额 + */ + private BigDecimal amount; + + /** + * 状态: 1:待处理 2:开票成功 3:开票失败 + */ + private Integer status; + + /** + * 失败备注 + */ + private String failRemark; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getApplyNo() { + return applyNo; + } + + public void setApplyNo(String applyNo) { + this.applyNo = applyNo; + } + + public Long getUserReceiptId() { + return userReceiptId; + } + + public void setUserReceiptId(Long userReceiptId) { + this.userReceiptId = userReceiptId; + } + + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public String getTaxNo() { + return taxNo; + } + + public void setTaxNo(String taxNo) { + this.taxNo = taxNo; + } + + public String getContactsPhone() { + return contactsPhone; + } + + public void setContactsPhone(String contactsPhone) { + this.contactsPhone = contactsPhone; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public String getOrderChildNo() { + return orderChildNo; + } + + public void setOrderChildNo(String orderChildNo) { + this.orderChildNo = orderChildNo; + } + + public String getOilNo() { + return oilNo; + } + + public void setOilNo(String oilNo) { + this.oilNo = oilNo; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getFailRemark() { + return failRemark; + } + + public void setFailRemark(String failRemark) { + this.failRemark = failRemark; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsGasOrderReceipt other = (BsGasOrderReceipt) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getApplyNo() == null ? other.getApplyNo() == null : this.getApplyNo().equals(other.getApplyNo())) + && (this.getUserReceiptId() == null ? other.getUserReceiptId() == null : this.getUserReceiptId().equals(other.getUserReceiptId())) + && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName())) + && (this.getTaxNo() == null ? other.getTaxNo() == null : this.getTaxNo().equals(other.getTaxNo())) + && (this.getContactsPhone() == null ? other.getContactsPhone() == null : this.getContactsPhone().equals(other.getContactsPhone())) + && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail())) + && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) + && (this.getOrderChildNo() == null ? other.getOrderChildNo() == null : this.getOrderChildNo().equals(other.getOrderChildNo())) + && (this.getOilNo() == null ? other.getOilNo() == null : this.getOilNo().equals(other.getOilNo())) + && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getFailRemark() == null ? other.getFailRemark() == null : this.getFailRemark().equals(other.getFailRemark())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getApplyNo() == null) ? 0 : getApplyNo().hashCode()); + result = prime * result + ((getUserReceiptId() == null) ? 0 : getUserReceiptId().hashCode()); + result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); + result = prime * result + ((getTaxNo() == null) ? 0 : getTaxNo().hashCode()); + result = prime * result + ((getContactsPhone() == null) ? 0 : getContactsPhone().hashCode()); + result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode()); + result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); + result = prime * result + ((getOrderChildNo() == null) ? 0 : getOrderChildNo().hashCode()); + result = prime * result + ((getOilNo() == null) ? 0 : getOilNo().hashCode()); + result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getFailRemark() == null) ? 0 : getFailRemark().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", applyNo=").append(applyNo); + sb.append(", userReceiptId=").append(userReceiptId); + sb.append(", companyName=").append(companyName); + sb.append(", taxNo=").append(taxNo); + sb.append(", contactsPhone=").append(contactsPhone); + sb.append(", email=").append(email); + sb.append(", orderNo=").append(orderNo); + sb.append(", orderChildNo=").append(orderChildNo); + sb.append(", oilNo=").append(oilNo); + sb.append(", amount=").append(amount); + sb.append(", status=").append(status); + sb.append(", failRemark=").append(failRemark); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsGasOrderReceiptExample.java b/service/src/main/java/com/hfkj/entity/BsGasOrderReceiptExample.java new file mode 100644 index 0000000..e6f93e9 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasOrderReceiptExample.java @@ -0,0 +1,1424 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsGasOrderReceiptExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsGasOrderReceiptExample() { + 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 andApplyNoIsNull() { + addCriterion("apply_no is null"); + return (Criteria) this; + } + + public Criteria andApplyNoIsNotNull() { + addCriterion("apply_no is not null"); + return (Criteria) this; + } + + public Criteria andApplyNoEqualTo(String value) { + addCriterion("apply_no =", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoNotEqualTo(String value) { + addCriterion("apply_no <>", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoGreaterThan(String value) { + addCriterion("apply_no >", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoGreaterThanOrEqualTo(String value) { + addCriterion("apply_no >=", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoLessThan(String value) { + addCriterion("apply_no <", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoLessThanOrEqualTo(String value) { + addCriterion("apply_no <=", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoLike(String value) { + addCriterion("apply_no like", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoNotLike(String value) { + addCriterion("apply_no not like", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoIn(List values) { + addCriterion("apply_no in", values, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoNotIn(List values) { + addCriterion("apply_no not in", values, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoBetween(String value1, String value2) { + addCriterion("apply_no between", value1, value2, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoNotBetween(String value1, String value2) { + addCriterion("apply_no not between", value1, value2, "applyNo"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdIsNull() { + addCriterion("user_receipt_id is null"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdIsNotNull() { + addCriterion("user_receipt_id is not null"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdEqualTo(Long value) { + addCriterion("user_receipt_id =", value, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdNotEqualTo(Long value) { + addCriterion("user_receipt_id <>", value, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdGreaterThan(Long value) { + addCriterion("user_receipt_id >", value, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_receipt_id >=", value, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdLessThan(Long value) { + addCriterion("user_receipt_id <", value, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdLessThanOrEqualTo(Long value) { + addCriterion("user_receipt_id <=", value, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdIn(List values) { + addCriterion("user_receipt_id in", values, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdNotIn(List values) { + addCriterion("user_receipt_id not in", values, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdBetween(Long value1, Long value2) { + addCriterion("user_receipt_id between", value1, value2, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andUserReceiptIdNotBetween(Long value1, Long value2) { + addCriterion("user_receipt_id not between", value1, value2, "userReceiptId"); + return (Criteria) this; + } + + public Criteria andCompanyNameIsNull() { + addCriterion("company_name is null"); + return (Criteria) this; + } + + public Criteria andCompanyNameIsNotNull() { + addCriterion("company_name is not null"); + return (Criteria) this; + } + + public Criteria andCompanyNameEqualTo(String value) { + addCriterion("company_name =", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotEqualTo(String value) { + addCriterion("company_name <>", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThan(String value) { + addCriterion("company_name >", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThanOrEqualTo(String value) { + addCriterion("company_name >=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThan(String value) { + addCriterion("company_name <", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThanOrEqualTo(String value) { + addCriterion("company_name <=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLike(String value) { + addCriterion("company_name like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotLike(String value) { + addCriterion("company_name not like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameIn(List values) { + addCriterion("company_name in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotIn(List values) { + addCriterion("company_name not in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameBetween(String value1, String value2) { + addCriterion("company_name between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotBetween(String value1, String value2) { + addCriterion("company_name not between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andTaxNoIsNull() { + addCriterion("tax_no is null"); + return (Criteria) this; + } + + public Criteria andTaxNoIsNotNull() { + addCriterion("tax_no is not null"); + return (Criteria) this; + } + + public Criteria andTaxNoEqualTo(String value) { + addCriterion("tax_no =", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoNotEqualTo(String value) { + addCriterion("tax_no <>", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoGreaterThan(String value) { + addCriterion("tax_no >", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoGreaterThanOrEqualTo(String value) { + addCriterion("tax_no >=", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoLessThan(String value) { + addCriterion("tax_no <", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoLessThanOrEqualTo(String value) { + addCriterion("tax_no <=", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoLike(String value) { + addCriterion("tax_no like", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoNotLike(String value) { + addCriterion("tax_no not like", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoIn(List values) { + addCriterion("tax_no in", values, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoNotIn(List values) { + addCriterion("tax_no not in", values, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoBetween(String value1, String value2) { + addCriterion("tax_no between", value1, value2, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoNotBetween(String value1, String value2) { + addCriterion("tax_no not between", value1, value2, "taxNo"); + return (Criteria) this; + } + + public Criteria andContactsPhoneIsNull() { + addCriterion("contacts_phone is null"); + return (Criteria) this; + } + + public Criteria andContactsPhoneIsNotNull() { + addCriterion("contacts_phone is not null"); + return (Criteria) this; + } + + public Criteria andContactsPhoneEqualTo(String value) { + addCriterion("contacts_phone =", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneNotEqualTo(String value) { + addCriterion("contacts_phone <>", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneGreaterThan(String value) { + addCriterion("contacts_phone >", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneGreaterThanOrEqualTo(String value) { + addCriterion("contacts_phone >=", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneLessThan(String value) { + addCriterion("contacts_phone <", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneLessThanOrEqualTo(String value) { + addCriterion("contacts_phone <=", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneLike(String value) { + addCriterion("contacts_phone like", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneNotLike(String value) { + addCriterion("contacts_phone not like", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneIn(List values) { + addCriterion("contacts_phone in", values, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneNotIn(List values) { + addCriterion("contacts_phone not in", values, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneBetween(String value1, String value2) { + addCriterion("contacts_phone between", value1, value2, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneNotBetween(String value1, String value2) { + addCriterion("contacts_phone not between", value1, value2, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andEmailIsNull() { + addCriterion("email is null"); + return (Criteria) this; + } + + public Criteria andEmailIsNotNull() { + addCriterion("email is not null"); + return (Criteria) this; + } + + public Criteria andEmailEqualTo(String value) { + addCriterion("email =", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotEqualTo(String value) { + addCriterion("email <>", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThan(String value) { + addCriterion("email >", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThanOrEqualTo(String value) { + addCriterion("email >=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThan(String value) { + addCriterion("email <", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThanOrEqualTo(String value) { + addCriterion("email <=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLike(String value) { + addCriterion("email like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotLike(String value) { + addCriterion("email not like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailIn(List values) { + addCriterion("email in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotIn(List values) { + addCriterion("email not in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailBetween(String value1, String value2) { + addCriterion("email between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotBetween(String value1, String value2) { + addCriterion("email not between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNull() { + addCriterion("order_no is null"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNotNull() { + addCriterion("order_no is not null"); + return (Criteria) this; + } + + public Criteria andOrderNoEqualTo(String value) { + addCriterion("order_no =", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotEqualTo(String value) { + addCriterion("order_no <>", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThan(String value) { + addCriterion("order_no >", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("order_no >=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThan(String value) { + addCriterion("order_no <", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThanOrEqualTo(String value) { + addCriterion("order_no <=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLike(String value) { + addCriterion("order_no like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotLike(String value) { + addCriterion("order_no not like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoIn(List values) { + addCriterion("order_no in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotIn(List values) { + addCriterion("order_no not in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoBetween(String value1, String value2) { + addCriterion("order_no between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotBetween(String value1, String value2) { + addCriterion("order_no not between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoIsNull() { + addCriterion("order_child_no is null"); + return (Criteria) this; + } + + public Criteria andOrderChildNoIsNotNull() { + addCriterion("order_child_no is not null"); + return (Criteria) this; + } + + public Criteria andOrderChildNoEqualTo(String value) { + addCriterion("order_child_no =", value, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoNotEqualTo(String value) { + addCriterion("order_child_no <>", value, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoGreaterThan(String value) { + addCriterion("order_child_no >", value, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoGreaterThanOrEqualTo(String value) { + addCriterion("order_child_no >=", value, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoLessThan(String value) { + addCriterion("order_child_no <", value, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoLessThanOrEqualTo(String value) { + addCriterion("order_child_no <=", value, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoLike(String value) { + addCriterion("order_child_no like", value, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoNotLike(String value) { + addCriterion("order_child_no not like", value, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoIn(List values) { + addCriterion("order_child_no in", values, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoNotIn(List values) { + addCriterion("order_child_no not in", values, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoBetween(String value1, String value2) { + addCriterion("order_child_no between", value1, value2, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOrderChildNoNotBetween(String value1, String value2) { + addCriterion("order_child_no not between", value1, value2, "orderChildNo"); + return (Criteria) this; + } + + public Criteria andOilNoIsNull() { + addCriterion("oil_no is null"); + return (Criteria) this; + } + + public Criteria andOilNoIsNotNull() { + addCriterion("oil_no is not null"); + return (Criteria) this; + } + + public Criteria andOilNoEqualTo(String value) { + addCriterion("oil_no =", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotEqualTo(String value) { + addCriterion("oil_no <>", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoGreaterThan(String value) { + addCriterion("oil_no >", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoGreaterThanOrEqualTo(String value) { + addCriterion("oil_no >=", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoLessThan(String value) { + addCriterion("oil_no <", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoLessThanOrEqualTo(String value) { + addCriterion("oil_no <=", value, "oilNo"); + return (Criteria) this; + } + + 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) { + addCriterion("oil_no not in", values, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoBetween(String value1, String value2) { + addCriterion("oil_no between", value1, value2, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotBetween(String value1, String value2) { + addCriterion("oil_no not between", value1, value2, "oilNo"); + return (Criteria) this; + } + + public Criteria andAmountIsNull() { + addCriterion("amount is null"); + return (Criteria) this; + } + + public Criteria andAmountIsNotNull() { + addCriterion("amount is not null"); + return (Criteria) this; + } + + public Criteria andAmountEqualTo(BigDecimal value) { + addCriterion("amount =", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotEqualTo(BigDecimal value) { + addCriterion("amount <>", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThan(BigDecimal value) { + addCriterion("amount >", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("amount >=", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountLessThan(BigDecimal value) { + addCriterion("amount <", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("amount <=", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountIn(List values) { + addCriterion("amount in", values, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotIn(List values) { + addCriterion("amount not in", values, "amount"); + return (Criteria) this; + } + + public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amount between", value1, value2, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amount not between", value1, value2, "amount"); + 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 andFailRemarkIsNull() { + addCriterion("fail_remark is null"); + return (Criteria) this; + } + + public Criteria andFailRemarkIsNotNull() { + addCriterion("fail_remark is not null"); + return (Criteria) this; + } + + public Criteria andFailRemarkEqualTo(String value) { + addCriterion("fail_remark =", value, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkNotEqualTo(String value) { + addCriterion("fail_remark <>", value, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkGreaterThan(String value) { + addCriterion("fail_remark >", value, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkGreaterThanOrEqualTo(String value) { + addCriterion("fail_remark >=", value, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkLessThan(String value) { + addCriterion("fail_remark <", value, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkLessThanOrEqualTo(String value) { + addCriterion("fail_remark <=", value, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkLike(String value) { + addCriterion("fail_remark like", value, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkNotLike(String value) { + addCriterion("fail_remark not like", value, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkIn(List values) { + addCriterion("fail_remark in", values, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkNotIn(List values) { + addCriterion("fail_remark not in", values, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkBetween(String value1, String value2) { + addCriterion("fail_remark between", value1, value2, "failRemark"); + return (Criteria) this; + } + + public Criteria andFailRemarkNotBetween(String value1, String value2) { + addCriterion("fail_remark not between", value1, value2, "failRemark"); + 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 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/service/src/main/java/com/hfkj/entity/BsUserReceipt.java b/service/src/main/java/com/hfkj/entity/BsUserReceipt.java new file mode 100644 index 0000000..19e064a --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsUserReceipt.java @@ -0,0 +1,245 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * bs_user_receipt + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsUserReceipt implements Serializable { + private Long id; + + /** + * 用户id + */ + private Long userId; + + /** + * 类型 1:企业 2:个人 + */ + private Integer type; + + /** + * 公司名称 + */ + private String companyName; + + /** + * 税号 + */ + private String taxNo; + + /** + * 联系人手机号 + */ + private String contactsPhone; + + /** + * 邮箱 + */ + private String email; + + /** + * 状态: 0:不可用 1:可用 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public String getTaxNo() { + return taxNo; + } + + public void setTaxNo(String taxNo) { + this.taxNo = taxNo; + } + + public String getContactsPhone() { + return contactsPhone; + } + + public void setContactsPhone(String contactsPhone) { + this.contactsPhone = contactsPhone; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsUserReceipt other = (BsUserReceipt) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName())) + && (this.getTaxNo() == null ? other.getTaxNo() == null : this.getTaxNo().equals(other.getTaxNo())) + && (this.getContactsPhone() == null ? other.getContactsPhone() == null : this.getContactsPhone().equals(other.getContactsPhone())) + && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); + result = prime * result + ((getTaxNo() == null) ? 0 : getTaxNo().hashCode()); + result = prime * result + ((getContactsPhone() == null) ? 0 : getContactsPhone().hashCode()); + result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", type=").append(type); + sb.append(", companyName=").append(companyName); + sb.append(", taxNo=").append(taxNo); + sb.append(", contactsPhone=").append(contactsPhone); + sb.append(", email=").append(email); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsUserReceiptExample.java b/service/src/main/java/com/hfkj/entity/BsUserReceiptExample.java new file mode 100644 index 0000000..c81f346 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsUserReceiptExample.java @@ -0,0 +1,1073 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsUserReceiptExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsUserReceiptExample() { + 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 andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List 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(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Integer value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Integer value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Integer value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Integer value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Integer value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Integer value1, Integer value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Integer value1, Integer value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCompanyNameIsNull() { + addCriterion("company_name is null"); + return (Criteria) this; + } + + public Criteria andCompanyNameIsNotNull() { + addCriterion("company_name is not null"); + return (Criteria) this; + } + + public Criteria andCompanyNameEqualTo(String value) { + addCriterion("company_name =", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotEqualTo(String value) { + addCriterion("company_name <>", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThan(String value) { + addCriterion("company_name >", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThanOrEqualTo(String value) { + addCriterion("company_name >=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThan(String value) { + addCriterion("company_name <", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThanOrEqualTo(String value) { + addCriterion("company_name <=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLike(String value) { + addCriterion("company_name like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotLike(String value) { + addCriterion("company_name not like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameIn(List values) { + addCriterion("company_name in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotIn(List values) { + addCriterion("company_name not in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameBetween(String value1, String value2) { + addCriterion("company_name between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotBetween(String value1, String value2) { + addCriterion("company_name not between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andTaxNoIsNull() { + addCriterion("tax_no is null"); + return (Criteria) this; + } + + public Criteria andTaxNoIsNotNull() { + addCriterion("tax_no is not null"); + return (Criteria) this; + } + + public Criteria andTaxNoEqualTo(String value) { + addCriterion("tax_no =", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoNotEqualTo(String value) { + addCriterion("tax_no <>", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoGreaterThan(String value) { + addCriterion("tax_no >", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoGreaterThanOrEqualTo(String value) { + addCriterion("tax_no >=", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoLessThan(String value) { + addCriterion("tax_no <", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoLessThanOrEqualTo(String value) { + addCriterion("tax_no <=", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoLike(String value) { + addCriterion("tax_no like", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoNotLike(String value) { + addCriterion("tax_no not like", value, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoIn(List values) { + addCriterion("tax_no in", values, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoNotIn(List values) { + addCriterion("tax_no not in", values, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoBetween(String value1, String value2) { + addCriterion("tax_no between", value1, value2, "taxNo"); + return (Criteria) this; + } + + public Criteria andTaxNoNotBetween(String value1, String value2) { + addCriterion("tax_no not between", value1, value2, "taxNo"); + return (Criteria) this; + } + + public Criteria andContactsPhoneIsNull() { + addCriterion("contacts_phone is null"); + return (Criteria) this; + } + + public Criteria andContactsPhoneIsNotNull() { + addCriterion("contacts_phone is not null"); + return (Criteria) this; + } + + public Criteria andContactsPhoneEqualTo(String value) { + addCriterion("contacts_phone =", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneNotEqualTo(String value) { + addCriterion("contacts_phone <>", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneGreaterThan(String value) { + addCriterion("contacts_phone >", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneGreaterThanOrEqualTo(String value) { + addCriterion("contacts_phone >=", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneLessThan(String value) { + addCriterion("contacts_phone <", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneLessThanOrEqualTo(String value) { + addCriterion("contacts_phone <=", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneLike(String value) { + addCriterion("contacts_phone like", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneNotLike(String value) { + addCriterion("contacts_phone not like", value, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneIn(List values) { + addCriterion("contacts_phone in", values, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneNotIn(List values) { + addCriterion("contacts_phone not in", values, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneBetween(String value1, String value2) { + addCriterion("contacts_phone between", value1, value2, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andContactsPhoneNotBetween(String value1, String value2) { + addCriterion("contacts_phone not between", value1, value2, "contactsPhone"); + return (Criteria) this; + } + + public Criteria andEmailIsNull() { + addCriterion("email is null"); + return (Criteria) this; + } + + public Criteria andEmailIsNotNull() { + addCriterion("email is not null"); + return (Criteria) this; + } + + public Criteria andEmailEqualTo(String value) { + addCriterion("email =", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotEqualTo(String value) { + addCriterion("email <>", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThan(String value) { + addCriterion("email >", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThanOrEqualTo(String value) { + addCriterion("email >=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThan(String value) { + addCriterion("email <", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThanOrEqualTo(String value) { + addCriterion("email <=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLike(String value) { + addCriterion("email like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotLike(String value) { + addCriterion("email not like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailIn(List values) { + addCriterion("email in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotIn(List values) { + addCriterion("email not in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailBetween(String value1, String value2) { + addCriterion("email between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotBetween(String value1, String value2) { + addCriterion("email not between", value1, value2, "email"); + 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 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 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/service/src/main/java/com/hfkj/pay/HuiPayService.java b/service/src/main/java/com/hfkj/pay/HuiPayService.java index 07163e3..ad557df 100644 --- a/service/src/main/java/com/hfkj/pay/HuiPayService.java +++ b/service/src/main/java/com/hfkj/pay/HuiPayService.java @@ -46,9 +46,9 @@ public class HuiPayService { param.put("outTradeNo", order.getOrderNo()); param.put("transType", "JSAPI"); if (OrderPayTypeEnum.type1.getCode() == order.getPayType()) { - param.put("payMode", "WECHAT"); - } else if (OrderPayTypeEnum.type2.getCode() == order.getPayType()) { param.put("payMode", "ALIPAY"); + } else if (OrderPayTypeEnum.type2.getCode() == order.getPayType()) { + param.put("payMode", "WECHAT"); } param.put("totalAmount", order.getPayRealPrice()); param.put("profitSharing", profitSharing?1:0); diff --git a/service/src/main/java/com/hfkj/service/gas/BsGasOrderReceiptService.java b/service/src/main/java/com/hfkj/service/gas/BsGasOrderReceiptService.java new file mode 100644 index 0000000..464eb7b --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/BsGasOrderReceiptService.java @@ -0,0 +1,61 @@ +package com.hfkj.service.gas; + +import com.hfkj.entity.BsGasOrderReceipt; + +import java.util.List; +import java.util.Map; + +/** + * @className: BsGasOrderReceiptService + * @author: HuRui + * @date: 2024/7/24 + **/ +public interface BsGasOrderReceiptService { + + /** + * 编辑数据 + * @param data + */ + void editData(BsGasOrderReceipt data); + + /** + * 申请 + * @param userReceiptId + * @param orderNos + */ + + void applyReceipt(Long userReceiptId, List orderNos); + + /** + * 开票成功 + * @param applyNo + */ + void success(String applyNo); + + /** + * 开票失败 + * @param applyNo + */ + void fail(String applyNo, String remark); + + /** + * 查询详情 + * @param applyNo + */ + BsGasOrderReceipt getDetail(String applyNo); + + /** + * 查询详情 + * @param orderReceiptId + * @return + */ + BsGasOrderReceipt getDetail(Long orderReceiptId); + + /** + * 查询列表 + * @param param + * @return + */ + List getList(Map param); + +} diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderReceiptServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderReceiptServiceImpl.java new file mode 100644 index 0000000..b28cdec --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderReceiptServiceImpl.java @@ -0,0 +1,184 @@ +package com.hfkj.service.gas.impl; + +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.dao.BsGasOrderReceiptMapper; +import com.hfkj.entity.BsGasOrder; +import com.hfkj.entity.BsGasOrderReceipt; +import com.hfkj.entity.BsGasOrderReceiptExample; +import com.hfkj.entity.BsUserReceipt; +import com.hfkj.service.gas.BsGasOrderReceiptService; +import com.hfkj.service.gas.BsGasOrderService; +import com.hfkj.service.user.BsUserReceiptService; +import com.hfkj.sysenum.gas.GasOrderReceiptStatusEnum; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +/** + * @className: BsGasOrderReceiptServiceImpl + * @author: HuRui + * @date: 2024/7/24 + **/ +@Service("gasOrderReceiptServiceImpl") +public class BsGasOrderReceiptServiceImpl implements BsGasOrderReceiptService { + @Resource + private BsGasOrderReceiptMapper gasOrderReceiptMapper; + @Resource + private BsUserReceiptService userReceiptService; + @Resource + private BsGasOrderService gasOrderService; + + @Override + public void editData(BsGasOrderReceipt data) { + data.setUpdateTime(new Date()); + if (data.getId() == null) { + data.setCreateTime(new Date()); + gasOrderReceiptMapper.insert(data); + } else { + gasOrderReceiptMapper.updateByPrimaryKeySelective(data); + } + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW,rollbackFor= {RuntimeException.class}) + public void applyReceipt(Long userReceiptId, List orderNos) { + // 查询收据 + BsUserReceipt receipt = userReceiptService.getDetail(userReceiptId); + if (receipt == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的收据"); + } + for (Object orderNo : orderNos) { + // 查询订单 + BsGasOrder gasOrder = gasOrderService.getDetailByOrderNo(orderNo.toString()); + if (gasOrder == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, orderNo+"未知的订单"); + } + if (!GasOrderReceiptStatusEnum.status0.getStatus().equals(gasOrder.getReceiptStatus()) + && !GasOrderReceiptStatusEnum.status3.getStatus().equals(gasOrder.getReceiptStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, gasOrder.getOrderNo()+"订单未处于未开票状态"); + } + gasOrder.setReceiptStatus(GasOrderReceiptStatusEnum.status1.getStatus()); + gasOrder.setReceiptFailRemark(null); + gasOrderService.updateGasOrder(gasOrder); + + BsGasOrderReceipt gasOrderReceipt = new BsGasOrderReceipt(); + gasOrderReceipt.setApplyNo(System.currentTimeMillis()+""); + gasOrderReceipt.setUserReceiptId(receipt.getUserId()); + gasOrderReceipt.setCompanyName(receipt.getCompanyName()); + gasOrderReceipt.setTaxNo(receipt.getTaxNo()); + gasOrderReceipt.setContactsPhone(receipt.getContactsPhone()); + gasOrderReceipt.setEmail(receipt.getEmail()); + gasOrderReceipt.setOrderNo(gasOrder.getOrderNo()); + gasOrderReceipt.setOrderChildNo(gasOrder.getOrderChildNo()); + gasOrderReceipt.setOilNo(gasOrder.getGasOilNo()); + gasOrderReceipt.setAmount(gasOrder.getActualPayPrice()); + gasOrderReceipt.setStatus(GasOrderReceiptStatusEnum.status1.getStatus()); + editData(gasOrderReceipt); + } + } + + @Override + public void success(String applyNo) { + // 查询详情 + BsGasOrderReceipt orderReceipt = getDetail(applyNo); + if (orderReceipt == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的申请"); + } + if (!GasOrderReceiptStatusEnum.status1.getStatus().equals(orderReceipt.getStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "申请状态错误"); + } + orderReceipt.setStatus(GasOrderReceiptStatusEnum.status2.getStatus()); + editData(orderReceipt); + + // 查询订单 + BsGasOrder gasOrder = gasOrderService.getDetailByOrderNo(orderReceipt.getOrderNo()); + if (gasOrder != null) { + gasOrder.setReceiptStatus(GasOrderReceiptStatusEnum.status2.getStatus()); + gasOrder.setReceiptFailRemark(null); + gasOrderService.updateGasOrder(gasOrder); + } + } + + @Override + public void fail(String applyNo, String remark) { + // 查询详情 + BsGasOrderReceipt orderReceipt = getDetail(applyNo); + if (orderReceipt == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的申请"); + } + if (!GasOrderReceiptStatusEnum.status1.getStatus().equals(orderReceipt.getStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "申请状态错误"); + } + orderReceipt.setStatus(GasOrderReceiptStatusEnum.status3.getStatus()); + orderReceipt.setFailRemark(remark); + editData(orderReceipt); + + // 查询订单 + BsGasOrder gasOrder = gasOrderService.getDetailByOrderNo(orderReceipt.getOrderNo()); + if (gasOrder != null) { + gasOrder.setReceiptStatus(GasOrderReceiptStatusEnum.status3.getStatus()); + gasOrder.setReceiptFailRemark(remark); + gasOrderService.updateGasOrder(gasOrder); + } + } + + @Override + public BsGasOrderReceipt getDetail(String applyNo) { + BsGasOrderReceiptExample example = new BsGasOrderReceiptExample(); + example.createCriteria().andApplyNoEqualTo(applyNo); + List list = gasOrderReceiptMapper.selectByExample(example); + if (!list.isEmpty()) { + return list.get(0); + } + return null; + } + + @Override + public BsGasOrderReceipt getDetail(Long orderReceiptId) { + return gasOrderReceiptMapper.selectByPrimaryKey(orderReceiptId); + } + + @Override + public List getList(Map param) { + BsGasOrderReceiptExample example = new BsGasOrderReceiptExample(); + BsGasOrderReceiptExample.Criteria criteria = example.createCriteria(); + + if (StringUtils.isNotBlank(MapUtils.getString(param, "orderNo"))) { + criteria.andOrderNoLike("%"+MapUtils.getString(param, "orderNo")+"%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "contactsPhone"))) { + criteria.andContactsPhoneLike("%"+MapUtils.getString(param, "contactsPhone")+"%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "status"))) { + List status = Arrays.stream(MapUtils.getString(param, "status").split(",")) + .flatMapToInt(num -> IntStream.of(Integer.parseInt(num))).boxed() + .collect(Collectors.toList()); + criteria.andStatusIn(status); + } + + if (MapUtils.getLong(param, "createTimeS") != null) { + criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS"))); + } + + if (MapUtils.getLong(param, "createTimeE") != null) { + criteria.andCreateTimeLessThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeE"))); + } + + example.setOrderByClause("create_time desc"); + return gasOrderReceiptMapper.selectByExample(example); + } +} diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java index 7d94037..f6f9942 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java @@ -210,6 +210,13 @@ public class BsGasOrderServiceImpl implements BsGasOrderService { criteria.andGasClassGroupTaskIdEqualTo(MapUtils.getLong(param, "gasClassGroupTaskId")); } + if (StringUtils.isNotBlank(MapUtils.getString(param, "receiptStatus"))) { + List receiptStatus = Arrays.stream(MapUtils.getString(param, "receiptStatus").split(",")) + .flatMapToInt(num -> IntStream.of(Integer.parseInt(num))).boxed() + .collect(Collectors.toList()); + criteria.andReceiptStatusIn(receiptStatus); + } + if (StringUtils.isNotBlank(MapUtils.getString(param, "status"))) { List status = Arrays.stream(MapUtils.getString(param, "status").split(",")) .flatMapToInt(num -> IntStream.of(Integer.parseInt(num))).boxed() diff --git a/service/src/main/java/com/hfkj/service/order/BsOrderRefundService.java b/service/src/main/java/com/hfkj/service/order/BsOrderRefundService.java index 99e8fb5..a1503f2 100644 --- a/service/src/main/java/com/hfkj/service/order/BsOrderRefundService.java +++ b/service/src/main/java/com/hfkj/service/order/BsOrderRefundService.java @@ -35,10 +35,12 @@ public interface BsOrderRefundService { /** * 交易子订单退款 * @param childOrderNo 子订单号 + * @param handleBusiness 处理业务 true:处理 false:不处理 * @param productCount 退款产品数量 + * @param remark 备注 * @return */ - BsOrderRefund tradeOrderChildRefund(String childOrderNo, Integer productCount, String remark); + BsOrderRefund tradeOrderChildRefund(String childOrderNo, Boolean handleBusiness, Integer productCount, String remark); /** * 查询退款 diff --git a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java index 77985a5..db6a530 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java +++ b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java @@ -14,6 +14,7 @@ import com.hfkj.service.gas.BsGasService; import com.hfkj.service.gas.BsGasStaffService; import com.hfkj.service.sec.SecDictionaryService; import com.hfkj.sysenum.MerchantStatusEnum; +import com.hfkj.sysenum.gas.GasOrderReceiptStatusEnum; import com.hfkj.sysenum.gas.OrderOilStatus; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -93,6 +94,7 @@ public class OrderCreateService { gasOrder.setMerName(merchant.getMerName()); gasOrder.setMerAddress(merchant.getAddress()); gasOrder.setStatus(OrderOilStatus.STATUS1.getNumber()); + gasOrder.setReceiptStatus(GasOrderReceiptStatusEnum.status0.getStatus()); gasOrder.setDeductionCouponPrice(new BigDecimal("0")); gasOrder.setDeductionOilPrice(priceModel.getTotalPreferences()); diff --git a/service/src/main/java/com/hfkj/service/order/OrderRefundBusiness.java b/service/src/main/java/com/hfkj/service/order/OrderRefundBusiness.java index 2adbfec..f631f95 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderRefundBusiness.java +++ b/service/src/main/java/com/hfkj/service/order/OrderRefundBusiness.java @@ -17,6 +17,7 @@ import com.hfkj.service.merchant.BsMerchantAccountService; import com.hfkj.sysenum.MerchantSourceTypeEnum; import com.hfkj.sysenum.gas.OrderOilStatus; import com.hfkj.sysenum.merchant.MerchantAccountRecordSourceTypeEnum; +import com.hfkj.sysenum.order.OrderChildProductTypeEnum; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; @@ -32,12 +33,47 @@ import java.util.Map; **/ @Component public class OrderRefundBusiness { - + @Resource + private BsOrderChildService orderChildService; @Resource private BsGasOrderService gasOrderService; @Resource private BsMerchantAccountService merchantAccountService; + /** + * 前置业务处理 + * @param refund + */ + public BsOrderRefund prepose(BsOrderRefund refund) { + // 查询商品订单 + OrderChildModel orderChild = orderChildService.getDetail(refund.getOrderChildNo()); + if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) { + // 查询加油订单 + BsGasOrder gasOrder = gasOrderService.getDetailByOrderNo(refund.getOrderNo()); + if (gasOrder != null) { + if (gasOrder.getChannelType().equals(MerchantSourceTypeEnum.type2.getNumber())) { + try { + // 请求团油渠道申请退款 + JSONObject object = NewLinkRequestService.refuelingOrderRefund(gasOrder.getUserPhone(), gasOrder.getOrderNo(), refund.getRefundRemark()); + if (object == null || !object.getString("code").equals("200")) { + gasOrder.setAbnormal(true); + gasOrder.setAbnormalContent("渠道申请退款失败!原因:" + object.getString("message")); + gasOrderService.updateGasOrder(gasOrder); + } else { + gasOrder.setStatus(OrderOilStatus.STATUS5.getNumber()); + gasOrderService.updateGasOrder(gasOrder); + } + } catch (Exception e) { + gasOrder.setAbnormal(true); + gasOrder.setAbnormalContent("渠道申请退款失败!原因:未知原因"); + gasOrderService.updateGasOrder(gasOrder); + } + } + } + } + return refund; + } + /** * 加油订单业务 * @param refund diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java index 9f45191..b8ed372 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java @@ -114,7 +114,7 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService { boolean refundSuccess = true; for (OrderChildModel orderChild : order.getOrderChildList()) { try { - BsOrderRefund orderRefund = tradeOrderChildRefund(orderChild.getChildOrderNo(), orderChild.getProductCount(), remark); + BsOrderRefund orderRefund = tradeOrderChildRefund(orderChild.getChildOrderNo(), true, orderChild.getProductCount(), remark); if (orderRefund.getRefundStatus().equals(OrderRefundStatusEnum.status3.getCode())) { refundSuccess = false; } @@ -133,7 +133,7 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService { @Override @Transactional(propagation= Propagation.REQUIRES_NEW,rollbackFor= {RuntimeException.class}) - public BsOrderRefund tradeOrderChildRefund(String childOrderNo, Integer productCount, String remark) { + public BsOrderRefund tradeOrderChildRefund(String childOrderNo, Boolean handleBusiness, Integer productCount, String remark) { // 查询子订单 OrderChildModel orderChild = orderChildService.getDetail(childOrderNo); if (orderChild == null) { @@ -222,10 +222,12 @@ public class BsOrderRefundServiceImpl implements BsOrderRefundService { orderChildService.editData(orderChild); // 处理退款业务 - if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) { - try { - orderRefundBusiness.gasOrder(orderRefund); - } catch (Exception e) { } + if (handleBusiness.equals(true)) { + if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) { + try { + orderRefundBusiness.gasOrder(orderRefund); + } catch (Exception e) { } + } } // 查询子订单已全部退款 diff --git a/service/src/main/java/com/hfkj/service/user/BsUserReceiptService.java b/service/src/main/java/com/hfkj/service/user/BsUserReceiptService.java new file mode 100644 index 0000000..cccea57 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/user/BsUserReceiptService.java @@ -0,0 +1,33 @@ +package com.hfkj.service.user; + +import com.hfkj.entity.BsUserReceipt; + +import java.util.List; +import java.util.Map; + +/** + * @className: BsUserReceiptService + * @author: HuRui + * @date: 2024/7/24 + **/ +public interface BsUserReceiptService { + + /** + * 编辑数据 + * @param data + */ + void editData(BsUserReceipt data); + + /** + * 查询详情 + * @param id + */ + BsUserReceipt getDetail(Long id); + + /** + * 查询列表 + * @param param + */ + List getList(Map param); + +} diff --git a/service/src/main/java/com/hfkj/service/user/impl/BsUserReceiptServiceImpl.java b/service/src/main/java/com/hfkj/service/user/impl/BsUserReceiptServiceImpl.java new file mode 100644 index 0000000..74fd1d7 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/user/impl/BsUserReceiptServiceImpl.java @@ -0,0 +1,64 @@ +package com.hfkj.service.user.impl; + +import com.hfkj.dao.BsUserReceiptMapper; +import com.hfkj.entity.BsUserReceipt; +import com.hfkj.entity.BsUserReceiptExample; +import com.hfkj.service.user.BsUserReceiptService; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +/** + * @className: BsUserReceiptServiceImpl + * @author: HuRui + * @date: 2024/7/24 + **/ +@Service("userReceiptService") +public class BsUserReceiptServiceImpl implements BsUserReceiptService { + @Resource + private BsUserReceiptMapper userReceiptMapper; + + @Override + public void editData(BsUserReceipt data) { + data.setUpdateTime(new Date()); + if (data.getId() == null) { + data.setCreateTime(new Date()); + userReceiptMapper.insert(data); + } else { + userReceiptMapper.updateByPrimaryKey(data); + } + } + + @Override + public BsUserReceipt getDetail(Long id) { + return userReceiptMapper.selectByPrimaryKey(id); + } + + @Override + public List getList(Map param) { + BsUserReceiptExample example = new BsUserReceiptExample(); + BsUserReceiptExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (MapUtils.getLong(param, "userId") != null) { + criteria.andUserIdEqualTo(MapUtils.getLong(param, "userId")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "status"))) { + List status = Arrays.stream(MapUtils.getString(param, "status").split(",")) + .flatMapToInt(num -> IntStream.of(Integer.parseInt(num))).boxed() + .collect(Collectors.toList()); + criteria.andStatusIn(status); + } + + example.setOrderByClause("create_time desc"); + return userReceiptMapper.selectByExample(example); + } +} diff --git a/service/src/main/java/com/hfkj/sysenum/gas/GasOrderReceiptStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/gas/GasOrderReceiptStatusEnum.java new file mode 100644 index 0000000..ef18e0b --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/gas/GasOrderReceiptStatusEnum.java @@ -0,0 +1,39 @@ +package com.hfkj.sysenum.gas; + +import lombok.Getter; + +/** + * 加油站价格任务 + * @author hurui + */ +@Getter +public enum GasOrderReceiptStatusEnum { + /** + * 未开票 + */ + status0(0 , "未开票", ""), + /** + * 待处理 + */ + status1(1 , "处理中", "待处理"), + /** + * 开票成功 + */ + status2(2 , "开票成功", "开票成功"), + /** + * 开票失败 + */ + status3(3 , "开票失败", "开票失败"), + ; + + private Integer status; + private String userName; + private String manageName; + + GasOrderReceiptStatusEnum(int status, String userName, String manageName) { + this.status = status; + this.userName = userName; + this.manageName = manageName; + } + +} diff --git a/service/src/main/java/com/hfkj/sysenum/gas/OrderOilStatus.java b/service/src/main/java/com/hfkj/sysenum/gas/OrderOilStatus.java index 293b953..86141b5 100644 --- a/service/src/main/java/com/hfkj/sysenum/gas/OrderOilStatus.java +++ b/service/src/main/java/com/hfkj/sysenum/gas/OrderOilStatus.java @@ -12,8 +12,8 @@ public enum OrderOilStatus { STATUS2(2, "已支付"), STATUS3(3, "已取消"), STATUS4(4, "已退款"), - STATUS6(5, "退款中"), - STATUS8(6, "退款失败"), + STATUS5(5, "退款中"), + STATUS6(6, "退款失败"), ; private Integer number; diff --git a/service/src/main/java/com/hfkj/sysenum/order/OrderPayTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/order/OrderPayTypeEnum.java index f6c3967..b8d09b2 100644 --- a/service/src/main/java/com/hfkj/sysenum/order/OrderPayTypeEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/order/OrderPayTypeEnum.java @@ -13,13 +13,13 @@ import java.util.Objects; @Getter public enum OrderPayTypeEnum { /** - * 微信 + * 支付宝 */ - type1(1, "微信"), + type1(1, "支付宝"), /** - * 支付宝 + * 微信 */ - type2(2, "支付宝"), + type2(2, "微信"), /** * 云闪付 */