|
|
@ -0,0 +1,47 @@ |
|
|
|
|
|
package com.qniao.dam.api.command.puc.user; |
|
|
|
|
|
|
|
|
|
|
|
import com.qniao.dam.api.command.puc.user.request.*; |
|
|
|
|
|
import com.qniao.dam.application.service.puc.PointUpgradeConfigApplicationService; |
|
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
|
|
|
|
|
|
|
|
@Api(tags = "积分升级配置") |
|
|
|
|
|
@RestController |
|
|
|
|
|
@RequestMapping("user") |
|
|
|
|
|
public class PointUpgradeConfigUserCommandController { |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
private PointUpgradeConfigApplicationService pointUpgradeConfigApplicationService; |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("用户创建积分升级配置") |
|
|
|
|
|
@PostMapping("create/point-upgrade-config") |
|
|
|
|
|
public void userCreatePointUpgradeConfig(@RequestBody @Valid UserCreatePointUpgradeConfigDto dto, |
|
|
|
|
|
@RequestParam("userId") Long userId) { |
|
|
|
|
|
pointUpgradeConfigApplicationService.create(dto.trans2Domain()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("用户编辑积分升级配置") |
|
|
|
|
|
@PostMapping("edit/point-upgrade-config") |
|
|
|
|
|
public void userEditPointUpgradeConfig(@RequestBody @Valid UserEditPointUpgradeConfigDto dto, |
|
|
|
|
|
@RequestParam("userId") Long userId) { |
|
|
|
|
|
pointUpgradeConfigApplicationService.edit(dto.trans2Domain()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("用户删除积分升级配置") |
|
|
|
|
|
@PostMapping("delete/point-upgrade-config") |
|
|
|
|
|
public void userDeletePointUpgradeConfig(@RequestBody @Valid UserDeletePointUpgradeConfigDto dto, |
|
|
|
|
|
@RequestParam("userId") Long userId) { |
|
|
|
|
|
pointUpgradeConfigApplicationService.delete(dto.getId()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("用户启停积分升级配置") |
|
|
|
|
|
@PostMapping("enable/point-upgrade-config") |
|
|
|
|
|
public void userEnablePointUpgradeConfig(@RequestBody @Valid UserEnablePointUpgradeConfigDto dto, |
|
|
|
|
|
@RequestParam("userId") Long userId) { |
|
|
|
|
|
pointUpgradeConfigApplicationService.enable(dto.getId()); |
|
|
|
|
|
} |
|
|
|
|
|
} |