|
@@ -2,6 +2,7 @@ package com.java110.store.cmd.resourceStore;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.java110.core.annotation.Java110Cmd;
|
|
import com.java110.core.annotation.Java110Cmd;
|
|
|
|
|
+import com.java110.core.context.CmdContextUtils;
|
|
|
import com.java110.core.context.ICmdDataFlowContext;
|
|
import com.java110.core.context.ICmdDataFlowContext;
|
|
|
import com.java110.core.event.cmd.Cmd;
|
|
import com.java110.core.event.cmd.Cmd;
|
|
|
import com.java110.core.event.cmd.CmdEvent;
|
|
import com.java110.core.event.cmd.CmdEvent;
|
|
@@ -16,6 +17,7 @@ import com.java110.intf.store.IResourceStoreInnerServiceSMO;
|
|
|
import com.java110.utils.exception.CmdException;
|
|
import com.java110.utils.exception.CmdException;
|
|
|
import com.java110.utils.util.Assert;
|
|
import com.java110.utils.util.Assert;
|
|
|
import com.java110.utils.util.BeanConvertUtil;
|
|
import com.java110.utils.util.BeanConvertUtil;
|
|
|
|
|
+import com.java110.utils.util.StringUtil;
|
|
|
import com.java110.vo.api.resourceStore.ApiResourceStoreDataVo;
|
|
import com.java110.vo.api.resourceStore.ApiResourceStoreDataVo;
|
|
|
import com.java110.vo.api.resourceStore.ApiResourceStoreVo;
|
|
import com.java110.vo.api.resourceStore.ApiResourceStoreVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -155,13 +157,18 @@ public class ListResourceStoresCmd extends Cmd {
|
|
|
@Override
|
|
@Override
|
|
|
public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
|
|
public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
|
|
|
super.validatePageInfo(reqJson);
|
|
super.validatePageInfo(reqJson);
|
|
|
- Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含小区ID");
|
|
|
|
|
|
|
+
|
|
|
Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含商户ID");
|
|
Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含商户ID");
|
|
|
|
|
+ if(!reqJson.containsKey("shId") || StringUtil.isEmpty(reqJson.getString("shId"))) {
|
|
|
|
|
+ Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含小区ID");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
|
|
public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
|
|
|
|
|
+ String storeId = CmdContextUtils.getStoreId(context);
|
|
|
ResourceStoreDto resourceStoreDto = BeanConvertUtil.covertBean(reqJson, ResourceStoreDto.class);
|
|
ResourceStoreDto resourceStoreDto = BeanConvertUtil.covertBean(reqJson, ResourceStoreDto.class);
|
|
|
|
|
+ resourceStoreDto.setStoreId(storeId);
|
|
|
//采购2806集团仓库 物品领用2807小区仓库 默认查询当前小区所有商品
|
|
//采购2806集团仓库 物品领用2807小区仓库 默认查询当前小区所有商品
|
|
|
//是否具有查看集团仓库物品权限
|
|
//是否具有查看集团仓库物品权限
|
|
|
String userId = reqJson.getString("userId");
|
|
String userId = reqJson.getString("userId");
|