提交代码

yy_dev
胡锐 1 year ago
parent b89f70bfbf
commit ed35d75ca5
  1. 1
      cweb/src/main/java/com/cweb/config/AuthConfig.java
  2. 124
      cweb/src/main/java/com/cweb/controller/BsMerWithdrawalController.java
  3. 8
      cweb/src/main/java/com/cweb/controller/TestController.java
  4. 2
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaWalletService.java
  5. 183
      service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapper.java
  6. 7
      service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapperExt.java
  7. 528
      service/src/main/java/com/hfkj/dao/BsMerWithdrawalSqlProvider.java
  8. 462
      service/src/main/java/com/hfkj/entity/BsMerWithdrawal.java
  9. 1924
      service/src/main/java/com/hfkj/entity/BsMerWithdrawalExample.java
  10. 25
      service/src/main/java/com/hfkj/service/BsMerWithdrawalService.java
  11. 45
      service/src/main/java/com/hfkj/service/impl/BsMerWithdrawalServiceImpl.java
  12. 39
      service/src/main/java/com/hfkj/sysenum/MerWithdrawalStatusEnum.java

@ -106,6 +106,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/storeDiscountActivityPartakeUser/*")
.excludePathPatterns("/wechat/*")
.excludePathPatterns("/cmsContent/*")
.excludePathPatterns("/merWithdrawal/notify")
.excludePathPatterns("/common/*")
.excludePathPatterns("/mer/*")
.excludePathPatterns("/tradeOrder/calculation")

@ -0,0 +1,124 @@
package com.cweb.controller;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsMer;
import com.hfkj.entity.BsMerPlatformNo;
import com.hfkj.entity.BsMerWithdrawal;
import com.hfkj.model.ResponseData;
import com.hfkj.service.BsMerPlatformNoService;
import com.hfkj.service.BsMerService;
import com.hfkj.service.BsMerWithdrawalService;
import com.hfkj.sysenum.MerWithdrawalStatusEnum;
import com.hfkj.sysenum.PlatformTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @className: BsMerWithdrawalController
* @author: HuRui
* @date: 2023/6/8
**/
@Controller
@Api(value = "商户结算信息")
@RequestMapping(value = "/merWithdrawal")
public class BsMerWithdrawalController {
private static Logger log = LoggerFactory.getLogger(BsMerWithdrawalController.class);
@Resource
private BsMerWithdrawalService merWithdrawalService;
@Resource
private BsMerPlatformNoService merPlatformNoService;
@Resource
private BsMerService merService;
@RequestMapping(value="/notify",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "提现通知")
public ResponseData notify(@RequestParam(value = "cupNo" , required = false) String cupNo,
@RequestBody String reqBody) {
try {
log.info("提款通知:", reqBody);
log.info("cupNo:", cupNo);
System.out.println(reqBody);
JSONObject respData = JSONObject.parseObject(reqBody);
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(cupNo);
// 查询提款
BsMerWithdrawal merWithdrawal = merWithdrawalService.getDetailByDrawJnl(respData.getString("drawJnl"));
if (merWithdrawal == null) {
merWithdrawal = new BsMerWithdrawal();
merWithdrawal.setPlatformType(PlatformTypeEnum.type1.getNumber());
if (merPlatform != null) {
merWithdrawal.setMerId(merPlatform.getMerId());
merWithdrawal.setMerNo(merWithdrawal.getMerNo());
merWithdrawal.setPlatformNo(merPlatform.getPlatformNo());
merWithdrawal.setCupNo(merPlatform.getCupNo());
// 查询商户
BsMer mer = merService.getMer(merPlatform.getMerId());
if (mer != null) {
merWithdrawal.setMerName(mer.getMerName());
}
}
}
merWithdrawal.setDrawJnl(respData.getString("drawJnl"));
merWithdrawal.setDrawAmt(respData.getBigDecimal("drawAmt"));
merWithdrawal.setDrawFee(respData.getBigDecimal("drawFee"));
merWithdrawal.setDrawMode(respData.getString("drawMode").equals("D0")?1:2);
merWithdrawal.setBatchAutoSettle(respData.getString("batchAutoSettle").equals("01")?1:2);
merWithdrawal.setBatchNo(respData.getString("batchNo"));
merWithdrawal.setAcctNo(respData.getString("acctNo"));
merWithdrawal.setAcctName(respData.getString("acctName"));
merWithdrawal.setSettleNo(respData.getString("settleNo"));
merWithdrawal.setBankNo(respData.getString("bankNo"));
merWithdrawal.setBankName(respData.getString("nbkName"));
merWithdrawal.setCompleteTime(respData.getDate("completeTime"));
/* DRAW.ACCEPTED 提款已受理
DRAW.FREEZE 提款冻结
DRAW.PROCESSING 提款处理中
DRAW.SUCCESS 提款成功
DRAW.FAILED 提款失败*/
String drawState = respData.getString("drawState");
if (drawState.equals("DRAW.ACCEPTED")) {
merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status1.getNumber());
} else if (drawState.equals("DRAW.FREEZE")) {
merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status2.getNumber());
} else if (drawState.equals("DRAW.PROCESSING")) {
merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status3.getNumber());
} else if (drawState.equals("DRAW.SUCCESS")) {
merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status4.getNumber());
} else if (drawState.equals("DRAW.FAILED")) {
merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status5.getNumber());
}
merWithdrawalService.editData(merWithdrawal);
return ResponseMsgUtil.success(null);
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getDetailByDrawJnl",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据提款流水号查询详情")
public ResponseData getDetailByDrawJnl(@RequestParam(value = "drawJnl" , required = true) String drawJnl) {
try {
return ResponseMsgUtil.success(merWithdrawalService.getDetailByDrawJnl(drawJnl));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -214,7 +214,7 @@ public class TestController {
// return ResponseMsgUtil.success(laKaLaWalletService.ewalletWithdrawD1("8226900581219V0", new BigDecimal("30193.35"),"提现"));
// return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleProfile("8226900581219V0", "02","06"));
// return ResponseMsgUtil.success(laKaLaWalletService.ewalletWithdrawQuery("8226900581219V0", "230602150213408367448221"));
return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleQuery("8226900581219V0"));
return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleQuery("8226900591200TC"));
// return ResponseMsgUtil.success(laKaLaWalletService.activeSettleApply("8226900581219V0"));
} catch (Exception e) {
@ -495,12 +495,12 @@ public class TestController {
// externalCustomerNos.add("822690053310F6C");
// return ResponseMsgUtil.success(saasActivityService.customerRegisterActivity("73", "315653020019", "0",externalCustomerNos));
return ResponseMsgUtil.success(saasActivityService.referee(code));
// return ResponseMsgUtil.success(saasActivityService.referee(code));
/******* 配置活动费率 *******/
/* String activityId = "73";
String activityId = "73";
String externalCustomerNo = code;
JSONArray jsonArray = saasActivityService.queryCustomerRates(activityId, externalCustomerNo);
return ResponseMsgUtil.success(jsonArray);*/
return ResponseMsgUtil.success(jsonArray);
/* Map<String, Object> rate;
List<Map<String,Object>> rates = new ArrayList<>();

@ -237,7 +237,7 @@ public class LaKaLaWalletService {
map.put("mercId", merCupNo);
map.put("settleType", settleType);
map.put("settleTime", settleTime);
map.put("notifyUrl", null);
map.put("notifyUrl", CommonSysConst.getSysConfig().getDomainName());
param.put("reqData", map);
// 生成签名

@ -0,0 +1,183 @@
package com.hfkj.dao;
import com.hfkj.entity.BsMerWithdrawal;
import com.hfkj.entity.BsMerWithdrawalExample;
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 BsMerWithdrawalMapper extends BsMerWithdrawalMapperExt {
@SelectProvider(type=BsMerWithdrawalSqlProvider.class, method="countByExample")
long countByExample(BsMerWithdrawalExample example);
@DeleteProvider(type=BsMerWithdrawalSqlProvider.class, method="deleteByExample")
int deleteByExample(BsMerWithdrawalExample example);
@Delete({
"delete from bs_mer_withdrawal",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_mer_withdrawal (mer_id, mer_no, ",
"mer_name, platform_type, ",
"platform_no, cup_no, ",
"mer_order_no, draw_jnl, ",
"draw_amt, draw_fee, ",
"draw_mode, batch_auto_settle, ",
"batch_no, acct_no, ",
"acct_name, bank_no, ",
"settle_no, bank_name, ",
"draw_status, create_time, ",
"update_time, complete_time, ",
"ext_1, ext_2, ext_3)",
"values (#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, ",
"#{merName,jdbcType=VARCHAR}, #{platformType,jdbcType=INTEGER}, ",
"#{platformNo,jdbcType=VARCHAR}, #{cupNo,jdbcType=VARCHAR}, ",
"#{merOrderNo,jdbcType=INTEGER}, #{drawJnl,jdbcType=VARCHAR}, ",
"#{drawAmt,jdbcType=DECIMAL}, #{drawFee,jdbcType=DECIMAL}, ",
"#{drawMode,jdbcType=INTEGER}, #{batchAutoSettle,jdbcType=INTEGER}, ",
"#{batchNo,jdbcType=VARCHAR}, #{acctNo,jdbcType=VARCHAR}, ",
"#{acctName,jdbcType=VARCHAR}, #{bankNo,jdbcType=VARCHAR}, ",
"#{settleNo,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, ",
"#{drawStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{completeTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsMerWithdrawal record);
@InsertProvider(type=BsMerWithdrawalSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(BsMerWithdrawal record);
@SelectProvider(type=BsMerWithdrawalSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_order_no", property="merOrderNo", jdbcType=JdbcType.INTEGER),
@Result(column="draw_jnl", property="drawJnl", jdbcType=JdbcType.VARCHAR),
@Result(column="draw_amt", property="drawAmt", jdbcType=JdbcType.DECIMAL),
@Result(column="draw_fee", property="drawFee", jdbcType=JdbcType.DECIMAL),
@Result(column="draw_mode", property="drawMode", jdbcType=JdbcType.INTEGER),
@Result(column="batch_auto_settle", property="batchAutoSettle", jdbcType=JdbcType.INTEGER),
@Result(column="batch_no", property="batchNo", jdbcType=JdbcType.VARCHAR),
@Result(column="acct_no", property="acctNo", jdbcType=JdbcType.VARCHAR),
@Result(column="acct_name", property="acctName", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_no", property="bankNo", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_no", property="settleNo", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
@Result(column="draw_status", property="drawStatus", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="complete_time", property="completeTime", 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<BsMerWithdrawal> selectByExample(BsMerWithdrawalExample example);
@Select({
"select",
"id, mer_id, mer_no, mer_name, platform_type, platform_no, cup_no, mer_order_no, ",
"draw_jnl, draw_amt, draw_fee, draw_mode, batch_auto_settle, batch_no, acct_no, ",
"acct_name, bank_no, settle_no, bank_name, draw_status, create_time, update_time, ",
"complete_time, ext_1, ext_2, ext_3",
"from bs_mer_withdrawal",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_order_no", property="merOrderNo", jdbcType=JdbcType.INTEGER),
@Result(column="draw_jnl", property="drawJnl", jdbcType=JdbcType.VARCHAR),
@Result(column="draw_amt", property="drawAmt", jdbcType=JdbcType.DECIMAL),
@Result(column="draw_fee", property="drawFee", jdbcType=JdbcType.DECIMAL),
@Result(column="draw_mode", property="drawMode", jdbcType=JdbcType.INTEGER),
@Result(column="batch_auto_settle", property="batchAutoSettle", jdbcType=JdbcType.INTEGER),
@Result(column="batch_no", property="batchNo", jdbcType=JdbcType.VARCHAR),
@Result(column="acct_no", property="acctNo", jdbcType=JdbcType.VARCHAR),
@Result(column="acct_name", property="acctName", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_no", property="bankNo", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_no", property="settleNo", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
@Result(column="draw_status", property="drawStatus", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="complete_time", property="completeTime", 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)
})
BsMerWithdrawal selectByPrimaryKey(Long id);
@UpdateProvider(type=BsMerWithdrawalSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsMerWithdrawal record, @Param("example") BsMerWithdrawalExample example);
@UpdateProvider(type=BsMerWithdrawalSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsMerWithdrawal record, @Param("example") BsMerWithdrawalExample example);
@UpdateProvider(type=BsMerWithdrawalSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsMerWithdrawal record);
@Update({
"update bs_mer_withdrawal",
"set mer_id = #{merId,jdbcType=BIGINT},",
"mer_no = #{merNo,jdbcType=VARCHAR},",
"mer_name = #{merName,jdbcType=VARCHAR},",
"platform_type = #{platformType,jdbcType=INTEGER},",
"platform_no = #{platformNo,jdbcType=VARCHAR},",
"cup_no = #{cupNo,jdbcType=VARCHAR},",
"mer_order_no = #{merOrderNo,jdbcType=INTEGER},",
"draw_jnl = #{drawJnl,jdbcType=VARCHAR},",
"draw_amt = #{drawAmt,jdbcType=DECIMAL},",
"draw_fee = #{drawFee,jdbcType=DECIMAL},",
"draw_mode = #{drawMode,jdbcType=INTEGER},",
"batch_auto_settle = #{batchAutoSettle,jdbcType=INTEGER},",
"batch_no = #{batchNo,jdbcType=VARCHAR},",
"acct_no = #{acctNo,jdbcType=VARCHAR},",
"acct_name = #{acctName,jdbcType=VARCHAR},",
"bank_no = #{bankNo,jdbcType=VARCHAR},",
"settle_no = #{settleNo,jdbcType=VARCHAR},",
"bank_name = #{bankName,jdbcType=VARCHAR},",
"draw_status = #{drawStatus,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"complete_time = #{completeTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsMerWithdrawal record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface BsMerWithdrawalMapperExt {
}

@ -0,0 +1,528 @@
package com.hfkj.dao;
import com.hfkj.entity.BsMerWithdrawal;
import com.hfkj.entity.BsMerWithdrawalExample.Criteria;
import com.hfkj.entity.BsMerWithdrawalExample.Criterion;
import com.hfkj.entity.BsMerWithdrawalExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class BsMerWithdrawalSqlProvider {
public String countByExample(BsMerWithdrawalExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("bs_mer_withdrawal");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(BsMerWithdrawalExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("bs_mer_withdrawal");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(BsMerWithdrawal record) {
SQL sql = new SQL();
sql.INSERT_INTO("bs_mer_withdrawal");
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getMerNo() != null) {
sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}");
}
if (record.getMerName() != null) {
sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformNo() != null) {
sql.VALUES("platform_no", "#{platformNo,jdbcType=VARCHAR}");
}
if (record.getCupNo() != null) {
sql.VALUES("cup_no", "#{cupNo,jdbcType=VARCHAR}");
}
if (record.getMerOrderNo() != null) {
sql.VALUES("mer_order_no", "#{merOrderNo,jdbcType=INTEGER}");
}
if (record.getDrawJnl() != null) {
sql.VALUES("draw_jnl", "#{drawJnl,jdbcType=VARCHAR}");
}
if (record.getDrawAmt() != null) {
sql.VALUES("draw_amt", "#{drawAmt,jdbcType=DECIMAL}");
}
if (record.getDrawFee() != null) {
sql.VALUES("draw_fee", "#{drawFee,jdbcType=DECIMAL}");
}
if (record.getDrawMode() != null) {
sql.VALUES("draw_mode", "#{drawMode,jdbcType=INTEGER}");
}
if (record.getBatchAutoSettle() != null) {
sql.VALUES("batch_auto_settle", "#{batchAutoSettle,jdbcType=INTEGER}");
}
if (record.getBatchNo() != null) {
sql.VALUES("batch_no", "#{batchNo,jdbcType=VARCHAR}");
}
if (record.getAcctNo() != null) {
sql.VALUES("acct_no", "#{acctNo,jdbcType=VARCHAR}");
}
if (record.getAcctName() != null) {
sql.VALUES("acct_name", "#{acctName,jdbcType=VARCHAR}");
}
if (record.getBankNo() != null) {
sql.VALUES("bank_no", "#{bankNo,jdbcType=VARCHAR}");
}
if (record.getSettleNo() != null) {
sql.VALUES("settle_no", "#{settleNo,jdbcType=VARCHAR}");
}
if (record.getBankName() != null) {
sql.VALUES("bank_name", "#{bankName,jdbcType=VARCHAR}");
}
if (record.getDrawStatus() != null) {
sql.VALUES("draw_status", "#{drawStatus,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.getCompleteTime() != null) {
sql.VALUES("complete_time", "#{completeTime,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(BsMerWithdrawalExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("mer_id");
sql.SELECT("mer_no");
sql.SELECT("mer_name");
sql.SELECT("platform_type");
sql.SELECT("platform_no");
sql.SELECT("cup_no");
sql.SELECT("mer_order_no");
sql.SELECT("draw_jnl");
sql.SELECT("draw_amt");
sql.SELECT("draw_fee");
sql.SELECT("draw_mode");
sql.SELECT("batch_auto_settle");
sql.SELECT("batch_no");
sql.SELECT("acct_no");
sql.SELECT("acct_name");
sql.SELECT("bank_no");
sql.SELECT("settle_no");
sql.SELECT("bank_name");
sql.SELECT("draw_status");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("complete_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("bs_mer_withdrawal");
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) {
BsMerWithdrawal record = (BsMerWithdrawal) parameter.get("record");
BsMerWithdrawalExample example = (BsMerWithdrawalExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("bs_mer_withdrawal");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
}
if (record.getPlatformNo() != null) {
sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}");
}
if (record.getCupNo() != null) {
sql.SET("cup_no = #{record.cupNo,jdbcType=VARCHAR}");
}
if (record.getMerOrderNo() != null) {
sql.SET("mer_order_no = #{record.merOrderNo,jdbcType=INTEGER}");
}
if (record.getDrawJnl() != null) {
sql.SET("draw_jnl = #{record.drawJnl,jdbcType=VARCHAR}");
}
if (record.getDrawAmt() != null) {
sql.SET("draw_amt = #{record.drawAmt,jdbcType=DECIMAL}");
}
if (record.getDrawFee() != null) {
sql.SET("draw_fee = #{record.drawFee,jdbcType=DECIMAL}");
}
if (record.getDrawMode() != null) {
sql.SET("draw_mode = #{record.drawMode,jdbcType=INTEGER}");
}
if (record.getBatchAutoSettle() != null) {
sql.SET("batch_auto_settle = #{record.batchAutoSettle,jdbcType=INTEGER}");
}
if (record.getBatchNo() != null) {
sql.SET("batch_no = #{record.batchNo,jdbcType=VARCHAR}");
}
if (record.getAcctNo() != null) {
sql.SET("acct_no = #{record.acctNo,jdbcType=VARCHAR}");
}
if (record.getAcctName() != null) {
sql.SET("acct_name = #{record.acctName,jdbcType=VARCHAR}");
}
if (record.getBankNo() != null) {
sql.SET("bank_no = #{record.bankNo,jdbcType=VARCHAR}");
}
if (record.getSettleNo() != null) {
sql.SET("settle_no = #{record.settleNo,jdbcType=VARCHAR}");
}
if (record.getBankName() != null) {
sql.SET("bank_name = #{record.bankName,jdbcType=VARCHAR}");
}
if (record.getDrawStatus() != null) {
sql.SET("draw_status = #{record.drawStatus,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.getCompleteTime() != null) {
sql.SET("complete_time = #{record.completeTime,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_withdrawal");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}");
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}");
sql.SET("cup_no = #{record.cupNo,jdbcType=VARCHAR}");
sql.SET("mer_order_no = #{record.merOrderNo,jdbcType=INTEGER}");
sql.SET("draw_jnl = #{record.drawJnl,jdbcType=VARCHAR}");
sql.SET("draw_amt = #{record.drawAmt,jdbcType=DECIMAL}");
sql.SET("draw_fee = #{record.drawFee,jdbcType=DECIMAL}");
sql.SET("draw_mode = #{record.drawMode,jdbcType=INTEGER}");
sql.SET("batch_auto_settle = #{record.batchAutoSettle,jdbcType=INTEGER}");
sql.SET("batch_no = #{record.batchNo,jdbcType=VARCHAR}");
sql.SET("acct_no = #{record.acctNo,jdbcType=VARCHAR}");
sql.SET("acct_name = #{record.acctName,jdbcType=VARCHAR}");
sql.SET("bank_no = #{record.bankNo,jdbcType=VARCHAR}");
sql.SET("settle_no = #{record.settleNo,jdbcType=VARCHAR}");
sql.SET("bank_name = #{record.bankName,jdbcType=VARCHAR}");
sql.SET("draw_status = #{record.drawStatus,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("complete_time = #{record.completeTime,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}");
BsMerWithdrawalExample example = (BsMerWithdrawalExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(BsMerWithdrawal record) {
SQL sql = new SQL();
sql.UPDATE("bs_mer_withdrawal");
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}");
}
if (record.getMerName() != null) {
sql.SET("mer_name = #{merName,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformNo() != null) {
sql.SET("platform_no = #{platformNo,jdbcType=VARCHAR}");
}
if (record.getCupNo() != null) {
sql.SET("cup_no = #{cupNo,jdbcType=VARCHAR}");
}
if (record.getMerOrderNo() != null) {
sql.SET("mer_order_no = #{merOrderNo,jdbcType=INTEGER}");
}
if (record.getDrawJnl() != null) {
sql.SET("draw_jnl = #{drawJnl,jdbcType=VARCHAR}");
}
if (record.getDrawAmt() != null) {
sql.SET("draw_amt = #{drawAmt,jdbcType=DECIMAL}");
}
if (record.getDrawFee() != null) {
sql.SET("draw_fee = #{drawFee,jdbcType=DECIMAL}");
}
if (record.getDrawMode() != null) {
sql.SET("draw_mode = #{drawMode,jdbcType=INTEGER}");
}
if (record.getBatchAutoSettle() != null) {
sql.SET("batch_auto_settle = #{batchAutoSettle,jdbcType=INTEGER}");
}
if (record.getBatchNo() != null) {
sql.SET("batch_no = #{batchNo,jdbcType=VARCHAR}");
}
if (record.getAcctNo() != null) {
sql.SET("acct_no = #{acctNo,jdbcType=VARCHAR}");
}
if (record.getAcctName() != null) {
sql.SET("acct_name = #{acctName,jdbcType=VARCHAR}");
}
if (record.getBankNo() != null) {
sql.SET("bank_no = #{bankNo,jdbcType=VARCHAR}");
}
if (record.getSettleNo() != null) {
sql.SET("settle_no = #{settleNo,jdbcType=VARCHAR}");
}
if (record.getBankName() != null) {
sql.SET("bank_name = #{bankName,jdbcType=VARCHAR}");
}
if (record.getDrawStatus() != null) {
sql.SET("draw_status = #{drawStatus,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.getCompleteTime() != null) {
sql.SET("complete_time = #{completeTime,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, BsMerWithdrawalExample 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,462 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* bs_mer_withdrawal
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class BsMerWithdrawal implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 商户id
*/
private Long merId;
/**
* 商户编号
*/
private String merNo;
/**
* 商户名称
*/
private String merName;
/**
* 平台 1拉卡拉
*/
private Integer platformType;
/**
* 平台商户号
*/
private String platformNo;
/**
* 银联商户号
*/
private String cupNo;
/**
* 商户订单号
*/
private Integer merOrderNo;
/**
* 提款流水号
*/
private String drawJnl;
/**
* 提现金额单位
*/
private BigDecimal drawAmt;
/**
* 手续费
*/
private BigDecimal drawFee;
/**
* 提款模式(D0/D1) 1: D0 2:D1
*/
private Integer drawMode;
/**
* 结算模式01主动提款 02自动结算 1:主动提款 2自动结算
*/
private Integer batchAutoSettle;
/**
* 自动结算批次号
*/
private String batchNo;
/**
* 结算账户号脱敏
*/
private String acctNo;
/**
* 结算账户名脱敏
*/
private String acctName;
/**
* 银行行号
*/
private String bankNo;
/**
* 结算流水号
*/
private String settleNo;
/**
* 银行名称
*/
private String bankName;
/**
* 提款状态
1提款已受理
2提款冻结
3提款处理中
4提款成功
5提款失败
*/
private Integer drawStatus;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改时间
*/
private Date updateTime;
/**
* 完成时间
*/
private Date completeTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getMerId() {
return merId;
}
public void setMerId(Long merId) {
this.merId = merId;
}
public String getMerNo() {
return merNo;
}
public void setMerNo(String merNo) {
this.merNo = merNo;
}
public String getMerName() {
return merName;
}
public void setMerName(String merName) {
this.merName = merName;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformNo() {
return platformNo;
}
public void setPlatformNo(String platformNo) {
this.platformNo = platformNo;
}
public String getCupNo() {
return cupNo;
}
public void setCupNo(String cupNo) {
this.cupNo = cupNo;
}
public Integer getMerOrderNo() {
return merOrderNo;
}
public void setMerOrderNo(Integer merOrderNo) {
this.merOrderNo = merOrderNo;
}
public String getDrawJnl() {
return drawJnl;
}
public void setDrawJnl(String drawJnl) {
this.drawJnl = drawJnl;
}
public BigDecimal getDrawAmt() {
return drawAmt;
}
public void setDrawAmt(BigDecimal drawAmt) {
this.drawAmt = drawAmt;
}
public BigDecimal getDrawFee() {
return drawFee;
}
public void setDrawFee(BigDecimal drawFee) {
this.drawFee = drawFee;
}
public Integer getDrawMode() {
return drawMode;
}
public void setDrawMode(Integer drawMode) {
this.drawMode = drawMode;
}
public Integer getBatchAutoSettle() {
return batchAutoSettle;
}
public void setBatchAutoSettle(Integer batchAutoSettle) {
this.batchAutoSettle = batchAutoSettle;
}
public String getBatchNo() {
return batchNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public String getAcctNo() {
return acctNo;
}
public void setAcctNo(String acctNo) {
this.acctNo = acctNo;
}
public String getAcctName() {
return acctName;
}
public void setAcctName(String acctName) {
this.acctName = acctName;
}
public String getBankNo() {
return bankNo;
}
public void setBankNo(String bankNo) {
this.bankNo = bankNo;
}
public String getSettleNo() {
return settleNo;
}
public void setSettleNo(String settleNo) {
this.settleNo = settleNo;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public Integer getDrawStatus() {
return drawStatus;
}
public void setDrawStatus(Integer drawStatus) {
this.drawStatus = drawStatus;
}
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 Date getCompleteTime() {
return completeTime;
}
public void setCompleteTime(Date completeTime) {
this.completeTime = completeTime;
}
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;
}
BsMerWithdrawal other = (BsMerWithdrawal) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo()))
&& (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName()))
&& (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType()))
&& (this.getPlatformNo() == null ? other.getPlatformNo() == null : this.getPlatformNo().equals(other.getPlatformNo()))
&& (this.getCupNo() == null ? other.getCupNo() == null : this.getCupNo().equals(other.getCupNo()))
&& (this.getMerOrderNo() == null ? other.getMerOrderNo() == null : this.getMerOrderNo().equals(other.getMerOrderNo()))
&& (this.getDrawJnl() == null ? other.getDrawJnl() == null : this.getDrawJnl().equals(other.getDrawJnl()))
&& (this.getDrawAmt() == null ? other.getDrawAmt() == null : this.getDrawAmt().equals(other.getDrawAmt()))
&& (this.getDrawFee() == null ? other.getDrawFee() == null : this.getDrawFee().equals(other.getDrawFee()))
&& (this.getDrawMode() == null ? other.getDrawMode() == null : this.getDrawMode().equals(other.getDrawMode()))
&& (this.getBatchAutoSettle() == null ? other.getBatchAutoSettle() == null : this.getBatchAutoSettle().equals(other.getBatchAutoSettle()))
&& (this.getBatchNo() == null ? other.getBatchNo() == null : this.getBatchNo().equals(other.getBatchNo()))
&& (this.getAcctNo() == null ? other.getAcctNo() == null : this.getAcctNo().equals(other.getAcctNo()))
&& (this.getAcctName() == null ? other.getAcctName() == null : this.getAcctName().equals(other.getAcctName()))
&& (this.getBankNo() == null ? other.getBankNo() == null : this.getBankNo().equals(other.getBankNo()))
&& (this.getSettleNo() == null ? other.getSettleNo() == null : this.getSettleNo().equals(other.getSettleNo()))
&& (this.getBankName() == null ? other.getBankName() == null : this.getBankName().equals(other.getBankName()))
&& (this.getDrawStatus() == null ? other.getDrawStatus() == null : this.getDrawStatus().equals(other.getDrawStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getCompleteTime() == null ? other.getCompleteTime() == null : this.getCompleteTime().equals(other.getCompleteTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode());
result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode());
result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode());
result = prime * result + ((getPlatformNo() == null) ? 0 : getPlatformNo().hashCode());
result = prime * result + ((getCupNo() == null) ? 0 : getCupNo().hashCode());
result = prime * result + ((getMerOrderNo() == null) ? 0 : getMerOrderNo().hashCode());
result = prime * result + ((getDrawJnl() == null) ? 0 : getDrawJnl().hashCode());
result = prime * result + ((getDrawAmt() == null) ? 0 : getDrawAmt().hashCode());
result = prime * result + ((getDrawFee() == null) ? 0 : getDrawFee().hashCode());
result = prime * result + ((getDrawMode() == null) ? 0 : getDrawMode().hashCode());
result = prime * result + ((getBatchAutoSettle() == null) ? 0 : getBatchAutoSettle().hashCode());
result = prime * result + ((getBatchNo() == null) ? 0 : getBatchNo().hashCode());
result = prime * result + ((getAcctNo() == null) ? 0 : getAcctNo().hashCode());
result = prime * result + ((getAcctName() == null) ? 0 : getAcctName().hashCode());
result = prime * result + ((getBankNo() == null) ? 0 : getBankNo().hashCode());
result = prime * result + ((getSettleNo() == null) ? 0 : getSettleNo().hashCode());
result = prime * result + ((getBankName() == null) ? 0 : getBankName().hashCode());
result = prime * result + ((getDrawStatus() == null) ? 0 : getDrawStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getCompleteTime() == null) ? 0 : getCompleteTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", merId=").append(merId);
sb.append(", merNo=").append(merNo);
sb.append(", merName=").append(merName);
sb.append(", platformType=").append(platformType);
sb.append(", platformNo=").append(platformNo);
sb.append(", cupNo=").append(cupNo);
sb.append(", merOrderNo=").append(merOrderNo);
sb.append(", drawJnl=").append(drawJnl);
sb.append(", drawAmt=").append(drawAmt);
sb.append(", drawFee=").append(drawFee);
sb.append(", drawMode=").append(drawMode);
sb.append(", batchAutoSettle=").append(batchAutoSettle);
sb.append(", batchNo=").append(batchNo);
sb.append(", acctNo=").append(acctNo);
sb.append(", acctName=").append(acctName);
sb.append(", bankNo=").append(bankNo);
sb.append(", settleNo=").append(settleNo);
sb.append(", bankName=").append(bankName);
sb.append(", drawStatus=").append(drawStatus);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", completeTime=").append(completeTime);
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,25 @@
package com.hfkj.service;
import com.hfkj.entity.BsMerWithdrawal;
/**
* @className: BsMerWithdrawalService
* @author: HuRui
* @date: 2023/6/8
**/
public interface BsMerWithdrawalService {
/**
* 编辑数据
* @param merWithdrawal
*/
void editData(BsMerWithdrawal merWithdrawal);
/**
* 根据提款流水号 查询详情
* @param drawJnl
* @return
*/
BsMerWithdrawal getDetailByDrawJnl(String drawJnl);
}

@ -0,0 +1,45 @@
package com.hfkj.service.impl;
import com.hfkj.dao.BsMerWithdrawalMapper;
import com.hfkj.entity.BsMerWithdrawal;
import com.hfkj.entity.BsMerWithdrawalExample;
import com.hfkj.service.BsMerWithdrawalService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
* @className: BsMerWithdrawalServiceImpl
* @author: HuRui
* @date: 2023/6/8
**/
@Service("merWithdrawalService")
public class BsMerWithdrawalServiceImpl implements BsMerWithdrawalService {
@Resource
private BsMerWithdrawalMapper merWithdrawalMapper;
@Override
public void editData(BsMerWithdrawal merWithdrawal) {
if (merWithdrawal.getId() == null) {
merWithdrawal.setCreateTime(new Date());
merWithdrawal.setUpdateTime(new Date());
merWithdrawalMapper.insert(merWithdrawal);
} else {
merWithdrawal.setUpdateTime(new Date());
merWithdrawalMapper.updateByPrimaryKey(merWithdrawal);
}
}
@Override
public BsMerWithdrawal getDetailByDrawJnl(String drawJnl) {
BsMerWithdrawalExample example = new BsMerWithdrawalExample();
example.createCriteria().andDrawJnlEqualTo(drawJnl);
List<BsMerWithdrawal> list = merWithdrawalMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
}

@ -0,0 +1,39 @@
package com.hfkj.sysenum;
/**
* 商户完善状态
* @author hurui
*/
public enum MerWithdrawalStatusEnum {
status1(1, "提款已受理"),
status2(2, "提款冻结"),
status3(3, "提款处理中"),
status4(4, "提款成功"),
status5(5, "提款失败"),
;
private Integer number;
private String name;
MerWithdrawalStatusEnum(int number, String name) {
this.number = number;
this.name = name;
}
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…
Cancel
Save