Commit deccd845 by 何文超

增加企业id

parent d6a91876
......@@ -34,7 +34,7 @@ public class GoodsBrandController {
@RequestMapping("/goods-brand-list")
public RestResponse goodsBrandList(int pageSize, int currentPage, String search, Long goodsDomainId, String channelCode) {
ServiceResponse<GoodsRightsSelectorDTO> selectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID);
ServiceResponse<GoodsRightsSelectorDTO> selectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID, Constant.TEST_ENTERPRISE_ID);
if (!selectorDTOServiceResponse.isSuccess() || selectorDTOServiceResponse.getResult() == null ||
selectorDTOServiceResponse.getResult().getHasRights() == Constant.NO) {
return RestResponse.success(Collections.EMPTY_LIST);
......
......@@ -53,7 +53,7 @@ public class GoodsDomainController {
*/
@RequestMapping("/get-all-goods-domain-list")
public RestResponse getAllGoodsDomianList() {
ServiceResponse<GoodsRightsSelectorDTO> selectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID);
ServiceResponse<GoodsRightsSelectorDTO> selectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID, Constant.TEST_ENTERPRISE_ID);
if (!selectorDTOServiceResponse.isSuccess() || selectorDTOServiceResponse.getResult() == null ||
selectorDTOServiceResponse.getResult().getHasRights() == Constant.NO) {
return RestResponse.success(Collections.EMPTY_LIST);
......
......@@ -49,7 +49,7 @@ public class GoodsPropertyController {
@RequestMapping("/property-value-list")
public RestResponse propertyValueList(int pageSize, int currentPage, String search, Long specPropertyId) {
ServiceResponse<Page<PropertyValueDTO>> serviceResponse = propertyValueApiService
.pagePropertyValue(currentPage, pageSize, specPropertyId, search, SortType.sortDescType);
.pagePropertyValue(currentPage, pageSize, specPropertyId, search, SortType.sortDescType, Constant.TEST_ENTERPRISE_ID);
if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
......
......@@ -34,6 +34,7 @@ public class GoodsRightsSelectorController {
if (goodsRightsSelectorDTO.getHasRights() == null) {
goodsRightsSelectorDTO.setHasRights(Constant.NO);
}
goodsRightsSelectorDTO.setEnterpriseId(Constant.TEST_ENTERPRISE_ID);
ServiceResponse<GoodsRightsSelectorDTO> serviceResponse = goodsRightsSelectorApiService.saveGoodsRightsSelector(goodsRightsSelectorDTO);
if (serviceResponse.isSuccess()) {
goodsRightsSelectorDTO = serviceResponse.getResult();
......@@ -56,6 +57,7 @@ public class GoodsRightsSelectorController {
if (goodsRightsSelectorDTO.getHasRights() == null) {
goodsRightsSelectorDTO.setHasRights(Constant.NO);
}
goodsRightsSelectorDTO.setEnterpriseId(Constant.TEST_ENTERPRISE_ID);
ServiceResponse<GoodsRightsSelectorDTO> serviceResponse = goodsRightsSelectorApiService.showGoodsRightsSelectorResult(goodsRightsSelectorDTO);
if (serviceResponse.isSuccess()) {
goodsRightsSelectorDTO = serviceResponse.getResult();
......@@ -67,6 +69,7 @@ public class GoodsRightsSelectorController {
@RequestMapping("/goods-rights-selector-update")
public RestResponse goodsRightsSelectorSave(GoodsRightsSelectorUpdateQO goodsRightsSelectorUpdateQO) {
GoodsRightsSelectorDTO goodsRightsSelectorDTO = EntityUtil.changeEntityByOrika(GoodsRightsSelectorDTO.class, goodsRightsSelectorUpdateQO);
goodsRightsSelectorDTO.setEnterpriseId(Constant.TEST_ENTERPRISE_ID);
ServiceResponse<GoodsRightsSelectorDTO> serviceResponse = goodsRightsSelectorApiService.updateGoodsRightsSelector(goodsRightsSelectorDTO);
if (serviceResponse.isSuccess()) {
goodsRightsSelectorDTO = serviceResponse.getResult();
......@@ -77,7 +80,7 @@ public class GoodsRightsSelectorController {
@RequestMapping("/get-goods-rights-selector")
public RestResponse getGoodsRightsSelector(Long goodsRightsSelectorId) {
ServiceResponse<GoodsRightsSelectorDTO> serviceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(goodsRightsSelectorId);
ServiceResponse<GoodsRightsSelectorDTO> serviceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(goodsRightsSelectorId, Constant.TEST_ENTERPRISE_ID);
if (serviceResponse.isSuccess()) {
GoodsRightsSelectorDTO goodsRightsSelectorDTO = serviceResponse.getResult();
return RestResponse.success(EntityUtil.changeEntityByOrika(GoodsRightsSelectorVO.class, goodsRightsSelectorDTO));
......
......@@ -27,7 +27,7 @@ public class GoodsSelectorController {
@RequestMapping("goods-selector-show-back")
public RestResponse goodsSelectorShowBack(Long goodsSelectorId) {
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.getGoodsSelector(goodsSelectorId);
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.getGoodsSelector(goodsSelectorId, Constant.TEST_ENTERPRISE_ID);
if (serviceResponse.isSuccess()) {
return RestResponse.success(serviceResponse.getResult().getGoodsSearchValue());
}
......@@ -36,7 +36,7 @@ public class GoodsSelectorController {
@RequestMapping("get-goods-selector")
public RestResponse getGoodsSelector(Long goodsSelectorId) {
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.getGoodsSelector(goodsSelectorId);
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.getGoodsSelector(goodsSelectorId, Constant.TEST_ENTERPRISE_ID);
if (serviceResponse.isSuccess()) {
GoodsSelectorVO goodsSelectorVO = EntityUtil.changeEntityByOrika(GoodsSelectorVO.class, serviceResponse.getResult());
return RestResponse.success(goodsSelectorVO);
......@@ -47,7 +47,7 @@ public class GoodsSelectorController {
@RequestMapping("goods-selector-edit-show-back")
public RestResponse goodsSelectorEditShowBack(Long goodsSelectorId) {
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.getGoodsSelector(goodsSelectorId);
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.getGoodsSelector(goodsSelectorId, Constant.TEST_ENTERPRISE_ID);
if (serviceResponse.isSuccess()) {
return RestResponse.success(serviceResponse.getResult().getGoodsSearchEdit());
}
......@@ -58,7 +58,7 @@ public class GoodsSelectorController {
public RestResponse goodsSelectorSave(GoodsSelectorSaveQO goodsSelectorSaveQO) {
GoodsSelectorDTO goodsSelectorDTO = EntityUtil.changeEntityByOrika(GoodsSelectorDTO.class, goodsSelectorSaveQO);
goodsSelectorDTO.setEnterpriseId(Constant.TEST_ENTERPRISE_ID);
ServiceResponse<GoodsRightsSelectorDTO> goodsRightsSelectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID);
ServiceResponse<GoodsRightsSelectorDTO> goodsRightsSelectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID, Constant.TEST_ENTERPRISE_ID);
if (!goodsRightsSelectorDTOServiceResponse.isSuccess()) {
return RestResponse.failure(goodsRightsSelectorDTOServiceResponse.getCode(), goodsRightsSelectorDTOServiceResponse.getMessage());
}
......@@ -79,7 +79,7 @@ public class GoodsSelectorController {
public RestResponse goodsSelectorShow(GoodsSelectorSaveQO goodsSelectorSaveQO) {
GoodsSelectorDTO goodsSelectorDTO = EntityUtil.changeEntityByOrika(GoodsSelectorDTO.class, goodsSelectorSaveQO);
goodsSelectorDTO.setEnterpriseId(Constant.TEST_ENTERPRISE_ID);
ServiceResponse<GoodsRightsSelectorDTO> goodsRightsSelectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID);
ServiceResponse<GoodsRightsSelectorDTO> goodsRightsSelectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID, Constant.TEST_ENTERPRISE_ID);
if (!goodsRightsSelectorDTOServiceResponse.isSuccess()) {
return RestResponse.failure(goodsRightsSelectorDTOServiceResponse.getCode(), goodsRightsSelectorDTOServiceResponse.getMessage());
}
......@@ -99,7 +99,7 @@ public class GoodsSelectorController {
@RequestMapping("change-goods-rights-for-selector")
public RestResponse changeGoodsRightsForSelector(Long goodsSelectorId) {
ServiceResponse<GoodsRightsSelectorDTO> goodsRightsSelectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID);
ServiceResponse<GoodsRightsSelectorDTO> goodsRightsSelectorDTOServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(Constant.TEST_GOODS_RIGHTS_SELECTOR_ID, Constant.TEST_ENTERPRISE_ID);
if (!goodsRightsSelectorDTOServiceResponse.isSuccess()) {
return RestResponse.failure(goodsRightsSelectorDTOServiceResponse.getCode(), goodsRightsSelectorDTOServiceResponse.getMessage());
}
......@@ -112,7 +112,7 @@ public class GoodsSelectorController {
}
GoodsRightsSelectorDTO goodsRightsSelectorDTO = goodsRightsSelectorDTOServiceResponse.getResult();
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.updateGoodsSelectorRights(goodsSelectorId,
goodsRightsSelectorDTO.getGoodsRightsSearchText(), goodsRightsSelectorDTO.getGoodsRightsSearchValue(), goodsRightsSelectorDTO.getHasRights());
goodsRightsSelectorDTO.getGoodsRightsSearchText(), goodsRightsSelectorDTO.getGoodsRightsSearchValue(), goodsRightsSelectorDTO.getHasRights(), Constant.TEST_ENTERPRISE_ID);
if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
......@@ -124,6 +124,7 @@ public class GoodsSelectorController {
@RequestMapping("goods-selector-update")
public RestResponse goodsSelectorUpdate(GoodsSelectorUpdateQO goodsSelectorUpdateQO) {
GoodsSelectorDTO goodsSelectorDTO = EntityUtil.changeEntityByOrika(GoodsSelectorDTO.class, goodsSelectorUpdateQO);
goodsSelectorDTO.setEnterpriseId(Constant.TEST_ENTERPRISE_ID);
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.updateGoodsSelector(goodsSelectorDTO);
if (serviceResponse.isSuccess()) {
goodsSelectorDTO = serviceResponse.getResult();
......
......@@ -15,6 +15,7 @@ import com.gic.goods.api.dto.StandardValueGroupDTO;
import com.gic.goods.api.service.StandardApiService;
import com.gic.goods.api.service.StandardValueApiService;
import com.gic.goods.api.service.StandardValueGroupApiService;
import com.gic.goods.api.util.Constant;
import com.gic.plug.web.vo.goods.GoodsStandardVO;
import com.gic.plug.web.vo.goods.GoodsStandardValueGroupVO;
import com.gic.plug.web.vo.goods.GoodsStandardValueVO;
......@@ -33,7 +34,7 @@ public class GoodsStandardController {
@RequestMapping("/list-standard")
public RestResponse listStandard(int currentPage, int pageSize, String search, Long goodsDomainId) {
ServiceResponse<Page<StandardDTO>> serviceResponse = standardApiService.listByPage(currentPage, pageSize, goodsDomainId, search);
ServiceResponse<Page<StandardDTO>> serviceResponse = standardApiService.listByPage(currentPage, pageSize, goodsDomainId, search, Constant.TEST_ENTERPRISE_ID);
if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
......@@ -45,7 +46,7 @@ public class GoodsStandardController {
@RequestMapping("/list-standard-value-group")
public RestResponse listStandardValueGroup(int currentPage, int pageSize, Long specStandardId, String search) {
ServiceResponse<Page<StandardValueGroupDTO>> serviceResponse =
standardValueGroupApiService.listByPage(currentPage, pageSize, specStandardId, search, SortType.sortDescType);
standardValueGroupApiService.listByPage(currentPage, pageSize, specStandardId, search, SortType.sortDescType, Constant.TEST_ENTERPRISE_ID);
if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
......@@ -56,7 +57,7 @@ public class GoodsStandardController {
@RequestMapping("/list-standard-value")
public RestResponse listStandardValue(int currentPage, int pageSize, Long specStandardId, String search, Long specStandardValueGroupId) {
ServiceResponse<Page<StandardValueDTO>> serviceResponse =
standardValueApiService.listByPage(currentPage, pageSize, specStandardId, search, SortType.sortDescType, specStandardValueGroupId);
standardValueApiService.listByPage(currentPage, pageSize, specStandardId, search, SortType.sortDescType, specStandardValueGroupId, Constant.TEST_ENTERPRISE_ID);
if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
......
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