mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
package com.panzhihua.service_community.service.impl;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.VolunteerIntegralRecordVO;
import com.panzhihua.service_community.dao.VolunteerIntegralRecordDao;
import com.panzhihua.service_community.entity.VolunteerActivity;
import com.panzhihua.service_community.entity.VolunteerIntegralRecord;
import com.panzhihua.service_community.service.VolunteerIntegralRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
 
@Slf4j
@Service
public class VolunteerIntegralRecordServiceImpl extends ServiceImpl<VolunteerIntegralRecordDao,
        VolunteerIntegralRecord> implements VolunteerIntegralRecordService
{
 
 
    @Override
    public R getId(String id) {
        return R.ok(baseMapper.getId(id));
    }
 
    @Override
    public R getList(int pageNum, int pageSize, String userId)
    {
        Page page = new Page<VolunteerIntegralRecord>(pageNum,pageSize);
        return R.ok(baseMapper.getList(page,userId,null));
    }
 
    @Override
    public R insertVolunteer(VolunteerIntegralRecordVO volunteerIntegralRecordVO)
    {
        int num= baseMapper.insertVolunteer(volunteerIntegralRecordVO);
        if(num>0)
        {
            return R.ok();
        }
        return R.fail("操作失败");
    }
 
    @Override
    public R updateId(VolunteerIntegralRecordVO volunteerIntegralRecordVO) {
        int num= baseMapper.updateId(volunteerIntegralRecordVO);
        if(num>0)
        {
            return R.ok();
        }
        return R.fail("操作失败");
    }
 
    @Override
    public R deleteId(String id) {
        int num= baseMapper.deleteId(id);
        if(num>0)
        {
            return R.ok();
        }
        return R.fail("操作失败");
    }
}