| | |
| | | import com.ruoyi.domain.ZfClan; |
| | | import com.ruoyi.service.ZInfoUserService; |
| | | import com.ruoyi.service.ZfAncestorService; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.mapper.SysUserRoleMapper; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import static com.ruoyi.common.core.page.TableSupport.*; |
| | |
| | | |
| | | @Resource |
| | | ZInfoUserService zInfoUserService; |
| | | |
| | | @Resource |
| | | private SysUserRoleMapper sysUserRoleMapper; |
| | | |
| | | @GetMapping("/all/{clanId}") |
| | | public AjaxResult listAll(@PathVariable Integer clanId){ |
| | |
| | | us.setPassword(SecurityUtils.encryptPassword(us.getPassword())); |
| | | userService.insertUser(us); |
| | | |
| | | SysUserRole sysUserRole = new SysUserRole(); |
| | | sysUserRole.setUserId(us.getUserId()); |
| | | sysUserRole.setRoleId(102L); |
| | | List<SysUserRole> sysUserRoles = new ArrayList<>(); |
| | | sysUserRoles.add(sysUserRole); |
| | | sysUserRoleMapper.batchUserRole(sysUserRoles); |
| | | |
| | | |
| | | |
| | | ZInfoUser infoUser = new ZInfoUser(); |
| | | infoUser.setClanId(zfAncestor.getClanId()); |
| | | infoUser.setSex(zfAncestor.getSex()); |
| | | infoUser.setNickName(zfAncestor.getName()); |
| | | infoUser.setSysId(us.getUserId()); |
| | | infoUser.setRoleId(Long.valueOf(zfAncestor.getRoleId())); |
| | | infoUser.setRoleId(zfAncestor.getRoleId().longValue()); |
| | | infoUser.setIsMyFamily(zfAncestor.getSex() == 0?1:0); |
| | | infoUser.setSpouseId(zfAncestor.getSpouseId().longValue()); |
| | | |
| | |
| | | // us.setRemark(zfAncestor.getRemark()); |
| | | userService.updateUser(us); |
| | | |
| | | Long userId1 = zfAncestor.getSysId(); |
| | | SysUserRole sysUserRole=sysUserRoleMapper.selectUserById(userId1); |
| | | // System.out.println(user.getFamilyId()); |
| | | // System.out.println("[[[[]]]]]]"); |
| | | ZInfoUser infoUser = new ZInfoUser(); |
| | |
| | | Long sysId = zfAncestorService.addData(zfAncestor); |
| | | zfAncestor.setSpouseId(sysId.intValue()); |
| | | zfAncestor.setSysId(addAncestor(zfAncestor)); |
| | | |
| | | zfAncestorService.updateById(zfAncestor); |
| | | |
| | | |