diff --git a/src/main/java/cn/com/tenlion/service/loginappservice/LoginAppServiceImpl.java b/src/main/java/cn/com/tenlion/service/loginappservice/LoginAppServiceImpl.java new file mode 100644 index 0000000..fb69e7b --- /dev/null +++ b/src/main/java/cn/com/tenlion/service/loginappservice/LoginAppServiceImpl.java @@ -0,0 +1,34 @@ +package cn.com.tenlion.service.loginappservice; + +import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; +import cn.com.tenlion.service.traininginstitutionuser.ITrainingInstitutionUserService; +import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.interfaces.expand.login.ILoginAppHandlerService; +import ink.wgink.pojo.bos.LoginAppUser; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Service; + +/** + * @author xwangs + * @create 2021-07-07 14:24 + * @description + */ +@Service +@Primary +public class LoginAppServiceImpl extends DefaultBaseService implements ILoginAppHandlerService { + + @Autowired + private ITrainingInstitutionUserService orgUserService; + + @Override + public void handle(LoginAppUser loginAppUser) throws Exception { + // 查询当前用户是否为机构用户 + // 如果是机构用户,则抛出异常 + InstitutionDTO orgInfo = orgUserService.getByUserId(loginAppUser.getUserId()); + if(orgInfo.getInstitutionId() != null + && !"".equals(orgInfo.getInstitutionId())){ + throw new Exception("机构用户请在首页选择机构登录进行登录"); + } + } +} diff --git a/src/main/resources/static/route/traininginstitution/list.html b/src/main/resources/static/route/traininginstitution/list.html index 0076228..693cf3d 100644 --- a/src/main/resources/static/route/traininginstitution/list.html +++ b/src/main/resources/static/route/traininginstitution/list.html @@ -91,27 +91,7 @@ [ {type:'checkbox', fixed: 'left'}, {field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'}, - {field: 'institutionImage', width: 180, title: '机构图片', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - var value='