pref#ncu_commit
This commit is contained in:
@@ -68,7 +68,7 @@ public class SysLoginController {
|
||||
@Ok("re")
|
||||
@ApiOperation("用户本地登录页面")
|
||||
@Filters
|
||||
// @SaCheckLogin
|
||||
@SaCheckLogin
|
||||
public String login(HttpServletRequest req, HttpSession session) {
|
||||
return "beetl:/platform/sys/login.html";
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class SysLoginController {
|
||||
@At
|
||||
@Ok("re")
|
||||
@Filters
|
||||
// @SaCheckLogin
|
||||
@SaCheckLogin
|
||||
public String h5() {
|
||||
return "beetl:/platform/sys/login.html";
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public class SysLoginController {
|
||||
@At("/doLogin")
|
||||
@Ok("json")
|
||||
@ApiOperation("用户本地账号密码登录")
|
||||
// @SaCheckLogin
|
||||
@SaCheckLogin
|
||||
public Object doLogin(@Param("username") String username,
|
||||
@Param("password") String password,
|
||||
@Param("platformKey") String captchaKey,
|
||||
|
||||
@@ -48,8 +48,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* Created by wizzer on 2016/6/24.
|
||||
*/
|
||||
@@ -300,7 +298,7 @@ public class SysUnitController {
|
||||
)
|
||||
));
|
||||
}
|
||||
List<Tree<String>> treeList = TreeUtil.build(nodeList, StrUtil.blankToDefault(pid, "0000"));
|
||||
List<Tree<String>> treeList = TreeUtil.build(nodeList, StrUtil.blankToDefault(pid, "0"));
|
||||
|
||||
// NutMap menuMap = NutMap.NEW();
|
||||
// for (Sys_unit unit : list) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.budwk.app.sys.services.SysUserService;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalConfig;
|
||||
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeOrigin;
|
||||
import com.budwk.app.zhgh.staffmanage.member.constant.MemberChangeType;
|
||||
import com.budwk.app.zhgh.staffmanage.specialstaff.model.SpecialStaff;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
@@ -174,6 +175,10 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
List<Sys_user> sysUsers = dao.query(Sys_user.class, Cnd.NEW().groupBy("loginname"));
|
||||
Map<String, Sys_user> userMap = sysUsers.stream().collect(Collectors.toMap(Sys_user::getLoginname, sysUser -> sysUser));
|
||||
|
||||
// 特殊人员,忽略更新
|
||||
List<String> specialStaffList = dao.query(SpecialStaff.class, Cnd.NEW()).stream().map(SpecialStaff::getUserId).toList();
|
||||
|
||||
|
||||
// 准备数据集合
|
||||
List<Sys_user> needDoUpdateList = new CopyOnWriteArrayList<>();
|
||||
List<Sys_user> needInitUserList = new CopyOnWriteArrayList<>();
|
||||
@@ -183,6 +188,7 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
|
||||
// 处理每条数据
|
||||
for (Sys_user_source source : sources) {
|
||||
|
||||
Sys_user user = userMap.get(source.getLoginname());
|
||||
|
||||
// 创建用户对象
|
||||
@@ -203,6 +209,11 @@ public class SysDataUserAllUpdateServiceImpl implements SysDataUserUpdateService
|
||||
// }
|
||||
needInitUserList.add(u);
|
||||
} else {
|
||||
|
||||
if (specialStaffList.contains(u.getId())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 修改现有用户
|
||||
u.setId(user.getId());
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
||||
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
||||
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
||||
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
||||
// throw new BaseException("用户名或者密码不正确");
|
||||
throw new BaseException("用户名或者密码不正确");
|
||||
}
|
||||
user = this.fetchLinks(user, "unit");
|
||||
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
||||
|
||||
+5
-8
@@ -109,19 +109,16 @@ public class SpecialStaffManageController {
|
||||
BeanUtil.copyProperties(specialStaffVo, staff);
|
||||
if (specialStaffVo.getIsManyUnit()!=null && specialStaffVo.getIsManyUnit()) {
|
||||
// 如果是多单位人员, 更改单位为工会关系
|
||||
user.setUnitId(specialStaffVo.getUnionRelationUnitId());
|
||||
// user.setThreeUnitId(specialStaffVo.getUnionRelationThreeUnitId());
|
||||
// user.setIsManyUnit(true);
|
||||
dao.updateIgnoreNull(user);
|
||||
dao.update(
|
||||
Sys_user.class,
|
||||
Chain.make("unitId", specialStaffVo.getUnionRelationUnitId()),
|
||||
Cnd.where(Sys_user::getId, "=", user.getId())
|
||||
);
|
||||
|
||||
staff.setPersonnelRelationUnitId(viewUser.getUnitId());
|
||||
staff.setPersonnelRelationUnitName(viewUser.getUnitName());
|
||||
staff.setPersonnelRelationUnionId(viewUser.getUnionId());
|
||||
staff.setPersonnelRelationUnionName(viewUser.getUnionName());
|
||||
// staff.setPersonnelRelationThreeUnitId(viewUser.getThreeUnitId());
|
||||
// staff.setPersonnelRelationThreeUnitName(viewUser.getThreeUnitName());
|
||||
// staff.setPersonnelRelationUnionGroupId(viewUser.getUnionGroupId());
|
||||
// staff.setPersonnelRelationUnionGroupName(viewUser.getUnionGroupName());
|
||||
}
|
||||
staff.setUserId(user.getId());
|
||||
dao.insertOrUpdate(staff);
|
||||
|
||||
-1
@@ -72,7 +72,6 @@ public class SpecialStaffManageServiceImpl extends BaseServiceImpl<SpecialStaff>
|
||||
|
||||
cnd.andEX("u.unionId", "=", pageForm.getUnionId());
|
||||
cnd.andEX("u.unitId", "=", pageForm.getUnitId());
|
||||
cnd.andEX("u.personType", "=", pageForm.getPersonType());
|
||||
cnd.andEX("u.userState", "=", pageForm.getUserState());
|
||||
cnd.andEX("u.personType", "=", pageForm.getPersonType());
|
||||
cnd.andEX("s.specialStaffType", "=", pageForm.getSpecialStaffType());
|
||||
|
||||
Reference in New Issue
Block a user