|
@@ -13,6 +13,7 @@ import com.usoftchina.saas.document.dto.ProductListDTO;
|
|
|
import com.usoftchina.saas.document.entities.Product;
|
|
import com.usoftchina.saas.document.entities.Product;
|
|
|
import com.usoftchina.saas.document.service.ProductService;
|
|
import com.usoftchina.saas.document.service.ProductService;
|
|
|
import com.usoftchina.saas.page.PageRequest;
|
|
import com.usoftchina.saas.page.PageRequest;
|
|
|
|
|
+import com.usoftchina.saas.utils.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
@@ -85,13 +86,19 @@ public class ProductController {
|
|
|
|
|
|
|
|
@PostMapping("/batchClose")
|
|
@PostMapping("/batchClose")
|
|
|
public Result batchClose(@RequestBody BatchDealBaseDTO baseDTOs){
|
|
public Result batchClose(@RequestBody BatchDealBaseDTO baseDTOs){
|
|
|
- productService.batchClose(baseDTOs);
|
|
|
|
|
|
|
+ String result = productService.batchClose(baseDTOs);
|
|
|
|
|
+ if (!StringUtils.isEmpty(result)){
|
|
|
|
|
+ return Result.error(result);
|
|
|
|
|
+ }
|
|
|
return Result.success();
|
|
return Result.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/batchOpen")
|
|
@PostMapping("/batchOpen")
|
|
|
public Result batchOpen(@RequestBody BatchDealBaseDTO baseDTOs){
|
|
public Result batchOpen(@RequestBody BatchDealBaseDTO baseDTOs){
|
|
|
- productService.batchOpen(baseDTOs);
|
|
|
|
|
|
|
+ String result = productService.batchOpen(baseDTOs);
|
|
|
|
|
+ if (!StringUtils.isEmpty(result)){
|
|
|
|
|
+ return Result.error(result);
|
|
|
|
|
+ }
|
|
|
return Result.success();
|
|
return Result.success();
|
|
|
}
|
|
}
|
|
|
|
|
|