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.
52 lines
1.4 KiB
52 lines
1.4 KiB
4 years ago
|
package com.hai.service.impl;
|
||
|
|
||
|
import com.hai.dao.HighDiscountMapper;
|
||
|
import com.hai.entity.HighDiscount;
|
||
|
import com.hai.entity.HighDiscountCouponRel;
|
||
|
import com.hai.entity.HighDiscountExample;
|
||
|
import com.hai.service.HighDiscountService;
|
||
|
import org.springframework.stereotype.Service;
|
||
|
|
||
|
import javax.annotation.Resource;
|
||
|
import java.util.List;
|
||
|
import java.util.Map;
|
||
|
|
||
|
/**
|
||
|
* @Auther: 胡锐
|
||
|
* @Description:
|
||
|
* @Date: 2021/4/3 21:39
|
||
|
*/
|
||
|
@Service("highDiscountService")
|
||
|
public class HighDiscountServiceImpl implements HighDiscountService {
|
||
|
|
||
|
@Resource
|
||
|
private HighDiscountMapper highDiscountMapper;
|
||
|
|
||
|
@Resource
|
||
|
private HighDiscountCouponRel highDiscountCouponRel;
|
||
|
|
||
|
@Override
|
||
|
public void insertDiscount(HighDiscount highDiscount) {
|
||
|
highDiscountMapper.insert(highDiscount);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void updateDiscount(HighDiscount highDiscount) {
|
||
|
highDiscountMapper.updateByPrimaryKey(highDiscount);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public HighDiscount getDiscountById(Long id) {
|
||
|
return highDiscountMapper.selectByPrimaryKey(id);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public List<HighDiscount> getDiscount(Map<String, Object> map) {
|
||
|
HighDiscountExample example = new HighDiscountExample();
|
||
|
HighDiscountExample.Criteria criteria = example.createCriteria();
|
||
|
|
||
|
example.setOrderByClause("update_time desc");
|
||
|
return highDiscountMapper.selectByExample(example);
|
||
|
}
|
||
|
}
|