From d673cb2c7fea89642d1e97bb22f4a138c4fd7a2f Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 9 Dec 2021 17:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HighDiscountPackageRecordService.java | 4 -- .../HighDiscountPackageRecordServiceImpl.java | 39 +++++++------------ 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/hai-service/src/main/java/com/hai/service/HighDiscountPackageRecordService.java b/hai-service/src/main/java/com/hai/service/HighDiscountPackageRecordService.java index fed2466f..3190b732 100644 --- a/hai-service/src/main/java/com/hai/service/HighDiscountPackageRecordService.java +++ b/hai-service/src/main/java/com/hai/service/HighDiscountPackageRecordService.java @@ -2,7 +2,6 @@ package com.hai.service; import com.hai.entity.HighDiscountPackageRecord; -<<<<<<< HEAD import java.util.List; import java.util.Map; @@ -24,8 +23,6 @@ public interface HighDiscountPackageRecordService { * @return java.util.List */ List getDiscountPackageRecord(Map map); -======= -public interface HighDiscountPackageRecordService { /** * 增加记录 @@ -33,5 +30,4 @@ public interface HighDiscountPackageRecordService { */ void insertRecord(HighDiscountPackageRecord record); ->>>>>>> c91e5b70c15cdb86ee69f2771ce00208b0bbf4cb } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageRecordServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageRecordServiceImpl.java index 34f14579..b502f7a0 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageRecordServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageRecordServiceImpl.java @@ -2,13 +2,13 @@ package com.hai.service.impl; import com.hai.dao.HighDiscountPackageRecordMapper; import com.hai.entity.HighDiscountPackageRecord; -<<<<<<< HEAD import com.hai.entity.HighDiscountPackageRecordExample; import com.hai.service.HighDiscountPackageRecordService; import org.apache.commons.collections4.MapUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.Date; import java.util.List; import java.util.Map; @@ -25,26 +25,29 @@ public class HighDiscountPackageRecordServiceImpl implements HighDiscountPackage @Resource private HighDiscountPackageRecordMapper discountPackageRecordMapper; + @Resource + private HighDiscountPackageRecordMapper highDiscountPackageRecordMapper; + @Override public List getDiscountPackageRecord(Map map) { HighDiscountPackageRecordExample example = new HighDiscountPackageRecordExample(); HighDiscountPackageRecordExample.Criteria criteria = example.createCriteria(); - if (MapUtils.getString(map , "phone") != null) { - criteria.andExt1Like("%" + MapUtils.getString(map , "phone") + "%"); + if (MapUtils.getString(map, "phone") != null) { + criteria.andExt1Like("%" + MapUtils.getString(map, "phone") + "%"); } - if (MapUtils.getString(map , "title") != null) { - criteria.andDiscountPackageTitleLike("%" + MapUtils.getString(map , "phone") + "%"); + if (MapUtils.getString(map, "title") != null) { + criteria.andDiscountPackageTitleLike("%" + MapUtils.getString(map, "phone") + "%"); } - if (MapUtils.getString(map , "recordNo") != null) { - criteria.andRecordNoLike("%" + MapUtils.getString(map , "recordNo") + "%"); + if (MapUtils.getString(map, "recordNo") != null) { + criteria.andRecordNoLike("%" + MapUtils.getString(map, "recordNo") + "%"); } - if (MapUtils.getInteger(map , "saleType") != null) { - criteria.andSalesTypeEqualTo(MapUtils.getInteger(map , "saleType")); + if (MapUtils.getInteger(map, "saleType") != null) { + criteria.andSalesTypeEqualTo(MapUtils.getInteger(map, "saleType")); } - if (MapUtils.getInteger(map , "companyId") != null) { - criteria.andCompanyIdEqualTo(MapUtils.getInteger(map , "companyId")); + if (MapUtils.getInteger(map, "companyId") != null) { + criteria.andCompanyIdEqualTo(MapUtils.getInteger(map, "companyId")); } criteria.andStatusEqualTo(1); @@ -52,24 +55,12 @@ public class HighDiscountPackageRecordServiceImpl implements HighDiscountPackage example.setOrderByClause("created_time"); return discountPackageRecordMapper.selectByExample(example); -======= -import com.hai.service.HighDiscountPackageRecordService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.Date; - -@Service("discountPackageRecordService") -public class HighDiscountPackageRecordServiceImpl implements HighDiscountPackageRecordService { - - @Resource - private HighDiscountPackageRecordMapper highDiscountPackageRecordMapper; + } @Override public void insertRecord(HighDiscountPackageRecord record) { record.setCreatedTime(new Date()); record.setStatus(1); highDiscountPackageRecordMapper.insert(record); ->>>>>>> c91e5b70c15cdb86ee69f2771ce00208b0bbf4cb } }