From 88d2eb6e628bd74818690a8f47198d55004c4921 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期二, 29 十一月 2022 10:12:47 +0800
Subject: [PATCH] Merge branch 'local_20221104' into huacheng_test
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActSocialOrgApi.java | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActSocialOrgApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActSocialOrgApi.java
index 52c0fbc..26df63d 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActSocialOrgApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActSocialOrgApi.java
@@ -40,6 +40,28 @@
public R selectAll(@RequestBody CommonPage commonPage) {
return this.comActSocialOrgService.pageList(commonPage);
}
+
+ /**
+ * 通过主键查询单条数据
+ *
+ * @param id 主键
+ * @return 单条数据
+ */
+ @GetMapping("{id}")
+ public R selectOne(@PathVariable("id") Long id) {
+ return this.comActSocialOrgService.selectById(id);
+ }
+
+ /**
+ * 通过userId查询
+ *
+ * @param userId 主键
+ * @return 单条数据
+ */
+ @GetMapping("/selectByUserId")
+ public R selectOneByUserId(@RequestParam("userId") Long userId) {
+ return R.ok(this.comActSocialOrgService.getOne(new QueryWrapper<ComActSocialOrg>().lambda().eq(ComActSocialOrg::getUserId,userId)));
+ }
/**
* 新增数据
*
--
Gitblit v1.7.1