| | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.utils.FebsUtil; |
| | | import cc.mrbird.febs.dapp.dto.SimulateDataDto; |
| | | import cc.mrbird.febs.dapp.service.DappSimulateDataService; |
| | | import cc.mrbird.febs.dapp.service.DappUserService; |
| | | import cc.mrbird.febs.system.entity.User; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | public class DappUserController extends BaseController { |
| | | |
| | | private final DappUserService dappUserService; |
| | | private final DappSimulateDataService dappSimulateDataService; |
| | | |
| | | @RequiresPermissions("admin:view") |
| | | @GetMapping(value = "/list") |
| | |
| | | dappUserService.delete(ids); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @RequiresPermissions("admin:simulate") |
| | | @PostMapping(value = "/simulateData") |
| | | @ControllerEndpoint(operation = "生成虚拟收益", exceptionMessage = "生成虚拟收益失败") |
| | | public FebsResponse simulateData(@Valid SimulateDataDto simulateDataDto) { |
| | | String batchNo = dappSimulateDataService.generateSimulateData(simulateDataDto); |
| | | return new FebsResponse().success().data(batchNo); |
| | | } |
| | | } |