| | |
| | | package com.ruoyi.aftersalesservice.controller; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.aftersalesservice.dto.AfterSalesServiceExeclDto; |
| | |
| | | @ApiOperation("售后服务-修改") |
| | | @Log(title = "售后服务-修改", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody AfterSalesServiceNewDto afterSalesServiceNewDto) { |
| | | if (afterSalesServiceNewDto.getProductModelIdList() != null && afterSalesServiceNewDto.getProductModelIdList().isEmpty() ) { |
| | | if (afterSalesServiceNewDto.getProductModelIdList() != null && !afterSalesServiceNewDto.getProductModelIdList().isEmpty() ) { |
| | | String productModelIds = afterSalesServiceNewDto.getProductModelIdList().stream() |
| | | .map(String::valueOf) |
| | | .collect(Collectors.joining(",")); |
| | | afterSalesServiceNewDto.setProductModelIds(productModelIds); |
| | | } |
| | | if (afterSalesServiceNewDto.getAfterSalesProductList() != null && !afterSalesServiceNewDto.getAfterSalesProductList().isEmpty()) { |
| | | afterSalesServiceNewDto.setAfterSalesProducts(JSON.toJSONString(afterSalesServiceNewDto.getAfterSalesProductList())); |
| | | } |
| | | boolean update = afterSalesServiceService.updateById(afterSalesServiceNewDto); |
| | | return update ? AjaxResult.success() : AjaxResult.error(); |
| | | } |