From f9e7f1b267dda7f43bd7dd76f81ef040a5e0cb90 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 30 May 2023 15:59:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bweb/controller/TestController.java | 48 +++++++++++++-- .../controller/BsMerLedgerController.java | 3 + .../main/java/com/hfkj/schedule/Merchant.java | 38 ++++++++++++ .../channel/lakala/LaKaLaLedgerService.java | 1 + .../java/com/hfkj/dao/BsMerLedgerMapper.java | 29 +++++---- .../com/hfkj/dao/BsMerLedgerSqlProvider.java | 14 +++++ .../java/com/hfkj/entity/BsMerLedger.java | 16 +++++ .../com/hfkj/entity/BsMerLedgerExample.java | 60 +++++++++++++++++++ .../service/impl/BsMerLedgerServiceImpl.java | 7 +++ 9 files changed, 198 insertions(+), 18 deletions(-) diff --git a/bweb/src/main/java/com/bweb/controller/TestController.java b/bweb/src/main/java/com/bweb/controller/TestController.java index c7f7798..5fc78c4 100644 --- a/bweb/src/main/java/com/bweb/controller/TestController.java +++ b/bweb/src/main/java/com/bweb/controller/TestController.java @@ -25,10 +25,7 @@ import com.hfkj.entity.*; import com.hfkj.model.MerBasisModel; import com.hfkj.model.ResponseData; import com.hfkj.service.*; -import com.hfkj.sysenum.MerStatusEnum; -import com.hfkj.sysenum.PlatformTypeEnum; -import com.hfkj.sysenum.StoreCreateTypeEnum; -import com.hfkj.sysenum.StoreStatusEnum; +import com.hfkj.sysenum.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.collections4.MapUtils; @@ -73,6 +70,8 @@ public class TestController { @Resource private BsTradeOrderProfitSharingService tradeOrderProfitSharingService; @Resource + private BsMerLedgerService merLedgerService; + @Resource private BsMerService merService; @Resource @@ -85,7 +84,8 @@ public class TestController { private BsMerPlatformTermService merPlatformTermService; @Resource private BsStoreService storeService; - + @Resource + private LaKaLaLedgerService laKaLaLedgerService; @RequestMapping(value="/saas",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "saas") @@ -100,6 +100,44 @@ public class TestController { } } + @RequestMapping(value="/applyLedgerReceiver",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "saas") + public ResponseData applyLedgerReceiver(@RequestParam(value = "code", required = true) String code) { + try { + + Map param = new HashMap<>(); + param.put("merStatus", MerStatusEnum.status1.getNumber()); + List merList = merService.getMerList(param); + + BsMerLedger merLedger; + for (BsMer mer : merList) { + try { + if (merLedgerService.getMerLedger(mer.getId(), PlatformTypeEnum.type1) == null) { + BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNo(mer.getId(), PlatformTypeEnum.type1); + merLedger = new BsMerLedger(); + merLedger.setMerId(mer.getId()); + merLedger.setMerName(mer.getMerName()); + merLedger.setPlatformType(merPlatform.getPlatformType()); + merLedger.setPlatformNo(merPlatform.getPlatformNo()); + merLedger.setCupNo(merPlatform.getCupNo()); + merLedger.setStatus(MerLedgerStatusEnum.status2.getNumber()); + merLedger.setReceiverStatus(false); + merLedgerService.editMerLedger(merLedger); + + laKaLaLedgerService.applyLedgerReceiver(merLedger.getMerId()); + } + } catch (Exception e) { + + } + } + return ResponseMsgUtil.success(""); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } @RequestMapping(value="/refreshMerStatus",method = RequestMethod.GET) @ResponseBody diff --git a/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java b/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java index ea595bd..b25fad3 100644 --- a/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java +++ b/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java @@ -86,6 +86,7 @@ public class BsMerLedgerController { } else { merLedger.setStatus(MerLedgerStatusEnum.status1.getNumber()); } + merLedger.setReceiverStatus(false); } else { if (!merLedger.getStatus().equals(MerLedgerStatusEnum.status3.getNumber())) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法修改"); @@ -256,11 +257,13 @@ public class BsMerLedgerController { @ResponseBody @ApiOperation(value = "查询接收方列表") public ResponseData getLedgerReceiverList(@RequestParam(name = "platformType", required = true) Integer platformType, + @RequestParam(name = "merNme", required = true) String merNme, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { Map param = new HashMap<>(); + param.put("merNme", merNme); param.put("platformType", platformType); param.put("status", MerLedgerStatusEnum.status1.getNumber()); param.put("receiverNoNotNull", "true"); diff --git a/schedule/src/main/java/com/hfkj/schedule/Merchant.java b/schedule/src/main/java/com/hfkj/schedule/Merchant.java index 4ba0bbd..e545993 100644 --- a/schedule/src/main/java/com/hfkj/schedule/Merchant.java +++ b/schedule/src/main/java/com/hfkj/schedule/Merchant.java @@ -2,6 +2,7 @@ package com.hfkj.schedule; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.hfkj.channel.lakala.LaKaLaLedgerService; import com.hfkj.channel.saas.SaasMerService; import com.hfkj.channel.weixin.WeiXinMerService; import com.hfkj.common.exception.ErrorCode; @@ -63,6 +64,11 @@ public class Merchant { @Resource private SaasMerService saasMerService; + @Resource + private BsMerLedgerService merLedgerService; + @Resource + private LaKaLaLedgerService laKaLaLedgerService; + /** * 审批状态查询 @@ -249,6 +255,19 @@ public class Merchant { } } + BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNo(mer.getId(), PlatformTypeEnum.type1); + BsMerLedger merLedger = new BsMerLedger(); + merLedger.setMerId(mer.getId()); + merLedger.setMerName(mer.getMerName()); + merLedger.setPlatformType(merPlatform.getPlatformType()); + merLedger.setPlatformNo(merPlatform.getPlatformNo()); + merLedger.setCupNo(merPlatform.getCupNo()); + merLedger.setStatus(MerLedgerStatusEnum.status2.getNumber()); + merLedger.setReceiverStatus(false); + merLedgerService.editMerLedger(merLedger); + + laKaLaLedgerService.applyLedgerReceiver(merLedger.getMerId()); + } else if (customer.getString("customerStatus").equals("REJECT")) { contractRecord.setStatus(3); merContractRecordService.updateRecord(contractRecord); @@ -328,6 +347,25 @@ public class Merchant { merSettleAcctApply.setStatus(MerSettleAcctApplyStatus.status3.getNumber()); merSettleAcctApplyService.editData(merSettleAcctApply); + BsMerLedger ledger = merLedgerService.getMerLedger(merSettleAcctApply.getMerId(), PlatformTypeEnum.type1); + if (ledger != null) { + ledger.setStatus(MerLedgerStatusEnum.status0.getNumber()); + merLedgerService.editMerLedger(ledger); + + } else { + BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNo(merSettleAcctApply.getMerId(), PlatformTypeEnum.type1); + BsMerLedger merLedger = new BsMerLedger(); + merLedger.setMerId(merSettleAcctApply.getMerId()); + merLedger.setMerName(merSettleAcctApply.getMerName()); + merLedger.setPlatformType(merPlatform.getPlatformType()); + merLedger.setPlatformNo(merPlatform.getPlatformNo()); + merLedger.setCupNo(merPlatform.getCupNo()); + merLedger.setStatus(MerLedgerStatusEnum.status2.getNumber()); + merLedger.setReceiverStatus(false); + merLedgerService.editMerLedger(merLedger); + laKaLaLedgerService.applyLedgerReceiver(merLedger.getMerId()); + } + } else if (responseObj.getString("reviewPass").equals("UNPASS")) { merSettleAcctApply.setStatus(MerSettleAcctApplyStatus.status6.getNumber()); merSettleAcctApply.setRejectReason(responseObj.getString("reviewResult")); diff --git a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java index ca1d8c6..32fc48a 100644 --- a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java +++ b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java @@ -348,6 +348,7 @@ public class LaKaLaLedgerService { // 查询分账信息 BsMerLedger merLedger = merLedgerService.getMerLedger(merId, PlatformTypeEnum.type1); if (merLedger != null) { + merLedger.setReceiverStatus(true); merLedger.setReceiverNo(responseBody.getJSONObject("respData").getString("receiverNo")); merLedgerService.editMerLedger(merLedger); } diff --git a/service/src/main/java/com/hfkj/dao/BsMerLedgerMapper.java b/service/src/main/java/com/hfkj/dao/BsMerLedgerMapper.java index c726875..8169297 100644 --- a/service/src/main/java/com/hfkj/dao/BsMerLedgerMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsMerLedgerMapper.java @@ -42,19 +42,19 @@ public interface BsMerLedgerMapper extends BsMerLedgerMapperExt { "insert into bs_mer_ledger (mer_id, mer_name, ", "platform_type, platform_no, ", "cup_no, receiver_no, ", - "split_lowest_ratio, split_entrust_file_name, ", - "split_entrust_file_path, `status`, ", - "reject_reason, create_time, ", - "update_time, ext_1, ", - "ext_2, ext_3)", + "receiver_status, split_lowest_ratio, ", + "split_entrust_file_name, split_entrust_file_path, ", + "`status`, reject_reason, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", "values (#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, ", "#{platformType,jdbcType=INTEGER}, #{platformNo,jdbcType=VARCHAR}, ", "#{cupNo,jdbcType=VARCHAR}, #{receiverNo,jdbcType=VARCHAR}, ", - "#{splitLowestRatio,jdbcType=DECIMAL}, #{splitEntrustFileName,jdbcType=VARCHAR}, ", - "#{splitEntrustFilePath,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", - "#{rejectReason,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ", - "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", - "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{receiverStatus,jdbcType=BIT}, #{splitLowestRatio,jdbcType=DECIMAL}, ", + "#{splitEntrustFileName,jdbcType=VARCHAR}, #{splitEntrustFilePath,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(BsMerLedger record); @@ -72,6 +72,7 @@ public interface BsMerLedgerMapper extends BsMerLedgerMapperExt { @Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR), @Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR), @Result(column="receiver_no", property="receiverNo", jdbcType=JdbcType.VARCHAR), + @Result(column="receiver_status", property="receiverStatus", jdbcType=JdbcType.BIT), @Result(column="split_lowest_ratio", property="splitLowestRatio", jdbcType=JdbcType.DECIMAL), @Result(column="split_entrust_file_name", property="splitEntrustFileName", jdbcType=JdbcType.VARCHAR), @Result(column="split_entrust_file_path", property="splitEntrustFilePath", jdbcType=JdbcType.VARCHAR), @@ -87,9 +88,9 @@ public interface BsMerLedgerMapper extends BsMerLedgerMapperExt { @Select({ "select", - "id, mer_id, mer_name, platform_type, platform_no, cup_no, receiver_no, split_lowest_ratio, ", - "split_entrust_file_name, split_entrust_file_path, `status`, reject_reason, create_time, ", - "update_time, ext_1, ext_2, ext_3", + "id, mer_id, mer_name, platform_type, platform_no, cup_no, receiver_no, receiver_status, ", + "split_lowest_ratio, split_entrust_file_name, split_entrust_file_path, `status`, ", + "reject_reason, create_time, update_time, ext_1, ext_2, ext_3", "from bs_mer_ledger", "where id = #{id,jdbcType=BIGINT}" }) @@ -101,6 +102,7 @@ public interface BsMerLedgerMapper extends BsMerLedgerMapperExt { @Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR), @Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR), @Result(column="receiver_no", property="receiverNo", jdbcType=JdbcType.VARCHAR), + @Result(column="receiver_status", property="receiverStatus", jdbcType=JdbcType.BIT), @Result(column="split_lowest_ratio", property="splitLowestRatio", jdbcType=JdbcType.DECIMAL), @Result(column="split_entrust_file_name", property="splitEntrustFileName", jdbcType=JdbcType.VARCHAR), @Result(column="split_entrust_file_path", property="splitEntrustFilePath", jdbcType=JdbcType.VARCHAR), @@ -131,6 +133,7 @@ public interface BsMerLedgerMapper extends BsMerLedgerMapperExt { "platform_no = #{platformNo,jdbcType=VARCHAR},", "cup_no = #{cupNo,jdbcType=VARCHAR},", "receiver_no = #{receiverNo,jdbcType=VARCHAR},", + "receiver_status = #{receiverStatus,jdbcType=BIT},", "split_lowest_ratio = #{splitLowestRatio,jdbcType=DECIMAL},", "split_entrust_file_name = #{splitEntrustFileName,jdbcType=VARCHAR},", "split_entrust_file_path = #{splitEntrustFilePath,jdbcType=VARCHAR},", diff --git a/service/src/main/java/com/hfkj/dao/BsMerLedgerSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMerLedgerSqlProvider.java index 20209c6..a6dd6d4 100644 --- a/service/src/main/java/com/hfkj/dao/BsMerLedgerSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsMerLedgerSqlProvider.java @@ -52,6 +52,10 @@ public class BsMerLedgerSqlProvider { sql.VALUES("receiver_no", "#{receiverNo,jdbcType=VARCHAR}"); } + if (record.getReceiverStatus() != null) { + sql.VALUES("receiver_status", "#{receiverStatus,jdbcType=BIT}"); + } + if (record.getSplitLowestRatio() != null) { sql.VALUES("split_lowest_ratio", "#{splitLowestRatio,jdbcType=DECIMAL}"); } @@ -108,6 +112,7 @@ public class BsMerLedgerSqlProvider { sql.SELECT("platform_no"); sql.SELECT("cup_no"); sql.SELECT("receiver_no"); + sql.SELECT("receiver_status"); sql.SELECT("split_lowest_ratio"); sql.SELECT("split_entrust_file_name"); sql.SELECT("split_entrust_file_path"); @@ -163,6 +168,10 @@ public class BsMerLedgerSqlProvider { sql.SET("receiver_no = #{record.receiverNo,jdbcType=VARCHAR}"); } + if (record.getReceiverStatus() != null) { + sql.SET("receiver_status = #{record.receiverStatus,jdbcType=BIT}"); + } + if (record.getSplitLowestRatio() != null) { sql.SET("split_lowest_ratio = #{record.splitLowestRatio,jdbcType=DECIMAL}"); } @@ -218,6 +227,7 @@ public class BsMerLedgerSqlProvider { sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}"); sql.SET("cup_no = #{record.cupNo,jdbcType=VARCHAR}"); sql.SET("receiver_no = #{record.receiverNo,jdbcType=VARCHAR}"); + sql.SET("receiver_status = #{record.receiverStatus,jdbcType=BIT}"); sql.SET("split_lowest_ratio = #{record.splitLowestRatio,jdbcType=DECIMAL}"); sql.SET("split_entrust_file_name = #{record.splitEntrustFileName,jdbcType=VARCHAR}"); sql.SET("split_entrust_file_path = #{record.splitEntrustFilePath,jdbcType=VARCHAR}"); @@ -262,6 +272,10 @@ public class BsMerLedgerSqlProvider { sql.SET("receiver_no = #{receiverNo,jdbcType=VARCHAR}"); } + if (record.getReceiverStatus() != null) { + sql.SET("receiver_status = #{receiverStatus,jdbcType=BIT}"); + } + if (record.getSplitLowestRatio() != null) { sql.SET("split_lowest_ratio = #{splitLowestRatio,jdbcType=DECIMAL}"); } diff --git a/service/src/main/java/com/hfkj/entity/BsMerLedger.java b/service/src/main/java/com/hfkj/entity/BsMerLedger.java index 9f9c80d..4009939 100644 --- a/service/src/main/java/com/hfkj/entity/BsMerLedger.java +++ b/service/src/main/java/com/hfkj/entity/BsMerLedger.java @@ -49,6 +49,11 @@ public class BsMerLedger implements Serializable { */ private String receiverNo; + /** + * 接收状态 0:不可用 1:可用 + */ + private Boolean receiverStatus; + /** * 最低分账比例 */ @@ -148,6 +153,14 @@ public class BsMerLedger implements Serializable { this.receiverNo = receiverNo; } + public Boolean getReceiverStatus() { + return receiverStatus; + } + + public void setReceiverStatus(Boolean receiverStatus) { + this.receiverStatus = receiverStatus; + } + public BigDecimal getSplitLowestRatio() { return splitLowestRatio; } @@ -247,6 +260,7 @@ public class BsMerLedger implements Serializable { && (this.getPlatformNo() == null ? other.getPlatformNo() == null : this.getPlatformNo().equals(other.getPlatformNo())) && (this.getCupNo() == null ? other.getCupNo() == null : this.getCupNo().equals(other.getCupNo())) && (this.getReceiverNo() == null ? other.getReceiverNo() == null : this.getReceiverNo().equals(other.getReceiverNo())) + && (this.getReceiverStatus() == null ? other.getReceiverStatus() == null : this.getReceiverStatus().equals(other.getReceiverStatus())) && (this.getSplitLowestRatio() == null ? other.getSplitLowestRatio() == null : this.getSplitLowestRatio().equals(other.getSplitLowestRatio())) && (this.getSplitEntrustFileName() == null ? other.getSplitEntrustFileName() == null : this.getSplitEntrustFileName().equals(other.getSplitEntrustFileName())) && (this.getSplitEntrustFilePath() == null ? other.getSplitEntrustFilePath() == null : this.getSplitEntrustFilePath().equals(other.getSplitEntrustFilePath())) @@ -270,6 +284,7 @@ public class BsMerLedger implements Serializable { result = prime * result + ((getPlatformNo() == null) ? 0 : getPlatformNo().hashCode()); result = prime * result + ((getCupNo() == null) ? 0 : getCupNo().hashCode()); result = prime * result + ((getReceiverNo() == null) ? 0 : getReceiverNo().hashCode()); + result = prime * result + ((getReceiverStatus() == null) ? 0 : getReceiverStatus().hashCode()); result = prime * result + ((getSplitLowestRatio() == null) ? 0 : getSplitLowestRatio().hashCode()); result = prime * result + ((getSplitEntrustFileName() == null) ? 0 : getSplitEntrustFileName().hashCode()); result = prime * result + ((getSplitEntrustFilePath() == null) ? 0 : getSplitEntrustFilePath().hashCode()); @@ -296,6 +311,7 @@ public class BsMerLedger implements Serializable { sb.append(", platformNo=").append(platformNo); sb.append(", cupNo=").append(cupNo); sb.append(", receiverNo=").append(receiverNo); + sb.append(", receiverStatus=").append(receiverStatus); sb.append(", splitLowestRatio=").append(splitLowestRatio); sb.append(", splitEntrustFileName=").append(splitEntrustFileName); sb.append(", splitEntrustFilePath=").append(splitEntrustFilePath); diff --git a/service/src/main/java/com/hfkj/entity/BsMerLedgerExample.java b/service/src/main/java/com/hfkj/entity/BsMerLedgerExample.java index d05b6aa..8fcc376 100644 --- a/service/src/main/java/com/hfkj/entity/BsMerLedgerExample.java +++ b/service/src/main/java/com/hfkj/entity/BsMerLedgerExample.java @@ -586,6 +586,66 @@ public class BsMerLedgerExample { return (Criteria) this; } + public Criteria andReceiverStatusIsNull() { + addCriterion("receiver_status is null"); + return (Criteria) this; + } + + public Criteria andReceiverStatusIsNotNull() { + addCriterion("receiver_status is not null"); + return (Criteria) this; + } + + public Criteria andReceiverStatusEqualTo(Boolean value) { + addCriterion("receiver_status =", value, "receiverStatus"); + return (Criteria) this; + } + + public Criteria andReceiverStatusNotEqualTo(Boolean value) { + addCriterion("receiver_status <>", value, "receiverStatus"); + return (Criteria) this; + } + + public Criteria andReceiverStatusGreaterThan(Boolean value) { + addCriterion("receiver_status >", value, "receiverStatus"); + return (Criteria) this; + } + + public Criteria andReceiverStatusGreaterThanOrEqualTo(Boolean value) { + addCriterion("receiver_status >=", value, "receiverStatus"); + return (Criteria) this; + } + + public Criteria andReceiverStatusLessThan(Boolean value) { + addCriterion("receiver_status <", value, "receiverStatus"); + return (Criteria) this; + } + + public Criteria andReceiverStatusLessThanOrEqualTo(Boolean value) { + addCriterion("receiver_status <=", value, "receiverStatus"); + return (Criteria) this; + } + + public Criteria andReceiverStatusIn(List values) { + addCriterion("receiver_status in", values, "receiverStatus"); + return (Criteria) this; + } + + public Criteria andReceiverStatusNotIn(List values) { + addCriterion("receiver_status not in", values, "receiverStatus"); + return (Criteria) this; + } + + public Criteria andReceiverStatusBetween(Boolean value1, Boolean value2) { + addCriterion("receiver_status between", value1, value2, "receiverStatus"); + return (Criteria) this; + } + + public Criteria andReceiverStatusNotBetween(Boolean value1, Boolean value2) { + addCriterion("receiver_status not between", value1, value2, "receiverStatus"); + return (Criteria) this; + } + public Criteria andSplitLowestRatioIsNull() { addCriterion("split_lowest_ratio is null"); return (Criteria) this; diff --git a/service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java index f5f257a..2776e4b 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java @@ -1,5 +1,6 @@ package com.hfkj.service.impl; +import com.ccb.wlpt.util.StringUtil; import com.hfkj.channel.lakala.LaKaLaLedgerService; import com.hfkj.dao.BsMerLedgerMapper; import com.hfkj.entity.BsMerLedger; @@ -7,6 +8,7 @@ import com.hfkj.entity.BsMerLedgerExample; import com.hfkj.service.BsMerLedgerService; import com.hfkj.sysenum.PlatformTypeEnum; import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -76,6 +78,11 @@ public class BsMerLedgerServiceImpl implements BsMerLedgerService { public List getMerLedgerList(Map param) { BsMerLedgerExample example = new BsMerLedgerExample(); BsMerLedgerExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (StringUtils.isNotBlank(MapUtils.getString(param, "merNme"))) { + criteria.andMerNameLike("%" + MapUtils.getString(param, "merNme") + "%"); + } + if (MapUtils.getInteger(param, "platformType") != null) { criteria.andPlatformTypeEqualTo(MapUtils.getInteger(param, "platformType")); } From adbd4f667a6737a308550c0ae34b6a5288639b81 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 30 May 2023 16:57:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/cweb/controller/BsMerLedgerController.java | 1 - 1 file changed, 1 deletion(-) diff --git a/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java b/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java index b25fad3..f1d5f8b 100644 --- a/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java +++ b/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java @@ -265,7 +265,6 @@ public class BsMerLedgerController { Map param = new HashMap<>(); param.put("merNme", merNme); param.put("platformType", platformType); - param.put("status", MerLedgerStatusEnum.status1.getNumber()); param.put("receiverNoNotNull", "true"); PageHelper.startPage(pageNum, pageSize);