| | |
| | | public R getInfo(@PathVariable("configId") Long configId) { |
| | | return R.ok(configService.selectConfigById(configId)); |
| | | } |
| | | /** |
| | | * 获取积分配置 兑换商品、充值积分 |
| | | */ |
| | | @GetMapping(value = "/getPointConfigInfo") |
| | | public R getPointConfigInfo() { |
| | | return R.ok(configService.getPointConfigInfo()); |
| | | } |
| | | |
| | | /** |
| | | * 根据参数键名查询参数值 |
| | |
| | | @Log(title = "参数管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/editPointConfig") |
| | | public AjaxResult editPointConfig(@RequestParam("configId")Long configId, @RequestParam("configValue")String configValue) { |
| | | if(configId!=6||configId!=8){ |
| | | if(configId!=6L&&configId!=8L){ |
| | | return AjaxResult.error("请选择积分配置id"); |
| | | } |
| | | SysConfig config=new SysConfig(); |
| | |
| | | config.setUpdateBy(SecurityUtils.getUsername()); |
| | | return toAjax(configService.updateConfig(config)); |
| | | } |
| | | |
| | | /** |
| | | * 修改积分参数配置 |
| | | */ |
| | | @Log(title = "参数管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/editPointConfig2") |
| | | public AjaxResult editPointConfig2(@RequestParam("configValue1")String configValue1, |
| | | @RequestParam("configValue2")String configValue2) { |
| | | SysConfig config=new SysConfig(); |
| | | config.setConfigId(6L); |
| | | config.setConfigValue(configValue1); |
| | | config.setUpdateBy(SecurityUtils.getUsername()); |
| | | configService.updateConfig(config); |
| | | SysConfig config2=new SysConfig(); |
| | | config2.setConfigId(8L); |
| | | config2.setConfigValue(configValue2); |
| | | config2.setUpdateBy(SecurityUtils.getUsername()); |
| | | configService.updateConfig(config2); |
| | | return success(); |
| | | } |
| | | |
| | | /** |
| | | * 修改参数配置 |