Commit 289e97aa by 何文超

增加默认值

parent 94e5ffdf
...@@ -38,8 +38,11 @@ public class GoodsBrandController extends BaseGoodsController { ...@@ -38,8 +38,11 @@ public class GoodsBrandController extends BaseGoodsController {
@Autowired @Autowired
private GoodsSelectorApiService goodsSelectorApiService; private GoodsSelectorApiService goodsSelectorApiService;
private static final int DEFAULT_PAGE_SIZE = 999;
@RequestMapping("/goods-brand-list") @RequestMapping("/goods-brand-list")
public RestResponse goodsBrandList(int pageSize, int currentPage, String search, Long goodsDomainId, String channelCode, Long goodsSelectorId) { public RestResponse goodsBrandList(int pageSize, int currentPage, String search, Long goodsDomainId, String channelCode, Long goodsSelectorId) {
pageSize = DEFAULT_PAGE_SIZE;
String goodsRightsBrands = null; String goodsRightsBrands = null;
if (goodsSelectorId != null) { if (goodsSelectorId != null) {
ServiceResponse<GoodsSelectorDTO> selectorServiceResponse = goodsSelectorApiService ServiceResponse<GoodsSelectorDTO> selectorServiceResponse = goodsSelectorApiService
...@@ -91,6 +94,7 @@ public class GoodsBrandController extends BaseGoodsController { ...@@ -91,6 +94,7 @@ public class GoodsBrandController extends BaseGoodsController {
} }
private RestResponse findBrandListByParams(int currentPage, int pageSize, Long goodsDomainId, String search, Integer enterpriseId) { private RestResponse findBrandListByParams(int currentPage, int pageSize, Long goodsDomainId, String search, Integer enterpriseId) {
pageSize = DEFAULT_PAGE_SIZE;
List<Long> branIdList = new ArrayList<>(); List<Long> branIdList = new ArrayList<>();
ServiceResponse<Page<BrandDTO>> serviceResponse = brandApiService.findBrandPage(currentPage, pageSize, goodsDomainId, search, branIdList, SortType.sortDescType, enterpriseId); ServiceResponse<Page<BrandDTO>> serviceResponse = brandApiService.findBrandPage(currentPage, pageSize, goodsDomainId, search, branIdList, SortType.sortDescType, enterpriseId);
if (!serviceResponse.isSuccess()) { if (!serviceResponse.isSuccess()) {
......
...@@ -28,8 +28,12 @@ public class GoodsPropertyController extends BaseGoodsController { ...@@ -28,8 +28,12 @@ public class GoodsPropertyController extends BaseGoodsController {
@Autowired @Autowired
private PropertyValueApiService propertyValueApiService; private PropertyValueApiService propertyValueApiService;
private static final int DEFAULT_PAGE_SIZE = 999;
@RequestMapping("/property-list") @RequestMapping("/property-list")
public RestResponse propertyList(int pageSize, int currentPage, String search, Long goodsDomainId) { public RestResponse propertyList(int pageSize, int currentPage, String search, Long goodsDomainId) {
pageSize = DEFAULT_PAGE_SIZE;
List<String> arrayList = new ArrayList<>(); List<String> arrayList = new ArrayList<>();
arrayList.add(Constant.PROPERTY_TYPE_TEXT); arrayList.add(Constant.PROPERTY_TYPE_TEXT);
arrayList.add(Constant.PROPERTY_TYPE_TIME); arrayList.add(Constant.PROPERTY_TYPE_TIME);
...@@ -47,6 +51,7 @@ public class GoodsPropertyController extends BaseGoodsController { ...@@ -47,6 +51,7 @@ public class GoodsPropertyController extends BaseGoodsController {
@RequestMapping("/property-value-list") @RequestMapping("/property-value-list")
public RestResponse propertyValueList(int pageSize, int currentPage, String search, Long specPropertyId) { public RestResponse propertyValueList(int pageSize, int currentPage, String search, Long specPropertyId) {
pageSize = DEFAULT_PAGE_SIZE;
ServiceResponse<Page<PropertyValueDTO>> serviceResponse = propertyValueApiService ServiceResponse<Page<PropertyValueDTO>> serviceResponse = propertyValueApiService
.pagePropertyValue(currentPage, pageSize, specPropertyId, search, SortType.sortDescType, getEnterpriseId()); .pagePropertyValue(currentPage, pageSize, specPropertyId, search, SortType.sortDescType, getEnterpriseId());
if (!serviceResponse.isSuccess()) { if (!serviceResponse.isSuccess()) {
......
...@@ -30,8 +30,11 @@ public class GoodsStandardController extends BaseGoodsController { ...@@ -30,8 +30,11 @@ public class GoodsStandardController extends BaseGoodsController {
@Autowired @Autowired
private StandardValueGroupApiService standardValueGroupApiService; private StandardValueGroupApiService standardValueGroupApiService;
private static final int DEFAULT_PAGE_SIZE = 999;
@RequestMapping("/list-standard") @RequestMapping("/list-standard")
public RestResponse listStandard(int currentPage, int pageSize, String search, Long goodsDomainId) { public RestResponse listStandard(int currentPage, int pageSize, String search, Long goodsDomainId) {
pageSize = DEFAULT_PAGE_SIZE;
ServiceResponse<Page<StandardDTO>> serviceResponse = standardApiService.listByPage(currentPage, pageSize, goodsDomainId, search, getEnterpriseId()); ServiceResponse<Page<StandardDTO>> serviceResponse = standardApiService.listByPage(currentPage, pageSize, goodsDomainId, search, getEnterpriseId());
if (!serviceResponse.isSuccess()) { if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage()); return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
...@@ -43,6 +46,7 @@ public class GoodsStandardController extends BaseGoodsController { ...@@ -43,6 +46,7 @@ public class GoodsStandardController extends BaseGoodsController {
@RequestMapping("/list-standard-value-group") @RequestMapping("/list-standard-value-group")
public RestResponse listStandardValueGroup(int currentPage, int pageSize, Long specStandardId, String search) { public RestResponse listStandardValueGroup(int currentPage, int pageSize, Long specStandardId, String search) {
pageSize = DEFAULT_PAGE_SIZE;
ServiceResponse<Page<StandardValueGroupDTO>> serviceResponse = ServiceResponse<Page<StandardValueGroupDTO>> serviceResponse =
standardValueGroupApiService.listByPage(currentPage, pageSize, specStandardId, search, SortType.sortDescType, getEnterpriseId()); standardValueGroupApiService.listByPage(currentPage, pageSize, specStandardId, search, SortType.sortDescType, getEnterpriseId());
if (!serviceResponse.isSuccess()) { if (!serviceResponse.isSuccess()) {
...@@ -54,6 +58,7 @@ public class GoodsStandardController extends BaseGoodsController { ...@@ -54,6 +58,7 @@ public class GoodsStandardController extends BaseGoodsController {
@RequestMapping("/list-standard-value") @RequestMapping("/list-standard-value")
public RestResponse listStandardValue(int currentPage, int pageSize, Long specStandardId, String search, Long specStandardValueGroupId) { public RestResponse listStandardValue(int currentPage, int pageSize, Long specStandardId, String search, Long specStandardValueGroupId) {
pageSize = DEFAULT_PAGE_SIZE;
ServiceResponse<Page<StandardValueDTO>> serviceResponse = ServiceResponse<Page<StandardValueDTO>> serviceResponse =
standardValueApiService.listByPage(currentPage, pageSize, specStandardId, search, SortType.sortDescType, specStandardValueGroupId, getEnterpriseId()); standardValueApiService.listByPage(currentPage, pageSize, specStandardId, search, SortType.sortDescType, specStandardValueGroupId, getEnterpriseId());
if (!serviceResponse.isSuccess()) { if (!serviceResponse.isSuccess()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment