Your Name 3 年之前
父節點
當前提交
9e727933fc

+ 1
- 1
pom.xml 查看文件

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.yunzhi</groupId>
12 12
 	<artifactId>shigongli</artifactId>
13
-	<version>2.0.14</version>
13
+	<version>3.0.1</version>
14 14
 	<name>shigongli</name>
15 15
 	<description>Shi Gong Li</description>
16 16
 

+ 17
- 5
src/main/java/com/yunzhi/shigongli/controller/TaShareController.java 查看文件

@@ -11,10 +11,7 @@ import io.swagger.annotations.ApiParam;
11 11
 import org.slf4j.Logger;
12 12
 import org.slf4j.LoggerFactory;
13 13
 import org.springframework.beans.factory.annotation.Autowired;
14
-import org.springframework.web.bind.annotation.RequestBody;
15
-import org.springframework.web.bind.annotation.RequestMapping;
16
-import org.springframework.web.bind.annotation.RequestMethod;
17
-import org.springframework.web.bind.annotation.RestController;
14
+import org.springframework.web.bind.annotation.*;
18 15
 
19 16
 import java.time.LocalDateTime;
20 17
 
@@ -67,7 +64,7 @@ public class TaShareController extends BaseController {
67 64
      */
68 65
     @RequestMapping(value="/wx/share",method= RequestMethod.POST)
69 66
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = TaShare.class)
70
-    public ResponseBean taPvAdd(@ApiParam("保存内容") @RequestBody TaShare taShare) throws Exception{
67
+    public ResponseBean saveShare(@ApiParam("保存内容") @RequestBody TaShare taShare) throws Exception{
71 68
 
72 69
         TaPerson person = getCurrentPerson();
73 70
         taShare.setPersonId(person.getPersonId());
@@ -80,6 +77,21 @@ public class TaShareController extends BaseController {
80 77
         }
81 78
     }
82 79
 
80
+    /**
81
+     * 打开分享
82
+     * @param id 分享ID
83
+     * @return
84
+     */
85
+    @RequestMapping(value="/wx/share/{id}/open",method= RequestMethod.POST)
86
+    @ApiOperation(value="打开分享", notes = "打开分享", httpMethod = "POST", response = TaShare.class)
87
+    public ResponseBean openShare(@ApiParam("分享ID") @PathVariable String id) throws Exception{
88
+
89
+        TaPerson person = getCurrentPerson();
90
+        iTaShareOpenService.saveInfo(person, id);
91
+
92
+        return ResponseBean.success(null);
93
+    }
94
+
83 95
 //    /**
84 96
 //     * 根据id删除对象
85 97
 //     * @param id  实体ID

+ 4
- 4
src/main/java/com/yunzhi/shigongli/controller/WxMaController.java 查看文件

@@ -136,10 +136,10 @@ public class WxMaController extends BaseController {
136 136
             iTaPersonService.updateById(taPerson);
137 137
         }
138 138
 
139
-        // 如果有分享ID
140
-        if (!StringUtils.isEmpty(params.getShareId())) {
141
-            iTaShareOpenService.saveInfo(taPerson, params.getShareId());
142
-        }
139
+//        // 如果有分享ID - 已经使用独立接口
140
+//        if (!StringUtils.isEmpty(params.getShareId())) {
141
+//            iTaShareOpenService.saveInfo(taPerson, params.getShareId());
142
+//        }
143 143
 
144 144
         // 生成 token
145 145
         Map<String, Object> tokenClaims = new HashMap<>();