ExpOperationController.java
1.37 KB
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
package com.topdraw.business.process.rest;
import com.topdraw.business.process.domian.TempCoupon;
import com.topdraw.business.process.domian.TempExp;
import com.topdraw.business.process.service.CouponOperationService;
import com.topdraw.business.process.service.ExpOperationService;
import com.topdraw.common.ResultInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays;
import java.util.List;
/**
* @author XiangHan
* @date 2021-10-22
*/
@Api(tags = "ExpOperation管理")
@RestController
@RequestMapping("/api/ExpOperation")
public class ExpOperationController {
@Autowired
private ExpOperationService expOperationService;
@PostMapping(value = "/grantExpByManual")
@ApiOperation("手动发放成长值")
public ResultInfo grantExpByManual(@Validated @RequestBody TempExp tempExp) {
List<TempExp> tempExpList = Arrays.asList(tempExp);
this.expOperationService.grantExpByManual(tempExpList);
return ResultInfo.success();
}
}