| | |
| | | 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 io.swagger.v3.oas.annotations.parameters.RequestBody; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | @Api(tags = "用户分享业务") |
| | | @Trace(exclude = true) |
| | |
| | | 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())); |
| | | // /** |
| | | // * 创建 |
| | | // * |
| | | // * @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())); |
| | | } |
| | | |
| | | |
| | | } |