企业列表出来了

master
法外狂徒张三 2024-09-09 09:10:54 +08:00
parent a0c77e722f
commit e9e8018fbb
5 changed files with 9 additions and 6 deletions

View File

@ -136,6 +136,6 @@ public class SysApitypeController extends BaseController
if(res!=1||userRole!=null){
return Result.error();
}
return Result.success(sysApitypeService.updateCreateByUserId(userId));
return Result.success(sysApitypeService.insertUserRole(userId));
}
}

View File

@ -17,7 +17,7 @@ import java.util.List;
*/
public interface SysApitypeMapper extends BaseMapper<SysApitype> {
Integer updateCreateByUserId(Long userId);
Integer insertUserRole(Long userId);
UserRole selectUserRoleByUserId(Long userId);
/**

View File

@ -15,7 +15,9 @@ import java.util.List;
*/
@Service
public interface ISysApitypeService extends IService<SysApitype> {
Integer updateCreateByUserId(Long userId);
Integer insertUserRole(Long userId);
UserRole selectUserRoleByUserId(Long userId);
/**

View File

@ -24,8 +24,8 @@ public class SysApitypeServiceImpl extends ServiceImpl<SysApitypeMapper, SysApit
private SysApitypeMapper sysApitypeMapper;
@Override
public Integer updateCreateByUserId(Long userId) {
return sysApitypeMapper.updateCreateByUserId(userId);
public Integer insertUserRole(Long userId) {
return sysApitypeMapper.insertUserRole(userId);
}
@Override

View File

@ -70,7 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where sys_id = #{sysId}
</update>
<insert id="updateCreateByUserId">
<insert id="insertUserRole">
INSERT INTO `sys_user_role` (`user_id`, `role_id`) VALUES (#{userId}, 6);
</insert>