Merge branch 'master' into dev

yy_dev
胡锐 1 year ago
commit 1fe94e9d24
  1. 3
      cweb/src/main/java/com/cweb/controller/BsMerController.java
  2. 58
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java
  3. 7
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java
  4. 2
      service/src/main/java/com/hfkj/channel/saas/SaasMerService.java
  5. 18
      service/src/main/java/com/hfkj/dao/BsMerMapper.java
  6. 28
      service/src/main/java/com/hfkj/dao/BsMerSqlProvider.java
  7. 32
      service/src/main/java/com/hfkj/entity/BsMer.java
  8. 140
      service/src/main/java/com/hfkj/entity/BsMerExample.java
  9. 2
      service/src/main/java/com/hfkj/service/BsMerPlatformNoService.java
  10. 11
      service/src/main/java/com/hfkj/service/impl/BsMerPlatformNoServiceImpl.java

@ -176,6 +176,7 @@ public class BsMerController {
} }
if (mer.getId() == null if (mer.getId() == null
|| StringUtils.isBlank(mer.getOrgNo())
|| mer.getMerType() == null || mer.getMerType() == null
|| StringUtils.isBlank(mer.getMerName()) || StringUtils.isBlank(mer.getMerName())
|| StringUtils.isBlank(mer.getMerAbbreviate()) || StringUtils.isBlank(mer.getMerAbbreviate())
@ -262,6 +263,8 @@ public class BsMerController {
mer.getMerRegion().setAreaCode(MapUtils.getObject(regionMap, "street").getRegionId()); mer.getMerRegion().setAreaCode(MapUtils.getObject(regionMap, "street").getRegionId());
mer.getMerRegion().setAreaName(MapUtils.getObject(regionMap, "street").getRegionName()); mer.getMerRegion().setAreaName(MapUtils.getObject(regionMap, "street").getRegionName());
bsMer.setOrgNo(mer.getOrgNo());
bsMer.setOrgName(commonService.getDictionaryCodeName("ORG_NO", mer.getOrgNo()));
bsMer.setMerType(mer.getMerType()); bsMer.setMerType(mer.getMerType());
bsMer.setMerName(mer.getMerName()); bsMer.setMerName(mer.getMerName());
bsMer.setMerAbbreviate(mer.getMerAbbreviate()); bsMer.setMerAbbreviate(mer.getMerAbbreviate());

@ -44,6 +44,8 @@ public class LaKaLaLedgerService {
private BsMerService merService; private BsMerService merService;
@Resource @Resource
private BsMerAttachService merAttachService; private BsMerAttachService merAttachService;
@Resource
private BsMerPlatformNoService merPlatformNoService;
/** /**
* 商户分账业务开通申请 * 商户分账业务开通申请
@ -57,8 +59,8 @@ public class LaKaLaLedgerService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
} }
// 商户 // 商户
MerBasisModel merDetail = merService.getMerDetail(merLedger.getMerId()); BsMer mer = merService.getMer(merLedger.getMerId());
if (merDetail == null) { if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户");
} }
@ -71,9 +73,9 @@ public class LaKaLaLedgerService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("version", "1.0"); map.put("version", "1.0");
map.put("orderNo", orderNo); map.put("orderNo", orderNo);
map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); map.put("orgCode", mer.getOrgNo());
map.put("merCupNo", merLedger.getCupNo()); map.put("merCupNo", merLedger.getCupNo());
map.put("contactMobile", merDetail.getRegPhone()); map.put("contactMobile", mer.getRegPhone());
map.put("splitLowestRatio", merLedger.getSplitLowestRatio()); map.put("splitLowestRatio", merLedger.getSplitLowestRatio());
map.put("splitEntrustFileName", merLedger.getSplitEntrustFileName()); map.put("splitEntrustFileName", merLedger.getSplitEntrustFileName());
// 转换成bas64 // 转换成bas64
@ -118,11 +120,10 @@ public class LaKaLaLedgerService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
} }
// 商户 // 商户
MerBasisModel merDetail = merService.getMerDetail(merLedger.getMerId()); BsMer mer = merService.getMer(merLedger.getMerId());
if (merDetail == null) { if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户");
} }
Map<String, Object> commonParam = new HashMap<>(); Map<String, Object> commonParam = new HashMap<>();
commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss"));
commonParam.put("version", "1.0.0"); commonParam.put("version", "1.0.0");
@ -132,10 +133,10 @@ public class LaKaLaLedgerService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("version", "1.0"); map.put("version", "1.0");
map.put("orderNo", orderNo); map.put("orderNo", orderNo);
map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); map.put("orgCode", mer.getOrgNo());
map.put("receiverNo", merLedger.getReceiverNo()); map.put("receiverNo", merLedger.getReceiverNo());
map.put("merCupNo", merLedger.getCupNo()); map.put("merCupNo", merLedger.getCupNo());
map.put("contactMobile", merDetail.getRegPhone()); map.put("contactMobile", mer.getRegPhone());
map.put("splitLowestRatio", merLedger.getSplitLowestRatio()); map.put("splitLowestRatio", merLedger.getSplitLowestRatio());
map.put("splitEntrustFileName", merLedger.getSplitEntrustFileName()); map.put("splitEntrustFileName", merLedger.getSplitEntrustFileName());
// 转换成bas64 // 转换成bas64
@ -183,8 +184,8 @@ public class LaKaLaLedgerService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
} }
// 商户 // 商户
MerBasisModel merDetail = merService.getMerDetail(merLedger.getId()); BsMer mer = merService.getMer(merLedger.getId());
if (merDetail == null) { if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户");
} }
@ -197,9 +198,9 @@ public class LaKaLaLedgerService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("version", "1.0"); map.put("version", "1.0");
map.put("orderNo", orderNo); map.put("orderNo", orderNo);
map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); map.put("orgCode", mer.getOrgNo());
map.put("merCupNo", merLedger.getCupNo()); map.put("merCupNo", merLedger.getCupNo());
map.put("contactMobile", merDetail.getRegPhone()); map.put("contactMobile", mer.getRegPhone());
map.put("splitLowestRatio", merLedger.getSplitLowestRatio()); map.put("splitLowestRatio", merLedger.getSplitLowestRatio());
map.put("splitEntrustFileName", merLedger.getSplitEntrustFileName()); map.put("splitEntrustFileName", merLedger.getSplitEntrustFileName());
// map.put("splitEntrustFilePath", saasCommon.fileUpload(new File(CommonSysConst.getSysConfig().getFile_url() +"/"+ merLedger.getSplitEntrustFilePath()), "SPLIT_ENTRUST_FILE", "0").getString("url")); // map.put("splitEntrustFilePath", saasCommon.fileUpload(new File(CommonSysConst.getSysConfig().getFile_url() +"/"+ merLedger.getSplitEntrustFilePath()), "SPLIT_ENTRUST_FILE", "0").getString("url"));
@ -244,6 +245,15 @@ public class LaKaLaLedgerService {
* @return * @return
*/ */
public JSONObject queryLedgerMer(String merCupNo) { public JSONObject queryLedgerMer(String merCupNo) {
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo);
if (merPlatform == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户号");
}
// 商户
BsMer mer = merService.getMer(merPlatform.getMerId());
if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户");
}
Map<String, Object> commonParam = new HashMap<>(); Map<String, Object> commonParam = new HashMap<>();
commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss"));
commonParam.put("version", "1.0.0"); commonParam.put("version", "1.0.0");
@ -253,7 +263,7 @@ public class LaKaLaLedgerService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("version", "1.0"); map.put("version", "1.0");
map.put("orderNo", orderNo); map.put("orderNo", orderNo);
map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); map.put("orgCode", mer.getOrgNo());
map.put("merCupNo", merCupNo); map.put("merCupNo", merCupNo);
commonParam.put("reqData", map); commonParam.put("reqData", map);
@ -290,7 +300,7 @@ public class LaKaLaLedgerService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("version", "1.0"); map.put("version", "1.0");
map.put("orderNo", System.currentTimeMillis()+""); map.put("orderNo", System.currentTimeMillis()+"");
map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); map.put("orgCode", merDetail.getOrgNo());
map.put("receiverName", merDetail.getMerName()); map.put("receiverName", merDetail.getMerName());
map.put("contactMobile", merDetail.getRegPhone()); map.put("contactMobile", merDetail.getRegPhone());
map.put("acctTypeCode", merDetail.getMerSettleAcct().getSettleType().equals(MerSettleType.status1.getNumber())?57:58);// 57:对公 58:对私 map.put("acctTypeCode", merDetail.getMerSettleAcct().getSettleType().equals(MerSettleType.status1.getNumber())?57:58);// 57:对公 58:对私
@ -355,7 +365,7 @@ public class LaKaLaLedgerService {
} }
/** /**
* 创建分账接收方 * 修改分账接收方
*/ */
public void updateLedgerReceiver(Long merId) { public void updateLedgerReceiver(Long merId) {
// 商户 // 商户
@ -371,7 +381,7 @@ public class LaKaLaLedgerService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("version", "1.0"); map.put("version", "1.0");
map.put("orderNo", System.currentTimeMillis()+""); map.put("orderNo", System.currentTimeMillis()+"");
map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); map.put("orgCode", merDetail.getOrgNo());
map.put("receiverNo", "1"); map.put("receiverNo", "1");
map.put("receiverName", merDetail.getMerName()); map.put("receiverName", merDetail.getMerName());
map.put("contactMobile", merDetail.getRegPhone()); map.put("contactMobile", merDetail.getRegPhone());
@ -432,6 +442,11 @@ public class LaKaLaLedgerService {
if (merLedgerReceiver == null) { if (merLedgerReceiver == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到分账关系"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到分账关系");
} }
// 商户
BsMer mer = merService.getMer(merLedgerReceiver.getMerId());
if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户");
}
Map<String, Object> commonParam = new HashMap<>(); Map<String, Object> commonParam = new HashMap<>();
commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss"));
commonParam.put("version", "1.0.0"); commonParam.put("version", "1.0.0");
@ -440,7 +455,7 @@ public class LaKaLaLedgerService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("version", "1.0"); map.put("version", "1.0");
map.put("orderNo", System.currentTimeMillis()+""); map.put("orderNo", System.currentTimeMillis()+"");
map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); map.put("orgCode", mer.getOrgNo());
map.put("merCupNo", merLedgerReceiver.getCupNo()); map.put("merCupNo", merLedgerReceiver.getCupNo());
map.put("receiverNo", merLedgerReceiver.getReceiverNo()); map.put("receiverNo", merLedgerReceiver.getReceiverNo());
@ -488,6 +503,11 @@ public class LaKaLaLedgerService {
if (merLedgerReceiver == null) { if (merLedgerReceiver == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到分账关系"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到分账关系");
} }
// 商户
BsMer mer = merService.getMer(merLedgerReceiver.getMerId());
if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户");
}
Map<String, Object> commonParam = new HashMap<>(); Map<String, Object> commonParam = new HashMap<>();
commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss"));
commonParam.put("version", "1.0.0"); commonParam.put("version", "1.0.0");
@ -496,7 +516,7 @@ public class LaKaLaLedgerService {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("version", "1.0"); map.put("version", "1.0");
map.put("orderNo", System.currentTimeMillis()+""); map.put("orderNo", System.currentTimeMillis()+"");
map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); map.put("orgCode", mer.getOrgNo());
map.put("merCupNo", merLedgerReceiver.getCupNo()); map.put("merCupNo", merLedgerReceiver.getCupNo());
map.put("receiverNo", merLedgerReceiver.getReceiverNo()); map.put("receiverNo", merLedgerReceiver.getReceiverNo());
String base64ImgUrl = ImageUtils.getBase64ByImgUrl(CommonSysConst.getSysConfig().getObs_url() + merLedgerReceiver.getRelieveEntrustFilePath()); String base64ImgUrl = ImageUtils.getBase64ByImgUrl(CommonSysConst.getSysConfig().getObs_url() + merLedgerReceiver.getRelieveEntrustFilePath());

@ -34,6 +34,8 @@ public class LaKaLaTradeSeparateService {
private BsTradeOrderProfitSharingService tradeOrderProfitSharingService; private BsTradeOrderProfitSharingService tradeOrderProfitSharingService;
@Resource @Resource
private BsTradeOrderProfitSharingReceiverService tradeOrderProfitSharingReceiverService; private BsTradeOrderProfitSharingReceiverService tradeOrderProfitSharingReceiverService;
@Resource
private BsMerService merService;
/** /**
* 发起分账 * 发起分账
@ -51,7 +53,8 @@ public class LaKaLaTradeSeparateService {
} }
// 查询交易详情 // 查询交易详情
BsTradeOrder tradeOrder = tradeOrderService.getOrderByTradeNoId(tradeOrderProfitSharing.getTradeOrderId()); BsTradeOrder tradeOrder = tradeOrderService.getOrderByTradeNoId(tradeOrderProfitSharing.getTradeOrderId());
// 商户
BsMer mer = merService.getMer(tradeOrder.getMerId());
// 分账接收方 // 分账接收方
List<BsTradeOrderProfitSharingReceiver> profitSharingReceiverList = tradeOrderProfitSharingReceiverService.getReceiverListByProfitSharingId(tradeOrderProfitSharing.getId()); List<BsTradeOrderProfitSharingReceiver> profitSharingReceiverList = tradeOrderProfitSharingReceiverService.getReceiverListByProfitSharingId(tradeOrderProfitSharing.getId());
@ -65,7 +68,7 @@ public class LaKaLaTradeSeparateService {
map.put("log_date", DateUtil.date2String(tradeOrder.getPayTime(), "yyyyMMdd")); map.put("log_date", DateUtil.date2String(tradeOrder.getPayTime(), "yyyyMMdd"));
map.put("out_separate_no", tradeOrderProfitSharing.getProfitSharingOrderNo()); map.put("out_separate_no", tradeOrderProfitSharing.getProfitSharingOrderNo());
map.put("total_amt", tradeOrderProfitSharing.getProfitSharingAmoun().multiply(new BigDecimal("100")).longValue()); map.put("total_amt", tradeOrderProfitSharing.getProfitSharingAmoun().multiply(new BigDecimal("100")).longValue());
map.put("lkl_org_no", "1"); map.put("lkl_org_no", mer.getOrgNo());
map.put("cal_type", "0"); map.put("cal_type", "0");
List<Map<String,Object>> recvDatasMapList = new ArrayList<>(); List<Map<String,Object>> recvDatasMapList = new ArrayList<>();

@ -97,7 +97,7 @@ public class SaasMerService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到经营范围"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到经营范围");
} }
Map<String,Object> body = new HashMap<>(); Map<String,Object> body = new HashMap<>();
body.put("userNo", SaasConfig.userNo); body.put("userNo",basisModel.getOrgNo());
body.put("email", basisModel.getRegEmail()); body.put("email", basisModel.getRegEmail());
body.put("busiCode", "WECHAT_PAY"); body.put("busiCode", "WECHAT_PAY");
body.put("merRegName", basisModel.getMerName()); body.put("merRegName", basisModel.getMerName());

@ -39,7 +39,8 @@ public interface BsMerMapper extends BsMerMapperExt {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
@Insert({ @Insert({
"insert into bs_mer (company_id, company_name, ", "insert into bs_mer (org_no, org_name, ",
"company_id, company_name, ",
"agent_id, agent_name, ", "agent_id, agent_name, ",
"salesman_id, salesman_name, ", "salesman_id, salesman_name, ",
"reg_phone, reg_name, ", "reg_phone, reg_name, ",
@ -57,7 +58,8 @@ public interface BsMerMapper extends BsMerMapperExt {
"complete_status, mer_status, ", "complete_status, mer_status, ",
"create_time, update_time, ", "create_time, update_time, ",
"ext_1, ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ", "values (#{orgNo,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, ",
"#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ",
"#{agentId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR}, ", "#{agentId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR}, ",
"#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ", "#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ",
"#{regPhone,jdbcType=VARCHAR}, #{regName,jdbcType=VARCHAR}, ", "#{regPhone,jdbcType=VARCHAR}, #{regName,jdbcType=VARCHAR}, ",
@ -86,6 +88,8 @@ public interface BsMerMapper extends BsMerMapperExt {
@SelectProvider(type=BsMerSqlProvider.class, method="selectByExample") @SelectProvider(type=BsMerSqlProvider.class, method="selectByExample")
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="org_no", property="orgNo", jdbcType=JdbcType.VARCHAR),
@Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@ -128,8 +132,8 @@ public interface BsMerMapper extends BsMerMapperExt {
@Select({ @Select({
"select", "select",
"id, company_id, company_name, agent_id, agent_name, salesman_id, salesman_name, ", "id, org_no, org_name, company_id, company_name, agent_id, agent_name, salesman_id, ",
"reg_phone, reg_name, reg_email, mer_type, mer_no, mer_name, mer_abbreviate, ", "salesman_name, reg_phone, reg_name, reg_email, mer_type, mer_no, mer_name, mer_abbreviate, ",
"mer_mcc_code, mer_mcc_name, blis_url, blis_name, blis_no, blis_reg_address, ", "mer_mcc_code, mer_mcc_name, blis_url, blis_name, blis_no, blis_reg_address, ",
"blis_period_type, blis_period_start, blis_period_end, lar_name, lar_id_card, ", "blis_period_type, blis_period_start, blis_period_end, lar_name, lar_id_card, ",
"lar_id_card_portrait_img, lar_id_card_national_emblem_img, lar_id_card_address, ", "lar_id_card_portrait_img, lar_id_card_national_emblem_img, lar_id_card_address, ",
@ -140,6 +144,8 @@ public interface BsMerMapper extends BsMerMapperExt {
}) })
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="org_no", property="orgNo", jdbcType=JdbcType.VARCHAR),
@Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@ -191,7 +197,9 @@ public interface BsMerMapper extends BsMerMapperExt {
@Update({ @Update({
"update bs_mer", "update bs_mer",
"set company_id = #{companyId,jdbcType=BIGINT},", "set org_no = #{orgNo,jdbcType=VARCHAR},",
"org_name = #{orgName,jdbcType=VARCHAR},",
"company_id = #{companyId,jdbcType=BIGINT},",
"company_name = #{companyName,jdbcType=VARCHAR},", "company_name = #{companyName,jdbcType=VARCHAR},",
"agent_id = #{agentId,jdbcType=BIGINT},", "agent_id = #{agentId,jdbcType=BIGINT},",
"agent_name = #{agentName,jdbcType=VARCHAR},", "agent_name = #{agentName,jdbcType=VARCHAR},",

@ -28,6 +28,14 @@ public class BsMerSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.INSERT_INTO("bs_mer"); sql.INSERT_INTO("bs_mer");
if (record.getOrgNo() != null) {
sql.VALUES("org_no", "#{orgNo,jdbcType=VARCHAR}");
}
if (record.getOrgName() != null) {
sql.VALUES("org_name", "#{orgName,jdbcType=VARCHAR}");
}
if (record.getCompanyId() != null) { if (record.getCompanyId() != null) {
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}");
} }
@ -186,6 +194,8 @@ public class BsMerSqlProvider {
} else { } else {
sql.SELECT("id"); sql.SELECT("id");
} }
sql.SELECT("org_no");
sql.SELECT("org_name");
sql.SELECT("company_id"); sql.SELECT("company_id");
sql.SELECT("company_name"); sql.SELECT("company_name");
sql.SELECT("agent_id"); sql.SELECT("agent_id");
@ -244,6 +254,14 @@ public class BsMerSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
} }
if (record.getOrgNo() != null) {
sql.SET("org_no = #{record.orgNo,jdbcType=VARCHAR}");
}
if (record.getOrgName() != null) {
sql.SET("org_name = #{record.orgName,jdbcType=VARCHAR}");
}
if (record.getCompanyId() != null) { if (record.getCompanyId() != null) {
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
} }
@ -401,6 +419,8 @@ public class BsMerSqlProvider {
sql.UPDATE("bs_mer"); sql.UPDATE("bs_mer");
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("org_no = #{record.orgNo,jdbcType=VARCHAR}");
sql.SET("org_name = #{record.orgName,jdbcType=VARCHAR}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}");
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
@ -448,6 +468,14 @@ public class BsMerSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.UPDATE("bs_mer"); sql.UPDATE("bs_mer");
if (record.getOrgNo() != null) {
sql.SET("org_no = #{orgNo,jdbcType=VARCHAR}");
}
if (record.getOrgName() != null) {
sql.SET("org_name = #{orgName,jdbcType=VARCHAR}");
}
if (record.getCompanyId() != null) { if (record.getCompanyId() != null) {
sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); sql.SET("company_id = #{companyId,jdbcType=BIGINT}");
} }

@ -18,6 +18,16 @@ public class BsMer implements Serializable {
*/ */
private Long id; private Long id;
/**
* 机构编号
*/
private String orgNo;
/**
* 机构名称
*/
private String orgName;
/** /**
* 公司id * 公司id
*/ */
@ -204,6 +214,22 @@ public class BsMer implements Serializable {
this.id = id; this.id = id;
} }
public String getOrgNo() {
return orgNo;
}
public void setOrgNo(String orgNo) {
this.orgNo = orgNo;
}
public String getOrgName() {
return orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public Long getCompanyId() { public Long getCompanyId() {
return companyId; return companyId;
} }
@ -513,6 +539,8 @@ public class BsMer implements Serializable {
} }
BsMer other = (BsMer) that; BsMer other = (BsMer) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getOrgNo() == null ? other.getOrgNo() == null : this.getOrgNo().equals(other.getOrgNo()))
&& (this.getOrgName() == null ? other.getOrgName() == null : this.getOrgName().equals(other.getOrgName()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName())) && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName()))
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId())) && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
@ -557,6 +585,8 @@ public class BsMer implements Serializable {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getOrgNo() == null) ? 0 : getOrgNo().hashCode());
result = prime * result + ((getOrgName() == null) ? 0 : getOrgName().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
@ -604,6 +634,8 @@ public class BsMer implements Serializable {
sb.append(" ["); sb.append(" [");
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", orgNo=").append(orgNo);
sb.append(", orgName=").append(orgName);
sb.append(", companyId=").append(companyId); sb.append(", companyId=").append(companyId);
sb.append(", companyName=").append(companyName); sb.append(", companyName=").append(companyName);
sb.append(", agentId=").append(agentId); sb.append(", agentId=").append(agentId);

@ -185,6 +185,146 @@ public class BsMerExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andOrgNoIsNull() {
addCriterion("org_no is null");
return (Criteria) this;
}
public Criteria andOrgNoIsNotNull() {
addCriterion("org_no is not null");
return (Criteria) this;
}
public Criteria andOrgNoEqualTo(String value) {
addCriterion("org_no =", value, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoNotEqualTo(String value) {
addCriterion("org_no <>", value, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoGreaterThan(String value) {
addCriterion("org_no >", value, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoGreaterThanOrEqualTo(String value) {
addCriterion("org_no >=", value, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoLessThan(String value) {
addCriterion("org_no <", value, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoLessThanOrEqualTo(String value) {
addCriterion("org_no <=", value, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoLike(String value) {
addCriterion("org_no like", value, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoNotLike(String value) {
addCriterion("org_no not like", value, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoIn(List<String> values) {
addCriterion("org_no in", values, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoNotIn(List<String> values) {
addCriterion("org_no not in", values, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoBetween(String value1, String value2) {
addCriterion("org_no between", value1, value2, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNoNotBetween(String value1, String value2) {
addCriterion("org_no not between", value1, value2, "orgNo");
return (Criteria) this;
}
public Criteria andOrgNameIsNull() {
addCriterion("org_name is null");
return (Criteria) this;
}
public Criteria andOrgNameIsNotNull() {
addCriterion("org_name is not null");
return (Criteria) this;
}
public Criteria andOrgNameEqualTo(String value) {
addCriterion("org_name =", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameNotEqualTo(String value) {
addCriterion("org_name <>", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameGreaterThan(String value) {
addCriterion("org_name >", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameGreaterThanOrEqualTo(String value) {
addCriterion("org_name >=", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameLessThan(String value) {
addCriterion("org_name <", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameLessThanOrEqualTo(String value) {
addCriterion("org_name <=", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameLike(String value) {
addCriterion("org_name like", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameNotLike(String value) {
addCriterion("org_name not like", value, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameIn(List<String> values) {
addCriterion("org_name in", values, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameNotIn(List<String> values) {
addCriterion("org_name not in", values, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameBetween(String value1, String value2) {
addCriterion("org_name between", value1, value2, "orgName");
return (Criteria) this;
}
public Criteria andOrgNameNotBetween(String value1, String value2) {
addCriterion("org_name not between", value1, value2, "orgName");
return (Criteria) this;
}
public Criteria andCompanyIdIsNull() { public Criteria andCompanyIdIsNull() {
addCriterion("company_id is null"); addCriterion("company_id is null");
return (Criteria) this; return (Criteria) this;

@ -26,6 +26,8 @@ public interface BsMerPlatformNoService {
*/ */
BsMerPlatformNo getPlatformNo(Long merId, PlatformTypeEnum type); BsMerPlatformNo getPlatformNo(Long merId, PlatformTypeEnum type);
BsMerPlatformNo getPlatformNoByCupNo(String merCupNo);
/** /**
* 查询商户号 * 查询商户号
* @param param * @param param

@ -43,6 +43,17 @@ public class BsMerPlatformNoServiceImpl implements BsMerPlatformNoService {
return null; return null;
} }
@Override
public BsMerPlatformNo getPlatformNoByCupNo(String merCupNo) {
BsMerPlatformNoExample example = new BsMerPlatformNoExample();
example.createCriteria().andCupNoEqualTo(merCupNo).andStatusEqualTo(1);
List<BsMerPlatformNo> list = merPlatformNoMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override @Override
public List<BsMerPlatformNo> getMerPlatformNoList(Map<String, Object> param) { public List<BsMerPlatformNo> getMerPlatformNoList(Map<String, Object> param) {
BsMerPlatformNoExample example = new BsMerPlatformNoExample(); BsMerPlatformNoExample example = new BsMerPlatformNoExample();

Loading…
Cancel
Save