Your Name 3 years ago
parent
commit
9e727933fc

+ 1
- 1
pom.xml View File

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

+ 17
- 5
src/main/java/com/yunzhi/shigongli/controller/TaShareController.java View File

11
 import org.slf4j.Logger;
11
 import org.slf4j.Logger;
12
 import org.slf4j.LoggerFactory;
12
 import org.slf4j.LoggerFactory;
13
 import org.springframework.beans.factory.annotation.Autowired;
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
 import java.time.LocalDateTime;
16
 import java.time.LocalDateTime;
20
 
17
 
67
      */
64
      */
68
     @RequestMapping(value="/wx/share",method= RequestMethod.POST)
65
     @RequestMapping(value="/wx/share",method= RequestMethod.POST)
69
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = TaShare.class)
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
         TaPerson person = getCurrentPerson();
69
         TaPerson person = getCurrentPerson();
73
         taShare.setPersonId(person.getPersonId());
70
         taShare.setPersonId(person.getPersonId());
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
 //     * 根据id删除对象
96
 //     * 根据id删除对象
85
 //     * @param id  实体ID
97
 //     * @param id  实体ID

+ 4
- 4
src/main/java/com/yunzhi/shigongli/controller/WxMaController.java View File

136
             iTaPersonService.updateById(taPerson);
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
         // 生成 token
144
         // 生成 token
145
         Map<String, Object> tokenClaims = new HashMap<>();
145
         Map<String, Object> tokenClaims = new HashMap<>();