From 5bed33e4c17057c4bf07be9a6165aaaa308e5c7e Mon Sep 17 00:00:00 2001 From: YUANYE <418471657@qq.com> Date: Fri, 11 Jun 2021 18:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=85=85=E5=80=BC=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OutRechargeOrderController.java | 92 + .../controller/pay/WechatPayController.java | 2 +- .../com/hai/dao/OutRechargeOrderMapper.java | 160 ++ .../hai/dao/OutRechargeOrderMapperExt.java | 7 + .../hai/dao/OutRechargeOrderSqlProvider.java | 444 +++++ .../java/com/hai/entity/OutRechargeOrder.java | 366 ++++ .../hai/entity/OutRechargeOrderExample.java | 1503 +++++++++++++++++ .../hai/service/OutRechargeOrderService.java | 55 + .../impl/OutRechargeOrderServiceImpl.java | 50 + 9 files changed, 2678 insertions(+), 1 deletion(-) create mode 100644 hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java create mode 100644 hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java create mode 100644 hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java create mode 100644 hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java create mode 100644 hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java diff --git a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java new file mode 100644 index 00000000..45888c11 --- /dev/null +++ b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java @@ -0,0 +1,92 @@ +package com.cweb.controller; + +import com.alibaba.fastjson.JSONObject; +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.common.security.SessionObject; +import com.hai.common.security.UserCenter; +import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.HighOrder; +import com.hai.entity.OutRechargeOrder; +import com.hai.model.HighUserModel; +import com.hai.model.ResponseData; +import com.hai.service.OutRechargeOrderService; +import com.hai.service.TelApiService; +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.beans.factory.annotation.Autowired; +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; +import javax.servlet.http.HttpServletRequest; + +@Controller +@RequestMapping(value = "/outRechargeOrder") +@Api(value = "充值订单接口") +public class OutRechargeOrderController { + private static Logger log = LoggerFactory.getLogger(HighMerchantStoreController.class); + + @Autowired + private UserCenter userCenter; + + @Resource + private OutRechargeOrderService outRechargeOrderService; + + @Resource + private TelApiService telApiService; + + @RequestMapping(value="/ ",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "增加订单") + public ResponseData addOrder(@RequestBody OutRechargeOrder outRechargeOrder, HttpServletRequest request) { + try { + + // 用户 + SessionObject sessionObject = userCenter.getSessionObject(request); + HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); + + if (StringUtils.isBlank(outRechargeOrder.getRechargeContent()) || + outRechargeOrder.getPayPrice() == null || + outRechargeOrder.getOrderPrice() == null + ) { + log.error("orderToPay error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + // 支付类型 1.微信支付 + outRechargeOrder.setPayType(1); + // 判断充值模式:1 话费充值 2. 中石化 3. 中石油 + if (outRechargeOrder.getRechargeModel() == 1) { + JSONObject telObject = telApiService.outApiTel(outRechargeOrder.getRechargeContent()); + JSONObject o = telObject.getObject("result",JSONObject.class); + // 拼接内容 + String remarks = o.get("province").toString() + o.get("company").toString(); + outRechargeOrder.setRemarks(remarks); + } else if (outRechargeOrder.getRechargeModel() == 2) { + // 中石油需要姓名和身份证号 + if (StringUtils.isBlank(outRechargeOrder.getRechargeName()) || + StringUtils.isBlank(outRechargeOrder.getIdCard()) + ) { + log.error("orderToPay error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + } + + return null; + + + + } catch (Exception e) { + log.error("HighOrderController -> addOrder() error!",e); + return ResponseMsgUtil.exception(e); + } + } +} diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java index 8b48c744..c56f5fe8 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java @@ -185,7 +185,7 @@ public class WechatPayController { public ResponseData addLedgerReceiver(@RequestParam(value = "tel", required = true) String tel) { try { JSONObject jsonObject = telApiService.outApiTel(tel); - return ResponseMsgUtil.success(jsonObject); + return ResponseMsgUtil.success(jsonObject.get("result")); } catch (Exception e) { log.error("WechatPayController --> wechatNotify() error!", e); return ResponseMsgUtil.exception(e); diff --git a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java new file mode 100644 index 00000000..c0797fdb --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java @@ -0,0 +1,160 @@ +package com.hai.dao; + +import com.hai.entity.OutRechargeOrder; +import com.hai.entity.OutRechargeOrderExample; +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 OutRechargeOrderMapper extends OutRechargeOrderMapperExt { + @SelectProvider(type=OutRechargeOrderSqlProvider.class, method="countByExample") + long countByExample(OutRechargeOrderExample example); + + @DeleteProvider(type=OutRechargeOrderSqlProvider.class, method="deleteByExample") + int deleteByExample(OutRechargeOrderExample example); + + @Delete({ + "delete from out_recharge_order", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into out_recharge_order (order_no, user_id, ", + "user_name, user_phone, ", + "recharge_model, pay_type, ", + "pay_price, order_price, ", + "pay_real_price, pay_serial_no, ", + "`status`, recharge_content, ", + "recharge_name, id_card, ", + "create_timed, pay_time, ", + "cancel_time, finish_time, ", + "remarks)", + "values (#{orderNo,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ", + "#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, ", + "#{rechargeModel,jdbcType=INTEGER}, #{payType,jdbcType=INTEGER}, ", + "#{payPrice,jdbcType=DECIMAL}, #{orderPrice,jdbcType=DECIMAL}, ", + "#{payRealPrice,jdbcType=DECIMAL}, #{paySerialNo,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{rechargeContent,jdbcType=VARCHAR}, ", + "#{rechargeName,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, ", + "#{createTimed,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ", + "#{cancelTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ", + "#{remarks,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(OutRechargeOrder record); + + @InsertProvider(type=OutRechargeOrderSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(OutRechargeOrder record); + + @SelectProvider(type=OutRechargeOrderSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), + @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="recharge_model", property="rechargeModel", jdbcType=JdbcType.INTEGER), + @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), + @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="order_price", property="orderPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="recharge_content", property="rechargeContent", jdbcType=JdbcType.VARCHAR), + @Result(column="recharge_name", property="rechargeName", jdbcType=JdbcType.VARCHAR), + @Result(column="id_card", property="idCard", jdbcType=JdbcType.VARCHAR), + @Result(column="create_timed", property="createTimed", jdbcType=JdbcType.TIMESTAMP), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(OutRechargeOrderExample example); + + @Select({ + "select", + "id, order_no, user_id, user_name, user_phone, recharge_model, pay_type, pay_price, ", + "order_price, pay_real_price, pay_serial_no, `status`, recharge_content, recharge_name, ", + "id_card, create_timed, pay_time, cancel_time, finish_time, remarks", + "from out_recharge_order", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR), + @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="recharge_model", property="rechargeModel", jdbcType=JdbcType.INTEGER), + @Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER), + @Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="order_price", property="orderPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="recharge_content", property="rechargeContent", jdbcType=JdbcType.VARCHAR), + @Result(column="recharge_name", property="rechargeName", jdbcType=JdbcType.VARCHAR), + @Result(column="id_card", property="idCard", jdbcType=JdbcType.VARCHAR), + @Result(column="create_timed", property="createTimed", jdbcType=JdbcType.TIMESTAMP), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR) + }) + OutRechargeOrder selectByPrimaryKey(Long id); + + @UpdateProvider(type=OutRechargeOrderSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") OutRechargeOrder record, @Param("example") OutRechargeOrderExample example); + + @UpdateProvider(type=OutRechargeOrderSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") OutRechargeOrder record, @Param("example") OutRechargeOrderExample example); + + @UpdateProvider(type=OutRechargeOrderSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(OutRechargeOrder record); + + @Update({ + "update out_recharge_order", + "set order_no = #{orderNo,jdbcType=VARCHAR},", + "user_id = #{userId,jdbcType=BIGINT},", + "user_name = #{userName,jdbcType=VARCHAR},", + "user_phone = #{userPhone,jdbcType=VARCHAR},", + "recharge_model = #{rechargeModel,jdbcType=INTEGER},", + "pay_type = #{payType,jdbcType=INTEGER},", + "pay_price = #{payPrice,jdbcType=DECIMAL},", + "order_price = #{orderPrice,jdbcType=DECIMAL},", + "pay_real_price = #{payRealPrice,jdbcType=DECIMAL},", + "pay_serial_no = #{paySerialNo,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "recharge_content = #{rechargeContent,jdbcType=VARCHAR},", + "recharge_name = #{rechargeName,jdbcType=VARCHAR},", + "id_card = #{idCard,jdbcType=VARCHAR},", + "create_timed = #{createTimed,jdbcType=TIMESTAMP},", + "pay_time = #{payTime,jdbcType=TIMESTAMP},", + "cancel_time = #{cancelTime,jdbcType=TIMESTAMP},", + "finish_time = #{finishTime,jdbcType=TIMESTAMP},", + "remarks = #{remarks,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(OutRechargeOrder record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java new file mode 100644 index 00000000..a7df2b37 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface OutRechargeOrderMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java new file mode 100644 index 00000000..9081bf00 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java @@ -0,0 +1,444 @@ +package com.hai.dao; + +import com.hai.entity.OutRechargeOrder; +import com.hai.entity.OutRechargeOrderExample.Criteria; +import com.hai.entity.OutRechargeOrderExample.Criterion; +import com.hai.entity.OutRechargeOrderExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class OutRechargeOrderSqlProvider { + + public String countByExample(OutRechargeOrderExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("out_recharge_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(OutRechargeOrderExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("out_recharge_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(OutRechargeOrder record) { + SQL sql = new SQL(); + sql.INSERT_INTO("out_recharge_order"); + + if (record.getOrderNo() != null) { + sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); + } + + if (record.getUserName() != null) { + sql.VALUES("user_name", "#{userName,jdbcType=VARCHAR}"); + } + + if (record.getUserPhone() != null) { + sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}"); + } + + if (record.getRechargeModel() != null) { + sql.VALUES("recharge_model", "#{rechargeModel,jdbcType=INTEGER}"); + } + + if (record.getPayType() != null) { + sql.VALUES("pay_type", "#{payType,jdbcType=INTEGER}"); + } + + if (record.getPayPrice() != null) { + sql.VALUES("pay_price", "#{payPrice,jdbcType=DECIMAL}"); + } + + if (record.getOrderPrice() != null) { + sql.VALUES("order_price", "#{orderPrice,jdbcType=DECIMAL}"); + } + + if (record.getPayRealPrice() != null) { + sql.VALUES("pay_real_price", "#{payRealPrice,jdbcType=DECIMAL}"); + } + + if (record.getPaySerialNo() != null) { + sql.VALUES("pay_serial_no", "#{paySerialNo,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getRechargeContent() != null) { + sql.VALUES("recharge_content", "#{rechargeContent,jdbcType=VARCHAR}"); + } + + if (record.getRechargeName() != null) { + sql.VALUES("recharge_name", "#{rechargeName,jdbcType=VARCHAR}"); + } + + if (record.getIdCard() != null) { + sql.VALUES("id_card", "#{idCard,jdbcType=VARCHAR}"); + } + + if (record.getCreateTimed() != null) { + sql.VALUES("create_timed", "#{createTimed,jdbcType=TIMESTAMP}"); + } + + if (record.getPayTime() != null) { + sql.VALUES("pay_time", "#{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCancelTime() != null) { + sql.VALUES("cancel_time", "#{cancelTime,jdbcType=TIMESTAMP}"); + } + + if (record.getFinishTime() != null) { + sql.VALUES("finish_time", "#{finishTime,jdbcType=TIMESTAMP}"); + } + + if (record.getRemarks() != null) { + sql.VALUES("remarks", "#{remarks,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(OutRechargeOrderExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("order_no"); + sql.SELECT("user_id"); + sql.SELECT("user_name"); + sql.SELECT("user_phone"); + sql.SELECT("recharge_model"); + sql.SELECT("pay_type"); + sql.SELECT("pay_price"); + sql.SELECT("order_price"); + sql.SELECT("pay_real_price"); + sql.SELECT("pay_serial_no"); + sql.SELECT("`status`"); + sql.SELECT("recharge_content"); + sql.SELECT("recharge_name"); + sql.SELECT("id_card"); + sql.SELECT("create_timed"); + sql.SELECT("pay_time"); + sql.SELECT("cancel_time"); + sql.SELECT("finish_time"); + sql.SELECT("remarks"); + sql.FROM("out_recharge_order"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + OutRechargeOrder record = (OutRechargeOrder) parameter.get("record"); + OutRechargeOrderExample example = (OutRechargeOrderExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("out_recharge_order"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + } + + if (record.getUserName() != null) { + sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); + } + + if (record.getUserPhone() != null) { + sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); + } + + if (record.getRechargeModel() != null) { + sql.SET("recharge_model = #{record.rechargeModel,jdbcType=INTEGER}"); + } + + if (record.getPayType() != null) { + sql.SET("pay_type = #{record.payType,jdbcType=INTEGER}"); + } + + if (record.getPayPrice() != null) { + sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}"); + } + + if (record.getOrderPrice() != null) { + sql.SET("order_price = #{record.orderPrice,jdbcType=DECIMAL}"); + } + + if (record.getPayRealPrice() != null) { + sql.SET("pay_real_price = #{record.payRealPrice,jdbcType=DECIMAL}"); + } + + if (record.getPaySerialNo() != null) { + sql.SET("pay_serial_no = #{record.paySerialNo,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getRechargeContent() != null) { + sql.SET("recharge_content = #{record.rechargeContent,jdbcType=VARCHAR}"); + } + + if (record.getRechargeName() != null) { + sql.SET("recharge_name = #{record.rechargeName,jdbcType=VARCHAR}"); + } + + if (record.getIdCard() != null) { + sql.SET("id_card = #{record.idCard,jdbcType=VARCHAR}"); + } + + if (record.getCreateTimed() != null) { + sql.SET("create_timed = #{record.createTimed,jdbcType=TIMESTAMP}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCancelTime() != null) { + sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}"); + } + + if (record.getFinishTime() != null) { + sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}"); + } + + if (record.getRemarks() != null) { + sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("out_recharge_order"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}"); + sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); + sql.SET("recharge_model = #{record.rechargeModel,jdbcType=INTEGER}"); + sql.SET("pay_type = #{record.payType,jdbcType=INTEGER}"); + sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}"); + sql.SET("order_price = #{record.orderPrice,jdbcType=DECIMAL}"); + sql.SET("pay_real_price = #{record.payRealPrice,jdbcType=DECIMAL}"); + sql.SET("pay_serial_no = #{record.paySerialNo,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("recharge_content = #{record.rechargeContent,jdbcType=VARCHAR}"); + sql.SET("recharge_name = #{record.rechargeName,jdbcType=VARCHAR}"); + sql.SET("id_card = #{record.idCard,jdbcType=VARCHAR}"); + sql.SET("create_timed = #{record.createTimed,jdbcType=TIMESTAMP}"); + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}"); + sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}"); + sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}"); + + OutRechargeOrderExample example = (OutRechargeOrderExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(OutRechargeOrder record) { + SQL sql = new SQL(); + sql.UPDATE("out_recharge_order"); + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=BIGINT}"); + } + + if (record.getUserName() != null) { + sql.SET("user_name = #{userName,jdbcType=VARCHAR}"); + } + + if (record.getUserPhone() != null) { + sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}"); + } + + if (record.getRechargeModel() != null) { + sql.SET("recharge_model = #{rechargeModel,jdbcType=INTEGER}"); + } + + if (record.getPayType() != null) { + sql.SET("pay_type = #{payType,jdbcType=INTEGER}"); + } + + if (record.getPayPrice() != null) { + sql.SET("pay_price = #{payPrice,jdbcType=DECIMAL}"); + } + + if (record.getOrderPrice() != null) { + sql.SET("order_price = #{orderPrice,jdbcType=DECIMAL}"); + } + + if (record.getPayRealPrice() != null) { + sql.SET("pay_real_price = #{payRealPrice,jdbcType=DECIMAL}"); + } + + if (record.getPaySerialNo() != null) { + sql.SET("pay_serial_no = #{paySerialNo,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getRechargeContent() != null) { + sql.SET("recharge_content = #{rechargeContent,jdbcType=VARCHAR}"); + } + + if (record.getRechargeName() != null) { + sql.SET("recharge_name = #{rechargeName,jdbcType=VARCHAR}"); + } + + if (record.getIdCard() != null) { + sql.SET("id_card = #{idCard,jdbcType=VARCHAR}"); + } + + if (record.getCreateTimed() != null) { + sql.SET("create_timed = #{createTimed,jdbcType=TIMESTAMP}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCancelTime() != null) { + sql.SET("cancel_time = #{cancelTime,jdbcType=TIMESTAMP}"); + } + + if (record.getFinishTime() != null) { + sql.SET("finish_time = #{finishTime,jdbcType=TIMESTAMP}"); + } + + if (record.getRemarks() != null) { + sql.SET("remarks = #{remarks,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, OutRechargeOrderExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java b/hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java new file mode 100644 index 00000000..f79c47b7 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java @@ -0,0 +1,366 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * out_recharge_order + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class OutRechargeOrder implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 订单流水号 + */ + private String orderNo; + + /** + * 用户表ID + */ + private Long userId; + + /** + * 用户名称 + */ + private String userName; + + /** + * 用户电话 + */ + private String userPhone; + + /** + * 充值模式:1 话费充值 2. 中石化 3. 中石油 + */ + private Integer rechargeModel; + + /** + * 1.微信 + */ + private Integer payType; + + /** + * 支付金额 + */ + private Long payPrice; + + /** + * 订单充值金额 + */ + private Long orderPrice; + + /** + * 实际金额 + */ + private Long payRealPrice; + + /** + * 支付流水号 + */ + private String paySerialNo; + + /** + * 订单状态 : 1.待支付 2.已支付 3.已完成 4.已退款 5.已取消 + */ + private Integer status; + + /** + * 充值内容(电话号码, 卡号) + */ + private String rechargeContent; + + /** + * 中石油需要的持卡人姓名 + */ + private String rechargeName; + + /** + * 中石油需要持卡人身份证 + */ + private String idCard; + + /** + * 生成时间 + */ + private Date createTimed; + + /** + * 支付时间 + */ + private Date payTime; + + /** + * 取消时间 + */ + private Date cancelTime; + + /** + * 完成时间 + */ + private Date finishTime; + + private String remarks; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + + public Integer getRechargeModel() { + return rechargeModel; + } + + public void setRechargeModel(Integer rechargeModel) { + this.rechargeModel = rechargeModel; + } + + public Integer getPayType() { + return payType; + } + + public void setPayType(Integer payType) { + this.payType = payType; + } + + public Long getPayPrice() { + return payPrice; + } + + public void setPayPrice(Long payPrice) { + this.payPrice = payPrice; + } + + public Long getOrderPrice() { + return orderPrice; + } + + public void setOrderPrice(Long orderPrice) { + this.orderPrice = orderPrice; + } + + public Long getPayRealPrice() { + return payRealPrice; + } + + public void setPayRealPrice(Long payRealPrice) { + this.payRealPrice = payRealPrice; + } + + public String getPaySerialNo() { + return paySerialNo; + } + + public void setPaySerialNo(String paySerialNo) { + this.paySerialNo = paySerialNo; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getRechargeContent() { + return rechargeContent; + } + + public void setRechargeContent(String rechargeContent) { + this.rechargeContent = rechargeContent; + } + + public String getRechargeName() { + return rechargeName; + } + + public void setRechargeName(String rechargeName) { + this.rechargeName = rechargeName; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard; + } + + public Date getCreateTimed() { + return createTimed; + } + + public void setCreateTimed(Date createTimed) { + this.createTimed = createTimed; + } + + public Date getPayTime() { + return payTime; + } + + public void setPayTime(Date payTime) { + this.payTime = payTime; + } + + public Date getCancelTime() { + return cancelTime; + } + + public void setCancelTime(Date cancelTime) { + this.cancelTime = cancelTime; + } + + public Date getFinishTime() { + return finishTime; + } + + public void setFinishTime(Date finishTime) { + this.finishTime = finishTime; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + OutRechargeOrder other = (OutRechargeOrder) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName())) + && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) + && (this.getRechargeModel() == null ? other.getRechargeModel() == null : this.getRechargeModel().equals(other.getRechargeModel())) + && (this.getPayType() == null ? other.getPayType() == null : this.getPayType().equals(other.getPayType())) + && (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice())) + && (this.getOrderPrice() == null ? other.getOrderPrice() == null : this.getOrderPrice().equals(other.getOrderPrice())) + && (this.getPayRealPrice() == null ? other.getPayRealPrice() == null : this.getPayRealPrice().equals(other.getPayRealPrice())) + && (this.getPaySerialNo() == null ? other.getPaySerialNo() == null : this.getPaySerialNo().equals(other.getPaySerialNo())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getRechargeContent() == null ? other.getRechargeContent() == null : this.getRechargeContent().equals(other.getRechargeContent())) + && (this.getRechargeName() == null ? other.getRechargeName() == null : this.getRechargeName().equals(other.getRechargeName())) + && (this.getIdCard() == null ? other.getIdCard() == null : this.getIdCard().equals(other.getIdCard())) + && (this.getCreateTimed() == null ? other.getCreateTimed() == null : this.getCreateTimed().equals(other.getCreateTimed())) + && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime())) + && (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime())) + && (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); + result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); + result = prime * result + ((getRechargeModel() == null) ? 0 : getRechargeModel().hashCode()); + result = prime * result + ((getPayType() == null) ? 0 : getPayType().hashCode()); + result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode()); + result = prime * result + ((getOrderPrice() == null) ? 0 : getOrderPrice().hashCode()); + result = prime * result + ((getPayRealPrice() == null) ? 0 : getPayRealPrice().hashCode()); + result = prime * result + ((getPaySerialNo() == null) ? 0 : getPaySerialNo().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getRechargeContent() == null) ? 0 : getRechargeContent().hashCode()); + result = prime * result + ((getRechargeName() == null) ? 0 : getRechargeName().hashCode()); + result = prime * result + ((getIdCard() == null) ? 0 : getIdCard().hashCode()); + result = prime * result + ((getCreateTimed() == null) ? 0 : getCreateTimed().hashCode()); + result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode()); + result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode()); + result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", orderNo=").append(orderNo); + sb.append(", userId=").append(userId); + sb.append(", userName=").append(userName); + sb.append(", userPhone=").append(userPhone); + sb.append(", rechargeModel=").append(rechargeModel); + sb.append(", payType=").append(payType); + sb.append(", payPrice=").append(payPrice); + sb.append(", orderPrice=").append(orderPrice); + sb.append(", payRealPrice=").append(payRealPrice); + sb.append(", paySerialNo=").append(paySerialNo); + sb.append(", status=").append(status); + sb.append(", rechargeContent=").append(rechargeContent); + sb.append(", rechargeName=").append(rechargeName); + sb.append(", idCard=").append(idCard); + sb.append(", createTimed=").append(createTimed); + sb.append(", payTime=").append(payTime); + sb.append(", cancelTime=").append(cancelTime); + sb.append(", finishTime=").append(finishTime); + sb.append(", remarks=").append(remarks); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java b/hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java new file mode 100644 index 00000000..7aadceb3 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java @@ -0,0 +1,1503 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class OutRechargeOrderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public OutRechargeOrderExample() { + 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 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 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 andUserNameIsNull() { + addCriterion("user_name is null"); + return (Criteria) this; + } + + public Criteria andUserNameIsNotNull() { + addCriterion("user_name is not null"); + return (Criteria) this; + } + + public Criteria andUserNameEqualTo(String value) { + addCriterion("user_name =", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotEqualTo(String value) { + addCriterion("user_name <>", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameGreaterThan(String value) { + addCriterion("user_name >", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameGreaterThanOrEqualTo(String value) { + addCriterion("user_name >=", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLessThan(String value) { + addCriterion("user_name <", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLessThanOrEqualTo(String value) { + addCriterion("user_name <=", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLike(String value) { + addCriterion("user_name like", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotLike(String value) { + addCriterion("user_name not like", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameIn(List values) { + addCriterion("user_name in", values, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotIn(List values) { + addCriterion("user_name not in", values, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameBetween(String value1, String value2) { + addCriterion("user_name between", value1, value2, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotBetween(String value1, String value2) { + addCriterion("user_name not between", value1, value2, "userName"); + return (Criteria) this; + } + + public Criteria andUserPhoneIsNull() { + addCriterion("user_phone is null"); + return (Criteria) this; + } + + public Criteria andUserPhoneIsNotNull() { + addCriterion("user_phone is not null"); + return (Criteria) this; + } + + public Criteria andUserPhoneEqualTo(String value) { + addCriterion("user_phone =", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotEqualTo(String value) { + addCriterion("user_phone <>", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneGreaterThan(String value) { + addCriterion("user_phone >", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneGreaterThanOrEqualTo(String value) { + addCriterion("user_phone >=", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLessThan(String value) { + addCriterion("user_phone <", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLessThanOrEqualTo(String value) { + addCriterion("user_phone <=", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLike(String value) { + addCriterion("user_phone like", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotLike(String value) { + addCriterion("user_phone not like", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneIn(List values) { + addCriterion("user_phone in", values, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotIn(List values) { + addCriterion("user_phone not in", values, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneBetween(String value1, String value2) { + addCriterion("user_phone between", value1, value2, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotBetween(String value1, String value2) { + addCriterion("user_phone not between", value1, value2, "userPhone"); + return (Criteria) this; + } + + public Criteria andRechargeModelIsNull() { + addCriterion("recharge_model is null"); + return (Criteria) this; + } + + public Criteria andRechargeModelIsNotNull() { + addCriterion("recharge_model is not null"); + return (Criteria) this; + } + + public Criteria andRechargeModelEqualTo(Integer value) { + addCriterion("recharge_model =", value, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andRechargeModelNotEqualTo(Integer value) { + addCriterion("recharge_model <>", value, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andRechargeModelGreaterThan(Integer value) { + addCriterion("recharge_model >", value, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andRechargeModelGreaterThanOrEqualTo(Integer value) { + addCriterion("recharge_model >=", value, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andRechargeModelLessThan(Integer value) { + addCriterion("recharge_model <", value, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andRechargeModelLessThanOrEqualTo(Integer value) { + addCriterion("recharge_model <=", value, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andRechargeModelIn(List values) { + addCriterion("recharge_model in", values, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andRechargeModelNotIn(List values) { + addCriterion("recharge_model not in", values, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andRechargeModelBetween(Integer value1, Integer value2) { + addCriterion("recharge_model between", value1, value2, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andRechargeModelNotBetween(Integer value1, Integer value2) { + addCriterion("recharge_model not between", value1, value2, "rechargeModel"); + return (Criteria) this; + } + + public Criteria andPayTypeIsNull() { + addCriterion("pay_type is null"); + return (Criteria) this; + } + + public Criteria andPayTypeIsNotNull() { + addCriterion("pay_type is not null"); + return (Criteria) this; + } + + public Criteria andPayTypeEqualTo(Integer value) { + addCriterion("pay_type =", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeNotEqualTo(Integer value) { + addCriterion("pay_type <>", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeGreaterThan(Integer value) { + addCriterion("pay_type >", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("pay_type >=", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeLessThan(Integer value) { + addCriterion("pay_type <", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeLessThanOrEqualTo(Integer value) { + addCriterion("pay_type <=", value, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeIn(List values) { + addCriterion("pay_type in", values, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeNotIn(List values) { + addCriterion("pay_type not in", values, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeBetween(Integer value1, Integer value2) { + addCriterion("pay_type between", value1, value2, "payType"); + return (Criteria) this; + } + + public Criteria andPayTypeNotBetween(Integer value1, Integer value2) { + addCriterion("pay_type not between", value1, value2, "payType"); + return (Criteria) this; + } + + public Criteria andPayPriceIsNull() { + addCriterion("pay_price is null"); + return (Criteria) this; + } + + public Criteria andPayPriceIsNotNull() { + addCriterion("pay_price is not null"); + return (Criteria) this; + } + + public Criteria andPayPriceEqualTo(Long value) { + addCriterion("pay_price =", value, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceNotEqualTo(Long value) { + addCriterion("pay_price <>", value, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceGreaterThan(Long value) { + addCriterion("pay_price >", value, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceGreaterThanOrEqualTo(Long value) { + addCriterion("pay_price >=", value, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceLessThan(Long value) { + addCriterion("pay_price <", value, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceLessThanOrEqualTo(Long value) { + addCriterion("pay_price <=", value, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceIn(List values) { + addCriterion("pay_price in", values, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceNotIn(List values) { + addCriterion("pay_price not in", values, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceBetween(Long value1, Long value2) { + addCriterion("pay_price between", value1, value2, "payPrice"); + return (Criteria) this; + } + + public Criteria andPayPriceNotBetween(Long value1, Long value2) { + addCriterion("pay_price not between", value1, value2, "payPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceIsNull() { + addCriterion("order_price is null"); + return (Criteria) this; + } + + public Criteria andOrderPriceIsNotNull() { + addCriterion("order_price is not null"); + return (Criteria) this; + } + + public Criteria andOrderPriceEqualTo(Long value) { + addCriterion("order_price =", value, "orderPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceNotEqualTo(Long value) { + addCriterion("order_price <>", value, "orderPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceGreaterThan(Long value) { + addCriterion("order_price >", value, "orderPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceGreaterThanOrEqualTo(Long value) { + addCriterion("order_price >=", value, "orderPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceLessThan(Long value) { + addCriterion("order_price <", value, "orderPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceLessThanOrEqualTo(Long value) { + addCriterion("order_price <=", value, "orderPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceIn(List values) { + addCriterion("order_price in", values, "orderPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceNotIn(List values) { + addCriterion("order_price not in", values, "orderPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceBetween(Long value1, Long value2) { + addCriterion("order_price between", value1, value2, "orderPrice"); + return (Criteria) this; + } + + public Criteria andOrderPriceNotBetween(Long value1, Long value2) { + addCriterion("order_price not between", value1, value2, "orderPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceIsNull() { + addCriterion("pay_real_price is null"); + return (Criteria) this; + } + + public Criteria andPayRealPriceIsNotNull() { + addCriterion("pay_real_price is not null"); + return (Criteria) this; + } + + public Criteria andPayRealPriceEqualTo(Long value) { + addCriterion("pay_real_price =", value, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceNotEqualTo(Long value) { + addCriterion("pay_real_price <>", value, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceGreaterThan(Long value) { + addCriterion("pay_real_price >", value, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceGreaterThanOrEqualTo(Long value) { + addCriterion("pay_real_price >=", value, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceLessThan(Long value) { + addCriterion("pay_real_price <", value, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceLessThanOrEqualTo(Long value) { + addCriterion("pay_real_price <=", value, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceIn(List values) { + addCriterion("pay_real_price in", values, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceNotIn(List values) { + addCriterion("pay_real_price not in", values, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceBetween(Long value1, Long value2) { + addCriterion("pay_real_price between", value1, value2, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPayRealPriceNotBetween(Long value1, Long value2) { + addCriterion("pay_real_price not between", value1, value2, "payRealPrice"); + return (Criteria) this; + } + + public Criteria andPaySerialNoIsNull() { + addCriterion("pay_serial_no is null"); + return (Criteria) this; + } + + public Criteria andPaySerialNoIsNotNull() { + addCriterion("pay_serial_no is not null"); + return (Criteria) this; + } + + public Criteria andPaySerialNoEqualTo(String value) { + addCriterion("pay_serial_no =", value, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoNotEqualTo(String value) { + addCriterion("pay_serial_no <>", value, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoGreaterThan(String value) { + addCriterion("pay_serial_no >", value, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoGreaterThanOrEqualTo(String value) { + addCriterion("pay_serial_no >=", value, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoLessThan(String value) { + addCriterion("pay_serial_no <", value, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoLessThanOrEqualTo(String value) { + addCriterion("pay_serial_no <=", value, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoLike(String value) { + addCriterion("pay_serial_no like", value, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoNotLike(String value) { + addCriterion("pay_serial_no not like", value, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoIn(List values) { + addCriterion("pay_serial_no in", values, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoNotIn(List values) { + addCriterion("pay_serial_no not in", values, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoBetween(String value1, String value2) { + addCriterion("pay_serial_no between", value1, value2, "paySerialNo"); + return (Criteria) this; + } + + public Criteria andPaySerialNoNotBetween(String value1, String value2) { + addCriterion("pay_serial_no not between", value1, value2, "paySerialNo"); + 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 andRechargeContentIsNull() { + addCriterion("recharge_content is null"); + return (Criteria) this; + } + + public Criteria andRechargeContentIsNotNull() { + addCriterion("recharge_content is not null"); + return (Criteria) this; + } + + public Criteria andRechargeContentEqualTo(String value) { + addCriterion("recharge_content =", value, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentNotEqualTo(String value) { + addCriterion("recharge_content <>", value, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentGreaterThan(String value) { + addCriterion("recharge_content >", value, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentGreaterThanOrEqualTo(String value) { + addCriterion("recharge_content >=", value, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentLessThan(String value) { + addCriterion("recharge_content <", value, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentLessThanOrEqualTo(String value) { + addCriterion("recharge_content <=", value, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentLike(String value) { + addCriterion("recharge_content like", value, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentNotLike(String value) { + addCriterion("recharge_content not like", value, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentIn(List values) { + addCriterion("recharge_content in", values, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentNotIn(List values) { + addCriterion("recharge_content not in", values, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentBetween(String value1, String value2) { + addCriterion("recharge_content between", value1, value2, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeContentNotBetween(String value1, String value2) { + addCriterion("recharge_content not between", value1, value2, "rechargeContent"); + return (Criteria) this; + } + + public Criteria andRechargeNameIsNull() { + addCriterion("recharge_name is null"); + return (Criteria) this; + } + + public Criteria andRechargeNameIsNotNull() { + addCriterion("recharge_name is not null"); + return (Criteria) this; + } + + public Criteria andRechargeNameEqualTo(String value) { + addCriterion("recharge_name =", value, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameNotEqualTo(String value) { + addCriterion("recharge_name <>", value, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameGreaterThan(String value) { + addCriterion("recharge_name >", value, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameGreaterThanOrEqualTo(String value) { + addCriterion("recharge_name >=", value, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameLessThan(String value) { + addCriterion("recharge_name <", value, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameLessThanOrEqualTo(String value) { + addCriterion("recharge_name <=", value, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameLike(String value) { + addCriterion("recharge_name like", value, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameNotLike(String value) { + addCriterion("recharge_name not like", value, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameIn(List values) { + addCriterion("recharge_name in", values, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameNotIn(List values) { + addCriterion("recharge_name not in", values, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameBetween(String value1, String value2) { + addCriterion("recharge_name between", value1, value2, "rechargeName"); + return (Criteria) this; + } + + public Criteria andRechargeNameNotBetween(String value1, String value2) { + addCriterion("recharge_name not between", value1, value2, "rechargeName"); + return (Criteria) this; + } + + public Criteria andIdCardIsNull() { + addCriterion("id_card is null"); + return (Criteria) this; + } + + public Criteria andIdCardIsNotNull() { + addCriterion("id_card is not null"); + return (Criteria) this; + } + + public Criteria andIdCardEqualTo(String value) { + addCriterion("id_card =", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotEqualTo(String value) { + addCriterion("id_card <>", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThan(String value) { + addCriterion("id_card >", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThanOrEqualTo(String value) { + addCriterion("id_card >=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThan(String value) { + addCriterion("id_card <", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThanOrEqualTo(String value) { + addCriterion("id_card <=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLike(String value) { + addCriterion("id_card like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotLike(String value) { + addCriterion("id_card not like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardIn(List values) { + addCriterion("id_card in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotIn(List values) { + addCriterion("id_card not in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardBetween(String value1, String value2) { + addCriterion("id_card between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotBetween(String value1, String value2) { + addCriterion("id_card not between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andCreateTimedIsNull() { + addCriterion("create_timed is null"); + return (Criteria) this; + } + + public Criteria andCreateTimedIsNotNull() { + addCriterion("create_timed is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimedEqualTo(Date value) { + addCriterion("create_timed =", value, "createTimed"); + return (Criteria) this; + } + + public Criteria andCreateTimedNotEqualTo(Date value) { + addCriterion("create_timed <>", value, "createTimed"); + return (Criteria) this; + } + + public Criteria andCreateTimedGreaterThan(Date value) { + addCriterion("create_timed >", value, "createTimed"); + return (Criteria) this; + } + + public Criteria andCreateTimedGreaterThanOrEqualTo(Date value) { + addCriterion("create_timed >=", value, "createTimed"); + return (Criteria) this; + } + + public Criteria andCreateTimedLessThan(Date value) { + addCriterion("create_timed <", value, "createTimed"); + return (Criteria) this; + } + + public Criteria andCreateTimedLessThanOrEqualTo(Date value) { + addCriterion("create_timed <=", value, "createTimed"); + return (Criteria) this; + } + + public Criteria andCreateTimedIn(List values) { + addCriterion("create_timed in", values, "createTimed"); + return (Criteria) this; + } + + public Criteria andCreateTimedNotIn(List values) { + addCriterion("create_timed not in", values, "createTimed"); + return (Criteria) this; + } + + public Criteria andCreateTimedBetween(Date value1, Date value2) { + addCriterion("create_timed between", value1, value2, "createTimed"); + return (Criteria) this; + } + + public Criteria andCreateTimedNotBetween(Date value1, Date value2) { + addCriterion("create_timed not between", value1, value2, "createTimed"); + return (Criteria) this; + } + + public Criteria andPayTimeIsNull() { + addCriterion("pay_time is null"); + return (Criteria) this; + } + + public Criteria andPayTimeIsNotNull() { + addCriterion("pay_time is not null"); + return (Criteria) this; + } + + public Criteria andPayTimeEqualTo(Date value) { + addCriterion("pay_time =", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotEqualTo(Date value) { + addCriterion("pay_time <>", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThan(Date value) { + addCriterion("pay_time >", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThanOrEqualTo(Date value) { + addCriterion("pay_time >=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThan(Date value) { + addCriterion("pay_time <", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThanOrEqualTo(Date value) { + addCriterion("pay_time <=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeIn(List values) { + addCriterion("pay_time in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotIn(List values) { + addCriterion("pay_time not in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeBetween(Date value1, Date value2) { + addCriterion("pay_time between", value1, value2, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotBetween(Date value1, Date value2) { + addCriterion("pay_time not between", value1, value2, "payTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeIsNull() { + addCriterion("cancel_time is null"); + return (Criteria) this; + } + + public Criteria andCancelTimeIsNotNull() { + addCriterion("cancel_time is not null"); + return (Criteria) this; + } + + public Criteria andCancelTimeEqualTo(Date value) { + addCriterion("cancel_time =", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeNotEqualTo(Date value) { + addCriterion("cancel_time <>", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeGreaterThan(Date value) { + addCriterion("cancel_time >", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeGreaterThanOrEqualTo(Date value) { + addCriterion("cancel_time >=", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeLessThan(Date value) { + addCriterion("cancel_time <", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeLessThanOrEqualTo(Date value) { + addCriterion("cancel_time <=", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeIn(List values) { + addCriterion("cancel_time in", values, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeNotIn(List values) { + addCriterion("cancel_time not in", values, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeBetween(Date value1, Date value2) { + addCriterion("cancel_time between", value1, value2, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeNotBetween(Date value1, Date value2) { + addCriterion("cancel_time not between", value1, value2, "cancelTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNull() { + addCriterion("finish_time is null"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNotNull() { + addCriterion("finish_time is not null"); + return (Criteria) this; + } + + public Criteria andFinishTimeEqualTo(Date value) { + addCriterion("finish_time =", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotEqualTo(Date value) { + addCriterion("finish_time <>", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThan(Date value) { + addCriterion("finish_time >", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThanOrEqualTo(Date value) { + addCriterion("finish_time >=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThan(Date value) { + addCriterion("finish_time <", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThanOrEqualTo(Date value) { + addCriterion("finish_time <=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeIn(List values) { + addCriterion("finish_time in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotIn(List values) { + addCriterion("finish_time not in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeBetween(Date value1, Date value2) { + addCriterion("finish_time between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotBetween(Date value1, Date value2) { + addCriterion("finish_time not between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java b/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java new file mode 100644 index 00000000..2086ac95 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java @@ -0,0 +1,55 @@ +package com.hai.service; + +import com.hai.entity.OutRechargeOrder; + +import java.util.List; +import java.util.Map; + +public interface OutRechargeOrderService { + + /** + * @Author Sum1Dream + * @Description // 查询充值订单 + * @Date 15:18 2021/6/11 + * @Param [map] + * @return java.util.List + **/ + List getListRechargeOrder(Map map); + + /** + * @Author Sum1Dream + * @Description // 根据订单ID查询订单 + * @Date 15:19 2021/6/11 + * @Param [orderId] + * @return com.hai.entity.OutRechargeOrder + **/ + OutRechargeOrder findByOrderId(Long orderId); + + /** + * @Author Sum1Dream + * @Description // 根据订单号查询订单 + * @Date 15:20 2021/6/11 + * @Param [orderNo] + * @return com.hai.entity.OutRechargeOrder + **/ + OutRechargeOrder findByOrderNo(String orderNo); + + /*** + * @Author Sum1Dream + * @Description // 新增订单 + * @Date 15:25 2021/6/11 + * @Param [outRechargeOrder] + * @return void + **/ + void insertOrder(OutRechargeOrder outRechargeOrder); + + /*** + * @Author Sum1Dream + * @Description // 修改订单 + * @Date 15:26 2021/6/11 + * @Param [outRechargeOrder] + * @return void + **/ + void updateOrder(OutRechargeOrder outRechargeOrder); + +} diff --git a/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java new file mode 100644 index 00000000..dfbd58eb --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java @@ -0,0 +1,50 @@ +package com.hai.service.impl; + +import com.hai.dao.OutRechargeOrderMapper; +import com.hai.entity.OutRechargeOrder; +import com.hai.entity.OutRechargeOrderExample; +import com.hai.service.OutRechargeOrderService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestParam; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; + +@Service("outRechargeOrderService") +public class OutRechargeOrderServiceImpl implements OutRechargeOrderService { + + @Resource + private OutRechargeOrderMapper outRechargeOrderMapper; + + @Override + public List getListRechargeOrder(Map map) { + return null; + } + + @Override + public OutRechargeOrder findByOrderId(Long orderId) { + return outRechargeOrderMapper.selectByPrimaryKey(orderId); + } + + @Override + public OutRechargeOrder findByOrderNo(String orderNo) { + OutRechargeOrderExample example = new OutRechargeOrderExample(); + example.createCriteria().andOrderNoEqualTo(orderNo); + return outRechargeOrderMapper.selectByExample(example).get(0); + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void insertOrder(OutRechargeOrder outRechargeOrder) { + outRechargeOrderMapper.insert(outRechargeOrder); + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void updateOrder(OutRechargeOrder outRechargeOrder) { + outRechargeOrderMapper.updateByPrimaryKey(outRechargeOrder); + } +}