This commit is contained in:
Carl 2022-01-07 18:05:30 +08:00
parent 2efb0f2fd2
commit fe641bb3c5

View File

@ -20,6 +20,7 @@ import net.lab1024.smartadmin.module.system.royalcanin.good.service.GoodService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -125,9 +126,9 @@ public class GoodController {
@ApiOperation(value = "删除购物车信息", notes = "删除购物车信息") @ApiOperation(value = "删除购物车信息", notes = "删除购物车信息")
@PostMapping("royalcanin/cancelCartProductInfo") @PostMapping("royalcanin/cancelCartProductInfo")
public ResponseDTO<String> cancelCartProductInfo(String memberId,String[] productCode){ public ResponseDTO<String> cancelCartProductInfo(String memberId,@RequestBody List<String> productCode){
for (int i = 0 ;i < productCode.length;i++) { for (int i = 0 ;i < productCode.size();i++) {
cartService.cancelProduct(memberId,productCode[i].replace("\"", "")); cartService.cancelProduct(memberId,productCode.get(i));
} }
return ResponseDTO.succ(); return ResponseDTO.succ();
} }