wuxw
2020-02-16 2bc6d9750e3806337f2d920b06ed464230158888
WebService/src/main/java/com/java110/web/smo/impl/PrivilegeServiceSMOImpl.java
@@ -5,7 +5,7 @@
import com.java110.utils.constant.ServiceConstant;
import com.java110.utils.util.Assert;
import com.java110.core.context.IPageData;
import com.java110.web.core.BaseComponentSMO;
import com.java110.core.component.BaseComponentSMO;
import com.java110.web.smo.IPrivilegeServiceSMO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
@@ -70,9 +70,10 @@
        Assert.jsonObjectHaveKey(privilegeInfoObj,"pgId","请求报文中未包含pgId 节点");
        String pgId = privilegeInfoObj.getString("pgId");
        String name = privilegeInfoObj.getString("name");
        ResponseEntity<String> privilegeGroup = super.callCenterService(restTemplate,pd,"",
                ServiceConstant.SERVICE_API_URL+"/api/query.privilege.byPgId?pgId="+pgId , HttpMethod.GET);
                ServiceConstant.SERVICE_API_URL+"/api/query.privilege.byPgId?pgId="+pgId+"&name="+name , HttpMethod.GET);
        if(privilegeGroup.getStatusCode() != HttpStatus.OK){
            return privilegeGroup;
        }
@@ -195,7 +196,10 @@
        JSONObject privilegeInfoObj = JSONObject.parseObject(pd.getReqData());
        Assert.jsonObjectHaveKey(privilegeInfoObj,"pgId","请求报文中未包含权限组ID 节点");
        Assert.jsonObjectHaveKey(privilegeInfoObj,"pId","请求报文中未包含权限ID 节点");
        //Assert.jsonObjectHaveKey(privilegeInfoObj,"pId","请求报文中未包含权限ID 节点");
        if(!privilegeInfoObj.containsKey("pIds") || privilegeInfoObj.getJSONArray("pIds").size() <1){
            throw new IllegalArgumentException("请求报文中未包含权限");
        }
        ResponseEntity<String> storeInfo = super.getStoreInfo(pd,restTemplate);