Commit 01fb98f2 by guojuxing

tab_store&tab_store_field_rel&tab_store_region_rel&tab_store_brand_ref own_type改成owner_flag

parent c864ef22
......@@ -97,9 +97,9 @@ public class ScreeningController {
EsScreeningChainDetailDTO item = this.esScreeningInitService.findRootChainByCategoryId(categoryId);
String widgetValues = item.getWidget().getWidgetValues();
if (StringUtils.isNotBlank(widgetValues)) {
List<WidgetValuesOldVO> oldVOS = JSONObject.parseArray(widgetValues, WidgetValuesOldVO.class);
List<WidgetValuesNewVO> newVOList = oldVOS.stream().map(data -> new WidgetValuesNewVO(data.getKey(), data.getValue(), data.getName())).collect(Collectors.toList());
item.getWidget().setWidgetValues(JSON.toJSONString(newVOList));
List<WidgetValuesOldVO> oldVos = JSONObject.parseArray(widgetValues, WidgetValuesOldVO.class);
List<WidgetValuesNewVO> newVoList = oldVos.stream().map(data -> new WidgetValuesNewVO(data.getKey(), data.getValue(), data.getName())).collect(Collectors.toList());
item.getWidget().setWidgetValues(JSON.toJSONString(newVoList));
}
all.add(item);
}
......@@ -114,9 +114,9 @@ public class ScreeningController {
if (CollectionUtils.isNotEmpty(list)) {
list = list.stream().peek(item -> {
if (StringUtils.isNotBlank(item.getWidget().getWidgetValues())) {
List<WidgetValuesOldVO> oldVOS = JSONObject.parseArray(item.getWidget().getWidgetValues(), WidgetValuesOldVO.class);
List<WidgetValuesNewVO> newVOList = oldVOS.stream().map(data -> new WidgetValuesNewVO(data.getKey(), data.getValue(), data.getName())).collect(Collectors.toList());
item.getWidget().setWidgetValues(JSON.toJSONString(newVOList));
List<WidgetValuesOldVO> oldVos = JSONObject.parseArray(item.getWidget().getWidgetValues(), WidgetValuesOldVO.class);
List<WidgetValuesNewVO> newVoList = oldVos.stream().map(data -> new WidgetValuesNewVO(data.getKey(), data.getValue(), data.getName())).collect(Collectors.toList());
item.getWidget().setWidgetValues(JSON.toJSONString(newVoList));
}
}).collect(Collectors.toList());
}
......@@ -141,9 +141,9 @@ public class ScreeningController {
public Object getScreeningWidgetDetail(String widgetChainId) {
EsScreeningChainDetailDTO dto = this.esScreeningInitService.findChainDetail(widgetChainId);
if (dto != null && dto.getWidget() != null && StringUtils.isNotBlank(dto.getWidget().getWidgetValues())) {
List<WidgetValuesOldVO> oldVOS = JSONObject.parseArray(dto.getWidget().getWidgetValues(), WidgetValuesOldVO.class);
List<WidgetValuesNewVO> newVOList = oldVOS.stream().map(data -> new WidgetValuesNewVO(data.getKey(), data.getValue(), data.getName())).collect(Collectors.toList());
dto.getWidget().setWidgetValues(JSON.toJSONString(newVOList));
List<WidgetValuesOldVO> oldVos = JSONObject.parseArray(dto.getWidget().getWidgetValues(), WidgetValuesOldVO.class);
List<WidgetValuesNewVO> newVoList = oldVos.stream().map(data -> new WidgetValuesNewVO(data.getKey(), data.getValue(), data.getName())).collect(Collectors.toList());
dto.getWidget().setWidgetValues(JSON.toJSONString(newVoList));
}
return RestResponse.success(dto);
}
......
......@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import com.gic.enterprise.dto.EnterpriseDTO;
import com.gic.enterprise.service.EnterpriseApiService;
import com.gic.plug.web.vo.widget.StoreWidgetInterfaceShareVO;
import com.gic.store.constant.StoreOwnerFlagEnum;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -47,7 +48,7 @@ public class StoreBrandController {
List<StoreWidgetInterfaceShareVO> voList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(list)) {
//共享类型
List<Integer> brandIdList = list.stream().filter(e -> Objects.equals(e.getType(), 2))
List<Integer> brandIdList = list.stream().filter(e -> Objects.equals(e.getOwnerFlag(), StoreOwnerFlagEnum.OTHER.getCode()))
.mapToInt(e -> e.getStoreBrandId())
.boxed()
.collect(Collectors.toList());
......@@ -59,10 +60,10 @@ public class StoreBrandController {
if (brandResponse.isSuccess() && CollectionUtils.isNotEmpty(brandResponse.getResult())) {
List<StoreBrandDTO> brandList = brandResponse.getResult();
List<Integer> enterpriseIdList = brandList.stream()
.filter(e -> Objects.equals(e.getType(), 1))
.filter(e -> Objects.equals(e.getOwnerFlag(), StoreOwnerFlagEnum.OWNER.getCode()))
.mapToInt(e -> e.getEnterpriseId()).boxed()
.collect(Collectors.toList());
brandIdMap = brandList.stream().filter(e -> Objects.equals(e.getType(), 1))
brandIdMap = brandList.stream().filter(e -> Objects.equals(e.getOwnerFlag(), StoreOwnerFlagEnum.OWNER.getCode()))
.collect(Collectors.toMap(e -> e.getStoreBrandId(), e -> e.getEnterpriseId()));
ServiceResponse<List<EnterpriseDTO>> enterpriseResponse = enterpriseApiService.listEnterpriseByIds(enterpriseIdList);
......@@ -79,7 +80,7 @@ public class StoreBrandController {
vo.setLabel(e.getStoreBrandName());
vo.setValue(e.getStoreBrandId().toString());
//共享类型
if (Objects.equals(e.getType(), 2)) {
if (Objects.equals(e.getOwnerFlag(), StoreOwnerFlagEnum.OTHER.getCode())) {
Integer tempEnterpriseId = finalBrandIdMap.get(e.getStoreBrandId());
vo.setEnterpriseName(finalEnterpriseMap.get(tempEnterpriseId));
}
......
......@@ -252,7 +252,6 @@ public class StoreController {
public RestResponse getStoreWidget(Integer storeWidgetId) throws ClassNotFoundException {
ServiceResponse<StoreWidgetDTO> response = this.storeWidgetApiService.getStoreWidget(storeWidgetId);
StoreWidgetVO storeWidgetVO = EntityUtil.changeEntityByJSON(StoreWidgetVO.class, response.getResult());
// storeWidgetVO.setScreenBack(this.getScreenBack(storeWidgetVO.getSearchParam()));
return RestResponse.success(storeWidgetVO);
}
......@@ -289,7 +288,6 @@ public class StoreController {
StoreResourceVO vo = EntityUtil.changeEntityNew(StoreResourceVO.class, storeWidgetDTO);
vo.setSearchJson(storeWidgetDTO.getSearchParam());
// vo.setSceenBack(getScreenBack(storeWidgetDTO.getSearchParam()));
return vo;
}
}
......
......@@ -15,7 +15,13 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 门店类型
* @ClassName:
* @Description: 

* @author guojuxing

* @date 2021/7/28 10:37 AM

*/
@RestController
@RequestMapping("/store-type")
public class StoreTypeController {
......
package com.gic.plug.web.controller.goods;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
......@@ -13,18 +23,8 @@ import com.gic.goods.api.dto.GoodsRightsSelectorDTO;
import com.gic.goods.api.dto.GoodsSelectorDTO;
import com.gic.goods.api.service.BrandApiService;
import com.gic.goods.api.service.GoodsRightsSelectorApiService;
import com.gic.goods.api.service.GoodsSelectorApiService;
import com.gic.goods.api.util.Constant;
import com.gic.plug.web.vo.goods.GoodsBrandVO;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* 商品
* @ClassName: GoodsBrandController

......@@ -41,9 +41,6 @@ public class GoodsBrandController extends BaseGoodsController {
@Autowired
private GoodsRightsSelectorApiService goodsRightsSelectorApiService;
@Autowired
private GoodsSelectorApiService goodsSelectorApiService;
private static final int DEFAULT_PAGE_SIZE = 999;
@RequestMapping("/goods-brand-list")
......@@ -51,13 +48,8 @@ public class GoodsBrandController extends BaseGoodsController {
pageSize = DEFAULT_PAGE_SIZE;
String goodsRightsBrands = null;
if (goodsSelectorId != null) {
ServiceResponse<GoodsSelectorDTO> selectorServiceResponse = goodsSelectorApiService
.getGoodsSelector(goodsSelectorId, getEnterpriseId());
if (selectorServiceResponse.getResult() != null) {
goodsRightsBrands = selectorServiceResponse.getResult().getGoodsRightsBrands();
} else {
return RestResponse.success(Collections.EMPTY_LIST);
}
} else {
Long resourceId = UserDetailUtils.getUserDetail().getGoodsResourceInfo() == null ? null :
UserDetailUtils.getUserDetail().getGoodsResourceInfo().getGoodsResourceId();
......
package com.gic.plug.web.controller.goods;
import java.util.*;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.ServiceResponse;
......@@ -10,17 +18,9 @@ import com.gic.goods.api.dto.GoodsRightsSelectorDTO;
import com.gic.goods.api.dto.GoodsSelectorDTO;
import com.gic.goods.api.service.GoodsDomainApiService;
import com.gic.goods.api.service.GoodsRightsSelectorApiService;
import com.gic.goods.api.service.GoodsSelectorApiService;
import com.gic.goods.api.util.Constant;
import com.gic.plug.web.vo.goods.GoodsChannelVO;
import com.gic.plug.web.vo.goods.GoodsDomainVO;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
/**
* 门店
* @ClassName: GoodsDomainController

......@@ -37,8 +37,6 @@ public class GoodsDomainController extends BaseGoodsController {
@Autowired
private GoodsRightsSelectorApiService goodsRightsSelectorApiService;
@Autowired
private GoodsSelectorApiService goodsSelectorApiService;
/**
* @return com.gic.commons.webapi.reponse.RestResponse
......@@ -69,14 +67,7 @@ public class GoodsDomainController extends BaseGoodsController {
String goodsDomian = null;
Integer hasRights = 0;
if (goodsSelectorId != null) {
ServiceResponse<GoodsSelectorDTO> selectorServiceResponse = goodsSelectorApiService
.getGoodsSelector(goodsSelectorId, getEnterpriseId());
if (selectorServiceResponse.getResult() != null) {
goodsDomian = selectorServiceResponse.getResult().getGoodsRightsBrands();
hasRights = selectorServiceResponse.getResult().getHasRights();
} else {
return RestResponse.success(Collections.EMPTY_LIST);
}
} else {
Long resourceId = UserDetailUtils.getUserDetail().getGoodsResourceInfo() == null ? null :
UserDetailUtils.getUserDetail().getGoodsResourceInfo().getGoodsResourceId();
......
......@@ -27,7 +27,7 @@ public class GoodsRightsSelectorController extends BaseGoodsController {
@Autowired
private GoodsRightsSelectorApiService goodsRightsSelectorApiService;
private Logger log = LogManager.getLogger(GoodsSelectorController.class);
private Logger log = LogManager.getLogger(GoodsRightsSelectorController.class);
/**
* @Title: BaseGoodsController
......
package com.gic.plug.web.controller.goods;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
......@@ -7,16 +13,10 @@ import com.gic.enterprise.utils.UserDetailUtils;
import com.gic.goods.api.dto.GoodsRightsSelectorDTO;
import com.gic.goods.api.dto.GoodsSelectorDTO;
import com.gic.goods.api.service.GoodsRightsSelectorApiService;
import com.gic.goods.api.service.GoodsSelectorApiService;
import com.gic.mall.base.api.enums.ErrorCodeEnums;
import com.gic.plug.web.qo.goods.GoodsSelectorSaveQO;
import com.gic.plug.web.qo.goods.GoodsSelectorUpdateQO;
import com.gic.plug.web.vo.goods.GoodsSelectorVO;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 商品
* @ClassName: GoodsSelectorController

......@@ -27,8 +27,6 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class GoodsSelectorController extends BaseGoodsController {
@Autowired
private GoodsSelectorApiService goodsSelectorApiService;
@Autowired
private GoodsRightsSelectorApiService goodsRightsSelectorApiService;
......@@ -37,146 +35,46 @@ public class GoodsSelectorController extends BaseGoodsController {
@RequestMapping("goods-selector-show-back")
public RestResponse goodsSelectorShowBack(Long goodsSelectorId) {
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.getGoodsSelector(goodsSelectorId, getEnterpriseId());
if (serviceResponse.isSuccess()) {
return RestResponse.success(serviceResponse.getResult().getGoodsSearchValue());
}
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
return RestResponse.success();
}
@RequestMapping("get-goods-selector")
public RestResponse getGoodsSelector(Long goodsSelectorId) {
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.getGoodsSelector(goodsSelectorId, getEnterpriseId());
if (serviceResponse.isSuccess()) {
GoodsSelectorVO goodsSelectorVO = EntityUtil.changeEntityByOrika(GoodsSelectorVO.class, serviceResponse.getResult());
return RestResponse.success(goodsSelectorVO);
}
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
return RestResponse.success();
}
@RequestMapping("goods-selector-edit-show-back")
public RestResponse goodsSelectorEditShowBack(Long goodsSelectorId) {
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.getGoodsSelector(goodsSelectorId, getEnterpriseId());
if (serviceResponse.isSuccess()) {
return RestResponse.success(serviceResponse.getResult().getGoodsSearchEdit());
}
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
return RestResponse.success();
}
@RequestMapping("goods-selector-save")
public RestResponse goodsSelectorSave(GoodsSelectorSaveQO goodsSelectorSaveQO) {
GoodsSelectorDTO goodsSelectorDTO = EntityUtil.changeEntityByOrika(GoodsSelectorDTO.class, goodsSelectorSaveQO);
goodsSelectorDTO.setEnterpriseId(getEnterpriseId());
Long resourceId = UserDetailUtils.getUserDetail().getGoodsResourceInfo() == null ? null :
UserDetailUtils.getUserDetail().getGoodsResourceInfo().getGoodsResourceId();
ServiceResponse<GoodsRightsSelectorDTO> goodsRightsSelectorDtoServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(resourceId,
getEnterpriseId(), UserDetailUtils.getUserDetail().getUserInfo().getSuperAdmin());
if (!goodsRightsSelectorDtoServiceResponse.isSuccess()) {
return RestResponse.failure(goodsRightsSelectorDtoServiceResponse.getCode(), goodsRightsSelectorDtoServiceResponse.getMessage());
}
GoodsRightsSelectorDTO goodsRightsSelectorDTO = goodsRightsSelectorDtoServiceResponse.getResult();
goodsSelectorDTO.setHasRights(goodsRightsSelectorDTO.getHasRights());
goodsSelectorDTO.setGoodsSearchRightValue(goodsRightsSelectorDTO.getGoodsRightsSearchValue());
goodsSelectorDTO.setGoodsSearchRightText(goodsRightsSelectorDTO.getGoodsRightsSearchText());
goodsSelectorDTO.setGoodsRightsBrands(goodsRightsSelectorDTO.getGoodsRightsBrands());
goodsSelectorDTO.setGoodsRightsDomains(goodsRightsSelectorDTO.getGoodsRightsDomains());
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.saveGoodsSelector(goodsSelectorDTO);
if (serviceResponse.isSuccess()) {
goodsSelectorDTO = serviceResponse.getResult();
GoodsSelectorVO goodsSelectorVO = EntityUtil.changeEntityByOrika(GoodsSelectorVO.class, goodsSelectorDTO);
return RestResponse.success(goodsSelectorVO);
}
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
return RestResponse.success();
}
@RequestMapping("goods-selector-show")
public RestResponse goodsSelectorShow(GoodsSelectorSaveQO goodsSelectorSaveQO) {
GoodsSelectorDTO goodsSelectorDTO = EntityUtil.changeEntityByOrika(GoodsSelectorDTO.class, goodsSelectorSaveQO);
goodsSelectorDTO.setEnterpriseId(getEnterpriseId());
Long resourceId = UserDetailUtils.getUserDetail().getGoodsResourceInfo() == null ? null :
UserDetailUtils.getUserDetail().getGoodsResourceInfo().getGoodsResourceId();
ServiceResponse<GoodsRightsSelectorDTO> goodsRightsSelectorDtoServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(resourceId,
getEnterpriseId(), UserDetailUtils.getUserDetail().getUserInfo().getSuperAdmin());
if (!goodsRightsSelectorDtoServiceResponse.isSuccess()) {
return RestResponse.failure(goodsRightsSelectorDtoServiceResponse.getCode(), goodsRightsSelectorDtoServiceResponse.getMessage());
}
GoodsRightsSelectorDTO goodsRightsSelectorDTO = goodsRightsSelectorDtoServiceResponse.getResult();
goodsSelectorDTO.setHasRights(goodsRightsSelectorDTO.getHasRights());
goodsSelectorDTO.setGoodsSearchRightValue(goodsRightsSelectorDTO.getGoodsRightsSearchValue());
goodsSelectorDTO.setGoodsSearchRightText(goodsRightsSelectorDTO.getGoodsRightsSearchText());
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.showGoodsSelector(goodsSelectorDTO);
if (serviceResponse.isSuccess()) {
goodsSelectorDTO = serviceResponse.getResult();
GoodsSelectorVO goodsSelectorVO = EntityUtil.changeEntityByOrika(GoodsSelectorVO.class, goodsSelectorDTO);
return RestResponse.success(goodsSelectorVO);
}
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
return RestResponse.success();
}
@RequestMapping("change-goods-rights-for-selector")
public RestResponse changeGoodsRightsForSelector(Long goodsSelectorId) {
if (goodsSelectorId == null) {
Long resourceId = UserDetailUtils.getUserDetail().getGoodsResourceInfo() == null ? null:UserDetailUtils.getUserDetail().getGoodsResourceInfo().getGoodsResourceId();
ServiceResponse<GoodsRightsSelectorDTO> serviceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(resourceId,
getEnterpriseId(), UserDetailUtils.getUserDetail().getUserInfo().getSuperAdmin());
if (serviceResponse.getResult() == null) {
return RestResponse.failure(ErrorCodeEnums.MAll_ERR.getCode(), "没有权限");
}
GoodsRightsSelectorDTO goodsRightsSelectorDTO = new GoodsRightsSelectorDTO();
goodsRightsSelectorDTO.setHasRights(serviceResponse.getResult().getHasRights());
goodsRightsSelectorDTO.setGoodsRightsSearchText(serviceResponse.getResult().getGoodsRightsSearchText());
goodsRightsSelectorDTO.setGoodsRightsSearchValue(serviceResponse.getResult().getGoodsRightsSearchValue());
return RestResponse.success(goodsRightsSelectorDTO);
}
Long resourceId = UserDetailUtils.getUserDetail().getGoodsResourceInfo() == null ? null :
UserDetailUtils.getUserDetail().getGoodsResourceInfo().getGoodsResourceId();
ServiceResponse<GoodsRightsSelectorDTO> goodsRightsSelectorDtoServiceResponse = goodsRightsSelectorApiService.getGoodsRightsSelector(resourceId,
getEnterpriseId(), UserDetailUtils.getUserDetail().getUserInfo().getSuperAdmin());
if (!goodsRightsSelectorDtoServiceResponse.isSuccess()) {
return RestResponse.failure(goodsRightsSelectorDtoServiceResponse.getCode(), goodsRightsSelectorDtoServiceResponse.getMessage());
}
if (goodsSelectorId == null) {
GoodsRightsSelectorDTO goodsRightsSelectorDTO = new GoodsRightsSelectorDTO();
goodsRightsSelectorDTO.setGoodsRightsSearchText(goodsRightsSelectorDtoServiceResponse.getResult().getGoodsRightsSearchText());
goodsRightsSelectorDTO.setGoodsRightsSearchValue(goodsRightsSelectorDtoServiceResponse.getResult().getGoodsRightsSearchValue());
goodsRightsSelectorDTO.setHasRights(goodsRightsSelectorDtoServiceResponse.getResult().getHasRights());
return RestResponse.success(goodsRightsSelectorDTO);
}
GoodsRightsSelectorDTO goodsRightsSelectorDTO = goodsRightsSelectorDtoServiceResponse.getResult();
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.updateGoodsSelectorRights(goodsSelectorId,
goodsRightsSelectorDTO.getGoodsRightsSearchText(), goodsRightsSelectorDTO.getGoodsRightsSearchValue(), goodsRightsSelectorDTO.getHasRights(), goodsRightsSelectorDTO.getGoodsRightsBrands(), goodsRightsSelectorDTO.getGoodsRightsDomains(), getEnterpriseId());
if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
goodsRightsSelectorDTO = new GoodsRightsSelectorDTO();
goodsRightsSelectorDTO.setGoodsRightsSearchText(serviceResponse.getResult().getGoodsSearchRightText());
goodsRightsSelectorDTO.setGoodsRightsSearchValue(serviceResponse.getResult().getGoodsSearchRightValue());
goodsRightsSelectorDTO.setHasRights(serviceResponse.getResult().getHasRights());
return RestResponse.success(goodsRightsSelectorDTO);
return RestResponse.success();
}
@RequestMapping("goods-selector-update")
public RestResponse goodsSelectorUpdate(GoodsSelectorUpdateQO goodsSelectorUpdateQO) {
GoodsSelectorDTO goodsSelectorDTO = EntityUtil.changeEntityByOrika(GoodsSelectorDTO.class, goodsSelectorUpdateQO);
goodsSelectorDTO.setEnterpriseId(getEnterpriseId());
ServiceResponse<GoodsSelectorDTO> serviceResponse = goodsSelectorApiService.updateGoodsSelector(goodsSelectorDTO);
if (serviceResponse.isSuccess()) {
goodsSelectorDTO = serviceResponse.getResult();
GoodsSelectorVO goodsSelectorVO = EntityUtil.changeEntityByOrika(GoodsSelectorVO.class, goodsSelectorDTO);
return RestResponse.success(goodsSelectorVO);
}
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
return RestResponse.success();
}
@RequestMapping("check-selector-goods-hit")
public RestResponse checkSelectorGoodsHit(Long goodsSelectorId, String goodsCode, String skuCode) {
ServiceResponse<Boolean> serviceResponse =
goodsSelectorApiService.isSelectorHitGoods(goodsSelectorId, skuCode, goodsCode, getEnterpriseId());
return RestResponse.success(serviceResponse.getResult());
return RestResponse.success();
}
}
......@@ -46,4 +46,13 @@ public class WidgetValuesNewVO implements Serializable {
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "WidgetValuesNewVO{" +
"key='" + key + '\'' +
", label='" + label + '\'' +
", value='" + value + '\'' +
'}';
}
}
......@@ -37,4 +37,13 @@ public class WidgetValuesOldVO implements Serializable {
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "WidgetValuesOldVO{" +
"key='" + key + '\'' +
", value='" + value + '\'' +
", name='" + name + '\'' +
'}';
}
}
......@@ -50,7 +50,12 @@ public class StoreWidgetInterfaceVO implements Serializable{
return this;
}
public static long getSerialVersionUID() {
return serialVersionUID;
@Override
public String toString() {
return "StoreWidgetInterfaceVO{" +
"value='" + value + '\'' +
", label='" + label + '\'' +
", key='" + key + '\'' +
'}';
}
}
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