| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.ExchangeGoodsDto; |
| | | import com.ruoyi.system.dto.TErpGoodsUpdateStatusDto; |
| | |
| | | |
| | | @ApiOperation(value = "添加积分商品--供应商") |
| | | @PostMapping(value = "/add") |
| | | @Log(title = "积分商品管理-添加积分商品", businessType = BusinessType.INSERT) |
| | | public R<String> add(@RequestBody TSysGoods goods) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | Integer roleType = user.getRoleType(); |
| | |
| | | |
| | | @ApiOperation(value = "编辑积分商品--供应商") |
| | | @PostMapping(value = "/update") |
| | | @Log(title = "积分商品管理-编辑积分商品", businessType = BusinessType.UPDATE) |
| | | public R<String> update(@RequestBody TSysGoods goods) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | Integer roleType = user.getRoleType(); |
| | |
| | | |
| | | @ApiOperation(value = "删除积分商品--供应商") |
| | | @DeleteMapping(value = "/delete/{id}") |
| | | @Log(title = "积分商品管理-删除积分商品", businessType = BusinessType.DELETE) |
| | | public R<String> delete(@PathVariable String id) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | Integer roleType = user.getRoleType(); |
| | |
| | | |
| | | @ApiOperation(value = "积分商品 上下架--供应商") |
| | | @PostMapping(value = "/updateStatus") |
| | | @Log(title = "积分商品管理-上下架积分商品", businessType = BusinessType.UPDATE) |
| | | public R<String> updateStatus(@RequestBody @Valid TErpGoodsUpdateStatusDto dto) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | Integer roleType = user.getRoleType(); |
| | |
| | | // 获取兑换记录 |
| | | @ApiOperation(value = "发货--供应商") |
| | | @PostMapping(value = "/sendGoods") |
| | | @Log(title = "积分商品管理-发货", businessType = BusinessType.UPDATE) |
| | | public R<?> sendGoods(@RequestBody @Valid TSysGoodsExchange exchange) { |
| | | TSysGoodsExchange exchange1 = sysGoodsExchangeService.getById(exchange.getId()); |
| | | if (exchange1.getStatus() == 2) { |
| | |
| | | */ |
| | | @ApiOperation(value = "兑换商品--诊所") |
| | | @PostMapping(value = "/exchangeGoods") |
| | | @Log(title = "积分商品管理-诊所兑换商品", businessType = BusinessType.INSERT) |
| | | public R<?> exchangeGoods(@RequestBody @Valid ExchangeGoodsDto dto) { |
| | | SysUser user = tokenService.getLoginUser().getUser(); |
| | | Integer roleType = user.getRoleType(); |