JWT独立子项目

This commit is contained in:
Crystal.Sea
2020-11-22 23:19:51 +08:00
parent 4f34978336
commit a526e7a596
24 changed files with 903 additions and 35 deletions

View File

@@ -0,0 +1,33 @@
/*
* Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*
*/
package org.maxkey.persistence.mapper;
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
import org.maxkey.domain.apps.AppsJwtDetails;
/**
* @author Crystal.sea
*
*/
public interface AppsJwtDetailsMapper extends IJpaBaseMapper<AppsJwtDetails> {
public AppsJwtDetails getAppDetails(String id);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright [2020] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.maxkey.persistence.service;
import org.apache.mybatis.jpa.persistence.JpaBaseService;
import org.maxkey.domain.apps.AppsJwtDetails;
import org.maxkey.persistence.mapper.AppsJwtDetailsMapper;
import org.springframework.stereotype.Service;
@Service
public class AppsJwtDetailsService extends JpaBaseService<AppsJwtDetails>{
public AppsJwtDetailsService() {
super(AppsJwtDetailsMapper.class);
}
/* (non-Javadoc)
* @see com.connsec.db.service.BaseService#getMapper()
*/
@Override
public AppsJwtDetailsMapper getMapper() {
// TODO Auto-generated method stub
return (AppsJwtDetailsMapper)super.getMapper();
}
public AppsJwtDetails getAppDetails(String id) {
return getMapper().getAppDetails(id);
}
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.maxkey.persistence.mapper.AppsJwtDetailsMapper">
<select id="getAppDetails" parameterType="string" resultType="AppsJwtDetails">
SELECT
*
FROM
MXK_APPS_JWT_DETAILS JD,
MXK_APPS APP
WHERE
APP.ID = #{value}
AND JD.ID = #{value}
AND JD.ID = APP.ID
AND STATUS = 1
</select>
</mapper>