| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.account.api.model.UserClickLog; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.other.api.domain.BaseSetting; |
| | | import com.ruoyi.other.api.domain.RechargeSet; |
| | | import com.ruoyi.other.dto.RechargeDto; |
| | | import com.ruoyi.other.service.BaseSettingService; |
| | | import com.ruoyi.other.service.RechargeSetService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | public class RechargeSetController { |
| | | @Resource |
| | | private RechargeSetService rechargeSetService; |
| | | @Resource |
| | | private BaseSettingService baseSettingService; |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "充值设置查询", tags = {"后台"}) |
| | |
| | | List<RechargeSet> list = rechargeSetService.list(); |
| | | rechargeSetService.removeBatchByIds(list); |
| | | rechargeSetService.saveBatch(rechargeDto.getRechargeDto()); |
| | | if (rechargeDto.getResetQuota() != null){ |
| | | baseSettingService.update(new LambdaUpdateWrapper<BaseSetting>() |
| | | .eq(BaseSetting::getId, 7) |
| | | .set(BaseSetting::getContent, rechargeDto.getResetQuota().toString())); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |