package cn.autoform.web.service.forminterface; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import cn.autoform.db.entity.FormInterfaceEntity; import cn.autoform.web.mapper.forminterface.FormInterfaceMapper; import cn.autoform.web.service.common.CommonService; /** * * @author liumy * */ @Service public class FormInterfaceService { @Autowired private FormInterfaceMapper formInterfaceMapper = null; @Autowired private CommonService commonService = null; /** * 新增一个接口 * @param tenantID * @param formid * @param strInterface * @param createUser * @return */ public int createFormInterface(FormInterfaceEntity formInterfaceEntity) { String strCode = formInterfaceEntity.getInterfaceName(); String strcontent = commonService.queryValueByCode("004", "000", strCode); formInterfaceEntity.setInterfaceName(strcontent == null ? strCode : strcontent); return formInterfaceMapper.createFormInterface(formInterfaceEntity); } /** * 表单接口管理表中取出数据 * @param tenantID * @param formID * @return */ public List getFormInterfaceList(String tenantID, String formID) { return formInterfaceMapper.getFormInterfaceList(tenantID, formID); } /** * 删除一个接口 * @param tenantID * @param formID * @param interfaceName * @return */ public int deleteFormInterface(String tenantID, String formID, String interfaceName) { return formInterfaceMapper.deleteFormInterface(tenantID, formID, interfaceName); } }