嗨森逛服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hai-server/hai-service/src/main/java/com/hai/service/impl/HighCouponPackageDetailsSer...

53 lines
1.8 KiB

package com.hai.service.impl;
import com.hai.service.HighCouponPackageDetailsService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @serviceName HighCouponPackageDetailsServiceImpl.java
* @author Sum1Dream
* @version 1.0.0
* @Description // 优惠券详情服务
* @createTime 3:38 下午 2021/11/25
**/
@Service("highCouponPackageDetailsService")
public class HighCouponPackageDetailsServiceImpl implements HighCouponPackageDetailsService {
@Resource
private HighCouponPackageDetailsMapper highCouponPackageDetailsMapper;
@Override
public List<HighCouponPackageDetails> getCouponPackageDetailsList(Map<String, Object> map) {
HighCouponPackageDetailsExample example = new HighCouponPackageDetailsExample();
HighCouponPackageDetailsExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(map, "couponPackageId") != null) {
criteria.andCouponPackageIdEqualTo(MapUtils.getInteger(map, "couponPackageId"));
}
criteria.andStatusEqualTo(1);
return highCouponPackageDetailsMapper.selectByExample(example);
}
@Override
public HighCouponPackageDetails findDetailsById(Integer id) {
return highCouponPackageDetailsMapper.selectByPrimaryKey(id);
}
@Override
public void insertCouponPackageDetails(HighCouponPackageDetails highCouponPackageDetails) {
highCouponPackageDetailsMapper.insert(highCouponPackageDetails);
}
@Override
public void updateCouponPackageDetails(HighCouponPackageDetails highCouponPackageDetails) {
highCouponPackageDetailsMapper.updateByPrimaryKey(highCouponPackageDetails);
}
}