rk
4 小时以前 56fcde8c93a1a10bc50fac775e370a2db57f520e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.doumee.api.web;
 
import com.doumee.config.annotation.LoginRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.dao.business.model.Shares;
import com.doumee.dao.web.request.WxPhoneRequest;
import com.doumee.dao.web.response.AccountResponse;
import com.doumee.dao.web.response.InviteInfoResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
 
import javax.validation.Valid;
 
@Api(tags = "用户分享业务")
@Trace(exclude = true)
@RestController
@RequestMapping("/web/shares")
@Slf4j
public class SharesApi extends ApiController{
 
 
//    /**
//     * 创建
//     *
//     * @param shares 实体对象
//     * @return Integer
//     */
//    @ApiOperation(value = "用户创建分享", notes = "小程序端")
//    @GetMapping("/getMemberDTO")
//    public ApiResponse<Integer> create(@RequestBody Shares shares){
//        return ApiResponse.success(sharesService.create(shares,getMemberId()));
//    }
 
    @LoginRequired
    @ApiOperation(value = "获取邀请信息", notes = "小程序端")
    @GetMapping("/getInviteInfo")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true)
    })
    public ApiResponse<InviteInfoResponse> getInviteInfo() {
        return  ApiResponse.success(inviteRecordService.getInviteInfo(getMemberId()));
    }
 
 
    @LoginRequired
    @ApiOperation(value = "生成邀请海报", notes = "小程序端")
    @GetMapping("/getShareImg")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true)
    })
    public ApiResponse<String> getShareImg()  throws Exception{
        return  ApiResponse.success(inviteRecordService.createShareImg(getMemberId()));
    }
 
 
}