From a7f89b841cdbc879eafe0451b7c20aecfdd70693 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 24 Oct 2023 14:53:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cweb/controller/TestController.java | 10 +- .../controller/v1/FundManageController.java | 125 ++ .../service/TianQueFundManageService.java | 80 + .../hfkj/dao/BsTransferAccountsMapper.java | 163 ++ .../hfkj/dao/BsTransferAccountsMapperExt.java | 7 + .../dao/BsTransferAccountsSqlProvider.java | 458 +++++ .../com/hfkj/entity/BsTransferAccounts.java | 374 ++++ .../entity/BsTransferAccountsExample.java | 1611 +++++++++++++++++ .../RequestQueryTransferInfoModel.java | 38 + .../request/RequestTransferAccountsModel.java | 51 + .../ResponseTransferAccountsModel.java | 61 + .../OpenApiTransferAccountsService.java | 31 + .../OpenApiTransferAccountsServiceImpl.java | 102 ++ .../hfkj/openapi/v1/utils/SignatureUtil.java | 12 +- .../service/BsTransferAccountsService.java | 25 + .../impl/BsTransferAccountsServiceImpl.java | 67 + .../sysenum/TransferAccountsCreateType.java | 49 + .../hfkj/sysenum/TransferAccountsStatus.java | 52 + 18 files changed, 3303 insertions(+), 13 deletions(-) create mode 100644 open-api/src/main/java/com/api/controller/v1/FundManageController.java create mode 100644 service/src/main/java/com/hfkj/channel/tianque/service/TianQueFundManageService.java create mode 100644 service/src/main/java/com/hfkj/dao/BsTransferAccountsMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/BsTransferAccountsMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/BsTransferAccountsSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/entity/BsTransferAccounts.java create mode 100644 service/src/main/java/com/hfkj/entity/BsTransferAccountsExample.java create mode 100644 service/src/main/java/com/hfkj/openapi/v1/model/request/RequestQueryTransferInfoModel.java create mode 100644 service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java create mode 100644 service/src/main/java/com/hfkj/openapi/v1/model/response/ResponseTransferAccountsModel.java create mode 100644 service/src/main/java/com/hfkj/openapi/v1/service/OpenApiTransferAccountsService.java create mode 100644 service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java create mode 100644 service/src/main/java/com/hfkj/service/BsTransferAccountsService.java create mode 100644 service/src/main/java/com/hfkj/service/impl/BsTransferAccountsServiceImpl.java create mode 100644 service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java create mode 100644 service/src/main/java/com/hfkj/sysenum/TransferAccountsStatus.java diff --git a/cweb/src/main/java/com/cweb/controller/TestController.java b/cweb/src/main/java/com/cweb/controller/TestController.java index 50446a2..ad3c5ad 100644 --- a/cweb/src/main/java/com/cweb/controller/TestController.java +++ b/cweb/src/main/java/com/cweb/controller/TestController.java @@ -11,10 +11,7 @@ import com.hfkj.channel.saas.SaasActivityService; import com.hfkj.channel.saas.SaasMerService; import com.hfkj.channel.saas.utils.SaasCommon; import com.hfkj.channel.saas.utils.SaasMerRequest; -import com.hfkj.channel.tianque.service.TianQueMerElecSignService; -import com.hfkj.channel.tianque.service.TianQueMerService; -import com.hfkj.channel.tianque.service.TianQueSeparateService; -import com.hfkj.channel.tianque.service.TianQueTradeService; +import com.hfkj.channel.tianque.service.*; import com.hfkj.channel.weixin.WeiXinMerService; import com.hfkj.channel.weixin.utils.WxUtils; import com.hfkj.channel.weixin.utils.sdk.WXPayConstants; @@ -259,6 +256,8 @@ public class TestController { private TianQueSeparateService tianQueSeparateService; @Resource private TianQueMerElecSignService tianQueMerElecSignService; + @Resource + private TianQueFundManageService tianQueFundManageService; @RequestMapping(value="/tianQueTest",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "tianQueTest") @@ -275,7 +274,8 @@ public class TestController { //return ResponseMsgUtil.success(tianQueMerService.weChatPayConf("399230921077727", "597456493", "01", "wxa075e8509802f826", "00", "")); // return ResponseMsgUtil.success(tianQueMerService.queryConf("399230921077727", "597456493")); - return ResponseMsgUtil.success(tianQueSeparateService.queryAmt(code)); + // return ResponseMsgUtil.success(tianQueSeparateService.queryAmt(code)); + return ResponseMsgUtil.success(tianQueFundManageService.getTransferInfo(code)); // 1200 // return ResponseMsgUtil.success(saasCommon.fileUpload(new HashMap<>())); /* AlipaySystemOauthTokenRequest request = new AlipaySystemOauthTokenRequest(); diff --git a/open-api/src/main/java/com/api/controller/v1/FundManageController.java b/open-api/src/main/java/com/api/controller/v1/FundManageController.java new file mode 100644 index 0000000..2e7904e --- /dev/null +++ b/open-api/src/main/java/com/api/controller/v1/FundManageController.java @@ -0,0 +1,125 @@ +package com.api.controller.v1; + +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.ResponseMsgUtil; +import com.hfkj.entity.BsMer; +import com.hfkj.entity.BsTransferAccounts; +import com.hfkj.model.ResponseData; +import com.hfkj.openapi.v1.model.request.RequestQueryTransferInfoModel; +import com.hfkj.openapi.v1.model.request.RequestTransferAccountsModel; +import com.hfkj.openapi.v1.model.response.ResponseTransferAccountsModel; +import com.hfkj.openapi.v1.service.OpenApiTransferAccountsService; +import com.hfkj.openapi.v1.utils.SignatureUtil; +import com.hfkj.service.BsMerKeyService; +import com.hfkj.service.BsMerService; +import com.hfkj.service.BsTransferAccountsService; +import com.hfkj.sysenum.*; +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.validation.annotation.Validated; +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; +import java.util.Map; + +/** + * 资金管理 + * @className: FundManageController + * @author: HuRui + * @date: 2023/10/23 + **/ +@Controller +@Api(value = "交易订单") +@RequestMapping(value = "/v1/fundManage") +public class FundManageController { + + private static Logger log = LoggerFactory.getLogger(FundManageController.class); + + @Resource + private BsMerService merService; + @Resource + private BsMerKeyService merKeyService; + @Resource + private BsTransferAccountsService transferAccountsService; + @Resource + private OpenApiTransferAccountsService openApiTransferAccountsService; + + @RequestMapping(value="/transfer",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "转账") + public ResponseData transfer(@Validated @RequestBody RequestTransferAccountsModel body, HttpServletRequest request) { + log.info("========= Start 转账接口 Start ==========="); + log.info("请求参数:" + JSONObject.toJSONString(body)); + try { + // 验证签名 + if (!SignatureUtil.checkSign(body.getSign(), body, merKeyService.getKeyByMerNo(body.getMerchantNo()))) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_SIGN_ERR, ""); + } + if (transferAccountsService.getDetailByOrderNo(body.getOrderNo()) != null) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_COMMON, "订单号已存在"); + } + // 查询商户 + BsMer mer = merService.getMer(body.getMerchantNo()); + if (mer == null) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_COMMON, "未知的商户号"); + } + if (!mer.getMerStatus().equals(MerStatusEnum.status1.getNumber())) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_COMMON, "商户状态异常"); + } + + BsTransferAccounts transferAccounts = new BsTransferAccounts(); + transferAccounts.setMerId(mer.getId()); + transferAccounts.setMerNo(mer.getMerNo()); + transferAccounts.setMerName(mer.getMerName()); + transferAccounts.setMerAbbreviate(mer.getMerAbbreviate()); + transferAccounts.setOrderNo(body.getOrderNo()); + transferAccounts.setAmount(body.getAmount()); + transferAccounts.setContent(body.getContent()); + // 转账 + Map returnParam = openApiTransferAccountsService.transfer(transferAccounts); + log.info("返回参数:" + JSONObject.toJSONString(returnParam)); + return ResponseMsgUtil.success(returnParam); + + } catch (Exception e) { + log.info("出现异常:", e); + return ResponseMsgUtil.exception(e); + } finally { + log.info("========= END 转账接口 END ==========="); + } + } + + @RequestMapping(value="/queryTransferInfo",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "查询结果") + public ResponseData queryTransferInfo(@Validated @RequestBody RequestQueryTransferInfoModel body, HttpServletRequest request) { + log.info("========= Start 查询结果 Start ==========="); + log.info("请求参数:" + JSONObject.toJSONString(body)); + try { + // 验证签名 + if (!SignatureUtil.checkSign(body.getSign(), body, merKeyService.getKeyByMerNo(body.getMerchantNo()))) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_SIGN_ERR, ""); + } + // 查询详情 + ResponseTransferAccountsModel transferInfo = openApiTransferAccountsService.queryTransferInfo(body.getOrderNo()); + log.info("返回参数:" + JSONObject.toJSONString(transferInfo)); + return ResponseMsgUtil.success(transferInfo); + + } catch (Exception e) { + log.info("出现异常:", e); + return ResponseMsgUtil.exception(e); + } finally { + log.info("========= END 查询结果 END ==========="); + } + } + +} diff --git a/service/src/main/java/com/hfkj/channel/tianque/service/TianQueFundManageService.java b/service/src/main/java/com/hfkj/channel/tianque/service/TianQueFundManageService.java new file mode 100644 index 0000000..f2cceb0 --- /dev/null +++ b/service/src/main/java/com/hfkj/channel/tianque/service/TianQueFundManageService.java @@ -0,0 +1,80 @@ +package com.hfkj.channel.tianque.service; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.channel.tianque.config.TianQueConfig; +import com.hfkj.channel.tianque.utils.RequestUtil; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; + +/** + * 营销转账 + * @className: TianQueFundManageService + * @author: HuRui + * @date: 2023/10/8 + **/ +@Component +public class TianQueFundManageService { + + private static Logger log = LoggerFactory.getLogger(TianQueFundManageService.class); + + /** + * 营销转账 + * @param mno 商户号 + * @param orderNo 交易号 + * @param amount 交易金额 + * @param remark 备注 + * @param investor 服务费出资方,枚举值 01:服务商出资 02:商户出资 + * @return + */ + public JSONObject orgTransfer(String mno, String orderNo, BigDecimal amount,String remark, String investor) { + log.info("========= Start 营销转账接口 Start ==========="); + Map param = new HashMap<>(); + param.put("mno", mno); + param.put("orderNo", orderNo); + param.put("amount", amount); + param.put("content", remark); + param.put("investor", investor); + + JSONObject responseBody = RequestUtil.request(TianQueConfig.requestUrl + "/capital/fundManage/orgTransfer", param); + log.info("请求参数:",JSONObject.toJSONString(param)); + log.info("响应参数:", responseBody.toJSONString()); + System.out.println("body:" + JSONObject.toJSONString(param)); + System.out.println("response:" + responseBody.toJSONString()); + if (!"0000".equals(responseBody.getString("bizCode"))) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.COMMON_ERROR, responseBody.getString("bizMsg")); + } + log.info("========= END 营销转账接口 END ==========="); + return responseBody; + } + + /** + * 转账结果查询 + * @param orderNo + * @return + */ + public JSONObject getTransferInfo(String orderNo) { + log.info("========= Start 营销转账 Start ==========="); + Map param = new HashMap<>(); + param.put("orderNo", orderNo); + + JSONObject responseBody = RequestUtil.request(TianQueConfig.requestUrl + "/capital/fundManage/getTransferInfo", param); + log.info("请求参数:",JSONObject.toJSONString(param)); + log.info("响应参数:", responseBody.toJSONString()); + System.out.println("body:" + JSONObject.toJSONString(param)); + System.out.println("response:" + responseBody.toJSONString()); + if (!"0000".equals(responseBody.getString("bizCode"))) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.COMMON_ERROR, responseBody.getString("bizMsg")); + } + log.info("========= END 营销转账 END ==========="); + return responseBody; + } + +} diff --git a/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapper.java b/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapper.java new file mode 100644 index 0000000..70dd888 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapper.java @@ -0,0 +1,163 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsTransferAccounts; +import com.hfkj.entity.BsTransferAccountsExample; +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 BsTransferAccountsMapper extends BsTransferAccountsMapperExt { + @SelectProvider(type=BsTransferAccountsSqlProvider.class, method="countByExample") + long countByExample(BsTransferAccountsExample example); + + @DeleteProvider(type=BsTransferAccountsSqlProvider.class, method="deleteByExample") + int deleteByExample(BsTransferAccountsExample example); + + @Delete({ + "delete from bs_transfer_accounts", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_transfer_accounts (mer_id, mer_no, ", + "mer_name, mer_abbreviate, ", + "order_no, platform_order_no, ", + "receiver_platform_type, receiver_platform_no, ", + "amount, shd_fee_amt, ", + "settle_date, content, ", + "`status`, transfer_time, ", + "create_time, create_type, ", + "update_time, ext_1, ", + "ext_2, ext_3)", + "values (#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, ", + "#{merName,jdbcType=VARCHAR}, #{merAbbreviate,jdbcType=VARCHAR}, ", + "#{orderNo,jdbcType=VARCHAR}, #{platformOrderNo,jdbcType=VARCHAR}, ", + "#{receiverPlatformType,jdbcType=INTEGER}, #{receiverPlatformNo,jdbcType=VARCHAR}, ", + "#{amount,jdbcType=DECIMAL}, #{shdFeeAmt,jdbcType=DECIMAL}, ", + "#{settleDate,jdbcType=DATE}, #{content,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{transferTime,jdbcType=TIMESTAMP}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{createType,jdbcType=INTEGER}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsTransferAccounts record); + + @InsertProvider(type=BsTransferAccountsSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsTransferAccounts record); + + @SelectProvider(type=BsTransferAccountsSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_order_no", property="platformOrderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="receiver_platform_type", property="receiverPlatformType", jdbcType=JdbcType.INTEGER), + @Result(column="receiver_platform_no", property="receiverPlatformNo", jdbcType=JdbcType.VARCHAR), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL), + @Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE), + @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="transfer_time", property="transferTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_type", property="createType", jdbcType=JdbcType.INTEGER), + @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(BsTransferAccountsExample example); + + @Select({ + "select", + "id, mer_id, mer_no, mer_name, mer_abbreviate, order_no, platform_order_no, receiver_platform_type, ", + "receiver_platform_no, amount, shd_fee_amt, settle_date, content, `status`, transfer_time, ", + "create_time, create_type, update_time, ext_1, ext_2, ext_3", + "from bs_transfer_accounts", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_order_no", property="platformOrderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="receiver_platform_type", property="receiverPlatformType", jdbcType=JdbcType.INTEGER), + @Result(column="receiver_platform_no", property="receiverPlatformNo", jdbcType=JdbcType.VARCHAR), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL), + @Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE), + @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="transfer_time", property="transferTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_type", property="createType", jdbcType=JdbcType.INTEGER), + @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) + }) + BsTransferAccounts selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsTransferAccountsSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsTransferAccounts record, @Param("example") BsTransferAccountsExample example); + + @UpdateProvider(type=BsTransferAccountsSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsTransferAccounts record, @Param("example") BsTransferAccountsExample example); + + @UpdateProvider(type=BsTransferAccountsSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsTransferAccounts record); + + @Update({ + "update bs_transfer_accounts", + "set mer_id = #{merId,jdbcType=BIGINT},", + "mer_no = #{merNo,jdbcType=VARCHAR},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR},", + "order_no = #{orderNo,jdbcType=VARCHAR},", + "platform_order_no = #{platformOrderNo,jdbcType=VARCHAR},", + "receiver_platform_type = #{receiverPlatformType,jdbcType=INTEGER},", + "receiver_platform_no = #{receiverPlatformNo,jdbcType=VARCHAR},", + "amount = #{amount,jdbcType=DECIMAL},", + "shd_fee_amt = #{shdFeeAmt,jdbcType=DECIMAL},", + "settle_date = #{settleDate,jdbcType=DATE},", + "content = #{content,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "transfer_time = #{transferTime,jdbcType=TIMESTAMP},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "create_type = #{createType,jdbcType=INTEGER},", + "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(BsTransferAccounts record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapperExt.java b/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapperExt.java new file mode 100644 index 0000000..81e160a --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsTransferAccountsMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsTransferAccountsSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsTransferAccountsSqlProvider.java new file mode 100644 index 0000000..9810762 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsTransferAccountsSqlProvider.java @@ -0,0 +1,458 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsTransferAccounts; +import com.hfkj.entity.BsTransferAccountsExample.Criteria; +import com.hfkj.entity.BsTransferAccountsExample.Criterion; +import com.hfkj.entity.BsTransferAccountsExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsTransferAccountsSqlProvider { + + public String countByExample(BsTransferAccountsExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_transfer_accounts"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsTransferAccountsExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_transfer_accounts"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsTransferAccounts record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_transfer_accounts"); + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerAbbreviate() != null) { + sql.VALUES("mer_abbreviate", "#{merAbbreviate,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformOrderNo() != null) { + sql.VALUES("platform_order_no", "#{platformOrderNo,jdbcType=VARCHAR}"); + } + + if (record.getReceiverPlatformType() != null) { + sql.VALUES("receiver_platform_type", "#{receiverPlatformType,jdbcType=INTEGER}"); + } + + if (record.getReceiverPlatformNo() != null) { + sql.VALUES("receiver_platform_no", "#{receiverPlatformNo,jdbcType=VARCHAR}"); + } + + if (record.getAmount() != null) { + sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); + } + + if (record.getShdFeeAmt() != null) { + sql.VALUES("shd_fee_amt", "#{shdFeeAmt,jdbcType=DECIMAL}"); + } + + if (record.getSettleDate() != null) { + sql.VALUES("settle_date", "#{settleDate,jdbcType=DATE}"); + } + + if (record.getContent() != null) { + sql.VALUES("content", "#{content,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getTransferTime() != null) { + sql.VALUES("transfer_time", "#{transferTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateType() != null) { + sql.VALUES("create_type", "#{createType,jdbcType=INTEGER}"); + } + + 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(BsTransferAccountsExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_id"); + sql.SELECT("mer_no"); + sql.SELECT("mer_name"); + sql.SELECT("mer_abbreviate"); + sql.SELECT("order_no"); + sql.SELECT("platform_order_no"); + sql.SELECT("receiver_platform_type"); + sql.SELECT("receiver_platform_no"); + sql.SELECT("amount"); + sql.SELECT("shd_fee_amt"); + sql.SELECT("settle_date"); + sql.SELECT("content"); + sql.SELECT("`status`"); + sql.SELECT("transfer_time"); + sql.SELECT("create_time"); + sql.SELECT("create_type"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_transfer_accounts"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsTransferAccounts record = (BsTransferAccounts) parameter.get("record"); + BsTransferAccountsExample example = (BsTransferAccountsExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_transfer_accounts"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getMerAbbreviate() != null) { + sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformOrderNo() != null) { + sql.SET("platform_order_no = #{record.platformOrderNo,jdbcType=VARCHAR}"); + } + + if (record.getReceiverPlatformType() != null) { + sql.SET("receiver_platform_type = #{record.receiverPlatformType,jdbcType=INTEGER}"); + } + + if (record.getReceiverPlatformNo() != null) { + sql.SET("receiver_platform_no = #{record.receiverPlatformNo,jdbcType=VARCHAR}"); + } + + if (record.getAmount() != null) { + sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); + } + + if (record.getShdFeeAmt() != null) { + sql.SET("shd_fee_amt = #{record.shdFeeAmt,jdbcType=DECIMAL}"); + } + + if (record.getSettleDate() != null) { + sql.SET("settle_date = #{record.settleDate,jdbcType=DATE}"); + } + + if (record.getContent() != null) { + sql.SET("content = #{record.content,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getTransferTime() != null) { + sql.SET("transfer_time = #{record.transferTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateType() != null) { + sql.SET("create_type = #{record.createType,jdbcType=INTEGER}"); + } + + 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_transfer_accounts"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("mer_abbreviate = #{record.merAbbreviate,jdbcType=VARCHAR}"); + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + sql.SET("platform_order_no = #{record.platformOrderNo,jdbcType=VARCHAR}"); + sql.SET("receiver_platform_type = #{record.receiverPlatformType,jdbcType=INTEGER}"); + sql.SET("receiver_platform_no = #{record.receiverPlatformNo,jdbcType=VARCHAR}"); + sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); + sql.SET("shd_fee_amt = #{record.shdFeeAmt,jdbcType=DECIMAL}"); + sql.SET("settle_date = #{record.settleDate,jdbcType=DATE}"); + sql.SET("content = #{record.content,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("transfer_time = #{record.transferTime,jdbcType=TIMESTAMP}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("create_type = #{record.createType,jdbcType=INTEGER}"); + 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}"); + + BsTransferAccountsExample example = (BsTransferAccountsExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsTransferAccounts record) { + SQL sql = new SQL(); + sql.UPDATE("bs_transfer_accounts"); + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerAbbreviate() != null) { + sql.SET("mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformOrderNo() != null) { + sql.SET("platform_order_no = #{platformOrderNo,jdbcType=VARCHAR}"); + } + + if (record.getReceiverPlatformType() != null) { + sql.SET("receiver_platform_type = #{receiverPlatformType,jdbcType=INTEGER}"); + } + + if (record.getReceiverPlatformNo() != null) { + sql.SET("receiver_platform_no = #{receiverPlatformNo,jdbcType=VARCHAR}"); + } + + if (record.getAmount() != null) { + sql.SET("amount = #{amount,jdbcType=DECIMAL}"); + } + + if (record.getShdFeeAmt() != null) { + sql.SET("shd_fee_amt = #{shdFeeAmt,jdbcType=DECIMAL}"); + } + + if (record.getSettleDate() != null) { + sql.SET("settle_date = #{settleDate,jdbcType=DATE}"); + } + + if (record.getContent() != null) { + sql.SET("content = #{content,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getTransferTime() != null) { + sql.SET("transfer_time = #{transferTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateType() != null) { + sql.SET("create_type = #{createType,jdbcType=INTEGER}"); + } + + 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, BsTransferAccountsExample 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/BsTransferAccounts.java b/service/src/main/java/com/hfkj/entity/BsTransferAccounts.java new file mode 100644 index 0000000..205078a --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsTransferAccounts.java @@ -0,0 +1,374 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_transfer_accounts + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsTransferAccounts implements Serializable { + private Long id; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户号 + */ + private String merNo; + + /** + * 商户名称 + */ + private String merName; + + /** + * 商户简称 + */ + private String merAbbreviate; + + /** + * 订单号 + */ + private String orderNo; + + /** + * 平台订单号 + */ + private String platformOrderNo; + + /** + * 接收方平台 + */ + private Integer receiverPlatformType; + + /** + * 接收方平台商户号 + */ + private String receiverPlatformNo; + + /** + * 转账金额 + */ + private BigDecimal amount; + + /** + * 交易手续费 + */ + private BigDecimal shdFeeAmt; + + /** + * 结算日期 + */ + private Date settleDate; + + /** + * 备注 + */ + private String content; + + /** + * 状态 0:不可用 1:处理中 2:成功 3:失败 4:异常 + */ + private Integer status; + + /** + * 转账时间 + */ + private Date transferTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 创建方式 1:系统自动 2:API + */ + private Integer createType; + + /** + * 更新时间 + */ + 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 getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerNo() { + return merNo; + } + + public void setMerNo(String merNo) { + this.merNo = merNo; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public String getMerAbbreviate() { + return merAbbreviate; + } + + public void setMerAbbreviate(String merAbbreviate) { + this.merAbbreviate = merAbbreviate; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public String getPlatformOrderNo() { + return platformOrderNo; + } + + public void setPlatformOrderNo(String platformOrderNo) { + this.platformOrderNo = platformOrderNo; + } + + public Integer getReceiverPlatformType() { + return receiverPlatformType; + } + + public void setReceiverPlatformType(Integer receiverPlatformType) { + this.receiverPlatformType = receiverPlatformType; + } + + public String getReceiverPlatformNo() { + return receiverPlatformNo; + } + + public void setReceiverPlatformNo(String receiverPlatformNo) { + this.receiverPlatformNo = receiverPlatformNo; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getShdFeeAmt() { + return shdFeeAmt; + } + + public void setShdFeeAmt(BigDecimal shdFeeAmt) { + this.shdFeeAmt = shdFeeAmt; + } + + public Date getSettleDate() { + return settleDate; + } + + public void setSettleDate(Date settleDate) { + this.settleDate = settleDate; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getTransferTime() { + return transferTime; + } + + public void setTransferTime(Date transferTime) { + this.transferTime = transferTime; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getCreateType() { + return createType; + } + + public void setCreateType(Integer createType) { + this.createType = createType; + } + + 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; + } + BsTransferAccounts other = (BsTransferAccounts) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getMerAbbreviate() == null ? other.getMerAbbreviate() == null : this.getMerAbbreviate().equals(other.getMerAbbreviate())) + && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) + && (this.getPlatformOrderNo() == null ? other.getPlatformOrderNo() == null : this.getPlatformOrderNo().equals(other.getPlatformOrderNo())) + && (this.getReceiverPlatformType() == null ? other.getReceiverPlatformType() == null : this.getReceiverPlatformType().equals(other.getReceiverPlatformType())) + && (this.getReceiverPlatformNo() == null ? other.getReceiverPlatformNo() == null : this.getReceiverPlatformNo().equals(other.getReceiverPlatformNo())) + && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) + && (this.getShdFeeAmt() == null ? other.getShdFeeAmt() == null : this.getShdFeeAmt().equals(other.getShdFeeAmt())) + && (this.getSettleDate() == null ? other.getSettleDate() == null : this.getSettleDate().equals(other.getSettleDate())) + && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getTransferTime() == null ? other.getTransferTime() == null : this.getTransferTime().equals(other.getTransferTime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getCreateType() == null ? other.getCreateType() == null : this.getCreateType().equals(other.getCreateType())) + && (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 + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getMerAbbreviate() == null) ? 0 : getMerAbbreviate().hashCode()); + result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); + result = prime * result + ((getPlatformOrderNo() == null) ? 0 : getPlatformOrderNo().hashCode()); + result = prime * result + ((getReceiverPlatformType() == null) ? 0 : getReceiverPlatformType().hashCode()); + result = prime * result + ((getReceiverPlatformNo() == null) ? 0 : getReceiverPlatformNo().hashCode()); + result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); + result = prime * result + ((getShdFeeAmt() == null) ? 0 : getShdFeeAmt().hashCode()); + result = prime * result + ((getSettleDate() == null) ? 0 : getSettleDate().hashCode()); + result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getTransferTime() == null) ? 0 : getTransferTime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getCreateType() == null) ? 0 : getCreateType().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(", merId=").append(merId); + sb.append(", merNo=").append(merNo); + sb.append(", merName=").append(merName); + sb.append(", merAbbreviate=").append(merAbbreviate); + sb.append(", orderNo=").append(orderNo); + sb.append(", platformOrderNo=").append(platformOrderNo); + sb.append(", receiverPlatformType=").append(receiverPlatformType); + sb.append(", receiverPlatformNo=").append(receiverPlatformNo); + sb.append(", amount=").append(amount); + sb.append(", shdFeeAmt=").append(shdFeeAmt); + sb.append(", settleDate=").append(settleDate); + sb.append(", content=").append(content); + sb.append(", status=").append(status); + sb.append(", transferTime=").append(transferTime); + sb.append(", createTime=").append(createTime); + sb.append(", createType=").append(createType); + 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/BsTransferAccountsExample.java b/service/src/main/java/com/hfkj/entity/BsTransferAccountsExample.java new file mode 100644 index 0000000..c165c5c --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsTransferAccountsExample.java @@ -0,0 +1,1611 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +public class BsTransferAccountsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsTransferAccountsExample() { + 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)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + 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 andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNoIsNull() { + addCriterion("mer_no is null"); + return (Criteria) this; + } + + public Criteria andMerNoIsNotNull() { + addCriterion("mer_no is not null"); + return (Criteria) this; + } + + public Criteria andMerNoEqualTo(String value) { + addCriterion("mer_no =", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotEqualTo(String value) { + addCriterion("mer_no <>", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThan(String value) { + addCriterion("mer_no >", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThanOrEqualTo(String value) { + addCriterion("mer_no >=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThan(String value) { + addCriterion("mer_no <", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThanOrEqualTo(String value) { + addCriterion("mer_no <=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLike(String value) { + addCriterion("mer_no like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotLike(String value) { + addCriterion("mer_no not like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoIn(List values) { + addCriterion("mer_no in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotIn(List values) { + addCriterion("mer_no not in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoBetween(String value1, String value2) { + addCriterion("mer_no between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotBetween(String value1, String value2) { + addCriterion("mer_no not between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateIsNull() { + addCriterion("mer_abbreviate is null"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateIsNotNull() { + addCriterion("mer_abbreviate is not null"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateEqualTo(String value) { + addCriterion("mer_abbreviate =", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotEqualTo(String value) { + addCriterion("mer_abbreviate <>", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateGreaterThan(String value) { + addCriterion("mer_abbreviate >", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateGreaterThanOrEqualTo(String value) { + addCriterion("mer_abbreviate >=", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateLessThan(String value) { + addCriterion("mer_abbreviate <", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateLessThanOrEqualTo(String value) { + addCriterion("mer_abbreviate <=", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateLike(String value) { + addCriterion("mer_abbreviate like", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotLike(String value) { + addCriterion("mer_abbreviate not like", value, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateIn(List values) { + addCriterion("mer_abbreviate in", values, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotIn(List values) { + addCriterion("mer_abbreviate not in", values, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateBetween(String value1, String value2) { + addCriterion("mer_abbreviate between", value1, value2, "merAbbreviate"); + return (Criteria) this; + } + + public Criteria andMerAbbreviateNotBetween(String value1, String value2) { + addCriterion("mer_abbreviate not between", value1, value2, "merAbbreviate"); + 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 andPlatformOrderNoIsNull() { + addCriterion("platform_order_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoIsNotNull() { + addCriterion("platform_order_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoEqualTo(String value) { + addCriterion("platform_order_no =", value, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoNotEqualTo(String value) { + addCriterion("platform_order_no <>", value, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoGreaterThan(String value) { + addCriterion("platform_order_no >", value, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_order_no >=", value, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoLessThan(String value) { + addCriterion("platform_order_no <", value, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoLessThanOrEqualTo(String value) { + addCriterion("platform_order_no <=", value, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoLike(String value) { + addCriterion("platform_order_no like", value, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoNotLike(String value) { + addCriterion("platform_order_no not like", value, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoIn(List values) { + addCriterion("platform_order_no in", values, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoNotIn(List values) { + addCriterion("platform_order_no not in", values, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoBetween(String value1, String value2) { + addCriterion("platform_order_no between", value1, value2, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformOrderNoNotBetween(String value1, String value2) { + addCriterion("platform_order_no not between", value1, value2, "platformOrderNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeIsNull() { + addCriterion("receiver_platform_type is null"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeIsNotNull() { + addCriterion("receiver_platform_type is not null"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeEqualTo(Integer value) { + addCriterion("receiver_platform_type =", value, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeNotEqualTo(Integer value) { + addCriterion("receiver_platform_type <>", value, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeGreaterThan(Integer value) { + addCriterion("receiver_platform_type >", value, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("receiver_platform_type >=", value, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeLessThan(Integer value) { + addCriterion("receiver_platform_type <", value, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeLessThanOrEqualTo(Integer value) { + addCriterion("receiver_platform_type <=", value, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeIn(List values) { + addCriterion("receiver_platform_type in", values, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeNotIn(List values) { + addCriterion("receiver_platform_type not in", values, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeBetween(Integer value1, Integer value2) { + addCriterion("receiver_platform_type between", value1, value2, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformTypeNotBetween(Integer value1, Integer value2) { + addCriterion("receiver_platform_type not between", value1, value2, "receiverPlatformType"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoIsNull() { + addCriterion("receiver_platform_no is null"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoIsNotNull() { + addCriterion("receiver_platform_no is not null"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoEqualTo(String value) { + addCriterion("receiver_platform_no =", value, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoNotEqualTo(String value) { + addCriterion("receiver_platform_no <>", value, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoGreaterThan(String value) { + addCriterion("receiver_platform_no >", value, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoGreaterThanOrEqualTo(String value) { + addCriterion("receiver_platform_no >=", value, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoLessThan(String value) { + addCriterion("receiver_platform_no <", value, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoLessThanOrEqualTo(String value) { + addCriterion("receiver_platform_no <=", value, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoLike(String value) { + addCriterion("receiver_platform_no like", value, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoNotLike(String value) { + addCriterion("receiver_platform_no not like", value, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoIn(List values) { + addCriterion("receiver_platform_no in", values, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoNotIn(List values) { + addCriterion("receiver_platform_no not in", values, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoBetween(String value1, String value2) { + addCriterion("receiver_platform_no between", value1, value2, "receiverPlatformNo"); + return (Criteria) this; + } + + public Criteria andReceiverPlatformNoNotBetween(String value1, String value2) { + addCriterion("receiver_platform_no not between", value1, value2, "receiverPlatformNo"); + 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 andShdFeeAmtIsNull() { + addCriterion("shd_fee_amt is null"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtIsNotNull() { + addCriterion("shd_fee_amt is not null"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtEqualTo(BigDecimal value) { + addCriterion("shd_fee_amt =", value, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtNotEqualTo(BigDecimal value) { + addCriterion("shd_fee_amt <>", value, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtGreaterThan(BigDecimal value) { + addCriterion("shd_fee_amt >", value, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("shd_fee_amt >=", value, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtLessThan(BigDecimal value) { + addCriterion("shd_fee_amt <", value, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtLessThanOrEqualTo(BigDecimal value) { + addCriterion("shd_fee_amt <=", value, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtIn(List values) { + addCriterion("shd_fee_amt in", values, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtNotIn(List values) { + addCriterion("shd_fee_amt not in", values, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("shd_fee_amt between", value1, value2, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andShdFeeAmtNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("shd_fee_amt not between", value1, value2, "shdFeeAmt"); + return (Criteria) this; + } + + public Criteria andSettleDateIsNull() { + addCriterion("settle_date is null"); + return (Criteria) this; + } + + public Criteria andSettleDateIsNotNull() { + addCriterion("settle_date is not null"); + return (Criteria) this; + } + + public Criteria andSettleDateEqualTo(Date value) { + addCriterionForJDBCDate("settle_date =", value, "settleDate"); + return (Criteria) this; + } + + public Criteria andSettleDateNotEqualTo(Date value) { + addCriterionForJDBCDate("settle_date <>", value, "settleDate"); + return (Criteria) this; + } + + public Criteria andSettleDateGreaterThan(Date value) { + addCriterionForJDBCDate("settle_date >", value, "settleDate"); + return (Criteria) this; + } + + public Criteria andSettleDateGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("settle_date >=", value, "settleDate"); + return (Criteria) this; + } + + public Criteria andSettleDateLessThan(Date value) { + addCriterionForJDBCDate("settle_date <", value, "settleDate"); + return (Criteria) this; + } + + public Criteria andSettleDateLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("settle_date <=", value, "settleDate"); + return (Criteria) this; + } + + public Criteria andSettleDateIn(List values) { + addCriterionForJDBCDate("settle_date in", values, "settleDate"); + return (Criteria) this; + } + + public Criteria andSettleDateNotIn(List values) { + addCriterionForJDBCDate("settle_date not in", values, "settleDate"); + return (Criteria) this; + } + + public Criteria andSettleDateBetween(Date value1, Date value2) { + addCriterionForJDBCDate("settle_date between", value1, value2, "settleDate"); + return (Criteria) this; + } + + public Criteria andSettleDateNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("settle_date not between", value1, value2, "settleDate"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + 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 andTransferTimeIsNull() { + addCriterion("transfer_time is null"); + return (Criteria) this; + } + + public Criteria andTransferTimeIsNotNull() { + addCriterion("transfer_time is not null"); + return (Criteria) this; + } + + public Criteria andTransferTimeEqualTo(Date value) { + addCriterion("transfer_time =", value, "transferTime"); + return (Criteria) this; + } + + public Criteria andTransferTimeNotEqualTo(Date value) { + addCriterion("transfer_time <>", value, "transferTime"); + return (Criteria) this; + } + + public Criteria andTransferTimeGreaterThan(Date value) { + addCriterion("transfer_time >", value, "transferTime"); + return (Criteria) this; + } + + public Criteria andTransferTimeGreaterThanOrEqualTo(Date value) { + addCriterion("transfer_time >=", value, "transferTime"); + return (Criteria) this; + } + + public Criteria andTransferTimeLessThan(Date value) { + addCriterion("transfer_time <", value, "transferTime"); + return (Criteria) this; + } + + public Criteria andTransferTimeLessThanOrEqualTo(Date value) { + addCriterion("transfer_time <=", value, "transferTime"); + return (Criteria) this; + } + + public Criteria andTransferTimeIn(List values) { + addCriterion("transfer_time in", values, "transferTime"); + return (Criteria) this; + } + + public Criteria andTransferTimeNotIn(List values) { + addCriterion("transfer_time not in", values, "transferTime"); + return (Criteria) this; + } + + public Criteria andTransferTimeBetween(Date value1, Date value2) { + addCriterion("transfer_time between", value1, value2, "transferTime"); + return (Criteria) this; + } + + public Criteria andTransferTimeNotBetween(Date value1, Date value2) { + addCriterion("transfer_time not between", value1, value2, "transferTime"); + 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 andCreateTypeIsNull() { + addCriterion("create_type is null"); + return (Criteria) this; + } + + public Criteria andCreateTypeIsNotNull() { + addCriterion("create_type is not null"); + return (Criteria) this; + } + + public Criteria andCreateTypeEqualTo(Integer value) { + addCriterion("create_type =", value, "createType"); + return (Criteria) this; + } + + public Criteria andCreateTypeNotEqualTo(Integer value) { + addCriterion("create_type <>", value, "createType"); + return (Criteria) this; + } + + public Criteria andCreateTypeGreaterThan(Integer value) { + addCriterion("create_type >", value, "createType"); + return (Criteria) this; + } + + public Criteria andCreateTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("create_type >=", value, "createType"); + return (Criteria) this; + } + + public Criteria andCreateTypeLessThan(Integer value) { + addCriterion("create_type <", value, "createType"); + return (Criteria) this; + } + + public Criteria andCreateTypeLessThanOrEqualTo(Integer value) { + addCriterion("create_type <=", value, "createType"); + return (Criteria) this; + } + + public Criteria andCreateTypeIn(List values) { + addCriterion("create_type in", values, "createType"); + return (Criteria) this; + } + + public Criteria andCreateTypeNotIn(List values) { + addCriterion("create_type not in", values, "createType"); + return (Criteria) this; + } + + public Criteria andCreateTypeBetween(Integer value1, Integer value2) { + addCriterion("create_type between", value1, value2, "createType"); + return (Criteria) this; + } + + public Criteria andCreateTypeNotBetween(Integer value1, Integer value2) { + addCriterion("create_type not between", value1, value2, "createType"); + 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/openapi/v1/model/request/RequestQueryTransferInfoModel.java b/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestQueryTransferInfoModel.java new file mode 100644 index 0000000..6c92745 --- /dev/null +++ b/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestQueryTransferInfoModel.java @@ -0,0 +1,38 @@ +package com.hfkj.openapi.v1.model.request; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.DecimalMax; +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.NotBlank; +import java.math.BigDecimal; + +/** + * 请求查询转账结果模型 + * @className: RequestTransferAccountsModel + * @author: HuRui + * @date: 2023/10/23 + **/ +@Data +public class RequestQueryTransferInfoModel { + + /** + * 商户号 + */ + @NotBlank(message = "商户号必填项") + private String merchantNo; + + /** + * 订单号 + */ + @NotBlank(message = "订单号必填项") + private String orderNo; + + /** + * 签名参数 + */ + @NotBlank(message = "签名必填项") + private String sign; + +} diff --git a/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java b/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java new file mode 100644 index 0000000..4760129 --- /dev/null +++ b/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java @@ -0,0 +1,51 @@ +package com.hfkj.openapi.v1.model.request; + +import lombok.Data; +import org.hibernate.validator.constraints.Length; +import javax.validation.constraints.DecimalMax; +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.NotBlank; +import java.math.BigDecimal; + +/** + * 请求转账模型 + * @className: RequestTransferAccountsModel + * @author: HuRui + * @date: 2023/10/23 + **/ +@Data +public class RequestTransferAccountsModel { + + /** + * 商户号 + */ + @NotBlank(message = "商户号必填项") + private String merchantNo; + + /** + * 订单号 + */ + @NotBlank(message = "订单号必填项") + private String orderNo; + + /** + * 转账金额 + */ + @DecimalMax(value = "99999999", message = "转账最大金额99999999元") + @DecimalMin(value = "0.01", message = "转账最小金额0.01元") + @NotBlank(message = "转账金额必填项") + private BigDecimal amount; + + /** + * 转账金额 + */ + @Length(max = 300, message = "订单标题长度限制在300字符以内") + private String content; + + /** + * 签名参数 + */ + @NotBlank(message = "签名必填项") + private String sign; + +} diff --git a/service/src/main/java/com/hfkj/openapi/v1/model/response/ResponseTransferAccountsModel.java b/service/src/main/java/com/hfkj/openapi/v1/model/response/ResponseTransferAccountsModel.java new file mode 100644 index 0000000..d71c530 --- /dev/null +++ b/service/src/main/java/com/hfkj/openapi/v1/model/response/ResponseTransferAccountsModel.java @@ -0,0 +1,61 @@ +package com.hfkj.openapi.v1.model.response; + +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @className: ResponseTransferAccountsModel + * @author: HuRui + * @date: 2023/10/23 + **/ +@Data +public class ResponseTransferAccountsModel { + + /** + * 商户号 + */ + private String merchantNo; + + /** + * 订单号 + */ + private String orderNo; + + /** + * 金额 + */ + private BigDecimal amount; + + /** + * 手续费 + */ + private BigDecimal shdFeeAmt; + + /** + * 结算时间 + */ + private Date settleDate; + + /** + * 备注 + */ + private String content; + + /** + * 状态 + */ + private Integer status; + + /** + * 转账时间 + */ + private Date transferTime; + + /** + * 签名 + */ + private String sign; + +} diff --git a/service/src/main/java/com/hfkj/openapi/v1/service/OpenApiTransferAccountsService.java b/service/src/main/java/com/hfkj/openapi/v1/service/OpenApiTransferAccountsService.java new file mode 100644 index 0000000..62e9793 --- /dev/null +++ b/service/src/main/java/com/hfkj/openapi/v1/service/OpenApiTransferAccountsService.java @@ -0,0 +1,31 @@ +package com.hfkj.openapi.v1.service; + +import com.hfkj.entity.BsTransferAccounts; +import com.hfkj.openapi.v1.model.request.RequestTransferAccountsModel; +import com.hfkj.openapi.v1.model.response.ResponseTransferAccountsModel; + +import java.util.Map; + +/** + * 转账 + * @className: OpenApiTransferAccountsService + * @author: HuRui + * @date: 2023/10/23 + **/ +public interface OpenApiTransferAccountsService { + + /** + * 转账 + * @param transferAccounts + * @return + */ + Map transfer(BsTransferAccounts transferAccounts) throws Exception; + + /** + * 查询详情 + * @param orderNo + * @return + */ + ResponseTransferAccountsModel queryTransferInfo(String orderNo) throws Exception; + +} diff --git a/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java b/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java new file mode 100644 index 0000000..9bcb5ba --- /dev/null +++ b/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java @@ -0,0 +1,102 @@ +package com.hfkj.openapi.v1.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.channel.tianque.service.TianQueFundManageService; +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.entity.BsMerPlatformNo; +import com.hfkj.entity.BsTransferAccounts; +import com.hfkj.openapi.v1.model.request.RequestTransferAccountsModel; +import com.hfkj.openapi.v1.model.response.ResponseTransferAccountsModel; +import com.hfkj.openapi.v1.service.OpenApiTransferAccountsService; +import com.hfkj.openapi.v1.utils.SignatureUtil; +import com.hfkj.service.BsMerKeyService; +import com.hfkj.service.BsMerPlatformNoService; +import com.hfkj.service.BsMerService; +import com.hfkj.service.BsTransferAccountsService; +import com.hfkj.sysenum.MerPlatformNoStatusEnum; +import com.hfkj.sysenum.PlatformTypeEnum; +import com.hfkj.sysenum.TransferAccountsCreateType; +import com.hfkj.sysenum.TransferAccountsStatus; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * @className: OpenApiTransferAccountsServiceImpl + * @author: HuRui + * @date: 2023/10/23 + **/ +@Service("openApiTransferAccountsService") +public class OpenApiTransferAccountsServiceImpl implements OpenApiTransferAccountsService { + + @Resource + private TianQueFundManageService tianQueFundManageService; + @Resource + private BsTransferAccountsService transferAccountsService; + @Resource + private BsMerKeyService merKeyService; + @Resource + private BsMerPlatformNoService merPlatformNoService; + + @Override + public Map transfer(BsTransferAccounts transferAccounts) throws Exception { + // 查询渠道 + BsMerPlatformNo platform = merPlatformNoService.getPlatformNo(transferAccounts.getMerId(), PlatformTypeEnum.type5); + if (platform == null) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_COMMON, "未开通权限"); + } + if (!platform.getStatus().equals(MerPlatformNoStatusEnum.status1.getNumber())) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_COMMON, "未开通权限"); + } + + transferAccounts.setStatus(TransferAccountsStatus.status1.getNumber()); + transferAccounts.setCreateType(TransferAccountsCreateType.type2.getNumber()); + transferAccounts.setReceiverPlatformType(platform.getPlatformType()); + transferAccounts.setReceiverPlatformNo(platform.getPlatformNo()); + transferAccountsService.editData(transferAccounts); + + /* // 调用渠道转账 + JSONObject orgTransfer = tianQueFundManageService.orgTransfer( + transferAccounts.getReceiverPlatformNo(), + transferAccounts.getOrderNo(), + transferAccounts.getAmount(), + transferAccounts.getOrderNo(), + "01" + ); + transferAccounts.setReceiverPlatformNo(orgTransfer.getString("transactionNo")); + transferAccounts.setSettleDate(DateUtil.format(orgTransfer.getString("clrDt"), "yyyyMMdd")); + transferAccounts.setTransferTime(DateUtil.format(orgTransfer.getString("transactionTime"), "yyyy-MM-dd HH:mm:ss")); + transferAccountsService.editData(transferAccounts);*/ + + Map map = new HashMap<>(); + map.put("orderNo", transferAccounts.getOrderNo()); + map.put("sign", SignatureUtil.createSign(map, merKeyService.getKeyByMerNo(transferAccounts.getMerNo()))); + return map; + } + + @Override + public ResponseTransferAccountsModel queryTransferInfo(String orderNo) throws Exception { + // 查询转账记录 + BsTransferAccounts transferInfo = transferAccountsService.getDetailByOrderNo(orderNo); + if (transferInfo == null) { + throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_COMMON, "未找到转账记录"); + } + ResponseTransferAccountsModel response = new ResponseTransferAccountsModel(); + response.setMerchantNo(transferInfo.getMerNo()); + response.setOrderNo(transferInfo.getOrderNo()); + response.setAmount(transferInfo.getAmount()); + response.setShdFeeAmt(transferInfo.getShdFeeAmt()); + response.setSettleDate(transferInfo.getSettleDate()); + response.setContent(transferInfo.getContent()); + response.setTransferTime(transferInfo.getTransferTime()); + response.setSign(SignatureUtil.createSign(response, merKeyService.getKeyByMerNo(transferInfo.getMerNo()))); + return response; + } + +} diff --git a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java index 3e4fc0c..51875c4 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java +++ b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java @@ -84,16 +84,12 @@ public class SignatureUtil { public static void main(String[] args) throws Exception { String paramStr = "{\n" + - " \"merchantNo\": \"2023041916292112804\",\n" + - " \"outTradeNo\": \"TZF100005\",\n" + - " \"payMode\": \"ALIPAY\",\n" + - " \"totalAmount\": 0.01,\n" + - " \"transType\": \"NATIVE\",\n" + - " \"userId\": \"2088612673845396\",\n" + - " \"profitSharing\": 0" + + " \"merchantNo\": \"2023053014340172109\",\n" + + " \"billDateS\": 1693584000000,\n" + + " \"billDateE\": 1693584000000,\n" + "}"; - String sign = createSign(JSONObject.parseObject(paramStr), "2jLO2WjXcSRSzTCaca0Kmv0OFrfYBbrA"); + String sign = createSign(JSONObject.parseObject(paramStr), "uAZAmX9CLJ3VmPhfi4GN8qpFifyfw0cF"); System.out.println(sign); } diff --git a/service/src/main/java/com/hfkj/service/BsTransferAccountsService.java b/service/src/main/java/com/hfkj/service/BsTransferAccountsService.java new file mode 100644 index 0000000..a55d653 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/BsTransferAccountsService.java @@ -0,0 +1,25 @@ +package com.hfkj.service; + +import com.hfkj.entity.BsTransferAccounts; + +/** + * @className: BsTransferAccountsService + * @author: HuRui + * @date: 2023/10/23 + **/ +public interface BsTransferAccountsService { + + /** + * 编辑数据 + * @param transferAccounts + */ + void editData(BsTransferAccounts transferAccounts); + + /** + * 查询数据 + * @param orderNo 订单号 + * @return + */ + BsTransferAccounts getDetailByOrderNo(String orderNo); + +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsTransferAccountsServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsTransferAccountsServiceImpl.java new file mode 100644 index 0000000..ddcd08d --- /dev/null +++ b/service/src/main/java/com/hfkj/service/impl/BsTransferAccountsServiceImpl.java @@ -0,0 +1,67 @@ +package com.hfkj.service.impl; + +import com.hfkj.common.utils.RedisUtil; +import com.hfkj.dao.BsTransferAccountsMapper; +import com.hfkj.entity.BsTransferAccounts; +import com.hfkj.entity.BsTransferAccountsExample; +import com.hfkj.service.BsTransferAccountsService; +import com.hfkj.sysenum.TransferAccountsStatus; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * @className: BsTransferAccountsServiceImpl + * @author: HuRui + * @date: 2023/10/23 + **/ +@Service("transferAccountsService") +public class BsTransferAccountsServiceImpl implements BsTransferAccountsService { + + @Resource + private BsTransferAccountsMapper transferAccountsMapper; + @Autowired + private RedisUtil redisUtil; + + // 缓存目录 + private final static String TRANSFER_ACCOUNTS = "TRANSFER_ACCOUNTS:"; + // 缓存时间 1小时 + private final static long cacheTime = 60 * 60; + @Override + public void editData(BsTransferAccounts transferAccounts) { + if (transferAccounts.getId() == null) { + transferAccounts.setCreateTime(new Date()); + transferAccounts.setUpdateTime(new Date()); + transferAccountsMapper.insert(transferAccounts); + } else { + transferAccounts.setUpdateTime(new Date()); + transferAccountsMapper.updateByPrimaryKey(transferAccounts); + } + // 缓存 + redisUtil.set(TRANSFER_ACCOUNTS + transferAccounts.getOrderNo(), transferAccounts, cacheTime); + } + + @Override + public BsTransferAccounts getDetailByOrderNo(String orderNo) { + Object obj = redisUtil.get(TRANSFER_ACCOUNTS + orderNo); + if (obj != null) { + return (BsTransferAccounts) obj; + } + BsTransferAccountsExample example = new BsTransferAccountsExample(); + example.createCriteria() + .andOrderNoEqualTo(orderNo) + .andStatusNotEqualTo(TransferAccountsStatus.status0.getNumber()); + List list = transferAccountsMapper.selectByExample(example); + if (!list.isEmpty()) { + BsTransferAccounts transferAccounts = list.get(0); + // 缓存 + redisUtil.set(TRANSFER_ACCOUNTS + transferAccounts.getOrderNo(), transferAccounts, cacheTime); + return transferAccounts; + } + return null; + } + +} diff --git a/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java b/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java new file mode 100644 index 0000000..7d23b72 --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java @@ -0,0 +1,49 @@ +package com.hfkj.sysenum; + +import java.util.Objects; + +/** + * 转账创建方式 + * @className: TransferAccountsCreateType + * @author: HuRui + * @date: 2023/10/23 + **/ +public enum TransferAccountsCreateType { + type1(0, "系统自动"), + type2(1, "API"), + ; + + private Integer number; + + private String name; + + TransferAccountsCreateType(int number, String name) { + this.number = number; + this.name = name; + } + + public static TransferAccountsCreateType getNameByNumber(Integer number) { + for (TransferAccountsCreateType ele : values()) { + if (Objects.equals(number,ele.getNumber())) { + return ele; + } + } + return null; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/service/src/main/java/com/hfkj/sysenum/TransferAccountsStatus.java b/service/src/main/java/com/hfkj/sysenum/TransferAccountsStatus.java new file mode 100644 index 0000000..87fd3f8 --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/TransferAccountsStatus.java @@ -0,0 +1,52 @@ +package com.hfkj.sysenum; + +import java.util.Objects; + +/** + * 转账状态 + * @className: TransferAccountsStatus + * @author: HuRui + * @date: 2023/10/23 + **/ +public enum TransferAccountsStatus { + status0(0, "不可用"), + status1(1, "处理中"), + status2(2, "成功"), + status3(3, "失败"), + status4(4, "异常"), + ; + + private Integer number; + + private String name; + + TransferAccountsStatus(int number, String name) { + this.number = number; + this.name = name; + } + + public static TransferAccountsStatus getNameByNumber(Integer number) { + for (TransferAccountsStatus ele : values()) { + if (Objects.equals(number,ele.getNumber())) { + return ele; + } + } + return null; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} From 2689936d54533db84dfa37aa032fa8eb8cfa327d Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 25 Oct 2023 11:09:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/api/controller/v1/FundManageController.java | 3 ++- .../v1/model/request/RequestTransferAccountsModel.java | 2 +- .../service/impl/OpenApiTransferAccountsServiceImpl.java | 4 ++-- .../main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java | 7 +++---- .../java/com/hfkj/sysenum/TransferAccountsCreateType.java | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/open-api/src/main/java/com/api/controller/v1/FundManageController.java b/open-api/src/main/java/com/api/controller/v1/FundManageController.java index 2e7904e..38d8686 100644 --- a/open-api/src/main/java/com/api/controller/v1/FundManageController.java +++ b/open-api/src/main/java/com/api/controller/v1/FundManageController.java @@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; +import java.math.BigDecimal; import java.util.Map; /** @@ -83,7 +84,7 @@ public class FundManageController { transferAccounts.setMerName(mer.getMerName()); transferAccounts.setMerAbbreviate(mer.getMerAbbreviate()); transferAccounts.setOrderNo(body.getOrderNo()); - transferAccounts.setAmount(body.getAmount()); + transferAccounts.setAmount(new BigDecimal(body.getAmount())); transferAccounts.setContent(body.getContent()); // 转账 Map returnParam = openApiTransferAccountsService.transfer(transferAccounts); diff --git a/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java b/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java index 4760129..8fde763 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java +++ b/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java @@ -34,7 +34,7 @@ public class RequestTransferAccountsModel { @DecimalMax(value = "99999999", message = "转账最大金额99999999元") @DecimalMin(value = "0.01", message = "转账最小金额0.01元") @NotBlank(message = "转账金额必填项") - private BigDecimal amount; + private String amount; /** * 转账金额 diff --git a/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java b/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java index 9bcb5ba..8a96830 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java +++ b/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java @@ -61,7 +61,7 @@ public class OpenApiTransferAccountsServiceImpl implements OpenApiTransferAccoun transferAccounts.setReceiverPlatformNo(platform.getPlatformNo()); transferAccountsService.editData(transferAccounts); - /* // 调用渠道转账 + // 调用渠道转账 JSONObject orgTransfer = tianQueFundManageService.orgTransfer( transferAccounts.getReceiverPlatformNo(), transferAccounts.getOrderNo(), @@ -72,7 +72,7 @@ public class OpenApiTransferAccountsServiceImpl implements OpenApiTransferAccoun transferAccounts.setReceiverPlatformNo(orgTransfer.getString("transactionNo")); transferAccounts.setSettleDate(DateUtil.format(orgTransfer.getString("clrDt"), "yyyyMMdd")); transferAccounts.setTransferTime(DateUtil.format(orgTransfer.getString("transactionTime"), "yyyy-MM-dd HH:mm:ss")); - transferAccountsService.editData(transferAccounts);*/ + transferAccountsService.editData(transferAccounts); Map map = new HashMap<>(); map.put("orderNo", transferAccounts.getOrderNo()); diff --git a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java index 51875c4..e615b6f 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java +++ b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java @@ -84,12 +84,11 @@ public class SignatureUtil { public static void main(String[] args) throws Exception { String paramStr = "{\n" + - " \"merchantNo\": \"2023053014340172109\",\n" + - " \"billDateS\": 1693584000000,\n" + - " \"billDateE\": 1693584000000,\n" + + " \"merchantNo\": \"2023090616352962600\",\n" + + " \"orderNo\": \"100001\"" + "}"; - String sign = createSign(JSONObject.parseObject(paramStr), "uAZAmX9CLJ3VmPhfi4GN8qpFifyfw0cF"); + String sign = createSign(JSONObject.parseObject(paramStr), "tglpZHbMLS8URfGeNqn82MGMcVRU9GtO"); System.out.println(sign); } diff --git a/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java b/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java index 7d23b72..f9e3979 100644 --- a/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java +++ b/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java @@ -9,8 +9,8 @@ import java.util.Objects; * @date: 2023/10/23 **/ public enum TransferAccountsCreateType { - type1(0, "系统自动"), - type2(1, "API"), + type1(1, "系统自动"), + type2(2, "API"), ; private Integer number;