admin
2019-07-16 013a3a80d8b91506307995e282337143c7b09783
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package com.yeshi.fanli.service.impl.order;
 
import java.util.List;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Service;
 
import com.yeshi.fanli.dao.mybatis.order.HongBaoOrderMapper;
import com.yeshi.fanli.entity.order.HongBaoOrder;
import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
import com.yeshi.fanli.util.Constant;
 
@Service
public class HongBaoOrderServiceImpl implements HongBaoOrderService {
 
    @Resource
    private HongBaoOrderMapper hongBaoOrderMapper;
 
    @Override
    public int insert(HongBaoOrder record) {
        return hongBaoOrderMapper.insert(record);
    }
 
    @Override
    public int insertSelective(HongBaoOrder record) {
        return hongBaoOrderMapper.insertSelective(record);
    }
 
    @Override
    public int updateByPrimaryKeySelective(HongBaoOrder record) {
        return hongBaoOrderMapper.updateByPrimaryKeySelective(record);
    }
 
    @Override
    public int updateByPrimaryKey(HongBaoOrder record) {
        return hongBaoOrderMapper.updateByPrimaryKey(record);
    }
 
    @Override
    public int deleteByPrimaryKey(Long id) {
        return hongBaoOrderMapper.deleteByPrimaryKey(id);
    }
 
    @Override
    public HongBaoOrder selectByPrimaryKey(Long id) {
        return hongBaoOrderMapper.selectByPrimaryKey(id);
    }
 
    @Override
    public List<HongBaoOrder> listFanLiOrder(Long uid, int page, int pageSize) {
        return hongBaoOrderMapper.listFanLiOrder(uid, (page - 1) * pageSize, pageSize);
    }
 
    @Override
    public long countFanLiOrder(Long uid) {
        Long count = hongBaoOrderMapper.countFanLiOrder(uid);
        return count == null ? 0 : count;
    }
 
    @Override
    public long countByOrderNoAndHongBaoType(String orderNo, int type) {
        return hongBaoOrderMapper.countByOrderNoAndHongBaoType(orderNo, type, Constant.SOURCE_TYPE_TAOBAO);
    }
 
    @Override
    public HongBaoOrder selectDetailByCommonOrderId(Long commonOrderId) {
        return hongBaoOrderMapper.selectByCommonOrderId(commonOrderId);
    }
 
}