| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.other.api.domain.BaseSetting; |
| | | import com.ruoyi.other.api.domain.VipSetting; |
| | | import com.ruoyi.other.service.BaseSettingService; |
| | | import com.ruoyi.other.service.VipSettingService; |
| | | import com.ruoyi.other.vo.RefundPassSettingVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Resource |
| | | private BaseSettingService baseSettingService; |
| | | |
| | | @Resource |
| | | private VipSettingService vipSettingService; |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | BaseSetting baseSetting = baseSettingService.getById(id); |
| | | return R.ok(baseSetting); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getBaseSetting1") |
| | | @ApiOperation(value = "获取基础配置", tags = {"小程序-基础配置"}) |
| | | public R<BaseSetting> getBaseSetting1(@RequestParam("id") Integer id){ |
| | | BaseSetting baseSetting = baseSettingService.getById(id); |
| | | Long userid = tokenService.getLoginUserApplet().getUserid(); |
| | | AppUser appUser = appUserClient.getAppUserById(userid); |
| | | VipSetting vipSetting = vipSettingService.getById(appUser.getVipId()); |
| | | baseSetting.setWithdraw(vipSetting.getVipWithdrawalRole()); |
| | | baseSetting.setWithdrawalMinAmount(vipSetting.getVipWithdrawalMinAmount()); |
| | | return R.ok(baseSetting); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存设置 |
| | |
| | | |
| | | |
| | | |
| | | @PostMapping("/getRefundPassSetting") |
| | | @GetMapping("/getRefundPassSetting") |
| | | @ApiOperation(value = "获取售后设置", tags = {"管理后台-售后管理"}) |
| | | public R<RefundPassSettingVo> getRefundPassSetting(){ |
| | | BaseSetting one = baseSettingService.getOne(new LambdaQueryWrapper<BaseSetting>().eq(BaseSetting::getId, 5)); |