parent
37744cf7d7
commit
49ee1762ab
@ -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<BsMerRateApplyDetail> 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<String,Object> 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<String, Object> param = new HashMap<>(); |
||||||
|
param.put("merId", merId); |
||||||
|
List<BsMerRateApply> 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); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -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<BsMerRateApplyDetail> 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); |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
/** |
||||||
|
* mapper扩展类 |
||||||
|
*/ |
||||||
|
public interface BsMerRateApplyDetailMapperExt { |
||||||
|
} |
@ -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<String, Object> 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<String, Object> 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<Criteria> 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<Criterion> 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()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -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<BsMerRateApply> 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); |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.hfkj.dao; |
||||||
|
|
||||||
|
/** |
||||||
|
* mapper扩展类 |
||||||
|
*/ |
||||||
|
public interface BsMerRateApplyMapperExt { |
||||||
|
} |
@ -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<String, Object> 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<String, Object> 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<Criteria> 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<Criterion> 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()); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -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<BsMerRateApplyDetail> merRateApplyDetailList; |
||||||
|
|
||||||
|
public List<BsMerRateApplyDetail> getMerRateApplyDetailList() { |
||||||
|
return merRateApplyDetailList; |
||||||
|
} |
||||||
|
|
||||||
|
public void setMerRateApplyDetailList(List<BsMerRateApplyDetail> 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(); |
||||||
|
} |
||||||
|
} |
@ -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(); |
||||||
|
} |
||||||
|
} |
@ -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<Criteria> oredCriteria; |
||||||
|
|
||||||
|
private Integer limit; |
||||||
|
|
||||||
|
private Long offset; |
||||||
|
|
||||||
|
public BsMerRateApplyDetailExample() { |
||||||
|
oredCriteria = new ArrayList<Criteria>(); |
||||||
|
} |
||||||
|
|
||||||
|
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<Criteria> 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<Criterion> criteria; |
||||||
|
|
||||||
|
protected GeneratedCriteria() { |
||||||
|
super(); |
||||||
|
criteria = new ArrayList<Criterion>(); |
||||||
|
} |
||||||
|
|
||||||
|
public boolean isValid() { |
||||||
|
return criteria.size() > 0; |
||||||
|
} |
||||||
|
|
||||||
|
public List<Criterion> getAllCriteria() { |
||||||
|
return criteria; |
||||||
|
} |
||||||
|
|
||||||
|
public List<Criterion> 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<Long> values) { |
||||||
|
addCriterion("id in", values, "id"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andIdNotIn(List<Long> 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<Long> values) { |
||||||
|
addCriterion("mer_rate_apply_id in", values, "merRateApplyId"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andMerRateApplyIdNotIn(List<Long> 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<Integer> values) { |
||||||
|
addCriterion("rate_type_code in", values, "rateTypeCode"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andRateTypeCodeNotIn(List<Integer> 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<String> values) { |
||||||
|
addCriterion("rate_saas_type_code in", values, "rateSaasTypeCode"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andRateSaasTypeCodeNotIn(List<String> 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<String> values) { |
||||||
|
addCriterion("rate_type_name in", values, "rateTypeName"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andRateTypeNameNotIn(List<String> 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<BigDecimal> values) { |
||||||
|
addCriterion("rate_pct in", values, "ratePct"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andRatePctNotIn(List<BigDecimal> 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<Integer> values) { |
||||||
|
addCriterion("`status` in", values, "status"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andStatusNotIn(List<Integer> 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<Date> values) { |
||||||
|
addCriterion("create_time in", values, "createTime"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andCreateTimeNotIn(List<Date> 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<Date> values) { |
||||||
|
addCriterion("update_time in", values, "updateTime"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotIn(List<Date> 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<String> values) { |
||||||
|
addCriterion("ext_1 in", values, "ext1"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andExt1NotIn(List<String> 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<String> values) { |
||||||
|
addCriterion("ext_2 in", values, "ext2"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andExt2NotIn(List<String> 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<String> values) { |
||||||
|
addCriterion("ext_3 in", values, "ext3"); |
||||||
|
return (Criteria) this; |
||||||
|
} |
||||||
|
|
||||||
|
public Criteria andExt3NotIn(List<String> 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); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -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<BsMerRateApplyDetail> rateApplyDetailList); |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据id查询申请 |
||||||
|
* @param id |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
BsMerRateApply getRateApplyById(Long id); |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询费率申请详情 |
||||||
|
* @param rateApplyId |
||||||
|
* @param rateTypeCode |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
BsMerRateApplyDetail getRateApplyDetail(Long rateApplyId,Integer rateTypeCode); |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询费率申请列表 |
||||||
|
* @param param |
||||||
|
*/ |
||||||
|
List<BsMerRateApply> getRateApplyList(Map<String, Object> param); |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询费率详情列表 |
||||||
|
* @param rateApplyId |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
List<BsMerRateApplyDetail> getRateApplyDetailListByApply(Long rateApplyId); |
||||||
|
|
||||||
|
/** |
||||||
|
* 审核回调 |
||||||
|
* @param merRateApply |
||||||
|
*/ |
||||||
|
void approveCallback(BsMerRateApply merRateApply); |
||||||
|
} |
@ -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<BsMerRateApplyDetail> 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<BsMerRateApplyDetail> list = merRateApplyDetailMapper.selectByExample(example); |
||||||
|
if (list.size() > 0) { |
||||||
|
return list.get(0); |
||||||
|
} |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<BsMerRateApply> getRateApplyList(Map<String, Object> 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<BsMerRateApplyDetail> 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()); |
||||||
|
} |
||||||
|
} |
@ -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; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue