@ -17,8 +17,10 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation ;
import io.swagger.annotations.ApiOperation ;
import io.swagger.annotations.ApiOperationSort ;
import io.swagger.annotations.ApiOperationSort ;
import io.swagger.annotations.ApiParam ;
import io.swagger.annotations.ApiParam ;
import java.util.List ;
import java.util.List ;
import javax.validation.constraints.NotNull ;
import javax.validation.constraints.NotNull ;
import lombok.extern.slf4j.Slf4j ;
import lombok.extern.slf4j.Slf4j ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.web.bind.annotation.CrossOrigin ;
import org.springframework.web.bind.annotation.CrossOrigin ;
@ -45,227 +47,250 @@ import org.springframework.web.bind.annotation.RestController;
@Api ( tags = "积分模块" )
@Api ( tags = "积分模块" )
public class PointController {
public class PointController {
@Autowired
@Autowired
private TaskPointService taskPointService ;
private TaskPointService taskPointService ;
@Autowired
private UserPointLogService userPointLogService ;
@Autowired
private LotteryService lotteryService ;
@Autowired
private UserPointLogService userPointLogService ;
@Autowired
@ApiOperation ( value = "1.1.新增任务积分配置" , notes = "仅限admin权限用户调用" )
private LotteryService lotteryService ;
@PostMapping ( "/task/add" )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "taskPoint" , value = "任务积分配置" , required = true , dataType = "TaskPoint" , paramType = "body" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) } )
public Result < Void > add (
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
@RequestBody TaskPoint taskPoint ) {
taskPointService . add ( taskPoint , authorization ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "1.2.修改任务积分配置" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/task/update" )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "taskPoint" , value = "任务积分配置" , required = true , dataType = "TaskPoint" , paramType = "body" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) }
)
public Result < Void > update (
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
@RequestBody TaskPoint taskPoint ) {
taskPointService . update ( taskPoint , authorization ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "1.1.新增任务积分配置" , notes = "仅限admin权限用户调用" )
@ApiOperation ( value = "1.3.批量修改任务积分配置" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/task/add" )
@PostMapping ( "/task/batch/update" )
@GlobalInterceptor ( checkAdminLogin = true )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "taskPoint" , value = "任务积分配置" , required = true , dataType = "TaskPoint" , paramType = "body" ) ,
@ApiImplicitParam ( name = "taskPoints" , value = "任务积分配置" , required = true , dataType = "List<TaskPoint>" , paramType = "body" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) } )
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) }
public Result < Void > add (
)
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
public Result < Void > batchUpdate (
@RequestBody TaskPoint taskPoint ) {
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
taskPointService . add ( taskPoint , authorization ) ;
@RequestBody List < TaskPoint > taskPoints ) {
return Result . success ( ) ;
taskPointService . batchUpdate ( taskPoints , authorization ) ;
}
return Result . success ( ) ;
}
@ApiOperation ( value = "1.2.修改任务积分配置" , notes = "仅限admin权限用户调用" )
@ApiOperation ( value = "1.4.批量禁用任务积分配置" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/task/update" )
@PostMapping ( "/task/batch/disable" )
@GlobalInterceptor ( checkAdminLogin = true )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "taskPoint" , value = "任务积分配置" , required = true , dataType = "TaskPoint" , paramType = "body" ) ,
@ApiImplicitParam ( name = "ids" , value = "任务积分配置id" , required = true , dataType = "List<String>" , paramType = "body" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) }
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
)
@ApiImplicitParam ( name = "valid" , value = "是否生效 1-生效 2-不生效" , required = true , dataType = "Integer" , paramType = "query" )
public Result < Void > update (
}
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
)
@RequestBody TaskPoint taskPoint ) {
public Result < Void > batchDisable (
taskPointService . update ( taskPoint , authorization ) ;
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
return Result . success ( ) ;
@RequestBody List < String > ids ,
}
@RequestParam Integer valid ) {
taskPointService . batchDisable ( ids , authorization , valid ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "1.3.批量修改任务积分配置" , notes = "仅限admin权限用户调用" )
@ApiOperation ( value = "1.5.禁用任务积分配置" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/task/batch/update" )
@PostMapping ( "/task/disable" )
@GlobalInterceptor ( checkAdminLogin = true )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "taskPoints" , value = "任务积分配置" , required = true , dataType = "List<TaskPoint>" , paramType = "body" ) ,
@ApiImplicitParam ( name = "id" , value = "任务积分配置id" , required = true , dataType = "String" , paramType = "body" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) }
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
)
@ApiImplicitParam ( name = "valid" , value = "是否生效 1-生效 2-不生效" , required = true , dataType = "Integer" , paramType = "query" )
public Result < Void > batchUpdate (
} )
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
public Result < Void > disable (
@RequestBody List < TaskPoint > taskPoints ) {
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
taskPointService . batchUpdate ( taskPoints , authorization ) ;
@RequestParam String id ,
return Result . success ( ) ;
@RequestParam Integer valid ) {
}
taskPointService . disable ( id , authorization , valid ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "1.4.批量禁用任务积分配置" , notes = "仅限admin权限用户调用" )
@ApiOperation ( value = "1.6. 任务积分列表" , notes = "任务积分列表" )
@PostMapping ( "/task/batch/disable" )
@GetMapping ( "/task/list/{page}/{size}" )
@GlobalInterceptor ( checkAdminLogin = true )
public Result < PageResult < TaskPoint > > getUnApproveList (
@ApiImplicitParams ( {
@ApiParam ( value = "Header中的token信息" , required = true ) @RequestHeader ( "Authorization" ) String token ,
@ApiImplicitParam ( name = "ids" , value = "任务积分配置id" , required = true , dataType = "List<String>" , paramType = "body" ) ,
@ApiParam ( value = "页码" , required = true ) @PathVariable Integer page ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiParam ( value = "每页条数" , required = true ) @PathVariable Integer size ) {
@ApiImplicitParam ( name = "valid" , value = "是否生效 1-生效 2-不生效" , required = true , dataType = "Integer" , paramType = "query" )
return Result . success ( taskPointService . getTaskPointList ( page , size ) ) ;
}
}
)
public Result < Void > batchDisable (
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
@RequestBody List < String > ids ,
@RequestParam Integer valid ) {
taskPointService . batchDisable ( ids , authorization , valid ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "1.5.禁用任务积分配置" , notes = "仅限admin权限用户调用" )
@ApiOperation ( value = "2.1. 用户根据新手任务获取积分" , notes = "仅限app用户调用" )
@PostMapping ( "/task/disable" )
@PostMapping ( "/log/earn/task/new" )
@GlobalInterceptor ( checkAdminLogin = true )
@GlobalInterceptor ( checkAppUserLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "id" , value = "任务积分配置id" , required = true , dataType = "String" , paramType = "body" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = "taskPointId" , value = "任务积分配置id" , required = true , dataType = "String" , paramType = "body" )
@ApiImplicitParam ( name = "valid" , value = "是否生效 1-生效 2-不生效" , required = true , dataType = "Integer" , paramType = "query" )
} )
} )
public Result < Void > addLogNew (
public Result < Void > disable (
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
@RequestBody String taskPointId ) {
@RequestParam String id ,
userPointLogService . addByTaskNew ( taskPointId , authorization ) ;
@RequestParam Integer valid ) {
return Result . success ( ) ;
taskPointService . disable ( id , authorization , valid ) ;
}
return Result . success ( ) ;
}
@ApiOperation ( value = "1.6. 任务积分列表" , notes = "任务积分列表" )
@ApiOperation ( value = "2.2. 用户根据日常任务获取积分" , notes = "仅限app用户调用" )
@GetMapping ( "/task/list/{page}/{size}" )
@PostMapping ( "/log/earn/task/daily" )
public Result < PageResult < TaskPoint > > getUnApproveList (
@GlobalInterceptor ( checkAppUserLogin = true )
@ApiParam ( value = "Header中的token信息" , required = true ) @RequestHeader ( "Authorization" ) String token ,
@ApiImplicitParams ( {
@ApiParam ( value = "页码" , required = true ) @PathVariable Integer page ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiParam ( value = "每页条数" , required = true ) @PathVariable Integer size ) {
@ApiImplicitParam ( name = "taskPointId" , value = "任务积分配置id" , required = true , dataType = "String" , paramType = "body" )
return Result . success ( taskPointService . getTaskPointList ( page , size ) ) ;
} )
}
public Result < Void > addLogDaily (
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
@RequestBody String taskPointId ) {
userPointLogService . addByTaskDaily ( taskPointId , authorization ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "2.1. 用户根据新手任务获取积分" , notes = "仅限app用户调用" )
@ApiOperation ( value = "2.3.用户积分日志列表" , notes = "用户积分日志列表" )
@PostMapping ( "/log/earn/task/new" )
@PostMapping ( "/log/list/{page}/{size}" )
@GlobalInterceptor ( checkAppUserLogin = true )
@GlobalInterceptor ( checkAppUserLogin = true )
@ApiImplicitParams ( {
public Result < PageResult < UserPointLog > > getUserPointLogList (
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiParam ( value = "Header中的token信息" , required = true ) @RequestHeader ( "Authorization" ) String token ,
@ApiImplicitParam ( name = "taskPointId" , value = "任务积分配置id" , required = true , dataType = "String" , paramType = "body" )
@ApiParam ( value = "查询对象" ) @RequestBody UserPointLogSearchDto userPointLogSearchDto ,
} )
@ApiParam ( value = "页码" , required = true ) @PathVariable Integer page ,
public Result < Void > addLogNew (
@ApiParam ( value = "每页条数" , required = true ) @PathVariable Integer size ) {
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
return Result . success (
@RequestBody String taskPointId ) {
userPointLogService . getUserPointLogList ( token , userPointLogSearchDto , page , size ) ) ;
userPointLogService . addByTaskNew ( taskPointId , authorization ) ;
}
return Result . success ( ) ;
}
@ApiOperation ( value = "2.2. 用户根据日常任务获取积分" , notes = "仅限app用户调用" )
@ApiOperation ( value = "2.4.每日签到" , notes = "仅限app用户调用" )
@PostMapping ( "/log/earn/task/daily" )
@PostMapping ( "/log/earn/sign" )
@GlobalInterceptor ( checkAppUserLogin = true )
@GlobalInterceptor ( checkAppUserLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" )
@ApiImplicitParam ( name = "taskPointId" , value = "任务积分配置id" , required = true , dataType = "String" , paramType = "body" )
} )
} )
public Result < Void > addLogSign ( @RequestHeader ( value = "Authorization" , required = true ) String authorization ) {
public Result < Void > addLogDaily (
userPointLogService . dailySign ( authorization ) ;
@RequestHeader ( value = "Authorization" , required = true ) String authorization ,
return Result . success ( ) ;
@RequestBody String taskPointId ) {
}
userPointLogService . addByTaskDaily ( taskPointId , authorization ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "2. 3.用户积分日志列表", notes = "用户积分日志列表 ")
@ApiOperation ( value = "2.5.分享期刊" , notes = "仅限app用户调用" )
@PostMapping ( "/log/list/{page}/{size} ")
@PostMapping ( "/log/share/journal" )
@GlobalInterceptor ( checkAppUserLogin = true )
@GlobalInterceptor ( checkAppUserLogin = true )
public Result < PageResult < UserPointLog > > getUserPointLogList (
@ApiImplicitParams ( {
@Api Param( value = " Header中的 token信息 ", required = true ) @RequestHeader ( "Authorization" ) String token ,
@Api Implicit Param( name = "Authorization" , value = " token", required = true , dataType = "String" , paramType = "header" ) ,
@ApiParam ( value = "查询对象" ) @RequestBody UserPointLogSearchDto userPointLogSearchDto ,
@ApiImplicitParam ( name = "journalId" , value = "期刊id" , required = true , dataType = "String" , paramType = "query" )
@ApiParam ( value = "页码" , required = true ) @PathVariable Integer page ,
} )
@ApiParam ( value = "每页条数" , required = true ) @PathVariable Integer size ) {
public Result < Void > addLogShareJournal ( @RequestHeader ( value = "Authorization" , required = true ) String authorization , @RequestParam String journalId ) {
return Result . success (
userPointLogService . shareJournal ( authorization ) ;
userPointLogService . getUserPointLogList ( token , userPointLogSearchDto , page , size ) ) ;
return Result . success ( ) ;
}
}
@ApiOperation ( value = "3.1.添加抽奖" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/lottery/add" )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = "lottery" , value = "抽奖信息" , required = true , dataType = "Lottery" , paramType = "body" )
} )
public Result < Void > addLottery ( @RequestHeader ( "Authorization" ) String token ,
@RequestBody Lottery lottery ) {
lotteryService . add ( lottery , token ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "3.2.抽奖列表页" , notes = "仅限admin权限用户调用" )
@ApiOperation ( value = "3.1.添加抽奖" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/lottery/list/{page}/{size}" )
@PostMapping ( "/lottery/add" )
@GlobalInterceptor ( checkAdminLogin = true )
@GlobalInterceptor ( checkAdminLogin = true )
public Result < PageResult < Lottery > > lotteryList (
@ApiImplicitParams ( {
@ApiParam ( value = "Header中的token信息" , required = true ) @RequestHeader ( "Authorization" ) String token ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiParam ( value = "查询对象" ) @RequestBody LotterySearchDto lotterySearchDto ,
@ApiImplicitParam ( name = "lottery" , value = "抽奖信息" , required = true , dataType = "Lottery" , paramType = "body" )
@ApiParam ( value = "页码" , required = true ) @PathVariable Integer page ,
} )
@ApiParam ( value = "每页条数" , required = true ) @PathVariable Integer size ) {
public Result < Void > addLottery ( @RequestHeader ( "Authorization" ) String token ,
return Result . success ( lotteryService . lotteryPageResult ( page , size , lotterySearchDto ) ) ;
@RequestBody Lottery lottery ) {
}
lotteryService . add ( lottery , token ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "3.3.编辑抽奖" , notes = "仅限admin权限用户调用" )
@ApiOperation ( value = "3.2.抽奖列表页" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/lottery/edit" )
@PostMapping ( "/lottery/list/{page}/{size}" )
@GlobalInterceptor ( checkAdminLogin = true )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
public Result < PageResult < Lottery > > lotteryList (
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiParam ( value = "Header中的token信息" , required = true ) @RequestHeader ( "Authorization" ) String token ,
@ApiImplicitParam ( name = "lottery" , value = "抽奖信息" , required = true , dataType = "Lottery" , paramType = "body" )
@ApiParam ( value = "查询对象" ) @RequestBody LotterySearchDto lotterySearchDto ,
} )
@ApiParam ( value = "页码" , required = true ) @PathVariable Integer page ,
public Result < Void > editLottery ( @RequestHeader ( "Authorization" ) String token ,
@ApiParam ( value = "每页条数" , required = true ) @PathVariable Integer size ) {
@RequestBody Lottery lottery ) {
return Result . success ( lotteryService . lotteryPageResult ( page , size , lotterySearchDto ) ) ;
lotteryService . edit ( lottery , token ) ;
}
return Result . success ( ) ;
}
@ApiOperation ( value = "3. 4.发布 抽奖", notes = "仅限admin权限用户调用" )
@ApiOperation ( value = "3.3.编辑抽奖" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/lottery/publish ")
@PostMapping ( "/lottery/edit ")
@GlobalInterceptor ( checkAdminLogin = true )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = " id", value = "抽奖id ", required = true , dataType = " String ", paramType = "body" )
@ApiImplicitParam ( name = " lottery", value = "抽奖信息 ", required = true , dataType = " Lottery ", paramType = "body" )
} )
} )
public Result < Void > publish Lottery( @RequestHeader ( "Authorization" ) String token ,
public Result < Void > edit Lottery( @RequestHeader ( "Authorization" ) String token ,
@RequestBody String id ) {
@RequestBody Lottery lottery ) {
lotteryService . publish ( id , token ) ;
lotteryService . edit ( lottery , token ) ;
return Result . success ( ) ;
return Result . success ( ) ;
}
}
@ApiOperation ( value = "3.5.停止抽奖" , notes = "仅限admin权限用户调用" )
@ApiOperation ( value = "3.4.发布抽奖" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/lottery/stop" )
@PostMapping ( "/lottery/publish" )
@GlobalInterceptor ( checkAdminLogin = true )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = "id" , value = "抽奖id" , required = true , dataType = "String" , paramType = "query" ) ,
@ApiImplicitParam ( name = "id" , value = "抽奖id" , required = true , dataType = "String" , paramType = "body" )
@ApiImplicitParam ( name = "stopReason" , value = "停止原因" , required = true , dataType = "String" , paramType = "body" )
} )
} )
public Result < Void > publishLottery ( @RequestHeader ( "Authorization" ) String token ,
public Result < Void > stopLottery ( @RequestHeader ( "Authorization" ) String token ,
@RequestBody String id ) {
@NotNull String id , @RequestBody @NotNull String stopReason ) {
lotteryService . publish ( id , token ) ;
lotteryService . stop ( id , token , stopReason ) ;
return Result . success ( ) ;
return Result . success ( ) ;
}
}
@ApiOperation ( value = "3.6.参与抽奖" )
@ApiOperation ( value = "3.5.停止抽奖" , notes = "仅限admin权限用户调用" )
@PostMapping ( "/lottery/participate" )
@PostMapping ( "/lottery/stop" )
@ApiImplicitParams ( {
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "id" , value = "抽奖id" , required = true , dataType = "String" , paramType = "query" ) ,
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = "regionId" , value = "区域id" , required = true , dataType = "String" , paramType = "query" )
@ApiImplicitParam ( name = "id" , value = "抽奖id" , required = true , dataType = "String" , paramType = "query" ) ,
} )
@ApiImplicitParam ( name = "stopReason" , value = "停止原因" , required = true , dataType = "String" , paramType = "body" )
public Result < Void > participate ( @RequestHeader ( "Authorization" ) String token , @NotNull String id , @NotNull Integer regionId ) {
} )
lotteryService . participate ( id , token , regionId ) ;
public Result < Void > stopLottery ( @RequestHeader ( "Authorization" ) String token ,
return Result . success ( ) ;
@NotNull String id , @RequestBody @NotNull String stopReason ) {
}
lotteryService . stop ( id , token , stopReason ) ;
return Result . success ( ) ;
}
@ApiOperation ( value = "3.7.自动抽奖结果" , notes = "用这个方法主动触发自动抽奖结果" )
@ApiOperation ( value = "3. 6.参与抽奖 ")
@PostMapping ( "/lottery/auto ")
@PostMapping ( "/lottery/participate ")
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = " Authorization", value = "token ", required = true , dataType = "String" , paramType = " header ") ,
@ApiImplicitParam ( name = " id", value = "抽奖id ", required = true , dataType = "String" , paramType = " query ") ,
@ApiImplicitParam ( name = " id", value = " 抽奖 id", required = true , dataType = "String" , paramType = "query" )
@ApiImplicitParam ( name = " reg ionI d", value = " 区域 id", required = true , dataType = "String" , paramType = "query" )
} )
} )
public Result < Void > auto ( @RequestHeader ( "Authorization" ) String token , @NotNull String i d) {
public Result < Void > participate ( @RequestHeader ( "Authorization" ) String token , @NotNull String i d, @NotNull Integer regionI d) {
lotteryService . auto ( id , token ) ;
lotteryService . participate ( id , token , regionId ) ;
return Result . success ( ) ;
return Result . success ( ) ;
}
}
@ApiOperation ( value = "3.7.自动抽奖结果" , notes = "用这个方法主动触发自动抽奖结果" )
@PostMapping ( "/lottery/auto" )
@GlobalInterceptor ( checkAdminLogin = true )
@ApiImplicitParams ( {
@ApiImplicitParam ( name = "Authorization" , value = "token" , required = true , dataType = "String" , paramType = "header" ) ,
@ApiImplicitParam ( name = "id" , value = "抽奖id" , required = true , dataType = "String" , paramType = "query" )
} )
public Result < Void > auto ( @RequestHeader ( "Authorization" ) String token , @NotNull String id ) {
lotteryService . auto ( id , token ) ;
return Result . success ( ) ;
}
}
}