Przeglądaj źródła

小小训练营活动
直播间商品

zouxuan 3 lat temu
rodzic
commit
9a1c14f38b

+ 27 - 0
mec-student/src/main/java/com/ym/mec/student/controller/LiveGoodsMapperController.java

@@ -0,0 +1,27 @@
+package com.ym.mec.student.controller;
+
+import com.ym.mec.biz.dal.page.LiveGoodsMapperQueryInfo;
+import com.ym.mec.biz.service.LiveGoodsMapperService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Api(tags = "直播商品关联管理")
+@RequestMapping("liveGoodsMapper")
+@RestController
+public class LiveGoodsMapperController extends BaseController {
+
+    @Autowired
+    private LiveGoodsMapperService liveGoodsMapperService;
+
+    @ApiOperation("分页查询直播间商品")
+    @PostMapping("/page")
+    public HttpResponseResult page(LiveGoodsMapperQueryInfo queryInfo) {
+        return succeed(liveGoodsMapperService.queryPage(queryInfo));
+    }
+}

+ 3 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/ImSendGroupMessageController.java

@@ -37,6 +37,9 @@ public class ImSendGroupMessageController extends BaseController {
     @ApiOperation("获取群消息列表")
     @PostMapping(value = "/queryPage")
     public HttpResponseResult<PageInfo<ImSendGroupMessage>> queryPage(ImSendGroupMessageQueryInfo queryInfo) throws Exception {
+        SysUser sysUser = Optional.of(sysUserFeignService.queryUserInfo()).
+                orElseThrow(() -> new Exception("请登录"));
+        queryInfo.setSenderId(sysUser.getId().toString());
         return succeed(imSendGroupMessageService.queryPage(queryInfo));
     }
 

+ 27 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/LiveGoodsMapperController.java

@@ -0,0 +1,27 @@
+package com.ym.mec.teacher.controller;
+
+import com.ym.mec.biz.dal.page.LiveGoodsMapperQueryInfo;
+import com.ym.mec.biz.service.LiveGoodsMapperService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Api(tags = "直播商品关联管理")
+@RequestMapping("liveGoodsMapper")
+@RestController
+public class LiveGoodsMapperController extends BaseController {
+
+    @Autowired
+    private LiveGoodsMapperService liveGoodsMapperService;
+
+    @ApiOperation("分页查询直播间商品")
+    @PostMapping("/page")
+    public HttpResponseResult page(LiveGoodsMapperQueryInfo queryInfo) {
+        return succeed(liveGoodsMapperService.queryPage(queryInfo));
+    }
+}