ui button style & update status

This commit is contained in:
MaxKey
2022-05-24 09:09:24 +08:00
parent 1f5c9922f6
commit 9ab56c7803
41 changed files with 832 additions and 445 deletions
@@ -24,6 +24,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
import org.maxkey.entity.Accounts;
import org.maxkey.entity.AccountsStrategy;
@@ -44,4 +45,7 @@ public interface AccountsMapper extends IJpaBaseMapper<Accounts> {
@Select("select * from mxk_accounts where appid=#{appId} and relatedusername=#{relatedUsername}")
public List<Accounts> queryByAppIdAndAccount(@Param ("appId") String appId,@Param ("relatedUsername") String relatedUsername);
@Update("update mxk_accounts set status = #{status} where id= #{id}")
public int updateStatus(Accounts accounts);
}
@@ -74,4 +74,7 @@ public interface UserInfoMapper extends IJpaBaseMapper<UserInfo>{
@Update("update mxk_userinfo set gridlist = #{gridList} where id = #{id}")
public int updateGridList(UserInfo userInfo) ;
@Update("update mxk_userinfo set status = #{status} where id = #{id}")
public int updateStatus(UserInfo userInfo) ;
}
@@ -109,6 +109,9 @@ public class AccountsService extends JpaBaseService<Accounts>{
return false;
}
public boolean updateStatus(Accounts accounts) {
return this.getMapper().updateStatus(accounts) > 0;
}
public boolean remove(String id) {
Accounts account = this.get(id);
if (super.remove(id)) {
@@ -334,7 +334,7 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
public void updateLocked(UserInfo userInfo) {
try {
if(userInfo != null && StringUtils.isNotEmpty(userInfo.getId())) {
userInfo.setIsLocked(ConstsStatus.STOP);
userInfo.setIsLocked(ConstsStatus.LOCK);
getMapper().updateLocked(userInfo);
}
} catch(Exception e) {
@@ -397,6 +397,10 @@ public class UserInfoService extends JpaBaseService<UserInfo> {
public int updateProfile(UserInfo userInfo){
return getMapper().updateProfile(userInfo);
}
public boolean updateStatus(UserInfo userInfo) {
return getMapper().updateStatus(userInfo) > 0;
}
public void setPasswordPolicyValidator(PasswordPolicyValidator passwordPolicyValidator) {
this.passwordPolicyValidator = passwordPolicyValidator;