package com.changhong.epc.rely.api.epc.admin; import com.alibaba.fastjson.TypeReference; import com.changhong.epc.bean.tenant.master.AutoMasterVal; import com.changhong.epc.constter.admin.AdminUrlConst; import com.changhong.epc.constter.system.SystemClients; import com.changhong.epc.constter.system.run.EpcRestInterface; import com.changhong.epc.rely.api.epc.BaseApi; import com.iemsoft.framework.cloud.core.base.ResMsg; import com.iemsoft.framework.cloud.core.tools.SpringUtil; import com.iemsoft.framework.cloud.ribbon.RestInterface; import org.springframework.stereotype.Service; @Service public class AdminMasterApi extends BaseApi implements SystemClients, AdminUrlConst { /** * 自定义查询一维通用主数据 * @param autoMasterVal * @return */ public String adminOneDimensional(AutoMasterVal autoMasterVal){ ResMsg resMsg = (ResMsg) SpringUtil.getBean(SERVER_ADMIN.getBeanName(), RestInterface.class) .post(VALUE_GETVALSTRING , autoMasterVal , new TypeReference>(){}.getType() , EpcRestInterface.getEpcHeads() ); assertSuccess(resMsg); return resMsg.getData(); } /** * 自定义查询二维通用主数据 * @param autoMasterVal * @return */ public String adminTwoDimensional(AutoMasterVal autoMasterVal){ ResMsg resMsg = (ResMsg) SpringUtil.getBean(SERVER_ADMIN.getBeanName(), RestInterface.class) .post(ADMIN_MASTER_TWO_DIMENSIONAL , autoMasterVal , new TypeReference>(){}.getType() , EpcRestInterface.getEpcHeads() ); assertSuccess(resMsg); return resMsg.getData(); } }