代码优化,删除UserAdjoint次要功能
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* 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.dromara.maxkey.persistence.mapper;
|
||||
|
||||
import org.dromara.maxkey.entity.UserInfoAdjoint;
|
||||
import org.dromara.mybatis.jpa.IJpaMapper;
|
||||
|
||||
|
||||
/**
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
public interface UserInfoAdjointMapper extends IJpaMapper<UserInfoAdjoint>{
|
||||
|
||||
|
||||
}
|
||||
@@ -25,7 +25,6 @@ import org.dromara.maxkey.constants.ConstsStatus;
|
||||
import org.dromara.maxkey.entity.ChangePassword;
|
||||
import org.dromara.maxkey.entity.Organizations;
|
||||
import org.dromara.maxkey.entity.UserInfo;
|
||||
import org.dromara.maxkey.entity.UserInfoAdjoint;
|
||||
import org.dromara.mybatis.jpa.IJpaMapper;
|
||||
|
||||
|
||||
@@ -46,8 +45,6 @@ public interface UserInfoMapper extends IJpaMapper<UserInfo>{
|
||||
|
||||
public List<Organizations> findDeptsByUserId(String userId);
|
||||
|
||||
public List<UserInfoAdjoint> findAdjointsByUserId(String userId);
|
||||
|
||||
public void updateLocked(UserInfo userInfo);
|
||||
|
||||
public void updateLockout(UserInfo userInfo);
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* 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.dromara.maxkey.persistence.service;
|
||||
|
||||
import org.dromara.maxkey.entity.UserInfoAdjoint;
|
||||
import org.dromara.maxkey.persistence.mapper.UserInfoAdjointMapper;
|
||||
import org.dromara.mybatis.jpa.JpaService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class UserInfoAdjointService extends JpaService<UserInfoAdjoint>{
|
||||
final static Logger _logger = LoggerFactory.getLogger(UserInfoAdjointService.class);
|
||||
|
||||
|
||||
public UserInfoAdjointService() {
|
||||
super(UserInfoAdjointMapper.class);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.connsec.db.service.BaseService#getMapper()
|
||||
*/
|
||||
@Override
|
||||
public UserInfoAdjointMapper getMapper() {
|
||||
return (UserInfoAdjointMapper)super.getMapper();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -166,7 +166,6 @@ public class UserInfoService extends JpaService<UserInfo> {
|
||||
public UserInfo findUserRelated(String userId) {
|
||||
UserInfo loadUserInfo =this.get(userId);
|
||||
loadUserInfo.setDepts(getMapper().findDeptsByUserId(userId));
|
||||
loadUserInfo.setAdjoints(getMapper().findAdjointsByUserId(userId));
|
||||
return loadUserInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
<?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.dromara.maxkey.persistence.mapper.UserInfoAdjointMapper">
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
and userid = #{userId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<select id="fetchPageResults" parameterType="UserInfoAdjoint" resultType="UserInfoAdjoint">
|
||||
select
|
||||
*
|
||||
from
|
||||
mxk_userinfo_adjunct
|
||||
where
|
||||
instid = #{instId}
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="logisticDelete" parameterType="UserInfoAdjoint" >
|
||||
update mxk_userinfo_adjunct set
|
||||
status = '2'
|
||||
where instid = #{instId}
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="name != name">
|
||||
and NAME = #{name}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="logisticBatchDelete" parameterType="java.util.List">
|
||||
update mxk_userinfo_adjunct
|
||||
set status='2'
|
||||
where instid = #{instId}
|
||||
and id in
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -252,11 +252,4 @@
|
||||
and ua.userid=#{value}
|
||||
</select>
|
||||
|
||||
<select id="findAdjointsByUserId" parameterType="string" resultType="UserInfoAdjoint">
|
||||
select
|
||||
*
|
||||
from mxk_userinfo_adjunct
|
||||
where userid=#{value}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user