¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.compare; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallSessionUser; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Comparator; |
| | | import java.util.Date; |
| | | @Component |
| | | public class ArdCallSessionUserComparator implements Comparator<ArdCallSessionUser> { |
| | | |
| | | @Override |
| | | public int compare(ArdCallSessionUser o1, ArdCallSessionUser o2) { |
| | | Date createTime1 = o1.getArdCallHistory().getCreateTime(); |
| | | Date createTime2 = o2.getArdCallHistory().getCreateTime(); |
| | | // æ ¹æ® createTime è¿è¡æ¯è¾ |
| | | return createTime2.compareTo(createTime1); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.call.domain.ArdCallGroup; |
| | | import com.ruoyi.call.service.IArdCallGroupService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ä¼è¯ç¾¤ç»Controller |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | @Api(tags = "群è-ç¾¤ç»æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/call/group") |
| | | @Anonymous |
| | | public class ArdCallGroupController extends BaseController { |
| | | @Autowired |
| | | private IArdCallGroupService ardCallGroupService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¾¤ç»å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢ç¾¤ç»å表") |
| | | @ApiOperationSupport(ignoreParameters = {"ardCallGroupUsers","userIds","params"}) |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdCallGroup ardCallGroup) { |
| | | startPage(); |
| | | List<ArdCallGroup> list = ardCallGroupService.selectArdCallGroupList(ardCallGroup); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·å群ç»è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·å群ç»è¯¦ç»ä¿¡æ¯") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardCallGroupService.selectArdCallGroupById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¾¤ç» |
| | | */ |
| | | @ApiOperation("æ°å¢ç¾¤ç»") |
| | | @ApiOperationSupport(includeParameters = {"param.userIds","param.name"}) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdCallGroup ardCallGroup) { |
| | | return success(ardCallGroupService.insertArdCallGroup(ardCallGroup)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¾¤ç» |
| | | */ |
| | | @ApiOperation("ä¿®æ¹ç¾¤ç»") |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdCallGroup ardCallGroup) { |
| | | return toAjax(ardCallGroupService.updateArdCallGroup(ardCallGroup)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¾¤ç» |
| | | */ |
| | | @ApiOperation("å é¤ç¾¤ç»") |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardCallGroupService.deleteArdCallGroupByIds(ids)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.call.domain.ArdCallGroupUser; |
| | | import com.ruoyi.call.service.IArdCallGroupUserService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 群ç»ç¨æ·ä¸é´Controller |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | @Api(tags = "群è-群ç»ç¨æ·æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/call/groupuser") |
| | | @Anonymous |
| | | public class ArdCallGroupUserController extends BaseController { |
| | | @Autowired |
| | | private IArdCallGroupUserService ardCallGroupUserService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¾¤ç»ç¨æ·ä¸é´å表 |
| | | */ |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdCallGroupUser ardCallGroupUser) { |
| | | startPage(); |
| | | List<ArdCallGroupUser> list = ardCallGroupUserService.selectArdCallGroupUserList(ardCallGroupUser); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·å群ç»ç¨æ·ä¸é´è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardCallGroupUserService.selectArdCallGroupUserById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¾¤ç»ç¨æ·ä¸é´ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('call:groupuser:add')") |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdCallGroupUser ardCallGroupUser) { |
| | | return toAjax(ardCallGroupUserService.insertArdCallGroupUser(ardCallGroupUser)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¾¤ç»ç¨æ·ä¸é´ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('call:groupuser:edit')") |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdCallGroupUser ardCallGroupUser) { |
| | | return toAjax(ardCallGroupUserService.updateArdCallGroupUser(ardCallGroupUser)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¾¤ç»ç¨æ·ä¸é´ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('call:groupuser:remove')") |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardCallGroupUserService.deleteArdCallGroupUserByIds(ids)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¨æ·æå¨ç¾¤ç» |
| | | */ |
| | | @ApiOperation("æ¥è¯¢ç¨æ·æå¨ç¾¤ç»") |
| | | @GetMapping(value = "/getGroupListByUserId/{userId}") |
| | | public AjaxResult getGroupListByUserId(@PathVariable("userId") String userId) { |
| | | return success(ardCallGroupUserService.getGroupListByUserId(userId)); |
| | | } |
| | | /** |
| | | * ä¸å¨ç¾¤ç»ç人åå表 |
| | | */ |
| | | @ApiOperation("ä¸å¨ç¾¤ç»ç人åå表") |
| | | @GetMapping(value = "/notInGroupUsers/{groupId}") |
| | | public AjaxResult notInGroupUsers (@PathVariable("groupId") String groupId) { |
| | | return success(ardCallGroupUserService.notInGroupUsers(groupId)); |
| | | } |
| | | |
| | | /** |
| | | * éè¯·ç¾¤ç»æå |
| | | */ |
| | | @ApiOperation("éè¯·ç¾¤ç»æå") |
| | | @PostMapping("/addGroupUser") |
| | | public AjaxResult addGroupUser(String groupId, String[] userIds) { |
| | | return toAjax(ardCallGroupUserService.addGroupUser(groupId, userIds)); |
| | | } |
| | | /** |
| | | * ç§»é¤ç¾¤ç»æå |
| | | */ |
| | | @ApiOperation("ç§»é¤ç¾¤ç»æå") |
| | | @PostMapping("/removeGroupUser") |
| | | public AjaxResult removeGroupUser(String groupId, String[] userIds) { |
| | | return toAjax(ardCallGroupUserService.removeGroupUser(groupId, userIds)); |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.call.domain.ArdCallHistory; |
| | | import com.ruoyi.call.service.IArdCallHistoryService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ä¼è¯åå²Controller |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | @Api(tags = "群è-å岿¶æ¯æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/call/history") |
| | | @Anonymous |
| | | public class ArdCallHistoryController extends BaseController { |
| | | @Autowired |
| | | private IArdCallHistoryService ardCallHistoryService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯æ¶æ¯å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢ä¼è¯æ¶æ¯å表") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdCallHistory ardCallHistory) { |
| | | startPage(); |
| | | List<ArdCallHistory> list = ardCallHistoryService.selectArdCallHistoryList(ardCallHistory); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åä¼è¯åå²è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardCallHistoryService.selectArdCallHistoryById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯æ¶æ¯ |
| | | */ |
| | | @ApiOperation("æ°å¢ä¼è¯æ¶æ¯") |
| | | @ApiOperationSupport(includeParameters = {"param.userId","param.targetId", "param.sessionId", "param.content", "param.type"}) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdCallHistory ardCallHistory) { |
| | | return toAjax(ardCallHistoryService.insertArdCallHistory(ardCallHistory)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯æ¶æ¯ |
| | | */ |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdCallHistory ardCallHistory) { |
| | | return toAjax(ardCallHistoryService.updateArdCallHistory(ardCallHistory)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¼è¯æ¶æ¯ |
| | | */ |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardCallHistoryService.deleteArdCallHistoryByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.call.domain.ArdCallSession; |
| | | import com.ruoyi.call.service.IArdCallSessionService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * è§é¢ä¼è¯Controller |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | @Api(tags = "群è-ä¼è¯æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/call/session") |
| | | @Anonymous |
| | | public class ArdCallSessionController extends BaseController { |
| | | @Autowired |
| | | private IArdCallSessionService ardCallSessionService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯å表 |
| | | */ |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdCallSession ardCallSession) { |
| | | startPage(); |
| | | List<ArdCallSession> list = ardCallSessionService.selectArdCallSessionList(ardCallSession); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åä¼è¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardCallSessionService.selectArdCallSessionById(id)); |
| | | } |
| | | /** |
| | | * è·åä¼è¯ |
| | | */ |
| | | @ApiOperation("è·åä¼è¯") |
| | | @GetMapping(value = "/getSession") |
| | | public AjaxResult getSession(String type,String userId, String targetId) { |
| | | return success(ardCallSessionService.getSession(type,userId,targetId)); |
| | | } |
| | | /** |
| | | * æ°å¢ä¼è¯ |
| | | */ |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdCallSession ardCallSession) { |
| | | return success(ardCallSessionService.insertArdCallSession(ardCallSession)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯ |
| | | */ |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdCallSession ardCallSession) { |
| | | return toAjax(ardCallSessionService.updateArdCallSession(ardCallSession)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¼è¯ |
| | | */ |
| | | @ApiOperation("å é¤ä¼è¯") |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardCallSessionService.deleteArdCallSessionByIds(ids)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.ruoyi.call.service.IArdCallUnreadMessagesService; |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.call.domain.ArdCallSessionUser; |
| | | import com.ruoyi.call.service.IArdCallSessionUserService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ä¼è¯ç¨æ·ä¸é´è¡¨Controller |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-04 |
| | | */ |
| | | @Api(tags = "群è-ä¼è¯æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/call/sessionuser") |
| | | @Anonymous |
| | | public class ArdCallSessionUserController extends BaseController { |
| | | @Autowired |
| | | private IArdCallSessionUserService ardCallSessionUserService; |
| | | @Autowired |
| | | private IArdCallUnreadMessagesService ardCallUnreadMessagesService; |
| | | /** |
| | | * è·åä¼è¯å表 |
| | | */ |
| | | @ApiOperation("è·åä¼è¯å表") |
| | | @ApiOperationSupport(ignoreParameters = {"id","unReadCount","sessionId","targetId","type","params","ardCallHistory"}) |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdCallSessionUser ardCallSessionUser) { |
| | | startPage(); |
| | | List<ArdCallSessionUser> list = ardCallSessionUserService.selectArdCallSessionUserList(ardCallSessionUser); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * è·åä¼è¯ç¨æ·ä¸é´è¡¨è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) { |
| | | return success(ardCallSessionUserService.selectArdCallSessionUserById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | */ |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdCallSessionUser ardCallSessionUser) { |
| | | return toAjax(ardCallSessionUserService.insertArdCallSessionUser(ardCallSessionUser)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | */ |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdCallSessionUser ardCallSessionUser) { |
| | | return toAjax(ardCallSessionUserService.updateArdCallSessionUser(ardCallSessionUser)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | */ |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) { |
| | | return toAjax(ardCallSessionUserService.deleteArdCallSessionUserByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * æ¸
é¤ä¼è¯æªè¯»æ°é |
| | | */ |
| | | @ApiOperation("æ¸
é¤ä¼è¯æªè¯»æ°é") |
| | | @PostMapping("/clearUnReadCount") |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "sessionId", value = "ä¼è¯id", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "userId", value = "ç¨æ·id", required = true, dataType = "String")}) |
| | | public AjaxResult clearUnReadCount(String sessionId, String userId) { |
| | | return toAjax(ardCallUnreadMessagesService.clearUnReadCount(sessionId, userId)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.domain; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¼è¯ç¾¤ç»å¯¹è±¡ ard_call_group |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public class ArdCallGroup extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | private String id; |
| | | |
| | | /** |
| | | * 群åç§° |
| | | */ |
| | | @Excel(name = "群åç§°") |
| | | private String name; |
| | | /** |
| | | * 群æåå表 |
| | | */ |
| | | private List<ArdCallGroupUser> ArdCallGroupUsers; |
| | | |
| | | /** |
| | | * 群æåidå表 |
| | | */ |
| | | private List<String> userIds; |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public List<ArdCallGroupUser> getArdCallGroupUsers() { |
| | | return ArdCallGroupUsers; |
| | | } |
| | | |
| | | public void setArdCallGroupUsers(List<ArdCallGroupUser> ardCallGroupUsers) { |
| | | ArdCallGroupUsers = ardCallGroupUsers; |
| | | } |
| | | |
| | | public List<String> getUserIds() { |
| | | return userIds; |
| | | } |
| | | |
| | | public void setUserIds(List<String> userIds) { |
| | | this.userIds = userIds; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("name", getName()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.domain; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * 群ç»ç¨æ·ä¸é´å¯¹è±¡ ard_call_group_user |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public class ArdCallGroupUser extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ä¸»é® */ |
| | | private String id; |
| | | |
| | | /** 群ç»ID */ |
| | | @Excel(name = "群ç»ID") |
| | | private String groupId; |
| | | |
| | | /** ç¨æ·ID */ |
| | | @Excel(name = "ç¨æ·ID") |
| | | private String userId; |
| | | |
| | | private SysUser sysUser; // åµå¥ç SysUser 对象 |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setGroupId(String groupId) |
| | | { |
| | | this.groupId = groupId; |
| | | } |
| | | |
| | | public String getGroupId() |
| | | { |
| | | return groupId; |
| | | } |
| | | public void setUserId(String userId) |
| | | { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getUserId() |
| | | { |
| | | return userId; |
| | | } |
| | | |
| | | public SysUser getSysUser() { |
| | | return sysUser; |
| | | } |
| | | |
| | | public void setSysUser(SysUser sysUser) { |
| | | this.sysUser = sysUser; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("groupId", getGroupId()) |
| | | .append("userId", getUserId()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * ä¼è¯åå²å¯¹è±¡ ard_call_history |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public class ArdCallHistory extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ä¸»é® */ |
| | | private String id; |
| | | |
| | | /** ä¼è¯ID */ |
| | | @Excel(name = "ä¼è¯ID") |
| | | private String sessionId; |
| | | /** ç¨æ·ID */ |
| | | @Excel(name = "ç¨æ·ID") |
| | | private String userId; |
| | | /** æ¶æ¯ç±»å */ |
| | | @Excel(name = "æ¶æ¯ç±»å") |
| | | private String type; |
| | | |
| | | /** æ¶æ¯å
容 */ |
| | | @Excel(name = "æ¶æ¯å
容") |
| | | private String content; |
| | | |
| | | /** ç®æ ID */ |
| | | @Excel(name = "ç®æ ID") |
| | | private String targetId; |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setType(String type) |
| | | { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getType() |
| | | { |
| | | return type; |
| | | } |
| | | public void setContent(String content) |
| | | { |
| | | this.content = content; |
| | | } |
| | | |
| | | public String getContent() |
| | | { |
| | | return content; |
| | | } |
| | | |
| | | public String getSessionId() { |
| | | return sessionId; |
| | | } |
| | | |
| | | public void setSessionId(String sessionId) { |
| | | this.sessionId = sessionId; |
| | | } |
| | | |
| | | public String getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(String userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | |
| | | public String getTargetId() { |
| | | return targetId; |
| | | } |
| | | |
| | | public void setTargetId(String targetId) { |
| | | this.targetId = targetId; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("type", getType()) |
| | | .append("content", getContent()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è§é¢ä¼è¯å¯¹è±¡ ard_call_session |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public class ArdCallSession extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | private String id; |
| | | |
| | | /** |
| | | * ä¼è¯ç±»å |
| | | */ |
| | | @Excel(name = "ä¼è¯ç±»å") |
| | | private String type; |
| | | |
| | | /** |
| | | * userId |
| | | */ |
| | | @Excel(name = "ç¨æ·Id") |
| | | private String userId; |
| | | |
| | | /** |
| | | * ä¼è¯ç¨æ·å表 |
| | | */ |
| | | private List<String> targetIds; |
| | | |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public String getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(String userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | |
| | | public List<String> getTargetIds() { |
| | | return targetIds; |
| | | } |
| | | |
| | | public void setTargetIds(List<String> targetIds) { |
| | | this.targetIds = targetIds; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("type", getType()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * ä¼è¯ç¨æ·ä¸é´è¡¨å¯¹è±¡ ard_call_session_user |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-04 |
| | | */ |
| | | public class ArdCallSessionUser extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ä¸»é® */ |
| | | private String id; |
| | | |
| | | /** ä¼è¯id */ |
| | | @Excel(name = "ä¼è¯id") |
| | | private String sessionId; |
| | | |
| | | /** ä¼è¯ç±»å */ |
| | | @Excel(name = "ä¼è¯ç±»å") |
| | | private String type; |
| | | |
| | | |
| | | /** å½åæåid */ |
| | | @Excel(name = "å½åæåid") |
| | | private String userId; |
| | | |
| | | /** ç®æ æåid */ |
| | | @Excel(name = "ç®æ æåid") |
| | | private String targetId; |
| | | |
| | | /** |
| | | * æå䏿¡æ¶æ¯ |
| | | */ |
| | | private ArdCallHistory ardCallHistory; |
| | | /** |
| | | * æªè¯»æ¶æ¯æ°æ®é |
| | | */ |
| | | private Integer unReadCount; |
| | | |
| | | |
| | | public ArdCallHistory getArdCallHistory() { |
| | | return ardCallHistory; |
| | | } |
| | | |
| | | public void setArdCallHistory(ArdCallHistory ardCallHistory) { |
| | | this.ardCallHistory = ardCallHistory; |
| | | } |
| | | |
| | | public Integer getUnReadCount() { |
| | | return unReadCount; |
| | | } |
| | | |
| | | public void setUnReadCount(Integer unReadCount) { |
| | | this.unReadCount = unReadCount; |
| | | } |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setSessionId(String sessionId) |
| | | { |
| | | this.sessionId = sessionId; |
| | | } |
| | | |
| | | public String getSessionId() |
| | | { |
| | | return sessionId; |
| | | } |
| | | public void setType(String type) |
| | | { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getType() |
| | | { |
| | | return type; |
| | | } |
| | | |
| | | public String getTargetId() { |
| | | return targetId; |
| | | } |
| | | |
| | | public void setTargetId(String targetId) { |
| | | this.targetId = targetId; |
| | | } |
| | | |
| | | public String getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(String userId) { |
| | | this.userId = userId; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * æªè¯»æ¶æ¯å¯¹è±¡ ard_call_unread_messages |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-06 |
| | | */ |
| | | public class ArdCallUnreadMessages extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ç¨æ·id */ |
| | | @Excel(name = "ç¨æ·id") |
| | | private String userId ; |
| | | |
| | | /** ä¼è¯id */ |
| | | @Excel(name = "ä¼è¯id") |
| | | private String sessionId; |
| | | |
| | | /** æªè¯»æ°é */ |
| | | @Excel(name = "æªè¯»æ°é") |
| | | private Integer unreadCount; |
| | | |
| | | public void setUserId (String userId ) |
| | | { |
| | | this.userId = userId ; |
| | | } |
| | | |
| | | public String getUserId () |
| | | { |
| | | return userId ; |
| | | } |
| | | public void setSessionId(String sessionId) |
| | | { |
| | | this.sessionId = sessionId; |
| | | } |
| | | |
| | | public String getSessionId() |
| | | { |
| | | return sessionId; |
| | | } |
| | | public void setUnreadCount(Integer unreadCount) |
| | | { |
| | | this.unreadCount = unreadCount; |
| | | } |
| | | |
| | | public Integer getUnreadCount() |
| | | { |
| | | return unreadCount; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("userId ", getUserId ()) |
| | | .append("sessionId", getSessionId()) |
| | | .append("unreadCount", getUnreadCount()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.call.domain.ArdCallGroup; |
| | | |
| | | /** |
| | | * ä¼è¯ç¾¤ç»Mapperæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public interface ArdCallGroupMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param id ä¼è¯ç¾¤ç»ä¸»é® |
| | | * @return ä¼è¯ç¾¤ç» |
| | | */ |
| | | public ArdCallGroup selectArdCallGroupById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¾¤ç»å表 |
| | | * |
| | | * @param ardCallGroup ä¼è¯ç¾¤ç» |
| | | * @return ä¼è¯ç¾¤ç»éå |
| | | */ |
| | | public List<ArdCallGroup> selectArdCallGroupList(ArdCallGroup ardCallGroup); |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param ardCallGroup ä¼è¯ç¾¤ç» |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallGroup(ArdCallGroup ardCallGroup); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param ardCallGroup ä¼è¯ç¾¤ç» |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallGroup(ArdCallGroup ardCallGroup); |
| | | |
| | | /** |
| | | * å é¤ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param id ä¼è¯ç¾¤ç»ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallGroupById(String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallGroupByIds(String[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallGroup; |
| | | import com.ruoyi.call.domain.ArdCallGroupUser; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 群ç»ç¨æ·ä¸é´Mapperæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public interface ArdCallGroupUserMapper { |
| | | /** |
| | | * æ¥è¯¢ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param id 群ç»ç¨æ·ä¸é´ä¸»é® |
| | | * @return 群ç»ç¨æ·ä¸é´ |
| | | */ |
| | | public ArdCallGroupUser selectArdCallGroupUserById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¾¤ç»ç¨æ·ä¸é´å表 |
| | | * |
| | | * @param ardCallGroupUser 群ç»ç¨æ·ä¸é´ |
| | | * @return 群ç»ç¨æ·ä¸é´éå |
| | | */ |
| | | public List<ArdCallGroupUser> selectArdCallGroupUserList(ArdCallGroupUser ardCallGroupUser); |
| | | |
| | | /** |
| | | * æ°å¢ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param ardCallGroupUser 群ç»ç¨æ·ä¸é´ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallGroupUser(ArdCallGroupUser ardCallGroupUser); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param ardCallGroupUser 群ç»ç¨æ·ä¸é´ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallGroupUser(ArdCallGroupUser ardCallGroupUser); |
| | | |
| | | /** |
| | | * å é¤ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param id 群ç»ç¨æ·ä¸é´ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallGroupUserById(String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallGroupUserByIds(String[] ids); |
| | | |
| | | /** |
| | | * å é¤ç¾¤ç»å
³èç¨æ· |
| | | * |
| | | * @param groupId 群ç»ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int clearArdCallGroupUsers(String groupId); |
| | | |
| | | /** |
| | | * ç§»é¤ç¾¤ç»ç¨æ· |
| | | * |
| | | * @param groupId 群ç»ä¸»é® |
| | | * @param userIds 群ç»ç¨æ·æ°ç»éå |
| | | * @return ç»æ |
| | | */ |
| | | public int removeGroupUser(@Param("groupId") String groupId, @Param("userIds") String[] userIds); |
| | | |
| | | public List<ArdCallGroup> getGroupListByUserId(String userId); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallHistory; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * ä¼è¯åå²Mapperæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public interface ArdCallHistoryMapper { |
| | | /** |
| | | * æ¥è¯¢ä¼è¯åå² |
| | | * |
| | | * @param id ä¼è¯åå²ä¸»é® |
| | | * @return ä¼è¯åå² |
| | | */ |
| | | public ArdCallHistory selectArdCallHistoryById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯åå²å表 |
| | | * |
| | | * @param ardCallHistory ä¼è¯åå² |
| | | * @return ä¼è¯åå²éå |
| | | */ |
| | | public List<ArdCallHistory> selectArdCallHistoryList(ArdCallHistory ardCallHistory); |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯åå² |
| | | * |
| | | * @param ardCallHistory ä¼è¯åå² |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallHistory(ArdCallHistory ardCallHistory); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯åå² |
| | | * |
| | | * @param ardCallHistory ä¼è¯åå² |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallHistory(ArdCallHistory ardCallHistory); |
| | | |
| | | /** |
| | | * å é¤ä¼è¯åå² |
| | | * |
| | | * @param id ä¼è¯åå²ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallHistoryById(String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¼è¯åå² |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallHistoryByIds(String[] ids); |
| | | |
| | | |
| | | /** |
| | | * è·åæå䏿¡ä¼è¯åå² |
| | | * |
| | | * @param sessionId ä¼è¯id |
| | | * @return ç»æ |
| | | */ |
| | | public ArdCallHistory selectLastArdCallHistory(@Param("sessionId") String sessionId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.call.domain.ArdCallSession; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * è§é¢ä¼è¯Mapperæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public interface ArdCallSessionMapper { |
| | | /** |
| | | * æ¥è¯¢è§é¢ä¼è¯ |
| | | * |
| | | * @param id è§é¢ä¼è¯ä¸»é® |
| | | * @return è§é¢ä¼è¯ |
| | | */ |
| | | public ArdCallSession selectArdCallSessionById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è§é¢ä¼è¯å表 |
| | | * |
| | | * @param ardCallSession è§é¢ä¼è¯ |
| | | * @return è§é¢ä¼è¯éå |
| | | */ |
| | | public List<ArdCallSession> selectArdCallSessionList(ArdCallSession ardCallSession); |
| | | |
| | | /** |
| | | * æ°å¢è§é¢ä¼è¯ |
| | | * |
| | | * @param ardCallSession è§é¢ä¼è¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallSession(ArdCallSession ardCallSession); |
| | | |
| | | /** |
| | | * ä¿®æ¹è§é¢ä¼è¯ |
| | | * |
| | | * @param ardCallSession è§é¢ä¼è¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallSession(ArdCallSession ardCallSession); |
| | | |
| | | /** |
| | | * å é¤è§é¢ä¼è¯ |
| | | * |
| | | * @param id è§é¢ä¼è¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallSessionById(String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤è§é¢ä¼è¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallSessionByIds(String[] ids); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallSessionUser; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * ä¼è¯ç¨æ·ä¸é´è¡¨Mapperæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-04 |
| | | */ |
| | | public interface ArdCallSessionUserMapper { |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param id ä¼è¯ç¨æ·ä¸é´è¡¨ä¸»é® |
| | | * @return ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | */ |
| | | public ArdCallSessionUser selectArdCallSessionUserById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¨æ·ä¸é´è¡¨å表 |
| | | * |
| | | * @param ardCallSessionUser ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * @return ä¼è¯ç¨æ·ä¸é´è¡¨éå |
| | | */ |
| | | public List<ArdCallSessionUser> selectArdCallSessionUserList(ArdCallSessionUser ardCallSessionUser); |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param ardCallSessionUser ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallSessionUser(ArdCallSessionUser ardCallSessionUser); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param ardCallSessionUser ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallSessionUser(ArdCallSessionUser ardCallSessionUser); |
| | | |
| | | /** |
| | | * å é¤ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param id ä¼è¯ç¨æ·ä¸é´è¡¨ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallSessionUserById(String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallSessionUserByIds(String[] ids); |
| | | |
| | | public String getSessionId(@Param("type") String type, @Param("userId") String userId, @Param("targetId") String targetId); |
| | | public String getGroupSessionId(@Param("type") String type, @Param("targetId") String targetId); |
| | | public int deleteArdCallSessionUserBySessionId(@Param("sessionId") String sessionId); |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallUnreadMessages; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | | * æªè¯»æ¶æ¯Mapperæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-06 |
| | | */ |
| | | public interface ArdCallUnreadMessagesMapper { |
| | | /** |
| | | * æ¥è¯¢æªè¯»æ¶æ¯ |
| | | * |
| | | * @param userId æªè¯»æ¶æ¯ä¸»é® |
| | | * @return æªè¯»æ¶æ¯ |
| | | */ |
| | | public ArdCallUnreadMessages selectArdCallUnreadMessagesByUserId(String userId); |
| | | |
| | | /** |
| | | * æ¥è¯¢æªè¯»æ¶æ¯å表 |
| | | * |
| | | * @param ardCallUnreadMessages æªè¯»æ¶æ¯ |
| | | * @return æªè¯»æ¶æ¯éå |
| | | */ |
| | | public List<ArdCallUnreadMessages> selectArdCallUnreadMessagesList(ArdCallUnreadMessages ardCallUnreadMessages); |
| | | |
| | | /** |
| | | * æ°å¢æªè¯»æ¶æ¯ |
| | | * |
| | | * @param ardCallUnreadMessages æªè¯»æ¶æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallUnreadMessages(ArdCallUnreadMessages ardCallUnreadMessages); |
| | | |
| | | /** |
| | | * ä¿®æ¹æªè¯»æ¶æ¯ |
| | | * |
| | | * @param ardCallUnreadMessages æªè¯»æ¶æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallUnreadMessages(ArdCallUnreadMessages ardCallUnreadMessages); |
| | | |
| | | /** |
| | | * å 餿ªè¯»æ¶æ¯ |
| | | * |
| | | * @param userId æªè¯»æ¶æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallUnreadMessagesByUserId(String userId); |
| | | |
| | | /** |
| | | * æ¹éå 餿ªè¯»æ¶æ¯ |
| | | * |
| | | * @param userId s éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallUnreadMessagesByUserId(String[] userId); |
| | | |
| | | @Select("select count(*) from ard_call_unread_messages where session_id=#{sessionId} and target_id=#{targetId}") |
| | | int countBySessionIdAnduserId(String sessionId, String userId); |
| | | |
| | | public ArdCallUnreadMessages getUnreadMessage(@Param("sessionId") String sessionId, @Param("targetId")String targetId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.call.domain.ArdCallGroup; |
| | | |
| | | /** |
| | | * ä¼è¯ç¾¤ç»Serviceæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public interface IArdCallGroupService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param id ä¼è¯ç¾¤ç»ä¸»é® |
| | | * @return ä¼è¯ç¾¤ç» |
| | | */ |
| | | public ArdCallGroup selectArdCallGroupById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¾¤ç»å表 |
| | | * |
| | | * @param ardCallGroup ä¼è¯ç¾¤ç» |
| | | * @return ä¼è¯ç¾¤ç»éå |
| | | */ |
| | | public List<ArdCallGroup> selectArdCallGroupList(ArdCallGroup ardCallGroup); |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param ardCallGroup ä¼è¯ç¾¤ç» |
| | | * @return ç»æ |
| | | */ |
| | | public String insertArdCallGroup(ArdCallGroup ardCallGroup); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param ardCallGroup ä¼è¯ç¾¤ç» |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallGroup(ArdCallGroup ardCallGroup); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param ids éè¦å é¤çä¼è¯ç¾¤ç»ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallGroupByIds(String[] ids); |
| | | |
| | | /** |
| | | * å é¤ä¼è¯ç¾¤ç»ä¿¡æ¯ |
| | | * |
| | | * @param id ä¼è¯ç¾¤ç»ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallGroupById(String id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallGroup; |
| | | import com.ruoyi.call.domain.ArdCallGroupUser; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | |
| | | /** |
| | | * 群ç»ç¨æ·ä¸é´Serviceæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public interface IArdCallGroupUserService { |
| | | /** |
| | | * æ¥è¯¢ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param id 群ç»ç¨æ·ä¸é´ä¸»é® |
| | | * @return 群ç»ç¨æ·ä¸é´ |
| | | */ |
| | | public ArdCallGroupUser selectArdCallGroupUserById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¾¤ç»ç¨æ·ä¸é´å表 |
| | | * |
| | | * @param ardCallGroupUser 群ç»ç¨æ·ä¸é´ |
| | | * @return 群ç»ç¨æ·ä¸é´éå |
| | | */ |
| | | public List<ArdCallGroupUser> selectArdCallGroupUserList(ArdCallGroupUser ardCallGroupUser); |
| | | |
| | | /** |
| | | * æ°å¢ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param ardCallGroupUser 群ç»ç¨æ·ä¸é´ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallGroupUser(ArdCallGroupUser ardCallGroupUser); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param ardCallGroupUser 群ç»ç¨æ·ä¸é´ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallGroupUser(ArdCallGroupUser ardCallGroupUser); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param ids éè¦å é¤ç群ç»ç¨æ·ä¸é´ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallGroupUserByIds(String[] ids); |
| | | |
| | | /** |
| | | * å é¤ç¾¤ç»ç¨æ·ä¸é´ä¿¡æ¯ |
| | | * |
| | | * @param id 群ç»ç¨æ·ä¸é´ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallGroupUserById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¨æ·æå¨ç¾¤ç» |
| | | * |
| | | * @param userId 群ç»ç¨æ· |
| | | * @return ç»æ |
| | | */ |
| | | List<ArdCallGroup> getGroupListByUserId(String userId); |
| | | |
| | | /** |
| | | * é请群ç»ç¨æ· |
| | | * |
| | | * @param id 群ç»ä¸»é® |
| | | * @param userIds 群ç»ç¨æ·æ°ç»éå |
| | | * @return ç»æ |
| | | */ |
| | | public int addGroupUser(String id, String[] userIds); |
| | | |
| | | /** |
| | | * ç§»é¤ç¾¤ç»ç¨æ· |
| | | * |
| | | * @param id 群ç»ä¸»é® |
| | | * @param userIds 群ç»ç¨æ·æ°ç»éå |
| | | * @return ç»æ |
| | | */ |
| | | public int removeGroupUser(String id, String[] userIds); |
| | | |
| | | /** |
| | | * ä¸å¨ç¾¤ç»ç人åå表 |
| | | * |
| | | * @param groupId 群ç»ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | List<SysUser> notInGroupUsers(String groupId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.call.domain.ArdCallHistory; |
| | | |
| | | /** |
| | | * ä¼è¯åå²Serviceæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public interface IArdCallHistoryService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ä¼è¯åå² |
| | | * |
| | | * @param id ä¼è¯åå²ä¸»é® |
| | | * @return ä¼è¯åå² |
| | | */ |
| | | public ArdCallHistory selectArdCallHistoryById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯åå²å表 |
| | | * |
| | | * @param ardCallHistory ä¼è¯åå² |
| | | * @return ä¼è¯åå²éå |
| | | */ |
| | | public List<ArdCallHistory> selectArdCallHistoryList(ArdCallHistory ardCallHistory); |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯åå² |
| | | * |
| | | * @param ardCallHistory ä¼è¯åå² |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallHistory(ArdCallHistory ardCallHistory); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯åå² |
| | | * |
| | | * @param ardCallHistory ä¼è¯åå² |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallHistory(ArdCallHistory ardCallHistory); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¼è¯åå² |
| | | * |
| | | * @param ids éè¦å é¤çä¼è¯åå²ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallHistoryByIds(String[] ids); |
| | | |
| | | /** |
| | | * å é¤ä¼è¯åå²ä¿¡æ¯ |
| | | * |
| | | * @param id ä¼è¯åå²ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallHistoryById(String id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallSession; |
| | | |
| | | /** |
| | | * è§é¢ä¼è¯Serviceæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | public interface IArdCallSessionService { |
| | | /** |
| | | * æ¥è¯¢è§é¢ä¼è¯ |
| | | * |
| | | * @param id è§é¢ä¼è¯ä¸»é® |
| | | * @return è§é¢ä¼è¯ |
| | | */ |
| | | public ArdCallSession selectArdCallSessionById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢è§é¢ä¼è¯å表 |
| | | * |
| | | * @param ardCallSession è§é¢ä¼è¯ |
| | | * @return è§é¢ä¼è¯éå |
| | | */ |
| | | public List<ArdCallSession> selectArdCallSessionList(ArdCallSession ardCallSession); |
| | | |
| | | /** |
| | | * æ°å¢è§é¢ä¼è¯ |
| | | * |
| | | * @param ardCallSession è§é¢ä¼è¯ |
| | | * @return ç»æ |
| | | */ |
| | | public String insertArdCallSession(ArdCallSession ardCallSession); |
| | | |
| | | /** |
| | | * ä¿®æ¹è§é¢ä¼è¯ |
| | | * |
| | | * @param ardCallSession è§é¢ä¼è¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallSession(ArdCallSession ardCallSession); |
| | | |
| | | /** |
| | | * æ¹éå é¤è§é¢ä¼è¯ |
| | | * |
| | | * @param ids éè¦å é¤çè§é¢ä¼è¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallSessionByIds(String[] ids); |
| | | |
| | | /** |
| | | * å é¤è§é¢ä¼è¯ä¿¡æ¯ |
| | | * |
| | | * @param id è§é¢ä¼è¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallSessionById(String id); |
| | | |
| | | |
| | | /** |
| | | * è·åä¼è¯ |
| | | * |
| | | * @param type ä¼è¯ç±»å 0åè1群è |
| | | * @param userId ä¼è¯åéæ¹ |
| | | * @param targetId ä¼è¯æ¥æ¶æ¹ |
| | | * @return ç»æ |
| | | */ |
| | | public String getSession(String type, String userId, String targetId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallSessionUser; |
| | | |
| | | /** |
| | | * ä¼è¯ç¨æ·ä¸é´è¡¨Serviceæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-04 |
| | | */ |
| | | public interface IArdCallSessionUserService { |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param id ä¼è¯ç¨æ·ä¸é´è¡¨ä¸»é® |
| | | * @return ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | */ |
| | | public ArdCallSessionUser selectArdCallSessionUserById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¨æ·ä¸é´è¡¨å表 |
| | | * |
| | | * @param ardCallSessionUser ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * @return ä¼è¯ç¨æ·ä¸é´è¡¨éå |
| | | */ |
| | | public List<ArdCallSessionUser> selectArdCallSessionUserList(ArdCallSessionUser ardCallSessionUser); |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param ardCallSessionUser ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallSessionUser(ArdCallSessionUser ardCallSessionUser); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param ardCallSessionUser ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallSessionUser(ArdCallSessionUser ardCallSessionUser); |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param ids éè¦å é¤çä¼è¯ç¨æ·ä¸é´è¡¨ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallSessionUserByIds(String[] ids); |
| | | |
| | | /** |
| | | * å é¤ä¼è¯ç¨æ·ä¸é´è¡¨ä¿¡æ¯ |
| | | * |
| | | * @param id ä¼è¯ç¨æ·ä¸é´è¡¨ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallSessionUserById(String id); |
| | | |
| | | |
| | | /** |
| | | * è·åä¼è¯ |
| | | * |
| | | * @param type ä¼è¯ç±»å |
| | | * @param userId ç¨æ·id |
| | | * @param targetId ç®æ id |
| | | * @return ç»æ |
| | | */ |
| | | public String getSessionId(String type, String userId, String targetId); |
| | | public String getGroupSessionId(String type,String targetId); |
| | | /** |
| | | * éè¿sessionIdå é¤å
³èç¨æ· |
| | | * |
| | | * @param sessionId ç®æ id |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallSessionUserBySessionId(String sessionId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.call.domain.ArdCallUnreadMessages; |
| | | |
| | | /** |
| | | * æªè¯»æ¶æ¯Serviceæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-06 |
| | | */ |
| | | public interface IArdCallUnreadMessagesService |
| | | { |
| | | /** |
| | | * æ¥è¯¢æªè¯»æ¶æ¯ |
| | | * |
| | | * @param userId æªè¯»æ¶æ¯ä¸»é® |
| | | * @return æªè¯»æ¶æ¯ |
| | | */ |
| | | public ArdCallUnreadMessages selectArdCallUnreadMessagesByUserId (String userId ); |
| | | |
| | | /** |
| | | * æ¥è¯¢æªè¯»æ¶æ¯å表 |
| | | * |
| | | * @param ardCallUnreadMessages æªè¯»æ¶æ¯ |
| | | * @return æªè¯»æ¶æ¯éå |
| | | */ |
| | | public List<ArdCallUnreadMessages> selectArdCallUnreadMessagesList(ArdCallUnreadMessages ardCallUnreadMessages); |
| | | |
| | | /** |
| | | * æ°å¢æªè¯»æ¶æ¯ |
| | | * |
| | | * @param ardCallUnreadMessages æªè¯»æ¶æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdCallUnreadMessages(ArdCallUnreadMessages ardCallUnreadMessages); |
| | | |
| | | /** |
| | | * ä¿®æ¹æªè¯»æ¶æ¯ |
| | | * |
| | | * @param ardCallUnreadMessages æªè¯»æ¶æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdCallUnreadMessages(ArdCallUnreadMessages ardCallUnreadMessages); |
| | | |
| | | /** |
| | | * æ¹éå 餿ªè¯»æ¶æ¯ |
| | | * |
| | | * @param userId s éè¦å é¤çæªè¯»æ¶æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallUnreadMessagesByUserId(String[] userId); |
| | | |
| | | /** |
| | | * å 餿ªè¯»æ¶æ¯ä¿¡æ¯ |
| | | * |
| | | * @param userId æªè¯»æ¶æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdCallUnreadMessagesByUserId (String userId ); |
| | | |
| | | /** |
| | | * æ¸
é¤ä¼è¯æªè¯»æ°é |
| | | * |
| | | * @param sessionId ä¼è¯id |
| | | * @param userId ç¨æ·id |
| | | * @return ç»æ |
| | | */ |
| | | public int clearUnReadCount(String sessionId,String userId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service.impl; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallGroupUser; |
| | | import com.ruoyi.call.mapper.ArdCallGroupUserMapper; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.call.mapper.ArdCallGroupMapper; |
| | | import com.ruoyi.call.domain.ArdCallGroup; |
| | | import com.ruoyi.call.service.IArdCallGroupService; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * ä¼è¯ç¾¤ç»Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | @Service |
| | | public class ArdCallGroupServiceImpl implements IArdCallGroupService { |
| | | @Resource |
| | | private ArdCallGroupMapper ardCallGroupMapper; |
| | | @Resource |
| | | private ArdCallGroupUserMapper ardCallGroupUserMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param id ä¼è¯ç¾¤ç»ä¸»é® |
| | | * @return ä¼è¯ç¾¤ç» |
| | | */ |
| | | @Override |
| | | public ArdCallGroup selectArdCallGroupById(String id) { |
| | | return ardCallGroupMapper.selectArdCallGroupById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¾¤ç»å表 |
| | | * |
| | | * @param ardCallGroup ä¼è¯ç¾¤ç» |
| | | * @return ä¼è¯ç¾¤ç» |
| | | */ |
| | | @Override |
| | | public List<ArdCallGroup> selectArdCallGroupList(ArdCallGroup ardCallGroup) { |
| | | return ardCallGroupMapper.selectArdCallGroupList(ardCallGroup); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param ardCallGroup ä¼è¯ç¾¤ç» |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public String insertArdCallGroup(ArdCallGroup ardCallGroup) { |
| | | ardCallGroup.setId(IdUtils.simpleUUID()); |
| | | ardCallGroup.setCreateTime(DateUtils.getNowDate()); |
| | | ardCallGroup.getUserIds().stream().forEach(userId -> { |
| | | ArdCallGroupUser groupUser = new ArdCallGroupUser(); |
| | | groupUser.setId(IdUtils.simpleUUID()); |
| | | groupUser.setGroupId(ardCallGroup.getId()); |
| | | groupUser.setUserId(userId); |
| | | groupUser.setCreateTime(DateUtils.getNowDate()); |
| | | ardCallGroupUserMapper.insertArdCallGroupUser(groupUser); |
| | | }); |
| | | ardCallGroupMapper.insertArdCallGroup(ardCallGroup); |
| | | return ardCallGroup.getId(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param ardCallGroup ä¼è¯ç¾¤ç» |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateArdCallGroup(ArdCallGroup ardCallGroup) { |
| | | ardCallGroup.setUpdateBy(SecurityUtils.getUsername()); |
| | | ardCallGroup.setUpdateTime(DateUtils.getNowDate()); |
| | | return ardCallGroupMapper.updateArdCallGroup(ardCallGroup); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¼è¯ç¾¤ç» |
| | | * |
| | | * @param ids éè¦å é¤çä¼è¯ç¾¤ç»ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallGroupByIds(String[] ids) { |
| | | Arrays.stream(ids).forEach(id -> { |
| | | ardCallGroupUserMapper.clearArdCallGroupUsers(id); |
| | | }); |
| | | return ardCallGroupMapper.deleteArdCallGroupByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¼è¯ç¾¤ç»ä¿¡æ¯ |
| | | * |
| | | * @param id ä¼è¯ç¾¤ç»ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallGroupById(String id) { |
| | | ardCallGroupUserMapper.clearArdCallGroupUsers(id); |
| | | return ardCallGroupMapper.deleteArdCallGroupById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service.impl; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallGroup; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.call.mapper.ArdCallGroupUserMapper; |
| | | import com.ruoyi.call.domain.ArdCallGroupUser; |
| | | import com.ruoyi.call.service.IArdCallGroupUserService; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 群ç»ç¨æ·ä¸é´Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | @Service |
| | | public class ArdCallGroupUserServiceImpl implements IArdCallGroupUserService { |
| | | @Resource |
| | | private ArdCallGroupUserMapper ardCallGroupUserMapper; |
| | | @Resource |
| | | private SysUserMapper sysUserMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param id 群ç»ç¨æ·ä¸é´ä¸»é® |
| | | * @return 群ç»ç¨æ·ä¸é´ |
| | | */ |
| | | @Override |
| | | public ArdCallGroupUser selectArdCallGroupUserById(String id) { |
| | | return ardCallGroupUserMapper.selectArdCallGroupUserById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¾¤ç»ç¨æ·ä¸é´å表 |
| | | * |
| | | * @param ardCallGroupUser 群ç»ç¨æ·ä¸é´ |
| | | * @return 群ç»ç¨æ·ä¸é´ |
| | | */ |
| | | @Override |
| | | public List<ArdCallGroupUser> selectArdCallGroupUserList(ArdCallGroupUser ardCallGroupUser) { |
| | | return ardCallGroupUserMapper.selectArdCallGroupUserList(ardCallGroupUser); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param ardCallGroupUser 群ç»ç¨æ·ä¸é´ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertArdCallGroupUser(ArdCallGroupUser ardCallGroupUser) { |
| | | ardCallGroupUser.setId(IdUtils.simpleUUID()); |
| | | ardCallGroupUser.setUserId(SecurityUtils.getUserId()); |
| | | ardCallGroupUser.setCreateBy(SecurityUtils.getUsername()); |
| | | ardCallGroupUser.setCreateTime(DateUtils.getNowDate()); |
| | | return ardCallGroupUserMapper.insertArdCallGroupUser(ardCallGroupUser); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param ardCallGroupUser 群ç»ç¨æ·ä¸é´ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateArdCallGroupUser(ArdCallGroupUser ardCallGroupUser) { |
| | | ardCallGroupUser.setUpdateBy(SecurityUtils.getUsername()); |
| | | ardCallGroupUser.setUpdateTime(DateUtils.getNowDate()); |
| | | return ardCallGroupUserMapper.updateArdCallGroupUser(ardCallGroupUser); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ç¾¤ç»ç¨æ·ä¸é´ |
| | | * |
| | | * @param ids éè¦å é¤ç群ç»ç¨æ·ä¸é´ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallGroupUserByIds(String[] ids) { |
| | | return ardCallGroupUserMapper.deleteArdCallGroupUserByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç¾¤ç»ç¨æ·ä¸é´ä¿¡æ¯ |
| | | * |
| | | * @param id 群ç»ç¨æ·ä¸é´ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallGroupUserById(String id) { |
| | | return ardCallGroupUserMapper.deleteArdCallGroupUserById(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<ArdCallGroup> getGroupListByUserId(String userId) { |
| | | return ardCallGroupUserMapper.getGroupListByUserId(userId); |
| | | } |
| | | |
| | | /** |
| | | * é请群ç»ç¨æ· |
| | | * |
| | | * @param id 群ç»ä¸»é® |
| | | * @param userIds 群ç»ç¨æ·æ°ç»éå |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int addGroupUser(String id, String[] userIds) { |
| | | ArdCallGroupUser ardCallGroupUser = new ArdCallGroupUser(); |
| | | ardCallGroupUser.setGroupId(id); |
| | | Arrays.stream(userIds).forEach(userId -> { |
| | | ardCallGroupUser.setId(IdUtils.simpleUUID()); |
| | | ardCallGroupUser.setCreateTime(DateUtils.getNowDate()); |
| | | ardCallGroupUser.setUserId(userId); |
| | | ardCallGroupUserMapper.insertArdCallGroupUser(ardCallGroupUser); |
| | | }); |
| | | return userIds.length; |
| | | } |
| | | |
| | | /** |
| | | * ç§»é¤ç¾¤ç»ç¨æ· |
| | | * |
| | | * @param id 群ç»ä¸»é® |
| | | * @param userIds 群ç»ç¨æ·æ°ç»éå |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int removeGroupUser(String id, String[] userIds) { |
| | | return ardCallGroupUserMapper.removeGroupUser(id, userIds); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysUser> notInGroupUsers(String groupId) { |
| | | //è·å平尿æç¨æ· |
| | | List<SysUser> userList = sysUserMapper.selectUserList(new SysUser()); |
| | | //è·å群ç»å
ç¨æ· |
| | | ArdCallGroupUser ardCallGroupUser=new ArdCallGroupUser(); |
| | | ardCallGroupUser.setGroupId(groupId); |
| | | List<ArdCallGroupUser> ardCallGroupUsers = ardCallGroupUserMapper.selectArdCallGroupUserList(ardCallGroupUser); |
| | | // æågroupListä¸çuserIdå°ä¸ä¸ªSetä¸ |
| | | Set<String> groupUserIds = ardCallGroupUsers.stream() |
| | | .map(ArdCallGroupUser::getUserId) |
| | | .collect(Collectors.toSet()); |
| | | // è¿æ»¤userListï¼åªä¿çé£äºuserIdä¸å¨groupUserIdsä¸çUser对象 |
| | | List<SysUser> filteredUserList = userList.stream() |
| | | .filter(user -> !groupUserIds.contains(user.getUserId())) |
| | | .collect(Collectors.toList()); |
| | | return filteredUserList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.domain.*; |
| | | import com.ruoyi.call.mapper.*; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | |
| | | import com.ruoyi.common.utils.MessageUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.utils.websocket.util.WebSocketUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.call.service.IArdCallHistoryService; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import static com.ruoyi.utils.websocket.util.WebSocketUtils.ONLINE_USER_SESSIONS; |
| | | |
| | | /** |
| | | * ä¼è¯åå²Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | @Service |
| | | public class ArdCallHistoryServiceImpl implements IArdCallHistoryService { |
| | | @Resource |
| | | private ArdCallHistoryMapper ardCallHistoryMapper; |
| | | @Resource |
| | | private ArdCallSessionMapper ardCallSessionMapper; |
| | | @Resource |
| | | private ArdCallUnreadMessagesMapper ardCallUnreadMessagesMapper; |
| | | @Resource |
| | | private ArdCallGroupUserMapper ardCallGroupUserMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯åå² |
| | | * |
| | | * @param id ä¼è¯åå²ä¸»é® |
| | | * @return ä¼è¯åå² |
| | | */ |
| | | @Override |
| | | public ArdCallHistory selectArdCallHistoryById(String id) { |
| | | return ardCallHistoryMapper.selectArdCallHistoryById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯åå²å表 |
| | | * |
| | | * @param ardCallHistory ä¼è¯åå² |
| | | * @return ä¼è¯åå² |
| | | */ |
| | | @Override |
| | | public List<ArdCallHistory> selectArdCallHistoryList(ArdCallHistory ardCallHistory) { |
| | | return ardCallHistoryMapper.selectArdCallHistoryList(ardCallHistory); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯åå² |
| | | * |
| | | * @param ardCallHistory ä¼è¯åå² |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertArdCallHistory(ArdCallHistory ardCallHistory) { |
| | | ardCallHistory.setId(IdUtils.simpleUUID()); |
| | | ardCallHistory.setCreateTime(DateUtils.getNowDate()); |
| | | ArdCallSession ardCallSession = ardCallSessionMapper.selectArdCallSessionById(ardCallHistory.getSessionId()); |
| | | if (ardCallSession.getType().equals("0")) { |
| | | //æ´æ°åèç¨æ·æªè¯»æ¶æ¯è®¡æ° |
| | | ArdCallUnreadMessages ardCallUnreadMessages = ardCallUnreadMessagesMapper.getUnreadMessage(ardCallHistory.getSessionId(), ardCallHistory.getTargetId()); |
| | | if (ardCallUnreadMessages == null) { |
| | | ardCallUnreadMessages = new ArdCallUnreadMessages(); |
| | | ardCallUnreadMessages.setUserId(ardCallHistory.getTargetId()); |
| | | ardCallUnreadMessages.setSessionId(ardCallHistory.getSessionId()); |
| | | ardCallUnreadMessages.setUnreadCount(1); |
| | | ardCallUnreadMessagesMapper.insertArdCallUnreadMessages(ardCallUnreadMessages); |
| | | } else { |
| | | ardCallUnreadMessages.setUnreadCount(ardCallUnreadMessages.getUnreadCount() + 1); |
| | | ardCallUnreadMessagesMapper.updateArdCallUnreadMessages(ardCallUnreadMessages); |
| | | } |
| | | //websocketåéç»targetId |
| | | WebSocketUtils.sendMessage(ONLINE_USER_SESSIONS.get(ardCallHistory.getTargetId()),ardCallHistory.getContent()); |
| | | } else { |
| | | //æ´æ°ç¾¤èç¨æ·æªè¯»æ¶æ¯è®¡æ° |
| | | ArdCallGroupUser ardCallGroupUser = new ArdCallGroupUser(); |
| | | ardCallGroupUser.setGroupId(ardCallHistory.getTargetId()); |
| | | List<ArdCallGroupUser> ardCallGroupUsers = ardCallGroupUserMapper.selectArdCallGroupUserList(ardCallGroupUser); |
| | | ardCallGroupUsers.stream().forEach(groupUser -> { |
| | | if (!ardCallHistory.getUserId().equals(groupUser.getUserId())) { |
| | | //对群éé¤äºèªå·±å¤å
¶ä»ç¨æ·æ´æ°æªè¯»æ¶æ¯ |
| | | ArdCallUnreadMessages ardCallUnreadMessages = ardCallUnreadMessagesMapper.getUnreadMessage(ardCallHistory.getSessionId(), groupUser.getUserId()); |
| | | if (ardCallUnreadMessages == null) { |
| | | ardCallUnreadMessages = new ArdCallUnreadMessages(); |
| | | ardCallUnreadMessages.setUserId(groupUser.getUserId()); |
| | | ardCallUnreadMessages.setSessionId(ardCallHistory.getSessionId()); |
| | | ardCallUnreadMessages.setUnreadCount(1); |
| | | ardCallUnreadMessagesMapper.insertArdCallUnreadMessages(ardCallUnreadMessages); |
| | | } else { |
| | | ardCallUnreadMessages.setUnreadCount(ardCallUnreadMessages.getUnreadCount() + 1); |
| | | ardCallUnreadMessagesMapper.updateArdCallUnreadMessages(ardCallUnreadMessages); |
| | | } |
| | | } |
| | | //websocketåéç»targetId |
| | | WebSocketUtils.sendMessage(ONLINE_USER_SESSIONS.get(groupUser.getUserId()),ardCallHistory.getContent()); |
| | | }); |
| | | |
| | | } |
| | | return ardCallHistoryMapper.insertArdCallHistory(ardCallHistory); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯åå² |
| | | * |
| | | * @param ardCallHistory ä¼è¯åå² |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateArdCallHistory(ArdCallHistory ardCallHistory) { |
| | | ardCallHistory.setUpdateBy(SecurityUtils.getUsername()); |
| | | ardCallHistory.setUpdateTime(DateUtils.getNowDate()); |
| | | return ardCallHistoryMapper.updateArdCallHistory(ardCallHistory); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¼è¯åå² |
| | | * |
| | | * @param ids éè¦å é¤çä¼è¯åå²ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallHistoryByIds(String[] ids) { |
| | | return ardCallHistoryMapper.deleteArdCallHistoryByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¼è¯åå²ä¿¡æ¯ |
| | | * |
| | | * @param id ä¼è¯åå²ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallHistoryById(String id) { |
| | | return ardCallHistoryMapper.deleteArdCallHistoryById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service.impl; |
| | | |
| | | import com.ruoyi.call.domain.ArdCallGroup; |
| | | import com.ruoyi.call.domain.ArdCallSession; |
| | | import com.ruoyi.call.domain.ArdCallSessionUser; |
| | | import com.ruoyi.call.mapper.ArdCallSessionMapper; |
| | | import com.ruoyi.call.service.IArdCallGroupService; |
| | | import com.ruoyi.call.service.IArdCallGroupUserService; |
| | | import com.ruoyi.call.service.IArdCallSessionService; |
| | | import com.ruoyi.call.service.IArdCallSessionUserService; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è§é¢ä¼è¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-03 |
| | | */ |
| | | @Service |
| | | public class ArdCallSessionServiceImpl implements IArdCallSessionService { |
| | | @Resource |
| | | private ArdCallSessionMapper ardCallSessionMapper; |
| | | @Resource |
| | | private IArdCallSessionUserService ardCallSessionUserService; |
| | | @Resource |
| | | private IArdCallGroupService ardCallGroupService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è§é¢ä¼è¯ |
| | | * |
| | | * @param id è§é¢ä¼è¯ä¸»é® |
| | | * @return è§é¢ä¼è¯ |
| | | */ |
| | | @Override |
| | | public ArdCallSession selectArdCallSessionById(String id) { |
| | | return ardCallSessionMapper.selectArdCallSessionById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è§é¢ä¼è¯å表 |
| | | * |
| | | * @param ardCallSession è§é¢ä¼è¯ |
| | | * @return è§é¢ä¼è¯ |
| | | */ |
| | | @Override |
| | | public List<ArdCallSession> selectArdCallSessionList(ArdCallSession ardCallSession) { |
| | | List<ArdCallSession> ardCallSessions = ardCallSessionMapper.selectArdCallSessionList(ardCallSession); |
| | | return ardCallSessions; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢è§é¢ä¼è¯ |
| | | * |
| | | * @param ardCallSession è§é¢ä¼è¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public String insertArdCallSession(ArdCallSession ardCallSession) { |
| | | ardCallSession.setId(IdUtils.simpleUUID()); |
| | | ardCallSession.setCreateTime(DateUtils.getNowDate()); |
| | | ardCallSessionMapper.insertArdCallSession(ardCallSession); |
| | | return ardCallSession.getId(); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è§é¢ä¼è¯ |
| | | * |
| | | * @param ardCallSession è§é¢ä¼è¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateArdCallSession(ArdCallSession ardCallSession) { |
| | | ardCallSession.setUpdateBy(SecurityUtils.getUsername()); |
| | | ardCallSession.setUpdateTime(DateUtils.getNowDate()); |
| | | return ardCallSessionMapper.updateArdCallSession(ardCallSession); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤è§é¢ä¼è¯ |
| | | * |
| | | * @param ids éè¦å é¤çè§é¢ä¼è¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public int |
| | | deleteArdCallSessionByIds(String[] ids) { |
| | | Arrays.stream(ids).forEach(id -> { |
| | | ardCallSessionUserService.deleteArdCallSessionUserBySessionId(id); |
| | | }); |
| | | return ardCallSessionMapper.deleteArdCallSessionByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤è§é¢ä¼è¯ä¿¡æ¯ |
| | | * |
| | | * @param id è§é¢ä¼è¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallSessionById(String id) { |
| | | return ardCallSessionMapper.deleteArdCallSessionById(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åä¼è¯ |
| | | * |
| | | * @param type ä¼è¯ç±»å |
| | | * @param userId ä¼è¯åèµ·æ¹ |
| | | * @param targetId ä¼è¯æ¥æ¶æ¹ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public String getSession(String type, String userId, String targetId) { |
| | | String sessionId = ""; |
| | | if (type.equals("0")) { |
| | | //åè |
| | | sessionId = ardCallSessionUserService.getSessionId(type, userId, targetId); |
| | | if (StringUtils.isEmpty(sessionId)) { |
| | | //å建åèåæ¹çä¼è¯ |
| | | ArdCallSession ardCallSession = new ArdCallSession(); |
| | | ardCallSession.setType(type); |
| | | sessionId = insertArdCallSession(ardCallSession); |
| | | ArdCallSessionUser ardCallSessionUser = new ArdCallSessionUser(); |
| | | ardCallSessionUser.setSessionId(sessionId); |
| | | ardCallSessionUser.setUserId(userId); |
| | | ardCallSessionUser.setTargetId(targetId); |
| | | ardCallSessionUser.setType(type); |
| | | ardCallSessionUserService.insertArdCallSessionUser(ardCallSessionUser);//å建主å«å
³è |
| | | ardCallSessionUser.setUserId(targetId); |
| | | ardCallSessionUser.setTargetId(userId); |
| | | ardCallSessionUserService.insertArdCallSessionUser(ardCallSessionUser);//å建被å«å
³è |
| | | } |
| | | } else { |
| | | //群è |
| | | sessionId = ardCallSessionUserService.getGroupSessionId(type, targetId); |
| | | if (StringUtils.isEmpty(sessionId)) { |
| | | //è¥ä¸åå¨ç¾¤èsessionç´æ¥ååå«å建ææç¾¤ç¨æ·çsession |
| | | ArdCallSession ardCallSession = new ArdCallSession(); |
| | | ardCallSession.setType(type); |
| | | sessionId = insertArdCallSession(ardCallSession); |
| | | |
| | | //è·åç¾¤ç¨æ·å表 |
| | | ArdCallGroup ardCallGroup = ardCallGroupService.selectArdCallGroupById(targetId); |
| | | if(ardCallGroup!=null) |
| | | { |
| | | String finalSessionId = sessionId; |
| | | ardCallGroup.getArdCallGroupUsers().stream().forEach(groupUser -> { |
| | | ArdCallSessionUser ardCallSessionUser = new ArdCallSessionUser(); |
| | | ardCallSessionUser.setSessionId(finalSessionId); |
| | | ardCallSessionUser.setType(type); |
| | | ardCallSessionUser.setUserId(groupUser.getUserId()); |
| | | ardCallSessionUser.setTargetId(targetId); |
| | | ardCallSessionUserService.insertArdCallSessionUser(ardCallSessionUser); |
| | | }); |
| | | } |
| | | } else { |
| | | //è·åèªå·±çsession |
| | | sessionId = ardCallSessionUserService.getSessionId(type, userId, targetId); |
| | | } |
| | | } |
| | | return sessionId; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service.impl; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.call.compare.ArdCallSessionUserComparator; |
| | | import com.ruoyi.call.domain.ArdCallGroupUser; |
| | | import com.ruoyi.call.domain.ArdCallHistory; |
| | | import com.ruoyi.call.domain.ArdCallUnreadMessages; |
| | | import com.ruoyi.call.mapper.ArdCallGroupUserMapper; |
| | | import com.ruoyi.call.mapper.ArdCallHistoryMapper; |
| | | import com.ruoyi.call.mapper.ArdCallUnreadMessagesMapper; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.call.mapper.ArdCallSessionUserMapper; |
| | | import com.ruoyi.call.domain.ArdCallSessionUser; |
| | | import com.ruoyi.call.service.IArdCallSessionUserService; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * ä¼è¯ç¨æ·ä¸é´è¡¨Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-04 |
| | | */ |
| | | @Service |
| | | public class ArdCallSessionUserServiceImpl implements IArdCallSessionUserService { |
| | | @Resource |
| | | private ArdCallSessionUserMapper ardCallSessionUserMapper; |
| | | @Resource |
| | | private ArdCallHistoryMapper ardCallHistoryMapper; |
| | | @Resource |
| | | private ArdCallSessionUserComparator ardCallSessionUserComparator; |
| | | @Resource |
| | | private ArdCallUnreadMessagesMapper ardCallUnreadMessagesMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param id ä¼è¯ç¨æ·ä¸é´è¡¨ä¸»é® |
| | | * @return ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | */ |
| | | @Override |
| | | public ArdCallSessionUser selectArdCallSessionUserById(String id) { |
| | | return ardCallSessionUserMapper.selectArdCallSessionUserById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¼è¯ç¨æ·ä¸é´è¡¨å表 |
| | | * |
| | | * @param ardCallSessionUser ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * @return ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | */ |
| | | @Override |
| | | public List<ArdCallSessionUser> selectArdCallSessionUserList(ArdCallSessionUser ardCallSessionUser) { |
| | | //è·åç¨æ·çä¼è¯/æªè¯»æ¶æ¯æ°é/æå䏿¡æ¶æ¯ |
| | | List<ArdCallSessionUser> ardCallSessionUsers = ardCallSessionUserMapper.selectArdCallSessionUserList(ardCallSessionUser); |
| | | ardCallSessionUsers.stream().forEach(callSessionUser -> { |
| | | ArdCallUnreadMessages ardCallUnreadMessages = ardCallUnreadMessagesMapper.getUnreadMessage(callSessionUser.getSessionId(), ardCallSessionUser.getUserId()); |
| | | if (ardCallUnreadMessages != null) { |
| | | callSessionUser.setUnReadCount(ardCallUnreadMessages.getUnreadCount()); |
| | | } else { |
| | | callSessionUser.setUnReadCount(0); |
| | | } |
| | | //è·åæå䏿¡æ¶æ¯å®ä½ |
| | | ArdCallHistory ardCallHistory = ardCallHistoryMapper.selectLastArdCallHistory(callSessionUser.getSessionId()); |
| | | callSessionUser.setArdCallHistory(ardCallHistory); |
| | | }); |
| | | //è¿æ»¤ææ²¡æåå²è®°å½çä¼è¯ |
| | | ardCallSessionUsers = ardCallSessionUsers.stream().filter(obj -> obj.getArdCallHistory() != null).collect(Collectors.toList()); |
| | | // 使ç¨å®ä¹ç ardCallSessionUserComparator è¿è¡æåº |
| | | Collections.sort(ardCallSessionUsers, ardCallSessionUserComparator); |
| | | return ardCallSessionUsers; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param ardCallSessionUser ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertArdCallSessionUser(ArdCallSessionUser ardCallSessionUser) { |
| | | ardCallSessionUser.setId(IdUtils.simpleUUID()); |
| | | ardCallSessionUser.setCreateTime(DateUtils.getNowDate()); |
| | | return ardCallSessionUserMapper.insertArdCallSessionUser(ardCallSessionUser); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param ardCallSessionUser ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateArdCallSessionUser(ArdCallSessionUser ardCallSessionUser) { |
| | | return ardCallSessionUserMapper.updateArdCallSessionUser(ardCallSessionUser); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ä¼è¯ç¨æ·ä¸é´è¡¨ |
| | | * |
| | | * @param ids éè¦å é¤çä¼è¯ç¨æ·ä¸é´è¡¨ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallSessionUserByIds(String[] ids) { |
| | | return ardCallSessionUserMapper.deleteArdCallSessionUserByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¼è¯ç¨æ·ä¸é´è¡¨ä¿¡æ¯ |
| | | * |
| | | * @param id ä¼è¯ç¨æ·ä¸é´è¡¨ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallSessionUserById(String id) { |
| | | return ardCallSessionUserMapper.deleteArdCallSessionUserById(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String getSessionId(String type, String userId, String targetId) { |
| | | return ardCallSessionUserMapper.getSessionId(type, userId, targetId); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteArdCallSessionUserBySessionId(String sessionId) { |
| | | return ardCallSessionUserMapper.deleteArdCallSessionUserBySessionId(sessionId); |
| | | } |
| | | |
| | | @Override |
| | | public String getGroupSessionId(String type, String targetId) { |
| | | return ardCallSessionUserMapper.getGroupSessionId(type, targetId); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.call.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.ArrayList; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.call.mapper.ArdCallUnreadMessagesMapper; |
| | | import com.ruoyi.call.domain.ArdCallUnreadMessages; |
| | | import com.ruoyi.call.service.IArdCallUnreadMessagesService; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * æªè¯»æ¶æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ard |
| | | * @date 2024-07-06 |
| | | */ |
| | | @Service |
| | | public class ArdCallUnreadMessagesServiceImpl implements IArdCallUnreadMessagesService { |
| | | @Resource |
| | | private ArdCallUnreadMessagesMapper ardCallUnreadMessagesMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢æªè¯»æ¶æ¯ |
| | | * |
| | | * @param userId æªè¯»æ¶æ¯ä¸»é® |
| | | * @return æªè¯»æ¶æ¯ |
| | | */ |
| | | @Override |
| | | public ArdCallUnreadMessages selectArdCallUnreadMessagesByUserId (String userId ) { |
| | | return ardCallUnreadMessagesMapper.selectArdCallUnreadMessagesByUserId (userId ); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æªè¯»æ¶æ¯å表 |
| | | * |
| | | * @param ardCallUnreadMessages æªè¯»æ¶æ¯ |
| | | * @return æªè¯»æ¶æ¯ |
| | | */ |
| | | @Override |
| | | public List<ArdCallUnreadMessages> selectArdCallUnreadMessagesList(ArdCallUnreadMessages ardCallUnreadMessages) { |
| | | return ardCallUnreadMessagesMapper.selectArdCallUnreadMessagesList(ardCallUnreadMessages); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æªè¯»æ¶æ¯ |
| | | * |
| | | * @param ardCallUnreadMessages æªè¯»æ¶æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertArdCallUnreadMessages(ArdCallUnreadMessages ardCallUnreadMessages) { |
| | | return ardCallUnreadMessagesMapper.insertArdCallUnreadMessages(ardCallUnreadMessages); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æªè¯»æ¶æ¯ |
| | | * |
| | | * @param ardCallUnreadMessages æªè¯»æ¶æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateArdCallUnreadMessages(ArdCallUnreadMessages ardCallUnreadMessages) { |
| | | return ardCallUnreadMessagesMapper.updateArdCallUnreadMessages(ardCallUnreadMessages); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå 餿ªè¯»æ¶æ¯ |
| | | * |
| | | * @param userId s éè¦å é¤çæªè¯»æ¶æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallUnreadMessagesByUserId(String[] userId) { |
| | | return ardCallUnreadMessagesMapper.deleteArdCallUnreadMessagesByUserId(userId); |
| | | } |
| | | |
| | | /** |
| | | * å 餿ªè¯»æ¶æ¯ä¿¡æ¯ |
| | | * |
| | | * @param userId æªè¯»æ¶æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdCallUnreadMessagesByUserId (String userId ) { |
| | | return ardCallUnreadMessagesMapper.deleteArdCallUnreadMessagesByUserId (userId ); |
| | | } |
| | | /** |
| | | * æ¸
餿ªè¯»æ¶æ¯ |
| | | * |
| | | * @param userId æ¸
餿ªè¯»æ¶æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int clearUnReadCount(String sessionId, String userId) { |
| | | ArdCallUnreadMessages ardCallUnreadMessages = ardCallUnreadMessagesMapper.getUnreadMessage(sessionId,userId); |
| | | if (ardCallUnreadMessages != null) { |
| | | ardCallUnreadMessages.setUnreadCount(0); |
| | | ardCallUnreadMessagesMapper.updateArdCallUnreadMessages(ardCallUnreadMessages); |
| | | } |
| | | return 1; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.utils.websocket.service; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ruoyi.app.position.domain.ArdAppPosition; |
| | | import com.ruoyi.app.position.service.IArdAppPositionService; |
| | | import com.ruoyi.app.position.service.impl.AppPositionPush; |
| | | import com.ruoyi.app.position.service.impl.AppPositionPushService; |
| | | import com.ruoyi.app.position.service.impl.ArdAppPositionServiceImpl; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.utils.websocket.util.WebSocketUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.websocket.*; |
| | | import javax.websocket.server.PathParam; |
| | | import javax.websocket.server.ServerEndpoint; |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @ClassName ChatServerEndpoint |
| | |
| | | String message = "ç¨æ·[" + userId + "] æåè¿æ¥ï¼"; |
| | | log.info("ç¨æ·ç»å½ï¼" + message); |
| | | WebSocketUtils.sendMessage(session, message); |
| | | //region æ§æ¹æ³ |
| | | // //æ¯ä¸ªç¨æ·è¿æ¥æ¶ï¼å¯å¨åå§ææappç¨æ·ä½ç½®åé |
| | | // AppPositionPush.initDataMap.put(userId,AppPositionPush.getAppPositionList()); |
| | | // AppPositionPush.initPushTask(userId,session,3000); |
| | | //endregion |
| | | } |
| | | |
| | | @OnMessage |
| | |
| | | log.info("æ¶å°æ¶æ¯ï¼" + message); |
| | | Session session = WebSocketUtils.ONLINE_USER_SESSIONS.get(userId); |
| | | WebSocketUtils.sendMessage(session, message); |
| | | // sendMessageAll("ç¨æ·[" + userid + "] : " + message); |
| | | //sendMessageAll("ç¨æ·[" + userid + "] : " + message); |
| | | // æ ¹æ®ç¨æ·æ°çé¢çéæ°è°æ´å®æ¶ä»»å¡ |
| | | AppPositionPushService.messageHandler(userId,message); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.call.mapper.ArdCallGroupMapper"> |
| | | |
| | | <resultMap type="ArdCallGroup" id="ArdCallGroupResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="name" column="name" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <collection property="ardCallGroupUsers" ofType="ArdCallGroupUser"> |
| | | <result property="id" column="id" /> |
| | | <result property="groupId" column="group_id" /> |
| | | <result property="userId" column="user_id" /> |
| | | <association property="sysUser" column="user_id" select="com.ruoyi.system.mapper.SysUserMapper.selectUserById"/> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="selectArdCallGroupVo"> |
| | | select acg.*,acgu.* from ard_call_group acg |
| | | left join ard_call_group_user acgu on acg.id = acgu.group_id |
| | | </sql> |
| | | |
| | | <select id="selectArdCallGroupList" parameterType="ArdCallGroup" resultMap="ArdCallGroupResult"> |
| | | <include refid="selectArdCallGroupVo"/> |
| | | <where> |
| | | <if test="name != null and name != ''"> and name like '%'||#{name}||'%'</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdCallGroupById" parameterType="String" resultMap="ArdCallGroupResult"> |
| | | <include refid="selectArdCallGroupVo"/> |
| | | where acg.id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertArdCallGroup" parameterType="ArdCallGroup"> |
| | | insert into ard_call_group |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="name != null">name,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="name != null">#{name},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateArdCallGroup" parameterType="ArdCallGroup"> |
| | | update ard_call_group |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="name != null">name = #{name},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdCallGroupById" parameterType="String"> |
| | | delete from ard_call_group where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdCallGroupByIds" parameterType="String"> |
| | | delete from ard_call_group where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.call.mapper.ArdCallGroupUserMapper"> |
| | | |
| | | <resultMap type="ArdCallGroupUser" id="ArdCallGroupUserResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="groupId" column="group_id"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <resultMap type="ArdCallGroup" id="ArdCallGroupResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <sql id="selectArdCallGroupUserVo"> |
| | | select id, group_id, user_id, create_by, create_time, update_by, update_time |
| | | from ard_call_group_user |
| | | </sql> |
| | | |
| | | <select id="selectArdCallGroupUserList" parameterType="ArdCallGroupUser" resultMap="ArdCallGroupUserResult"> |
| | | <include refid="selectArdCallGroupUserVo"/> |
| | | <where> |
| | | <if test="groupId != null and groupId != ''">and group_id = #{groupId}</if> |
| | | <if test="userId != null and userId != ''">and user_id = #{userId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdCallGroupUserById" parameterType="String" resultMap="ArdCallGroupUserResult"> |
| | | <include refid="selectArdCallGroupUserVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertArdCallGroupUser" parameterType="ArdCallGroupUser"> |
| | | insert into ard_call_group_user |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="groupId != null">group_id,</if> |
| | | <if test="userId != null">user_id,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="groupId != null">#{groupId},</if> |
| | | <if test="userId != null">#{userId},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateArdCallGroupUser" parameterType="ArdCallGroupUser"> |
| | | update ard_call_group_user |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="groupId != null">group_id = #{groupId},</if> |
| | | <if test="userId != null">user_id = #{userId},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdCallGroupUserById" parameterType="String"> |
| | | delete |
| | | from ard_call_group_user |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdCallGroupUserByIds" parameterType="String"> |
| | | delete from ard_call_group_user where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | <delete id="clearArdCallGroupUsers" parameterType="String"> |
| | | delete |
| | | from ard_call_group_user |
| | | where group_id = #{groupId} |
| | | </delete> |
| | | |
| | | <delete id="removeGroupUser"> |
| | | delete from ard_call_group_user where group_id = #{groupId} and user_id in |
| | | <foreach item="userId" collection="userIds" open="(" separator="," close=")"> |
| | | #{userId} |
| | | </foreach> |
| | | </delete> |
| | | <select id="getGroupListByUserId" resultMap="ArdCallGroupResult"> |
| | | select acg.* |
| | | from ard_call_group_user acgu |
| | | left join ard_call_group acg on acg.id = acgu.group_id |
| | | where acgu.user_id = #{userId} |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.call.mapper.ArdCallHistoryMapper"> |
| | | |
| | | <resultMap type="ArdCallHistory" id="ArdCallHistoryResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="type" column="type"/> |
| | | <result property="content" column="content"/> |
| | | <result property="sessionId" column="session_id"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="targetId" column="target_id"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdCallHistoryVo"> |
| | | select id, |
| | | type, |
| | | content, |
| | | session_id, |
| | | user_id, |
| | | target_id, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time |
| | | from ard_call_history |
| | | </sql> |
| | | |
| | | <select id="selectArdCallHistoryList" parameterType="ArdCallHistory" resultMap="ArdCallHistoryResult"> |
| | | <include refid="selectArdCallHistoryVo"/> |
| | | <where> |
| | | <if test="sessionId != null and sessionId != ''">and session_id= #{sessionId}</if> |
| | | <if test="userId != null and userId != ''">and user_id = #{userId}</if> |
| | | <if test="targetId != null and targetId != ''">and target_id = #{targetId}</if> |
| | | <if test="type != null and type != ''">and type = #{type}</if> |
| | | <if test="content != null and content != ''">and content = #{content}</if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectArdCallHistoryById" parameterType="String" resultMap="ArdCallHistoryResult"> |
| | | <include refid="selectArdCallHistoryVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertArdCallHistory" parameterType="ArdCallHistory"> |
| | | insert into ard_call_history |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="type != null">type,</if> |
| | | <if test="content != null">content,</if> |
| | | <if test="sessionId != null">session_id,</if> |
| | | <if test="userId != null">user_id,</if> |
| | | <if test="targetId != null">target_id,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="type != null">#{type},</if> |
| | | <if test="content != null">#{content},</if> |
| | | <if test="sessionId != null">#{sessionId},</if> |
| | | <if test="userId != null">#{userId},</if> |
| | | <if test="targetId != null">#{targetId},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateArdCallHistory" parameterType="ArdCallHistory"> |
| | | update ard_call_history |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="content != null">content = #{content},</if> |
| | | <if test="sessionId != null">session_id = #{sessionId},</if> |
| | | <if test="userId != null">user_id = #{userId},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdCallHistoryById" parameterType="String"> |
| | | delete |
| | | from ard_call_history |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdCallHistoryByIds" parameterType="String"> |
| | | delete from ard_call_history where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="selectLastArdCallHistory" parameterType="String" resultType="ArdCallHistory"> |
| | | select * |
| | | from ard_call_history |
| | | where session_id = #{sessionId} |
| | | order by create_time desc limit 1 |
| | | </select> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.call.mapper.ArdCallSessionMapper"> |
| | | |
| | | <resultMap type="ArdCallSession" id="ArdCallSessionResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="type" column="type"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdCallSessionVo"> |
| | | select id, type, user_id, create_by, create_time, update_by, update_time |
| | | from ard_call_session |
| | | </sql> |
| | | |
| | | <select id="selectArdCallSessionList" parameterType="ArdCallSession" resultMap="ArdCallSessionResult"> |
| | | <include refid="selectArdCallSessionVo"/> |
| | | <where> |
| | | <if test="type != null and type != ''">and type = #{type}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdCallSessionById" parameterType="String" resultMap="ArdCallSessionResult"> |
| | | <include refid="selectArdCallSessionVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertArdCallSession" parameterType="ArdCallSession"> |
| | | insert into ard_call_session |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="type != null">type,</if> |
| | | <if test="userId != null">user_id,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="type != null">#{type},</if> |
| | | <if test="userId != null">#{userId},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateArdCallSession" parameterType="ArdCallSession"> |
| | | update ard_call_session |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="userId != null">user_id = #{userId},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdCallSessionById" parameterType="String"> |
| | | delete |
| | | from ard_call_session |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdCallSessionByIds" parameterType="String"> |
| | | delete from ard_call_session where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.call.mapper.ArdCallSessionUserMapper"> |
| | | |
| | | <resultMap type="ArdCallSessionUser" id="ArdCallSessionUserResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="sessionId" column="session_id"/> |
| | | <result property="type" column="type"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="targetId" column="target_id"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdCallSessionUserVo"> |
| | | select id, session_id, type, user_id,target_id |
| | | from ard_call_session_user |
| | | </sql> |
| | | |
| | | <select id="selectArdCallSessionUserList" parameterType="ArdCallSessionUser" resultMap="ArdCallSessionUserResult"> |
| | | <include refid="selectArdCallSessionUserVo"/> |
| | | <where> |
| | | <if test="sessionId != null and sessionId != ''">and session_id = #{sessionId}</if> |
| | | <if test="type != null and type != ''">and type = #{type}</if> |
| | | <if test="userId != null and userId != ''">and user_id = #{userId}</if> |
| | | <if test="targetId != null and targetId != ''">and target_id = #{targetId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdCallSessionUserById" parameterType="String" resultMap="ArdCallSessionUserResult"> |
| | | <include refid="selectArdCallSessionUserVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertArdCallSessionUser" parameterType="ArdCallSessionUser"> |
| | | insert into ard_call_session_user |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="sessionId != null">session_id,</if> |
| | | <if test="type != null">type,</if> |
| | | <if test="userId != null">user_id,</if> |
| | | <if test="targetId != null">target_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="sessionId != null">#{sessionId},</if> |
| | | <if test="type != null">#{type},</if> |
| | | <if test="userId != null">#{userId},</if> |
| | | <if test="targetId != null">#{targetId},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateArdCallSessionUser" parameterType="ArdCallSessionUser"> |
| | | update ard_call_session_user |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sessionId != null">session_id = #{sessionId},</if> |
| | | <if test="type != null">type = #{type},</if> |
| | | <if test="userId != null">user_id = #{userId},</if> |
| | | <if test="targetId != null">target_id = #{targetId},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdCallSessionUserById" parameterType="String"> |
| | | delete |
| | | from ard_call_session_user |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdCallSessionUserByIds" parameterType="String"> |
| | | delete from ard_call_session_user where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | <select id="getSessionId" parameterType="String" resultType="String"> |
| | | select session_id |
| | | from ard_call_session_user |
| | | where user_id = #{userId} |
| | | and target_id = #{targetId} |
| | | and type = #{type} |
| | | </select> |
| | | <select id="getGroupSessionId" parameterType="String" resultType="String"> |
| | | select session_id |
| | | from ard_call_session_user |
| | | where target_id = #{targetId} |
| | | limit 1 |
| | | </select> |
| | | <delete id="deleteArdCallSessionUserBySessionId" parameterType="String"> |
| | | delete |
| | | from ard_call_session_user |
| | | where session_id = #{sessionId} |
| | | </delete> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.call.mapper.ArdCallUnreadMessagesMapper"> |
| | | |
| | | <resultMap type="ArdCallUnreadMessages" id="ArdCallUnreadMessagesResult"> |
| | | <result property="userId" column="user_id "/> |
| | | <result property="sessionId" column="session_id"/> |
| | | <result property="unreadCount" column="unread_count"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdCallUnreadMessagesVo"> |
| | | select user_id, session_id, unread_count |
| | | from ard_call_unread_messages |
| | | </sql> |
| | | |
| | | <select id="selectArdCallUnreadMessagesList" parameterType="ArdCallUnreadMessages" |
| | | resultMap="ArdCallUnreadMessagesResult"> |
| | | <include refid="selectArdCallUnreadMessagesVo"/> |
| | | <where> |
| | | <if test="userId != null and userId != ''">and user_id = #{userId }</if> |
| | | <if test="sessionId != null and sessionId != ''">and session_id = #{sessionId}</if> |
| | | <if test="unreadCount != null and unreadCount != ''">and unread_count = #{unreadCount}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdCallUnreadMessagesByUserId" parameterType="String" resultMap="ArdCallUnreadMessagesResult"> |
| | | <include refid="selectArdCallUnreadMessagesVo"/> |
| | | where user_id = #{userId } |
| | | </select> |
| | | |
| | | <insert id="insertArdCallUnreadMessages" parameterType="ArdCallUnreadMessages"> |
| | | insert into ard_call_unread_messages |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="userId != null">user_id ,</if> |
| | | <if test="sessionId != null">session_id,</if> |
| | | <if test="unreadCount != null">unread_count,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="userId != null">#{userId },</if> |
| | | <if test="sessionId != null">#{sessionId},</if> |
| | | <if test="unreadCount != null">#{unreadCount},</if> |
| | | </trim> |
| | | ON CONFLICT (session_id, user_id) DO NOTHING |
| | | </insert> |
| | | |
| | | <update id="updateArdCallUnreadMessages" parameterType="ArdCallUnreadMessages"> |
| | | update ard_call_unread_messages |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="unreadCount != null">unread_count = #{unreadCount},</if> |
| | | </trim> |
| | | where user_id = #{userId } and session_id = #{sessionId} |
| | | </update> |
| | | |
| | | <delete id="deleteArdCallUnreadMessagesByUserId " parameterType="String"> |
| | | delete |
| | | from ard_call_unread_messages |
| | | where user_id = #{userId } |
| | | </delete> |
| | | |
| | | <delete id="deleteArdCallUnreadMessagesByUserId" parameterType="String"> |
| | | delete from ard_call_unread_messages where user_id in |
| | | <foreach item="userId" collection="array" open="(" separator="," close=")"> |
| | | #{userId } |
| | | </foreach> |
| | | </delete> |
| | | <select id="getUnreadMessage" resultType="ArdCallUnreadMessages"> |
| | | select * |
| | | from ard_call_unread_messages |
| | | where user_id = #{targetId} |
| | | and session_id = #{sessionId} |
| | | </select> |
| | | </mapper> |
| | |
| | | /** |
| | | * å建API |
| | | */ |
| | | @Bean |
| | | @Bean("baseApi") |
| | | public Docket createRestApi() |
| | | { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | // æ¯å¦å¯ç¨Swagger |
| | | .enable(true) |
| | | //åç»åç§° |
| | | .groupName("baseApi") |
| | | // ç¨æ¥å建该APIçåºæ¬ä¿¡æ¯ï¼å±ç¤ºå¨ææ¡£ç页é¢ä¸ï¼èªå®ä¹å±ç¤ºçä¿¡æ¯ï¼ |
| | | .apiInfo(apiInfo()) |
| | | // 设置åªäºæ¥å£æ´é²ç»Swaggerå±ç¤º |
| | |
| | | .securityContexts(securityContexts()) |
| | | .pathMapping("/"); |
| | | } |
| | | |
| | | /** |
| | | * å建API-VideoCall |
| | | */ |
| | | @Bean("VideoCallApi") |
| | | public Docket createRestApiVideoCall() |
| | | { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | // æ¯å¦å¯ç¨Swagger |
| | | .enable(true) |
| | | //åç»åç§° |
| | | .groupName("VideoCallApi") |
| | | // ç¨æ¥å建该APIçåºæ¬ä¿¡æ¯ï¼å±ç¤ºå¨ææ¡£ç页é¢ä¸ï¼èªå®ä¹å±ç¤ºçä¿¡æ¯ï¼ |
| | | .apiInfo(apiInfo()) |
| | | // 设置åªäºæ¥å£æ´é²ç»Swaggerå±ç¤º |
| | | .select() |
| | | // æ«æææææ³¨è§£çapiï¼ç¨è¿ç§æ¹å¼æ´çµæ´» |
| | | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) |
| | | // æ«ææå®å
ä¸çswagger注解 |
| | | .apis(RequestHandlerSelectors.basePackage("com.ruoyi.call.controller")) |
| | | // æ«æææ .apis(RequestHandlerSelectors.any()) |
| | | .paths(PathSelectors.any()) |
| | | .build() |
| | | /* 设置å®å
¨æ¨¡å¼ï¼swaggerå¯ä»¥è®¾ç½®è®¿é®token */ |
| | | .securitySchemes(securitySchemes()) |
| | | .securityContexts(securityContexts()) |
| | | .pathMapping("/"); |
| | | } |
| | | /** |
| | | * å®å
¨æ¨¡å¼ï¼è¿éæå®tokenéè¿Authorization头请æ±å¤´ä¼ é |
| | | */ |