parent
ed66ef1c47
commit
16ba17b367
@ -0,0 +1,26 @@ |
|||||||
|
package com.hai.service; |
||||||
|
|
||||||
|
import com.hai.entity.HighDiscountPackageRecord; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @serviceName HighDiscountPackageRecordService.java |
||||||
|
* @author Sum1Dream |
||||||
|
* @version 1.0.0 |
||||||
|
* @Description // 优惠券包订单列表
|
||||||
|
* @createTime 11:41 上午 2021/12/9 |
||||||
|
**/ |
||||||
|
public interface HighDiscountPackageRecordService { |
||||||
|
|
||||||
|
/** |
||||||
|
* @Author Sum1Dream |
||||||
|
* @name getDiscountPackageRecord.java |
||||||
|
* @Description // 优惠券包订单列表
|
||||||
|
* @Date 11:40 上午 2021/12/9 |
||||||
|
* @Param [java.util.Map<java.lang.String,java.lang.Object>] |
||||||
|
* @return java.util.List<com.hai.entity.HighDiscountPackageRecord> |
||||||
|
*/ |
||||||
|
List<HighDiscountPackageRecord> getDiscountPackageRecord(Map<String , Object> map); |
||||||
|
} |
@ -0,0 +1,55 @@ |
|||||||
|
package com.hai.service.impl; |
||||||
|
|
||||||
|
import com.hai.dao.HighDiscountPackageRecordMapper; |
||||||
|
import com.hai.entity.HighDiscountPackageRecord; |
||||||
|
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.List; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* @serviceName HighDiscountPackageRecordServiceImpl.java |
||||||
|
* @author Sum1Dream |
||||||
|
* @version 1.0.0 |
||||||
|
* @Description //
|
||||||
|
* @createTime 12:12 下午 2021/12/9 |
||||||
|
**/ |
||||||
|
@Service("highDiscountPackageRecordService") |
||||||
|
public class HighDiscountPackageRecordServiceImpl implements HighDiscountPackageRecordService { |
||||||
|
|
||||||
|
@Resource |
||||||
|
private HighDiscountPackageRecordMapper discountPackageRecordMapper; |
||||||
|
|
||||||
|
@Override |
||||||
|
public List<HighDiscountPackageRecord> getDiscountPackageRecord(Map<String, Object> 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 , "title") != null) { |
||||||
|
criteria.andDiscountPackageTitleLike("%" + MapUtils.getString(map , "phone") + "%"); |
||||||
|
} |
||||||
|
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 , "companyId") != null) { |
||||||
|
criteria.andCompanyIdEqualTo(MapUtils.getInteger(map , "companyId")); |
||||||
|
} |
||||||
|
|
||||||
|
criteria.andStatusEqualTo(1); |
||||||
|
|
||||||
|
example.setOrderByClause("created_time"); |
||||||
|
|
||||||
|
return discountPackageRecordMapper.selectByExample(example); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue