From 49ee1762abf13f65cf5f3f6affd2a6618cfab6bd Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 28 Jul 2023 10:39:12 +0800 Subject: [PATCH] =?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/bweb/controller/BsMerController.java | 40 + .../cweb/controller/BsMerRateController.java | 187 +++ .../controller/BsMerSettleAcctController.java | 1 - .../main/java/com/hfkj/schedule/Merchant.java | 59 +- .../com/hfkj/channel/saas/SaasMerService.java | 50 + .../hfkj/channel/saas/config/SaasConfig.java | 8 +- .../hfkj/dao/BsMerRateApplyDetailMapper.java | 125 ++ .../dao/BsMerRateApplyDetailMapperExt.java | 7 + .../dao/BsMerRateApplyDetailSqlProvider.java | 332 ++++++ .../com/hfkj/dao/BsMerRateApplyMapper.java | 125 ++ .../com/hfkj/dao/BsMerRateApplyMapperExt.java | 7 + .../hfkj/dao/BsMerRateApplySqlProvider.java | 332 ++++++ .../java/com/hfkj/entity/BsMerRateApply.java | 243 ++++ .../com/hfkj/entity/BsMerRateApplyDetail.java | 233 ++++ .../entity/BsMerRateApplyDetailExample.java | 994 ++++++++++++++++ .../hfkj/entity/BsMerRateApplyExample.java | 1013 +++++++++++++++++ .../hfkj/service/BsMerRateApplyService.java | 62 + .../hfkj/service/impl/BsAuditServiceImpl.java | 20 +- .../impl/BsMerRateApplyServiceImpl.java | 131 +++ .../hfkj/sysenum/AuditVocationalWorkType.java | 1 + .../hfkj/sysenum/MerRateApplyStatusEnum.java | 53 + 21 files changed, 4012 insertions(+), 11 deletions(-) create mode 100644 cweb/src/main/java/com/cweb/controller/BsMerRateController.java create mode 100644 service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/dao/BsMerRateApplyMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/BsMerRateApplyMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/BsMerRateApplySqlProvider.java create mode 100644 service/src/main/java/com/hfkj/entity/BsMerRateApply.java create mode 100644 service/src/main/java/com/hfkj/entity/BsMerRateApplyDetail.java create mode 100644 service/src/main/java/com/hfkj/entity/BsMerRateApplyDetailExample.java create mode 100644 service/src/main/java/com/hfkj/entity/BsMerRateApplyExample.java create mode 100644 service/src/main/java/com/hfkj/service/BsMerRateApplyService.java create mode 100644 service/src/main/java/com/hfkj/service/impl/BsMerRateApplyServiceImpl.java create mode 100644 service/src/main/java/com/hfkj/sysenum/MerRateApplyStatusEnum.java diff --git a/bweb/src/main/java/com/bweb/controller/BsMerController.java b/bweb/src/main/java/com/bweb/controller/BsMerController.java index e829f38..cc5d02c 100644 --- a/bweb/src/main/java/com/bweb/controller/BsMerController.java +++ b/bweb/src/main/java/com/bweb/controller/BsMerController.java @@ -1,5 +1,6 @@ package com.bweb.controller; +import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.hfkj.common.exception.ErrorCode; @@ -10,11 +11,13 @@ import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.config.CommonSysConst; import com.hfkj.entity.BsMer; import com.hfkj.entity.BsMerPlatformNo; +import com.hfkj.entity.BsSalesman; import com.hfkj.model.ResponseData; import com.hfkj.model.UserInfoModel; import com.hfkj.obs.HuaWeiYunObs; import com.hfkj.service.BsMerPlatformNoService; import com.hfkj.service.BsMerService; +import com.hfkj.service.BsSalesmanService; import com.hfkj.service.SecUserService; import com.hfkj.sysenum.PlatformTypeEnum; import com.hfkj.sysenum.SecUserTypeEnum; @@ -46,6 +49,9 @@ public class BsMerController { @Resource private BsMerService merService; + @Resource + private BsSalesmanService salesmanService; + @Resource private UserCenter userCenter; @@ -111,4 +117,38 @@ public class BsMerController { } } + @RequestMapping(value="/merMigrateSalesman",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "商户迁移业务员") + public ResponseData merMigrateSalesman(@RequestBody JSONObject body) { + try { + if (body == null + || body.getLong("salesmanId") == null + || body.getJSONArray("merList") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + // 业务员 + BsSalesman salesman = salesmanService.getSalesman(body.getLong("salesmanId")); + if (salesman == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "业务员不存在"); + } + + for (Object merId : body.getJSONArray("merList")) { + // 商户 + BsMer mer = merService.getMer(Long.parseLong(merId.toString())); + if (mer == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户不存在"); + } + mer.setSalesmanId(salesman.getId()); + mer.setSalesmanName(salesman.getName()); + merService.editMer(mer); + } + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } } diff --git a/cweb/src/main/java/com/cweb/controller/BsMerRateController.java b/cweb/src/main/java/com/cweb/controller/BsMerRateController.java new file mode 100644 index 0000000..7a0c9ee --- /dev/null +++ b/cweb/src/main/java/com/cweb/controller/BsMerRateController.java @@ -0,0 +1,187 @@ +package com.cweb.controller; + +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.BsMerRateApply; +import com.hfkj.entity.BsMerRateApplyDetail; +import com.hfkj.entity.SecDictionary; +import com.hfkj.model.ResponseData; +import com.hfkj.service.BsMerRateApplyService; +import com.hfkj.service.BsMerRateService; +import com.hfkj.service.BsMerService; +import com.hfkj.service.CommonService; +import com.hfkj.sysenum.MerRateApplyStatusEnum; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @className: BsMerRateController + * @author: HuRui + * @date: 2023/7/25 + **/@Controller +@Api(value = "商户费率信息") +@RequestMapping(value = "/merRate") +public class BsMerRateController { + + private static Logger log = LoggerFactory.getLogger(BsMerRateController.class); + + @Resource + private BsMerService merService; + @Resource + private BsMerRateApplyService merRateApplyService; + @Resource + private BsMerRateService merRateService; + @Resource + private CommonService commonService; + + @RequestMapping(value="/getRateByMer",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "根据商户查询费率") + public ResponseData getRateByMer(@RequestParam(value = "merId" , required = true) Long merId) { + try { + + return ResponseMsgUtil.success(merRateService.getRateListByMerId(merId)); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/editRateApply",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "编辑费率申请") + public ResponseData editRateApply(@RequestBody JSONObject body) { + try { + + if (body == null + || body.getLong("merId") == null + || body.getJSONArray("rate") == null + || body.getJSONArray("rate").size() == 0) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + // 商户 + BsMer mer = merService.getMer(body.getLong("merId")); + if (mer == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + BsMerRateApply rateApply; + + if (body.getLong("rateApplyId") != null) { + // 查询申请详情 + rateApply = merRateApplyService.getRateApplyById(body.getLong("rateApplyId")); + if (rateApply == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的申请"); + } + if (rateApply.getStatus().equals(MerRateApplyStatusEnum.status2.getNumber()) + || rateApply.getStatus().equals(MerRateApplyStatusEnum.status3.getNumber()) + || rateApply.getStatus().equals(MerRateApplyStatusEnum.status5)) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前状态暂时无法修改"); + } + } else { + rateApply = new BsMerRateApply(); + } + + rateApply.setMerNo(mer.getMerNo()); + rateApply.setMerId(mer.getId()); + rateApply.setMerName(mer.getMerName()); + rateApply.setStatus(MerRateApplyStatusEnum.status2.getNumber()); + + BsMerRateApplyDetail rateApplyDetail = null; + List rateApplyDetailList = new ArrayList<>(); + for (Object obj : body.getJSONArray("rate")) { + JSONObject rateObject = (JSONObject) obj; + if (StringUtils.isBlank(rateObject.getString("rateTypeCode")) + || rateObject.getBigDecimal("ratePct") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + // 费率代码 + SecDictionary platformNoRate = commonService.mappingSysCode("MER_PLATFORM_NO_RATE", rateObject.getString("rateTypeCode")); + if (platformNoRate == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "费率代码错误"); + } + if (body.getLong("rateApplyId") != null) { + rateApplyDetail = merRateApplyService.getRateApplyDetail(body.getLong("rateApplyId"), Integer.parseInt(platformNoRate.getCodeValue())); + if (rateApplyDetail == null) { + rateApplyDetail = new BsMerRateApplyDetail(); + } + } else { + rateApplyDetail = new BsMerRateApplyDetail(); + } + rateApplyDetail.setRateTypeCode(Integer.parseInt(platformNoRate.getCodeValue())); + rateApplyDetail.setRateSaasTypeCode(platformNoRate.getExt2()); + rateApplyDetail.setRateTypeName(platformNoRate.getCodeName()); + rateApplyDetail.setRatePct(rateObject.getBigDecimal("ratePct")); + rateApplyDetailList.add(rateApplyDetail); + } + merRateApplyService.rateApply(rateApply,rateApplyDetailList); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/getRateApplyDetail",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询费率申请详情") + public ResponseData getRateApplyDetail(@RequestParam(value = "rateApplyId" , required = true) Long rateApplyId) { + try { + BsMerRateApply rateApply = merRateApplyService.getRateApplyById(rateApplyId); + if (rateApply == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的费率申请"); + } + rateApply.setMerRateApplyDetailList(merRateApplyService.getRateApplyDetailListByApply(rateApply.getId())); + + Map param = new HashMap<>(); + param.put("mer", merService.getMer(rateApply.getMerId())); + param.put("rateApply", rateApply); + return ResponseMsgUtil.success(param); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/getNewRateApplyDetail",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询最新费率申请") + public ResponseData getNewRateApplyDetail(@RequestParam(value = "merId" , required = true) Long merId) { + try { + + Map param = new HashMap<>(); + param.put("merId", merId); + List applyList = merRateApplyService.getRateApplyList(param); + if (applyList.size() > 0) { + BsMerRateApply rateApply = applyList.get(0); + rateApply.setMerRateApplyDetailList(merRateApplyService.getRateApplyDetailListByApply(rateApply.getId())); + return ResponseMsgUtil.success(rateApply); + } + return ResponseMsgUtil.success(null); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java b/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java index 86c8511..dd9d473 100644 --- a/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java +++ b/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java @@ -68,7 +68,6 @@ public class BsMerSettleAcctController { } } - @RequestMapping(value="/createApplyUpdateSettle",method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "创建申请修改结算") diff --git a/schedule/src/main/java/com/hfkj/schedule/Merchant.java b/schedule/src/main/java/com/hfkj/schedule/Merchant.java index 05e035c..c1cfd53 100644 --- a/schedule/src/main/java/com/hfkj/schedule/Merchant.java +++ b/schedule/src/main/java/com/hfkj/schedule/Merchant.java @@ -12,6 +12,8 @@ import com.hfkj.entity.*; import com.hfkj.service.*; import com.hfkj.sysenum.*; import lombok.SneakyThrows; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.util.StringUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Configuration; @@ -54,16 +56,14 @@ public class Merchant { @Resource private BsMerSettleAcctApplyService merSettleAcctApplyService; - @Resource private BsMerSettleAcctService merSettleAcctService; - @Resource - private WeiXinMerService weiXinMerService; - + private BsMerRateApplyService merRateApplyService; + @Resource + private BsMerRateService merRateService; @Resource private SaasMerService saasMerService; - @Resource private BsMerLedgerService merLedgerService; @Resource @@ -380,4 +380,53 @@ public class Merchant { } } + /** + * 修改费率审批查询并更新 + */ + @SneakyThrows + @Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次 + public void lklRateApply() { + Map param = new HashMap<>(); + param.put("status", MerRateApplyStatusEnum.status5.getNumber()); + List rateApplyList = merRateApplyService.getRateApplyList(param); + for (BsMerRateApply rateApply : rateApplyList) { + if (StringUtils.isNotBlank(rateApply.getApplyNo())) { + + JSONObject responseObj = saasMerService.updateReview(rateApply.getApplyNo()); + if (responseObj != null) { + if (responseObj.getString("reviewPass").equals("PASS")) { + rateApply.setStatus(MerRateApplyStatusEnum.status3.getNumber()); + merRateApplyService.editData(rateApply); + + // 旧费率 作废 + List oldMerRateList = merRateService.getRateListByMerId(rateApply.getMerId()); + for (BsMerRate merRate : oldMerRateList) { + merRate.setStatus(0); + merRateService.editMerRate(merRate); + } + + // 生成新费率 + List merRateApplyDetailList = merRateApplyService.getRateApplyDetailListByApply(rateApply.getId()); + for (BsMerRateApplyDetail rateApplyDetail : merRateApplyDetailList) { + BsMerRate newMerRate = new BsMerRate(); + newMerRate.setMerId(rateApply.getMerId()); + newMerRate.setMerNo(rateApply.getMerNo()); + newMerRate.setRateTypeCode(rateApplyDetail.getRateTypeCode()); + newMerRate.setRateTypeName(rateApplyDetail.getRateTypeName()); + newMerRate.setRateSaasTypeCode(rateApplyDetail.getRateSaasTypeCode()); + newMerRate.setRatePct(rateApplyDetail.getRatePct()); + newMerRate.setStatus(1); + merRateService.editMerRate(newMerRate); + } + + } else if (responseObj.getString("reviewPass").equals("UNPASS")) { + rateApply.setStatus(MerRateApplyStatusEnum.status6.getNumber()); + rateApply.setRejectReason(responseObj.getString("reviewResult")); + merRateApplyService.editData(rateApply); + } + } + } + } + } + } diff --git a/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java b/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java index ecaacc3..dabde7a 100644 --- a/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java +++ b/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java @@ -53,6 +53,8 @@ public class SaasMerService { @Resource private BsMerRateService merRateService; @Resource + private BsMerRateApplyService merRateApplyService; + @Resource private BsMerSettleAcctApplyService merSettleAcctApplyService; @Resource @@ -429,6 +431,54 @@ public class SaasMerService { } + /** + * 修改费率 + * @param merRateApplyId 申请id + * @return + */ + public JSONObject updateFeeApply(Long merRateApplyId) { + // 修改费率申请 + BsMerRateApply rateApply = merRateApplyService.getRateApplyById(merRateApplyId); + if (rateApply == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "未知的申请"); + } + // 平台商户 + BsMerPlatformNo merPlatformNo = merPlatformNoService.getPlatformNo(rateApply.getMerId(), PlatformTypeEnum.type1); + if (merPlatformNo == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "未找到平台商户号"); + } + Map param = new HashMap<>(); + param.put("productCode", "PAPER_CODE"); + param.put("settlementType", "AUTOMATIC"); + // 商户费率 + List> feesMapList = new ArrayList<>(); + Map feesMap; + List rateList = merRateApplyService.getRateApplyDetailListByApply(rateApply.getId()); + for (BsMerRateApplyDetail rate : rateList) { + feesMap = new HashMap<>(); + feesMap.put("fee", rate.getRatePct()); + feesMap.put("feeType", rate.getRateSaasTypeCode()); + if (StringUtils.isNotBlank(rate.getExt1())) { + feesMap.put("topFee", rate.getExt1()); + } + feesMapList.add(feesMap); + } + param.put("fees", feesMapList); + + Map header = new HashMap<>(); + header.put("Authorization", "bearer " + saasCommon.getUpdateToken()); + + JSONObject responseObj = HttpsUtils.doPost(SaasConfig.requestMerUrl + "channel/customer/update/fee/" + merPlatformNo.getPlatformNo(), param, header); + System.out.println("商户号:" + merPlatformNo.getPlatformNo() + " " + merPlatformNo.getCupNo()); + System.out.println("body:" + JSONObject.toJSONString(param)); + System.out.println("response:" + responseObj.toJSONString()); + if (responseObj == null || !responseObj.getString("message").equals("SUCCESS")) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseObj.getString("message")); + } + rateApply.setApplyNo(responseObj.getString("reviewRelatedId")); + merRateApplyService.editData(rateApply); + return responseObj; + } /** * 修改费率 diff --git a/service/src/main/java/com/hfkj/channel/saas/config/SaasConfig.java b/service/src/main/java/com/hfkj/channel/saas/config/SaasConfig.java index 2b6fbe1..f5d7ea1 100644 --- a/service/src/main/java/com/hfkj/channel/saas/config/SaasConfig.java +++ b/service/src/main/java/com/hfkj/channel/saas/config/SaasConfig.java @@ -20,10 +20,10 @@ public class SaasConfig { public static String activityId = CommonSysConst.getSysConfig().getLkl_saas_activity_id(); public static String userNo = CommonSysConst.getSysConfig().getLkl_saas_user_no(); - // public static String username = "13200000001"; - // public static String password = "12345qwert"; - public static String username = "13638395536"; - public static String password = "lkl1qaz"; + public static String username = "13200000001"; + public static String password = "12345qwert"; + //public static String username = "13638395536"; + //public static String password = "lkl1qaz"; /* public static String requestMerRegistrationTokenUrl = "https://test.wsmsd.cn/sit/htkauth/oauth/token"; public static String requestMerRegistrationUrl = "https://test.wsmsd.cn/sit/htkregistration/merchant/"; diff --git a/service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailMapper.java b/service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailMapper.java new file mode 100644 index 0000000..f642e26 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailMapper.java @@ -0,0 +1,125 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerRateApplyDetail; +import com.hfkj.entity.BsMerRateApplyDetailExample; +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 BsMerRateApplyDetailMapper extends BsMerRateApplyDetailMapperExt { + @SelectProvider(type=BsMerRateApplyDetailSqlProvider.class, method="countByExample") + long countByExample(BsMerRateApplyDetailExample example); + + @DeleteProvider(type=BsMerRateApplyDetailSqlProvider.class, method="deleteByExample") + int deleteByExample(BsMerRateApplyDetailExample example); + + @Delete({ + "delete from bs_mer_rate_apply_detail", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_mer_rate_apply_detail (mer_rate_apply_id, rate_type_code, ", + "rate_saas_type_code, rate_type_name, ", + "rate_pct, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{merRateApplyId,jdbcType=BIGINT}, #{rateTypeCode,jdbcType=INTEGER}, ", + "#{rateSaasTypeCode,jdbcType=VARCHAR}, #{rateTypeName,jdbcType=VARCHAR}, ", + "#{ratePct,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsMerRateApplyDetail record); + + @InsertProvider(type=BsMerRateApplyDetailSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsMerRateApplyDetail record); + + @SelectProvider(type=BsMerRateApplyDetailSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_rate_apply_id", property="merRateApplyId", jdbcType=JdbcType.BIGINT), + @Result(column="rate_type_code", property="rateTypeCode", jdbcType=JdbcType.INTEGER), + @Result(column="rate_saas_type_code", property="rateSaasTypeCode", jdbcType=JdbcType.VARCHAR), + @Result(column="rate_type_name", property="rateTypeName", jdbcType=JdbcType.VARCHAR), + @Result(column="rate_pct", property="ratePct", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsMerRateApplyDetailExample example); + + @Select({ + "select", + "id, mer_rate_apply_id, rate_type_code, rate_saas_type_code, rate_type_name, ", + "rate_pct, `status`, create_time, update_time, ext_1, ext_2, ext_3", + "from bs_mer_rate_apply_detail", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_rate_apply_id", property="merRateApplyId", jdbcType=JdbcType.BIGINT), + @Result(column="rate_type_code", property="rateTypeCode", jdbcType=JdbcType.INTEGER), + @Result(column="rate_saas_type_code", property="rateSaasTypeCode", jdbcType=JdbcType.VARCHAR), + @Result(column="rate_type_name", property="rateTypeName", jdbcType=JdbcType.VARCHAR), + @Result(column="rate_pct", property="ratePct", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsMerRateApplyDetail selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsMerRateApplyDetailSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsMerRateApplyDetail record, @Param("example") BsMerRateApplyDetailExample example); + + @UpdateProvider(type=BsMerRateApplyDetailSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsMerRateApplyDetail record, @Param("example") BsMerRateApplyDetailExample example); + + @UpdateProvider(type=BsMerRateApplyDetailSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsMerRateApplyDetail record); + + @Update({ + "update bs_mer_rate_apply_detail", + "set mer_rate_apply_id = #{merRateApplyId,jdbcType=BIGINT},", + "rate_type_code = #{rateTypeCode,jdbcType=INTEGER},", + "rate_saas_type_code = #{rateSaasTypeCode,jdbcType=VARCHAR},", + "rate_type_name = #{rateTypeName,jdbcType=VARCHAR},", + "rate_pct = #{ratePct,jdbcType=DECIMAL},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsMerRateApplyDetail record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailMapperExt.java new file mode 100644 index 0000000..f58f183 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsMerRateApplyDetailMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailSqlProvider.java new file mode 100644 index 0000000..36b6b06 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerRateApplyDetailSqlProvider.java @@ -0,0 +1,332 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerRateApplyDetail; +import com.hfkj.entity.BsMerRateApplyDetailExample.Criteria; +import com.hfkj.entity.BsMerRateApplyDetailExample.Criterion; +import com.hfkj.entity.BsMerRateApplyDetailExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsMerRateApplyDetailSqlProvider { + + public String countByExample(BsMerRateApplyDetailExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_mer_rate_apply_detail"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsMerRateApplyDetailExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_mer_rate_apply_detail"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsMerRateApplyDetail record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_mer_rate_apply_detail"); + + if (record.getMerRateApplyId() != null) { + sql.VALUES("mer_rate_apply_id", "#{merRateApplyId,jdbcType=BIGINT}"); + } + + if (record.getRateTypeCode() != null) { + sql.VALUES("rate_type_code", "#{rateTypeCode,jdbcType=INTEGER}"); + } + + if (record.getRateSaasTypeCode() != null) { + sql.VALUES("rate_saas_type_code", "#{rateSaasTypeCode,jdbcType=VARCHAR}"); + } + + if (record.getRateTypeName() != null) { + sql.VALUES("rate_type_name", "#{rateTypeName,jdbcType=VARCHAR}"); + } + + if (record.getRatePct() != null) { + sql.VALUES("rate_pct", "#{ratePct,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(BsMerRateApplyDetailExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_rate_apply_id"); + sql.SELECT("rate_type_code"); + sql.SELECT("rate_saas_type_code"); + sql.SELECT("rate_type_name"); + sql.SELECT("rate_pct"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_mer_rate_apply_detail"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsMerRateApplyDetail record = (BsMerRateApplyDetail) parameter.get("record"); + BsMerRateApplyDetailExample example = (BsMerRateApplyDetailExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_mer_rate_apply_detail"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getMerRateApplyId() != null) { + sql.SET("mer_rate_apply_id = #{record.merRateApplyId,jdbcType=BIGINT}"); + } + + if (record.getRateTypeCode() != null) { + sql.SET("rate_type_code = #{record.rateTypeCode,jdbcType=INTEGER}"); + } + + if (record.getRateSaasTypeCode() != null) { + sql.SET("rate_saas_type_code = #{record.rateSaasTypeCode,jdbcType=VARCHAR}"); + } + + if (record.getRateTypeName() != null) { + sql.SET("rate_type_name = #{record.rateTypeName,jdbcType=VARCHAR}"); + } + + if (record.getRatePct() != null) { + sql.SET("rate_pct = #{record.ratePct,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_mer_rate_apply_detail"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_rate_apply_id = #{record.merRateApplyId,jdbcType=BIGINT}"); + sql.SET("rate_type_code = #{record.rateTypeCode,jdbcType=INTEGER}"); + sql.SET("rate_saas_type_code = #{record.rateSaasTypeCode,jdbcType=VARCHAR}"); + sql.SET("rate_type_name = #{record.rateTypeName,jdbcType=VARCHAR}"); + sql.SET("rate_pct = #{record.ratePct,jdbcType=DECIMAL}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsMerRateApplyDetailExample example = (BsMerRateApplyDetailExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsMerRateApplyDetail record) { + SQL sql = new SQL(); + sql.UPDATE("bs_mer_rate_apply_detail"); + + if (record.getMerRateApplyId() != null) { + sql.SET("mer_rate_apply_id = #{merRateApplyId,jdbcType=BIGINT}"); + } + + if (record.getRateTypeCode() != null) { + sql.SET("rate_type_code = #{rateTypeCode,jdbcType=INTEGER}"); + } + + if (record.getRateSaasTypeCode() != null) { + sql.SET("rate_saas_type_code = #{rateSaasTypeCode,jdbcType=VARCHAR}"); + } + + if (record.getRateTypeName() != null) { + sql.SET("rate_type_name = #{rateTypeName,jdbcType=VARCHAR}"); + } + + if (record.getRatePct() != null) { + sql.SET("rate_pct = #{ratePct,jdbcType=DECIMAL}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsMerRateApplyDetailExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerRateApplyMapper.java b/service/src/main/java/com/hfkj/dao/BsMerRateApplyMapper.java new file mode 100644 index 0000000..4c446a3 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerRateApplyMapper.java @@ -0,0 +1,125 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerRateApply; +import com.hfkj.entity.BsMerRateApplyExample; +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 BsMerRateApplyMapper extends BsMerRateApplyMapperExt { + @SelectProvider(type=BsMerRateApplySqlProvider.class, method="countByExample") + long countByExample(BsMerRateApplyExample example); + + @DeleteProvider(type=BsMerRateApplySqlProvider.class, method="deleteByExample") + int deleteByExample(BsMerRateApplyExample example); + + @Delete({ + "delete from bs_mer_rate_apply", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_mer_rate_apply (apply_no, mer_no, ", + "mer_id, mer_name, `status`, ", + "reject_reason, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", + "values (#{applyNo,jdbcType=VARCHAR}, #{merNo,jdbcType=VARCHAR}, ", + "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{rejectReason,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsMerRateApply record); + + @InsertProvider(type=BsMerRateApplySqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsMerRateApply record); + + @SelectProvider(type=BsMerRateApplySqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="reject_reason", property="rejectReason", jdbcType=JdbcType.VARCHAR), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsMerRateApplyExample example); + + @Select({ + "select", + "id, apply_no, mer_no, mer_id, mer_name, `status`, reject_reason, create_time, ", + "update_time, ext_1, ext_2, ext_3", + "from bs_mer_rate_apply", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="reject_reason", property="rejectReason", jdbcType=JdbcType.VARCHAR), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsMerRateApply selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsMerRateApplySqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsMerRateApply record, @Param("example") BsMerRateApplyExample example); + + @UpdateProvider(type=BsMerRateApplySqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsMerRateApply record, @Param("example") BsMerRateApplyExample example); + + @UpdateProvider(type=BsMerRateApplySqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsMerRateApply record); + + @Update({ + "update bs_mer_rate_apply", + "set apply_no = #{applyNo,jdbcType=VARCHAR},", + "mer_no = #{merNo,jdbcType=VARCHAR},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "reject_reason = #{rejectReason,jdbcType=VARCHAR},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsMerRateApply record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerRateApplyMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMerRateApplyMapperExt.java new file mode 100644 index 0000000..19904ad --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerRateApplyMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsMerRateApplyMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerRateApplySqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMerRateApplySqlProvider.java new file mode 100644 index 0000000..48ce1f1 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerRateApplySqlProvider.java @@ -0,0 +1,332 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerRateApply; +import com.hfkj.entity.BsMerRateApplyExample.Criteria; +import com.hfkj.entity.BsMerRateApplyExample.Criterion; +import com.hfkj.entity.BsMerRateApplyExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsMerRateApplySqlProvider { + + public String countByExample(BsMerRateApplyExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_mer_rate_apply"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsMerRateApplyExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_mer_rate_apply"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsMerRateApply record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_mer_rate_apply"); + + if (record.getApplyNo() != null) { + sql.VALUES("apply_no", "#{applyNo,jdbcType=VARCHAR}"); + } + + if (record.getMerNo() != null) { + sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getRejectReason() != null) { + sql.VALUES("reject_reason", "#{rejectReason,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(BsMerRateApplyExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("apply_no"); + sql.SELECT("mer_no"); + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("`status`"); + sql.SELECT("reject_reason"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_mer_rate_apply"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsMerRateApply record = (BsMerRateApply) parameter.get("record"); + BsMerRateApplyExample example = (BsMerRateApplyExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_mer_rate_apply"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getApplyNo() != null) { + sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getRejectReason() != null) { + sql.SET("reject_reason = #{record.rejectReason,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_mer_rate_apply"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}"); + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("reject_reason = #{record.rejectReason,jdbcType=VARCHAR}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsMerRateApplyExample example = (BsMerRateApplyExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsMerRateApply record) { + SQL sql = new SQL(); + sql.UPDATE("bs_mer_rate_apply"); + + if (record.getApplyNo() != null) { + sql.SET("apply_no = #{applyNo,jdbcType=VARCHAR}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getRejectReason() != null) { + sql.SET("reject_reason = #{rejectReason,jdbcType=VARCHAR}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsMerRateApplyExample 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/BsMerRateApply.java b/service/src/main/java/com/hfkj/entity/BsMerRateApply.java new file mode 100644 index 0000000..b2b8f32 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerRateApply.java @@ -0,0 +1,243 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * bs_mer_rate_apply + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsMerRateApply implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 申请编号 + */ + private String applyNo; + + /** + * 商户号 + */ + private String merNo; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户名称 + */ + private String merName; + + /** + * 状态 0:删除 1:待提交 2:审核中 3:通过 4:驳回 5 :渠道审核中 6:渠道驳回 + */ + private Integer status; + + /** + * 驳回原因 + */ + private String rejectReason; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + List merRateApplyDetailList; + + public List getMerRateApplyDetailList() { + return merRateApplyDetailList; + } + + public void setMerRateApplyDetailList(List merRateApplyDetailList) { + this.merRateApplyDetailList = merRateApplyDetailList; + } + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getApplyNo() { + return applyNo; + } + + public void setApplyNo(String applyNo) { + this.applyNo = applyNo; + } + + public String getMerNo() { + return merNo; + } + + public void setMerNo(String merNo) { + this.merNo = merNo; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getRejectReason() { + return rejectReason; + } + + public void setRejectReason(String rejectReason) { + this.rejectReason = rejectReason; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsMerRateApply other = (BsMerRateApply) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getApplyNo() == null ? other.getApplyNo() == null : this.getApplyNo().equals(other.getApplyNo())) + && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getRejectReason() == null ? other.getRejectReason() == null : this.getRejectReason().equals(other.getRejectReason())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getApplyNo() == null) ? 0 : getApplyNo().hashCode()); + result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getRejectReason() == null) ? 0 : getRejectReason().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", applyNo=").append(applyNo); + sb.append(", merNo=").append(merNo); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + sb.append(", status=").append(status); + sb.append(", rejectReason=").append(rejectReason); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} diff --git a/service/src/main/java/com/hfkj/entity/BsMerRateApplyDetail.java b/service/src/main/java/com/hfkj/entity/BsMerRateApplyDetail.java new file mode 100644 index 0000000..b3a08a8 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerRateApplyDetail.java @@ -0,0 +1,233 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_mer_rate_apply_detail + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsMerRateApplyDetail implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 费率申请id + */ + private Long merRateApplyId; + + /** + * 费率类型代码 + */ + private Integer rateTypeCode; + + /** + * 费率类型代码【拉卡拉SAAS平台代码】 + */ + private String rateSaasTypeCode; + + /** + * 费率类型名称 + */ + private String rateTypeName; + + /** + * 手续费率(%) 例如:0.6 + */ + private BigDecimal ratePct; + + /** + * 状态 0:不可用 1:可用 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMerRateApplyId() { + return merRateApplyId; + } + + public void setMerRateApplyId(Long merRateApplyId) { + this.merRateApplyId = merRateApplyId; + } + + public Integer getRateTypeCode() { + return rateTypeCode; + } + + public void setRateTypeCode(Integer rateTypeCode) { + this.rateTypeCode = rateTypeCode; + } + + public String getRateSaasTypeCode() { + return rateSaasTypeCode; + } + + public void setRateSaasTypeCode(String rateSaasTypeCode) { + this.rateSaasTypeCode = rateSaasTypeCode; + } + + public String getRateTypeName() { + return rateTypeName; + } + + public void setRateTypeName(String rateTypeName) { + this.rateTypeName = rateTypeName; + } + + public BigDecimal getRatePct() { + return ratePct; + } + + public void setRatePct(BigDecimal ratePct) { + this.ratePct = ratePct; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsMerRateApplyDetail other = (BsMerRateApplyDetail) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerRateApplyId() == null ? other.getMerRateApplyId() == null : this.getMerRateApplyId().equals(other.getMerRateApplyId())) + && (this.getRateTypeCode() == null ? other.getRateTypeCode() == null : this.getRateTypeCode().equals(other.getRateTypeCode())) + && (this.getRateSaasTypeCode() == null ? other.getRateSaasTypeCode() == null : this.getRateSaasTypeCode().equals(other.getRateSaasTypeCode())) + && (this.getRateTypeName() == null ? other.getRateTypeName() == null : this.getRateTypeName().equals(other.getRateTypeName())) + && (this.getRatePct() == null ? other.getRatePct() == null : this.getRatePct().equals(other.getRatePct())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMerRateApplyId() == null) ? 0 : getMerRateApplyId().hashCode()); + result = prime * result + ((getRateTypeCode() == null) ? 0 : getRateTypeCode().hashCode()); + result = prime * result + ((getRateSaasTypeCode() == null) ? 0 : getRateSaasTypeCode().hashCode()); + result = prime * result + ((getRateTypeName() == null) ? 0 : getRateTypeName().hashCode()); + result = prime * result + ((getRatePct() == null) ? 0 : getRatePct().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", merRateApplyId=").append(merRateApplyId); + sb.append(", rateTypeCode=").append(rateTypeCode); + sb.append(", rateSaasTypeCode=").append(rateSaasTypeCode); + sb.append(", rateTypeName=").append(rateTypeName); + sb.append(", ratePct=").append(ratePct); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMerRateApplyDetailExample.java b/service/src/main/java/com/hfkj/entity/BsMerRateApplyDetailExample.java new file mode 100644 index 0000000..5d18065 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerRateApplyDetailExample.java @@ -0,0 +1,994 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsMerRateApplyDetailExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsMerRateApplyDetailExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdIsNull() { + addCriterion("mer_rate_apply_id is null"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdIsNotNull() { + addCriterion("mer_rate_apply_id is not null"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdEqualTo(Long value) { + addCriterion("mer_rate_apply_id =", value, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdNotEqualTo(Long value) { + addCriterion("mer_rate_apply_id <>", value, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdGreaterThan(Long value) { + addCriterion("mer_rate_apply_id >", value, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_rate_apply_id >=", value, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdLessThan(Long value) { + addCriterion("mer_rate_apply_id <", value, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdLessThanOrEqualTo(Long value) { + addCriterion("mer_rate_apply_id <=", value, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdIn(List values) { + addCriterion("mer_rate_apply_id in", values, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdNotIn(List values) { + addCriterion("mer_rate_apply_id not in", values, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdBetween(Long value1, Long value2) { + addCriterion("mer_rate_apply_id between", value1, value2, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andMerRateApplyIdNotBetween(Long value1, Long value2) { + addCriterion("mer_rate_apply_id not between", value1, value2, "merRateApplyId"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeIsNull() { + addCriterion("rate_type_code is null"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeIsNotNull() { + addCriterion("rate_type_code is not null"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeEqualTo(Integer value) { + addCriterion("rate_type_code =", value, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeNotEqualTo(Integer value) { + addCriterion("rate_type_code <>", value, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeGreaterThan(Integer value) { + addCriterion("rate_type_code >", value, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeGreaterThanOrEqualTo(Integer value) { + addCriterion("rate_type_code >=", value, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeLessThan(Integer value) { + addCriterion("rate_type_code <", value, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeLessThanOrEqualTo(Integer value) { + addCriterion("rate_type_code <=", value, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeIn(List values) { + addCriterion("rate_type_code in", values, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeNotIn(List values) { + addCriterion("rate_type_code not in", values, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeBetween(Integer value1, Integer value2) { + addCriterion("rate_type_code between", value1, value2, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeCodeNotBetween(Integer value1, Integer value2) { + addCriterion("rate_type_code not between", value1, value2, "rateTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeIsNull() { + addCriterion("rate_saas_type_code is null"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeIsNotNull() { + addCriterion("rate_saas_type_code is not null"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeEqualTo(String value) { + addCriterion("rate_saas_type_code =", value, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeNotEqualTo(String value) { + addCriterion("rate_saas_type_code <>", value, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeGreaterThan(String value) { + addCriterion("rate_saas_type_code >", value, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeGreaterThanOrEqualTo(String value) { + addCriterion("rate_saas_type_code >=", value, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeLessThan(String value) { + addCriterion("rate_saas_type_code <", value, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeLessThanOrEqualTo(String value) { + addCriterion("rate_saas_type_code <=", value, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeLike(String value) { + addCriterion("rate_saas_type_code like", value, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeNotLike(String value) { + addCriterion("rate_saas_type_code not like", value, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeIn(List values) { + addCriterion("rate_saas_type_code in", values, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeNotIn(List values) { + addCriterion("rate_saas_type_code not in", values, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeBetween(String value1, String value2) { + addCriterion("rate_saas_type_code between", value1, value2, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateSaasTypeCodeNotBetween(String value1, String value2) { + addCriterion("rate_saas_type_code not between", value1, value2, "rateSaasTypeCode"); + return (Criteria) this; + } + + public Criteria andRateTypeNameIsNull() { + addCriterion("rate_type_name is null"); + return (Criteria) this; + } + + public Criteria andRateTypeNameIsNotNull() { + addCriterion("rate_type_name is not null"); + return (Criteria) this; + } + + public Criteria andRateTypeNameEqualTo(String value) { + addCriterion("rate_type_name =", value, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameNotEqualTo(String value) { + addCriterion("rate_type_name <>", value, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameGreaterThan(String value) { + addCriterion("rate_type_name >", value, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameGreaterThanOrEqualTo(String value) { + addCriterion("rate_type_name >=", value, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameLessThan(String value) { + addCriterion("rate_type_name <", value, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameLessThanOrEqualTo(String value) { + addCriterion("rate_type_name <=", value, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameLike(String value) { + addCriterion("rate_type_name like", value, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameNotLike(String value) { + addCriterion("rate_type_name not like", value, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameIn(List values) { + addCriterion("rate_type_name in", values, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameNotIn(List values) { + addCriterion("rate_type_name not in", values, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameBetween(String value1, String value2) { + addCriterion("rate_type_name between", value1, value2, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRateTypeNameNotBetween(String value1, String value2) { + addCriterion("rate_type_name not between", value1, value2, "rateTypeName"); + return (Criteria) this; + } + + public Criteria andRatePctIsNull() { + addCriterion("rate_pct is null"); + return (Criteria) this; + } + + public Criteria andRatePctIsNotNull() { + addCriterion("rate_pct is not null"); + return (Criteria) this; + } + + public Criteria andRatePctEqualTo(BigDecimal value) { + addCriterion("rate_pct =", value, "ratePct"); + return (Criteria) this; + } + + public Criteria andRatePctNotEqualTo(BigDecimal value) { + addCriterion("rate_pct <>", value, "ratePct"); + return (Criteria) this; + } + + public Criteria andRatePctGreaterThan(BigDecimal value) { + addCriterion("rate_pct >", value, "ratePct"); + return (Criteria) this; + } + + public Criteria andRatePctGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("rate_pct >=", value, "ratePct"); + return (Criteria) this; + } + + public Criteria andRatePctLessThan(BigDecimal value) { + addCriterion("rate_pct <", value, "ratePct"); + return (Criteria) this; + } + + public Criteria andRatePctLessThanOrEqualTo(BigDecimal value) { + addCriterion("rate_pct <=", value, "ratePct"); + return (Criteria) this; + } + + public Criteria andRatePctIn(List values) { + addCriterion("rate_pct in", values, "ratePct"); + return (Criteria) this; + } + + public Criteria andRatePctNotIn(List values) { + addCriterion("rate_pct not in", values, "ratePct"); + return (Criteria) this; + } + + public Criteria andRatePctBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("rate_pct between", value1, value2, "ratePct"); + return (Criteria) this; + } + + public Criteria andRatePctNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("rate_pct not between", value1, value2, "ratePct"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMerRateApplyExample.java b/service/src/main/java/com/hfkj/entity/BsMerRateApplyExample.java new file mode 100644 index 0000000..e544a03 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerRateApplyExample.java @@ -0,0 +1,1013 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsMerRateApplyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsMerRateApplyExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andApplyNoIsNull() { + addCriterion("apply_no is null"); + return (Criteria) this; + } + + public Criteria andApplyNoIsNotNull() { + addCriterion("apply_no is not null"); + return (Criteria) this; + } + + public Criteria andApplyNoEqualTo(String value) { + addCriterion("apply_no =", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoNotEqualTo(String value) { + addCriterion("apply_no <>", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoGreaterThan(String value) { + addCriterion("apply_no >", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoGreaterThanOrEqualTo(String value) { + addCriterion("apply_no >=", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoLessThan(String value) { + addCriterion("apply_no <", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoLessThanOrEqualTo(String value) { + addCriterion("apply_no <=", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoLike(String value) { + addCriterion("apply_no like", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoNotLike(String value) { + addCriterion("apply_no not like", value, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoIn(List values) { + addCriterion("apply_no in", values, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoNotIn(List values) { + addCriterion("apply_no not in", values, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoBetween(String value1, String value2) { + addCriterion("apply_no between", value1, value2, "applyNo"); + return (Criteria) this; + } + + public Criteria andApplyNoNotBetween(String value1, String value2) { + addCriterion("apply_no not between", value1, value2, "applyNo"); + return (Criteria) this; + } + + public Criteria 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 andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria 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 andRejectReasonIsNull() { + addCriterion("reject_reason is null"); + return (Criteria) this; + } + + public Criteria andRejectReasonIsNotNull() { + addCriterion("reject_reason is not null"); + return (Criteria) this; + } + + public Criteria andRejectReasonEqualTo(String value) { + addCriterion("reject_reason =", value, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonNotEqualTo(String value) { + addCriterion("reject_reason <>", value, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonGreaterThan(String value) { + addCriterion("reject_reason >", value, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonGreaterThanOrEqualTo(String value) { + addCriterion("reject_reason >=", value, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonLessThan(String value) { + addCriterion("reject_reason <", value, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonLessThanOrEqualTo(String value) { + addCriterion("reject_reason <=", value, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonLike(String value) { + addCriterion("reject_reason like", value, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonNotLike(String value) { + addCriterion("reject_reason not like", value, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonIn(List values) { + addCriterion("reject_reason in", values, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonNotIn(List values) { + addCriterion("reject_reason not in", values, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonBetween(String value1, String value2) { + addCriterion("reject_reason between", value1, value2, "rejectReason"); + return (Criteria) this; + } + + public Criteria andRejectReasonNotBetween(String value1, String value2) { + addCriterion("reject_reason not between", value1, value2, "rejectReason"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/service/BsMerRateApplyService.java b/service/src/main/java/com/hfkj/service/BsMerRateApplyService.java new file mode 100644 index 0000000..14af5f1 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/BsMerRateApplyService.java @@ -0,0 +1,62 @@ +package com.hfkj.service; + +import com.hfkj.entity.BsMerRateApply; +import com.hfkj.entity.BsMerRateApplyDetail; + +import java.util.List; +import java.util.Map; + +/** + * @className: BsMerRateApplyService + * @author: HuRui + * @date: 2023/7/25 + **/ +public interface BsMerRateApplyService { + + /** + * 编辑数据 + * @param merRateApply + */ + void editData(BsMerRateApply merRateApply); + + /** + * 修改费率申请 + * @param merRateApply + * @param rateApplyDetailList + */ + void rateApply(BsMerRateApply merRateApply, List rateApplyDetailList); + + /** + * 根据id查询申请 + * @param id + * @return + */ + BsMerRateApply getRateApplyById(Long id); + + /** + * 查询费率申请详情 + * @param rateApplyId + * @param rateTypeCode + * @return + */ + BsMerRateApplyDetail getRateApplyDetail(Long rateApplyId,Integer rateTypeCode); + + /** + * 查询费率申请列表 + * @param param + */ + List getRateApplyList(Map param); + + /** + * 查询费率详情列表 + * @param rateApplyId + * @return + */ + List getRateApplyDetailListByApply(Long rateApplyId); + + /** + * 审核回调 + * @param merRateApply + */ + void approveCallback(BsMerRateApply merRateApply); +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsAuditServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsAuditServiceImpl.java index 0708b4e..f3648ee 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsAuditServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsAuditServiceImpl.java @@ -6,12 +6,15 @@ import com.hfkj.common.exception.SysCode; import com.hfkj.dao.BsAuditMapper; import com.hfkj.entity.BsAudit; import com.hfkj.entity.BsAuditExample; +import com.hfkj.entity.BsMerRateApply; import com.hfkj.entity.BsMerSettleAcctApply; import com.hfkj.model.BsAuditModel; import com.hfkj.service.BsAuditService; +import com.hfkj.service.BsMerRateApplyService; import com.hfkj.service.BsMerSettleAcctApplyService; import com.hfkj.sysenum.AuditStatusEnum; import com.hfkj.sysenum.AuditVocationalWorkType; +import com.hfkj.sysenum.MerRateApplyStatusEnum; import com.hfkj.sysenum.MerSettleAcctApplyStatus; import org.apache.commons.collections4.MapUtils; import org.springframework.beans.BeanUtils; @@ -34,9 +37,10 @@ public class BsAuditServiceImpl implements BsAuditService { @Resource private BsAuditMapper auditMapper; - @Resource private BsMerSettleAcctApplyService merSettleAcctApplyService; + @Resource + private BsMerRateApplyService merRateApplyService; @Override public void editData(BsAudit audit) { @@ -81,6 +85,13 @@ public class BsAuditServiceImpl implements BsAuditService { acctApply.setStatus(MerSettleAcctApplyStatus.status5.getNumber()); merSettleAcctApplyService.applyUpdateSettleAcct(acctApply); } + + } else if (audit.getVocationalWorkType().equals(AuditVocationalWorkType.type2.getNumber())) { + BsMerRateApply merRateApply = merRateApplyService.getRateApplyById(audit.getAuditObjectId()); + if (merRateApply != null) { + merRateApply.setStatus(MerRateApplyStatusEnum.status5.getNumber()); + merRateApplyService.approveCallback(merRateApply); + } } } @@ -111,6 +122,13 @@ public class BsAuditServiceImpl implements BsAuditService { acctApply.setStatus(MerSettleAcctApplyStatus.status4.getNumber()); merSettleAcctApplyService.editData(acctApply); } + } else if (audit.getVocationalWorkType().equals(AuditVocationalWorkType.type2.getNumber())) { + BsMerRateApply merRateApply = merRateApplyService.getRateApplyById(audit.getAuditObjectId()); + if (merRateApply != null) { + merRateApply.setRejectReason(audit.getRejectReason()); + merRateApply.setStatus(MerRateApplyStatusEnum.status4.getNumber()); + merRateApplyService.editData(merRateApply); + } } } diff --git a/service/src/main/java/com/hfkj/service/impl/BsMerRateApplyServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsMerRateApplyServiceImpl.java new file mode 100644 index 0000000..a72b160 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/impl/BsMerRateApplyServiceImpl.java @@ -0,0 +1,131 @@ +package com.hfkj.service.impl; + +import com.hfkj.channel.saas.SaasMerService; +import com.hfkj.common.security.UserCenter; +import com.hfkj.dao.BsMerRateApplyDetailMapper; +import com.hfkj.dao.BsMerRateApplyMapper; +import com.hfkj.entity.*; +import com.hfkj.model.UserInfoModel; +import com.hfkj.service.BsAuditService; +import com.hfkj.service.BsMerRateApplyService; +import com.hfkj.sysenum.AuditStatusEnum; +import com.hfkj.sysenum.AuditVocationalWorkType; +import com.hfkj.sysenum.MerRateApplyStatusEnum; +import org.apache.commons.collections4.MapUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * @className: BsMerRateApplyServiceImpl + * @author: HuRui + * @date: 2023/7/25 + **/ +@Service("merRateApplyService") +public class BsMerRateApplyServiceImpl implements BsMerRateApplyService { + + @Resource + private BsMerRateApplyMapper merRateApplyMapper; + @Resource + private BsMerRateApplyDetailMapper merRateApplyDetailMapper; + @Resource + private BsAuditService auditService; + @Resource + private SaasMerService saasMerService; + @Resource + private UserCenter userCenter; + + @Override + public void editData(BsMerRateApply merRateApply) { + if (merRateApply.getId() == null) { + merRateApply.setCreateTime(new Date()); + merRateApply.setUpdateTime(new Date()); + merRateApplyMapper.insert(merRateApply); + } else { + merRateApply.setUpdateTime(new Date()); + merRateApplyMapper.updateByPrimaryKey(merRateApply); + } + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) + public void rateApply(BsMerRateApply merRateApply, List rateApplyDetailList) { + editData(merRateApply); + + for (BsMerRateApplyDetail merRateApplyDetail : rateApplyDetailList) { + merRateApplyDetail.setMerRateApplyId(merRateApply.getId()); + merRateApplyDetail.setStatus(1); + merRateApplyDetail.setCreateTime(new Date()); + merRateApplyDetail.setUpdateTime(new Date()); + merRateApplyDetailMapper.insert(merRateApplyDetail); + } + + UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); + + BsAudit audit = new BsAudit(); + audit.setAuditNo(System.currentTimeMillis()+""); + audit.setVocationalWorkType(AuditVocationalWorkType.type2.getNumber()); + audit.setVocationalWorkTypeName(AuditVocationalWorkType.type2.getName()); + audit.setAuditObjectId(merRateApply.getId()); + audit.setAuditObjectName(merRateApply.getMerName()); + audit.setOpUserId(userInfoModel.getSecUser().getId()); + audit.setOpUserName(userInfoModel.getSecUser().getUserName()); + audit.setReviewedUserId(userInfoModel.getSalesman().getAgentId()); + audit.setReviewedUserName(userInfoModel.getSalesman().getAgentName()); + audit.setStatus(AuditStatusEnum.status1.getNumber()); + auditService.createAudit(audit); + } + + @Override + public BsMerRateApply getRateApplyById(Long id) { + return merRateApplyMapper.selectByPrimaryKey(id); + } + + @Override + public BsMerRateApplyDetail getRateApplyDetail(Long rateApplyId, Integer rateTypeCode) { + BsMerRateApplyDetailExample example = new BsMerRateApplyDetailExample(); + example.createCriteria().andMerRateApplyIdEqualTo(rateApplyId).andRateTypeCodeEqualTo(rateTypeCode); + example.setOrderByClause("create_time desc"); + List list = merRateApplyDetailMapper.selectByExample(example); + if (list.size() > 0) { + return list.get(0); + } + return null; + } + + @Override + public List getRateApplyList(Map param) { + BsMerRateApplyExample example = new BsMerRateApplyExample(); + BsMerRateApplyExample.Criteria criteria = example.createCriteria() + .andStatusNotEqualTo(MerRateApplyStatusEnum.status0.getNumber()); + + if (MapUtils.getLong(param, "merId") != null) { + criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId")); + } + + if (MapUtils.getInteger(param, "status") != null) { + criteria.andStatusEqualTo(MapUtils.getInteger(param, "status")); + } + + example.setOrderByClause("create_time desc"); + return merRateApplyMapper.selectByExample(example); + } + + @Override + public List getRateApplyDetailListByApply(Long rateApplyId) { + BsMerRateApplyDetailExample example = new BsMerRateApplyDetailExample(); + example.createCriteria().andMerRateApplyIdEqualTo(rateApplyId); + return merRateApplyDetailMapper.selectByExample(example); + } + + @Override + public void approveCallback(BsMerRateApply merRateApply) { + editData(merRateApply); + saasMerService.updateFeeApply(merRateApply.getId()); + } +} diff --git a/service/src/main/java/com/hfkj/sysenum/AuditVocationalWorkType.java b/service/src/main/java/com/hfkj/sysenum/AuditVocationalWorkType.java index 9466c5d..aeda43e 100644 --- a/service/src/main/java/com/hfkj/sysenum/AuditVocationalWorkType.java +++ b/service/src/main/java/com/hfkj/sysenum/AuditVocationalWorkType.java @@ -8,6 +8,7 @@ package com.hfkj.sysenum; public enum AuditVocationalWorkType { type1(1, "修改商户结算"), + type2(2, "修改商户费率"), ; private Integer number; diff --git a/service/src/main/java/com/hfkj/sysenum/MerRateApplyStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/MerRateApplyStatusEnum.java new file mode 100644 index 0000000..1eafdc2 --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/MerRateApplyStatusEnum.java @@ -0,0 +1,53 @@ +package com.hfkj.sysenum; + +import java.util.Objects; + +/** + * 商户费率申请状态 + * @author hurui + */ +public enum MerRateApplyStatusEnum { + status0(0, "删除"), + status1(1, "待提交"), + status2(2, "审核中"), + status3(3, "通过"), + status4(4, "驳回"), + status5(5, "渠道审核中"), + status6(6, "渠道驳回"), + ; + + private Integer number; + + private String name; + + MerRateApplyStatusEnum(int number, String name) { + this.number = number; + this.name = name; + } + + public static MerRateApplyStatusEnum getDataByNumber(Integer number) { + for (MerRateApplyStatusEnum 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; + } +}