huwhois 4 jaren geleden
bovenliggende
commit
273c03252e

+ 6 - 0
src/main/java/io/renren/modules/admin/controller/AttendersController.java

205
            return R.error("会议id不可为空");
205
            return R.error("会议id不可为空");
206
        }
206
        }
207
        MemberEntity member = memberService.getById(attendersform.getMemberId());
207
        MemberEntity member = memberService.getById(attendersform.getMemberId());
208
        if (member == null) {
209
            return R.error("会员不存在");
210
        }
208
        member.setTruename(attendersform.getTruename());
211
        member.setTruename(attendersform.getTruename());
209
        member.setOrganization(attendersform.getOrganization());
212
        member.setOrganization(attendersform.getOrganization());
210
        member.setPosition(attendersform.getPosition());
213
        member.setPosition(attendersform.getPosition());
224
        memberService.updateMember(member);
227
        memberService.updateMember(member);
225
228
226
        AttendersEntity attenders = attendersService.getById(attendersform.getId());
229
        AttendersEntity attenders = attendersService.getById(attendersform.getId());
230
        if (attenders == null) {
231
            return R.error("参会人员不存在");
232
        }
227
        attenders.setMemberId(attendersform.getMemberId());
233
        attenders.setMemberId(attendersform.getMemberId());
228
        attenders.setMeetingId(attendersform.getMeetingId());
234
        attenders.setMeetingId(attendersform.getMeetingId());
229
        attenders.setMemberType(attendersform.getMemberType());
235
        attenders.setMemberType(attendersform.getMemberType());

+ 12 - 3
src/main/java/io/renren/modules/admin/controller/InvitationController.java

1
package io.renren.modules.admin.controller;
1
package io.renren.modules.admin.controller;
2
2
3
4
import java.util.Map;
3
import java.util.Map;
5
4
6
import org.apache.shiro.authz.annotation.RequiresPermissions;
5
import org.apache.shiro.authz.annotation.RequiresPermissions;
17
import io.renren.common.utils.PageUtils;
16
import io.renren.common.utils.PageUtils;
18
import io.renren.common.utils.R;
17
import io.renren.common.utils.R;
19
import io.renren.modules.admin.entity.AttendersEntity;
18
import io.renren.modules.admin.entity.AttendersEntity;
19
import io.renren.modules.admin.entity.MemberEntity;
20
import io.renren.modules.admin.service.AttendersService;
20
import io.renren.modules.admin.service.AttendersService;
21
import io.renren.modules.admin.service.MeetingService;
21
import io.renren.modules.admin.service.MemberService;
22
import io.renren.modules.admin.service.MemberService;
22
23
23
24
34
    private AttendersService attendersService;
35
    private AttendersService attendersService;
35
    @Autowired
36
    @Autowired
36
    private MemberService memberService;
37
    private MemberService memberService;
38
    @Autowired
39
    private MeetingService meetingService;
37
40
38
    /**
41
    /**
39
     * 列表
42
     * 列表
56
    @PostMapping("/isreceipt")
59
    @PostMapping("/isreceipt")
57
    @RequiresPermissions("admin:invitation:isreceipt")
60
    @RequiresPermissions("admin:invitation:isreceipt")
58
    public R isreceipt(@RequestBody Map<String, Object> params){
61
    public R isreceipt(@RequestBody Map<String, Object> params){
59
        if (!params.containsKey("meetingId")) {
60
            return R.error("会议id不可为空");
62
        if (!params.containsKey("meetingId") || !params.containsKey("id")) {
63
            return R.error("会议id不可为空 or 会员id不可为空");
61
        }
64
        }
62
        Long meetingId = Long.valueOf(params.get("meetingId").toString());
65
        Long meetingId = Long.valueOf(params.get("meetingId").toString());
63
        Long id = Long.valueOf(params.get("id").toString());
66
        Long id = Long.valueOf(params.get("id").toString());
67
        
68
        MemberEntity member = memberService.getById(id);
69
        if (member == null || !meetingService.meetingExist(meetingId)) {
70
            return R.error("会员不存在 or 会议不存在");
71
        }
72
64
        Long aid = params.get("aid") == null ? 0L : Long.valueOf(params.get("aid").toString());
73
        Long aid = params.get("aid") == null ? 0L : Long.valueOf(params.get("aid").toString());
65
        int receipt = Integer.valueOf(params.get("receipt").toString());
74
        int receipt = Integer.valueOf(params.get("receipt").toString());
66
75

+ 1 - 1
src/main/java/io/renren/modules/admin/service/MeetingService.java

17
17
18
    PageUtils queryPage(Map<String, Object> params);
18
    PageUtils queryPage(Map<String, Object> params);
19
19
20
    boolean meetingExist(Long meetingId);
20
    boolean meetingExist(Long id);
21
}
21
}
22
22

+ 2 - 2
src/main/java/io/renren/modules/admin/service/impl/MeetingServiceImpl.java

32
    }
32
    }
33
33
34
    @Override
34
    @Override
35
    public boolean meetingExist(Long meetingId) {
36
        MeetingEntity meeting = getOne(new QueryWrapper<MeetingEntity>().eq("meeting_id", meetingId));
35
    public boolean meetingExist(Long id) {
36
        MeetingEntity meeting = getOne(new QueryWrapper<MeetingEntity>().eq("id", id).eq("pid", 0).eq("is_del", 0));
37
37
38
        return meeting==null ? false : true;
38
        return meeting==null ? false : true;
39
    }
39
    }