| | |
| | | import cn.afterturn.easypoi.excel.entity.ImportParams; |
| | | import cn.hutool.json.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.domain.R; |
| | |
| | | @DeleteMapping(value = "/delete/{id}") |
| | | @Log(title = "实物商品-删除", businessType = BusinessType.DELETE) |
| | | public R<String> delete(@PathVariable Integer id ) { |
| | | TPhysicalGoods physicalGoods = tPhysicalGoodsService.getById(id); |
| | | physicalGoods.setStatus(0); |
| | | physicalGoods.setUpdateUserId(tokenService.getLoginUser().getUserId()); |
| | | boolean remove = tPhysicalGoodsService.updateById(physicalGoods); |
| | | boolean remove = tPhysicalGoodsService.update(new LambdaUpdateWrapper<TPhysicalGoods>().eq(TPhysicalGoods::getId, id).set(TPhysicalGoods::getStatus, 1).set(TPhysicalGoods::getUpdateUserId,tokenService.getLoginUser().getUserId())); |
| | | return remove ? R.ok() : R.fail(); |
| | | } |
| | | |