wuxw пре 3 година
родитељ
комит
ca6dec9fa0

+ 5 - 0
service-store/src/main/java/com/java110/store/cmd/store/QueryStoreByUserCmd.java

@@ -9,6 +9,7 @@ import com.java110.service.context.DataQuery;
 import com.java110.service.smo.IQueryServiceSMO;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
+import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -31,6 +32,10 @@ public class QueryStoreByUserCmd extends Cmd {
     public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
         String userId = event.getCmdDataFlowContext().getReqHeaders().get("user-id");
 
+        if(StringUtil.isEmpty(userId)){
+            userId = reqJson.getString("userId");
+        }
+
         DataQuery dataQuery = new DataQuery();
         dataQuery.setServiceCode("query.store.byuser");
         JSONObject param = new JSONObject();