| package com.pt5.pthouduan.service; |
| |
| import com.pt5.pthouduan.entity.Invites; |
| import com.pt5.pthouduan.mapper.InvitesMapper; |
| import com.pt5.pthouduan.mapper.UserMapper; |
| import org.springframework.beans.factory.annotation.Autowired; |
| import org.springframework.stereotype.Service; |
| |
| import java.util.HashMap; |
| import java.util.List; |
| import java.util.Map; |
| |
| @Service |
| public class InviteService { |
| @Autowired |
| private InvitesMapper invitesMapper; |
| //获取“我的”邀请码 |
| public Map<String, Object> getInvitesByUsername(String username){ |
| Map<String, Object> result = new HashMap<>(); |
| List<Map<String, Object>> invites = invitesMapper.selectInvitesByUsername(username); |
| result.put("success", true); |
| result.put("invites", invites); |
| result.put("message", "获取成功"); |
| return result; |
| } |
| |
| |
| |
| } |