服务上下架及删除状态修改

This commit is contained in:
donqi 2022-06-17 13:52:08 +08:00
parent 2f81f01801
commit 2158137e36
2 changed files with 17 additions and 1 deletions

View File

@ -242,4 +242,20 @@ public class GoodsController extends BaseController {
return AjaxResult.error(ExceptionUtil.getExceptionMessage(e));
}
}
/**
* 修改商品状态
*/
@PostMapping("/app/updateStatus")
@ResponseBody
public AjaxResult status(@RequestBody Goods goods) {
try {
goodsService.updateGoods(goods);
return AjaxResult.success("操作成功");
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
return AjaxResult.error(ExceptionUtil.getExceptionMessage(e));
}
}
}

View File

@ -41,7 +41,7 @@
<if test="deptGoodsCategoryId != null and deptGoodsCategoryId != ''">dept_goods_category_id = #{deptGoodsCategoryId},</if>
<if test="goodsImgUrl != null and goodsImgUrl != ''">goods_img_url = #{goodsImgUrl},</if>
<if test="goodsVideoUrl != null and goodsVideoUrl != ''">goods_video_url = #{goodsVideoUrl},</if>
<if test="status != null and status != ''">`status` = #{status},</if>
<if test="status != null">`status` = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()