大致完成小程序返回平台接口

This commit is contained in:
wen 2022-01-13 18:42:04 +08:00
parent df97402324
commit 52330aa54f
3 changed files with 49 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import com.xhpc.common.core.web.controller.BaseController;
import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.log.annotation.Log; import com.xhpc.common.log.annotation.Log;
import com.xhpc.common.log.enums.BusinessType; import com.xhpc.common.log.enums.BusinessType;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -41,6 +42,13 @@ public class XhpcMessageBoardApiController extends BaseController {
return AjaxResult.success(); return AjaxResult.success();
} }
/**
* 用户查看所发送的聊天记录
*
* @author WH
* @date 2022/1/13 18:15
* @since version-1.0
*/
@GetMapping("/user/message") @GetMapping("/user/message")
public AjaxResult queryUserMessage(UserQueryCondition userQueryCondition) { public AjaxResult queryUserMessage(UserQueryCondition userQueryCondition) {
@ -48,4 +56,18 @@ public class XhpcMessageBoardApiController extends BaseController {
return AjaxResult.success(queryUserMassageResponse); return AjaxResult.success(queryUserMassageResponse);
} }
/**
* 获取用户对应的租户的头像
*
* @author WH
* @date 2022/1/13 18:19
* @since version-1.0
*/
@GetMapping("/platform-icon")
public AjaxResult returnPlatformAvatar(@Param("tenantId") String tenantId, @Param("tenantType") Integer tenantType) {
String avatarAddress = xhpcMessageBoardService.returnPlatformAvatar(tenantId, tenantType);
return AjaxResult.success(avatarAddress);
}
} }

View File

@ -45,5 +45,16 @@ public interface XhpcMessageBoardService {
*/ */
QueryUserMassageResponse queryUserMessage(UserQueryCondition userQueryCondition); QueryUserMassageResponse queryUserMessage(UserQueryCondition userQueryCondition);
/**
* 根据租户id和租户类型查询指定的租户头像
*
* @param tenantId 租户id
* @param tenantType 租户类型
* @return 头像地址
* @author WH
* @date 2022/1/13 18:30
* @since version-1.0
*/
String returnPlatformAvatar(String tenantId, Integer tenantType);
} }

View File

@ -225,4 +225,20 @@ public class XhpcMessageBoardServiceImpl implements XhpcMessageBoardService {
return response; return response;
} }
/**
* 根据租户id和租户类型查询指定的租户头像
*
* @param tenantId 租户id
* @param tenantType 租户类型
* @return 头像地址
* @author WH
* @date 2022/1/13 18:30
* @since version-1.0
*/
@Override
public String returnPlatformAvatar(String tenantId, Integer tenantType) {
return "https://xhpc-bucket1.oss-cn-hangzhou.aliyuncs.com/avatar/logo.png";
}
} }