|
@@ -11,6 +11,7 @@
|
|
|
package com.qs.mp.web.controller.api.channel.mall;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.qs.mp.channel.domain.ChannelCart;
|
|
|
import com.qs.mp.channel.domain.param.ChannelCartParam;
|
|
|
import com.qs.mp.channel.domain.vo.ChannelCartVO;
|
|
@@ -60,7 +61,7 @@ public class ChannelCartController extends BaseApiController {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 添加/修改购物车数量
|
|
|
+ * 盲票列表页面点加购
|
|
|
*/
|
|
|
@PostMapping("/cart/add")
|
|
|
@ApiOperation(value = "加购物车" , notes = "渠道经销商加购物车")
|
|
@@ -72,6 +73,23 @@ public class ChannelCartController extends BaseApiController {
|
|
|
return AjaxResult.success("操作成功");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改购物车数量
|
|
|
+ */
|
|
|
+ @PostMapping("/cart/update")
|
|
|
+ @ApiOperation(value = "修改购物车数量" , notes = "渠道经销商购物车列表页面直接修改")
|
|
|
+ public AjaxResult update(@RequestBody ChannelCartParam param) {
|
|
|
+ Long channelId = SecurityUtils.getLoginUser().getChannelId();
|
|
|
+ boolean rtn = channelCartService.update(new LambdaUpdateWrapper<ChannelCart>()
|
|
|
+ .set(ChannelCart::getOrderNum, param.getOrderNum())
|
|
|
+ .eq(ChannelCart::getChannelId, channelId)
|
|
|
+ .eq(ChannelCart::getCartId, param.getCartId()));
|
|
|
+ if (!rtn) {
|
|
|
+ return AjaxResult.error("更新失败");
|
|
|
+ }
|
|
|
+ return AjaxResult.success("更新成功");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 删除购物清单项
|
|
|
*/
|