Commit 45260e49 by 杨伟程
parents 600ea9f9 25e385c5
Showing with 363 additions and 97 deletions
package com.makeit.controller.plat;
import com.makeit.common.dto.BaseBatchIdDTO;
import com.makeit.common.dto.BaseIdDTO;
import com.makeit.common.dto.StatusDTO;
import com.makeit.common.page.PageReqDTO;
import com.makeit.common.page.PageVO;
import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils;
import com.makeit.common.vo.ExcelImportVo;
import com.makeit.exception.BusinessException;
import com.makeit.global.annotation.Action;
import com.makeit.module.admin.dto.plat.PlatUserDTOVO;
import com.makeit.module.admin.dto.plat.PlatUserQueryDTO;
......@@ -20,7 +23,9 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
......@@ -111,6 +116,14 @@ public class PlatUserController {
return ApiResponseUtils.success();
}
@Action(module = "平台端-人员", name = "批量删除", code = "plat:user:del")
@ApiOperation("批量删除")
@PostMapping("delBatch")
public ApiResponseEntity<Void> delBatch(@RequestBody BaseBatchIdDTO dto) {
platUserService.delBatch(dto.getIdList());
return ApiResponseUtils.success();
}
@Action(module = "平台端-人员", name = "改变状态", code = "plat:user:changeStatus")
@ApiOperation("改变状态")
@PostMapping("changeStatus")
......@@ -143,5 +156,15 @@ public class PlatUserController {
return ApiResponseUtils.success(platUserService.getUserDetail());
}
@Action(module = "平台端-人员", name = "批量导入", code = "plat:user:import")
@ApiOperation("批量导入")
@PostMapping("import")
public ApiResponseEntity<ExcelImportVo> importExcel(@RequestParam(value = "excelFile", required = false) MultipartFile excelFile) throws Exception {
if(excelFile == null ){
throw new BusinessException("请上传excel");
}
ExcelImportVo excelImportVo = platUserService.importExcel(excelFile);
return ApiResponseUtils.success(excelImportVo);
}
}
......@@ -46,7 +46,7 @@ public class SaasUserController {
return ApiResponseUtils.success(saasUserService.page(page));
}
@ApiOperation("分页列表")
@ApiOperation("分页列表-免登录")
@PostMapping("pageAuthIgnore")
public ApiResponseEntity<PageVO<SaasUserDTOVO>> pageAuthIgnore(@RequestBody PageReqDTO<SaasUserQueryDTO> page){
return ApiResponseUtils.success(saasUserService.page(page));
......
......@@ -4,8 +4,11 @@ import com.makeit.utils.data.locale.LocaleUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.List;
import java.util.Objects;
@Data
@ApiModel("excel导入错误信息VO")
......@@ -41,4 +44,17 @@ public class ExcelErrorVo implements Serializable {
public ExcelErrorVo() {
}
public static void isNotNull(String value,List<ExcelErrorVo> errorVoList, int i, String title) {
if(StringUtils.isBlank(value)) {
errorVoList.add(new ExcelErrorVo(i, title, "数据不为空"));
}
}
public static void notExists(Object object,List<ExcelErrorVo> errorVoList,int i,String title){
if(Objects.isNull(object)){
errorVoList.add(new ExcelErrorVo(i,title,"数据库数据不存在"));
}
}
}
......@@ -94,6 +94,9 @@ public enum CodeMessageEnum {
PLATFORM_ERROR_ELDER_CERTIFICATENUMBER_DUPLICATE(500, "PLATFORM.ERROR.ELDER.CERTIFICATENUMBER.DUPLICATE"),
PLATFORM_ERROR_SPACE_NAME_DUPLICATE(500,"PLATFORM.ERROR.SPACE.NAME.DUPLICATE"),
......
......@@ -32,20 +32,20 @@ public class PlatUserQueryDTO extends BaseOrgDTO {
@ApiModelProperty(value = "要排除的角色id roleId和notRoleId只能用一个")
private String notRoleId;
@ApiModelProperty(value = "关键词 用来搜姓名或者工号")
private String keyword;
@ApiModelProperty(value = "职级")
private Integer postLevel;
@ApiModelProperty(value = "是否从酒店开始 0否 1是")
private String fromHotel;
@ApiModelProperty(value = "是否常用人员 0否 1是")
private String isFrequent;
@ApiModelProperty(value = "标签id")
private String labelId;
// @ApiModelProperty(value = "关键词 用来搜姓名或者工号")
// private String keyword;
//
// @ApiModelProperty(value = "职级")
// private Integer postLevel;
//
// @ApiModelProperty(value = "是否从酒店开始 0否 1是")
// private String fromHotel;
//
// @ApiModelProperty(value = "是否常用人员 0否 1是")
// private String isFrequent;
//
// @ApiModelProperty(value = "标签id")
// private String labelId;
@ApiModelProperty(value = "用户工号集合")
private List<String> accountList;
......
......@@ -88,3 +88,6 @@ SYSTEM.ERROR.SMS.CODE.NOT.EXIST=验证码已过期
SYSTEM.ERROR.SMS.CODE.NOT.CORRECT=验证码不正确
PLATFORM.ERROR.ELDER.CERTIFICATENUMBER.DUPLICATE=证件号不能重复
PLATFORM.ERROR.SPACE.NAME.DUPLICATE=同一层级,空间名称不能重复
\ No newline at end of file
package com.makeit.module.controller.space;
import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.platform.space.PlatSpaceAddDTO;
import com.makeit.service.platform.space.PlatSpaceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Author:lzy
* @Date:2023/9/4 16:52
* @Describe:
*/
@Api(tags = "空间管理")
@RestController
@RequestMapping("/plat/space")
public class PlatSpaceController {
@Autowired
private PlatSpaceService spaceService;
@ApiOperation("新增")
@PostMapping("add")
public ApiResponseEntity<?> add(@Validated @RequestBody PlatSpaceAddDTO dto) {
spaceService.add(dto);
return ApiResponseUtils.success();
}
}
package com.makeit.dto.platform.auth;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
@Data
public class PlatUserImportDTO {
private static final String headDesc = "导入说明:\n" +
"\n" +
"1.带*号为必填项\n" +
"\n" +
"2.手机号和邮箱不可重复\n" +
"\n" +
"3.角色必须为【角色管理】处维护的角色名称\n" +
"\n" +
"4.导入人员默认登录密码为:888888";
@ExcelProperty(value = "姓名*")
private String username;
@ExcelProperty(value = "手机号*")
private String mobile;
@ExcelProperty(value = "邮箱")
private String email;
@ExcelProperty(value = "所属组织*")
private String orgName;
@ExcelProperty(value = "角色*")
private String roleName;
@ExcelProperty(value = "备注")
private String remark;
@ExcelIgnore
private String password = "888888";
}
package com.makeit.dto.platform.space;
import com.makeit.common.dto.BaseTenantDTO;
import com.makeit.enums.platform.space.PlatSpaceEnum;
import com.makeit.global.validator.DictEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
/**
* @Author:lzy
* @Date:2023/9/5 9:50
* @Describe:
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PlatSpaceAddDTO对象", description = "空间添加")
public class PlatSpaceAddDTO extends BaseTenantDTO {
@NotBlank(message = "空间名称不能为空")
@Size(max = 50, message = "空间名称最长为50个字符")
@ApiModelProperty(value = "空间名称")
private String name;
@DictEnum(em = PlatSpaceEnum.TypeEnum.class, message = "空间类型可选值为{m}")
@ApiModelProperty(value = "空间类型 数据字典 1:小区/社区/街道 2:楼栋 3:单元 4 楼层")
private String type;
@ApiModelProperty(value = "上级空间")
private String parentId;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
}
......@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Bed对象", description = "床位管理")
public class Bed extends BaseBusEntity {
public class PlatBed extends BaseBusEntity {
@ApiModelProperty(value = "名称")
private String name;
......
......@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "RegionSetting对象", description = "区域设置")
public class RegionSetting extends BaseBusEntity {
public class PlatRegionSetting extends BaseBusEntity {
@ApiModelProperty(value = "区域名称")
private String name;
......
......@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "RegionSettingLocation对象", description = "区域设置定位")
public class RegionSettingLocation extends BaseBusEntity {
public class PlatRegionSettingLocation extends BaseBusEntity {
@ApiModelProperty("区域设置Id")
private String regionSettingId;
......
......@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Room对象", description = "房间管理")
public class Room extends BaseBusEntity {
public class PlatRoom extends BaseBusEntity {
@ApiModelProperty(value = "名称")
......
......@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Space对象", description = "空间管理")
public class Space extends BaseBusEntity {
public class PlatSpace extends BaseBusEntity {
@ApiModelProperty(value = "名称")
private String name;
......
package com.makeit.enums.platform.space;
import com.makeit.enums.BaseEnum;
import com.makeit.utils.sys.SysDictUtil;
/**
* @Author:lzy
* @Date:2023/9/4 17:57
* @Describe:
*/
public class PlatSpaceEnum {
public enum TypeEnum implements BaseEnum {
//community 小区/社区/街道
//building 楼栋
//unit 单元
//floor 楼层
COMMUNITY("space.type.community"),
BUILDING("space.type.building"),
UNIT("space.type.unit"),
FLOOR("space.type.floor");
private String code;
TypeEnum(String code) {
this.code = code;
}
@Override
public String getValue() {
return SysDictUtil.getValue(code);
}
}
}
package com.makeit.mapper.platform.space;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.makeit.entity.platform.space.Bed;
import com.makeit.entity.platform.space.PlatBed;
/**
* @Author:lzy
* @Date:2023/8/31 11:58
* @Describe:
*/
public interface BedMapper extends BaseMapper<Bed> {
public interface PlatBedMapper extends BaseMapper<PlatBed> {
}
package com.makeit.mapper.platform.space;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.makeit.entity.platform.space.RegionSettingLocation;
import com.makeit.entity.platform.space.PlatRegionSettingLocation;
/**
* @Author:lzy
* @Date:2023/8/31 11:59
* @Describe:
*/
public interface RegionSettingLocationMapper extends BaseMapper<RegionSettingLocation> {
public interface PlatRegionSettingLocationMapper extends BaseMapper<PlatRegionSettingLocation> {
}
package com.makeit.mapper.platform.space;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.makeit.entity.platform.space.RegionSetting;
import com.makeit.entity.platform.space.PlatRegionSetting;
/**
* @Author:lzy
* @Date:2023/8/31 11:59
* @Describe:
*/
public interface RegionSettingMapper extends BaseMapper<RegionSetting> {
public interface PlatRegionSettingMapper extends BaseMapper<PlatRegionSetting> {
}
package com.makeit.mapper.platform.space;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.makeit.entity.platform.space.Room;
import com.makeit.entity.platform.space.PlatRoom;
/**
* @Author:lzy
* @Date:2023/8/31 12:00
* @Describe:
*/
public interface RoomMapper extends BaseMapper<Room> {
public interface PlatRoomMapper extends BaseMapper<PlatRoom> {
}
package com.makeit.mapper.platform.space;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.makeit.entity.platform.space.Space;
import com.makeit.entity.platform.space.PlatSpace;
/**
* @Author:lzy
* @Date:2023/8/31 12:01
* @Describe:
*/
public interface SpaceMapper extends BaseMapper<Space> {
public interface PlatSpaceMapper extends BaseMapper<PlatSpace> {
}
......@@ -6,6 +6,7 @@ import com.makeit.common.dto.LoginDTO;
import com.makeit.common.dto.StatusDTO;
import com.makeit.common.page.PageReqDTO;
import com.makeit.common.page.PageVO;
import com.makeit.common.vo.ExcelImportVo;
import com.makeit.entity.platform.auth.PlatOrg;
import com.makeit.entity.platform.auth.PlatRole;
import com.makeit.entity.platform.auth.PlatUser;
......@@ -16,6 +17,7 @@ import com.makeit.module.admin.dto.plat.PlatUserQueryDTO;
import com.makeit.module.admin.vo.plat.PlatUserLoginVO;
import com.makeit.vo.platform.auth.PlatPersonDTOVO;
import com.makeit.vo.platform.auth.PlatUserCountVO;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Map;
......@@ -56,14 +58,10 @@ public interface PlatUserService extends IService<PlatUser> {
PlatUserLoginVO getRoleAndMenuList2();
// PlatUserLoginVO getWechatMenuList();
PlatUserLoginVO getUserVO();
PlatPersonDTOVO getUserDetail();
// List<String> getCustomGroupNameList();
List<PlatRole> getRoleList(String userId);
......@@ -86,10 +84,6 @@ public interface PlatUserService extends IService<PlatUser> {
PlatPersonDTOVO viewPerson(String id);
// void changeDeptMessage(PlatUser tntUser, String oldDeptId, String newDeptId);
//void leaveMessage(PlatUser tntUser);
List<PlatRole> getRoleListWithTag(String userId);
PlatRole getMaxRole(String userId);
......@@ -114,11 +108,6 @@ public interface PlatUserService extends IService<PlatUser> {
List<PlatOrg> getCandidateDeptList();
// List<String> getCustomGroupNameList(String userId);
//
// List<String> getCustomGroupIdList(String userId);
List<PlatMenu> getMenuListByUserId(String userId);
/**
......@@ -137,4 +126,8 @@ public interface PlatUserService extends IService<PlatUser> {
* @param platUserId
*/
void updatePlatUserTenantId(String tenantId,String platUserId);
void delBatch(List<String> idList);
ExcelImportVo importExcel(MultipartFile excelFile) throws Exception;
}
package com.makeit.service.platform.space;
import com.baomidou.mybatisplus.extension.service.IService;
import com.makeit.entity.platform.space.Bed;
import com.makeit.entity.platform.space.PlatBed;
/**
* @Author:lzy
* @Date:2023/8/31 15:08
* @Describe:
*/
public interface BedService extends IService<Bed> {
public interface PlatBedService extends IService<PlatBed> {
}
package com.makeit.service.platform.space;
import com.baomidou.mybatisplus.extension.service.IService;
import com.makeit.entity.platform.space.RegionSettingLocation;
import com.makeit.entity.platform.space.PlatRegionSettingLocation;
/**
* @Author:lzy
* @Date:2023/8/31 16:10
* @Describe:
*/
public interface RegionSettingLocationService extends IService<RegionSettingLocation> {
public interface PlatRegionSettingLocationService extends IService<PlatRegionSettingLocation> {
}
package com.makeit.service.platform.space;
import com.baomidou.mybatisplus.extension.service.IService;
import com.makeit.entity.platform.space.RegionSetting;
import com.makeit.entity.platform.space.PlatRegionSetting;
/**
* @Author:lzy
* @Date:2023/8/31 16:13
* @Describe:
*/
public interface RegionSettingService extends IService<RegionSetting> {
public interface PlatRegionSettingService extends IService<PlatRegionSetting> {
}
package com.makeit.service.platform.space;
import com.baomidou.mybatisplus.extension.service.IService;
import com.makeit.entity.platform.space.Room;
import com.makeit.entity.platform.space.PlatRoom;
/**
* @Author:lzy
* @Date:2023/8/31 16:15
* @Describe:
*/
public interface RoomService extends IService<Room> {
public interface PlatRoomService extends IService<PlatRoom> {
}
package com.makeit.service.platform.space;
import com.baomidou.mybatisplus.extension.service.IService;
import com.makeit.dto.platform.space.PlatSpaceAddDTO;
import com.makeit.entity.platform.space.PlatSpace;
/**
* @Author:lzy
* @Date:2023/8/31 16:17
* @Describe:
*/
public interface PlatSpaceService extends IService<PlatSpace> {
/**
* 添加
* @param dto
*/
void add(PlatSpaceAddDTO dto);
/**
* 编辑
* @param dto
*/
void edit(PlatSpaceAddDTO dto);
/**
* 删除
* @param id
*/
void del(String id);
}
package com.makeit.service.platform.space;
import com.baomidou.mybatisplus.extension.service.IService;
import com.makeit.entity.platform.space.Space;
/**
* @Author:lzy
* @Date:2023/8/31 16:17
* @Describe:
*/
public interface SpaceService extends IService<Space> {
}
package com.makeit.service.platform.space.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.entity.platform.space.Bed;
import com.makeit.mapper.platform.space.BedMapper;
import com.makeit.service.platform.space.BedService;
import com.makeit.entity.platform.space.PlatBed;
import com.makeit.mapper.platform.space.PlatBedMapper;
import com.makeit.service.platform.space.PlatBedService;
import org.springframework.stereotype.Service;
/**
......@@ -12,5 +12,5 @@ import org.springframework.stereotype.Service;
* @Describe:
*/
@Service
public class BedServiceImpl extends ServiceImpl<BedMapper, Bed> implements BedService {
public class PlatBedServiceImpl extends ServiceImpl<PlatBedMapper, PlatBed> implements PlatBedService {
}
package com.makeit.service.platform.space.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.entity.platform.space.RegionSettingLocation;
import com.makeit.mapper.platform.space.RegionSettingLocationMapper;
import com.makeit.service.platform.space.RegionSettingLocationService;
import com.makeit.entity.platform.space.PlatRegionSettingLocation;
import com.makeit.mapper.platform.space.PlatRegionSettingLocationMapper;
import com.makeit.service.platform.space.PlatRegionSettingLocationService;
import org.springframework.stereotype.Service;
/**
......@@ -12,5 +12,5 @@ import org.springframework.stereotype.Service;
* @Describe:
*/
@Service
public class RegionSettingLocationServiceImpl extends ServiceImpl<RegionSettingLocationMapper, RegionSettingLocation> implements RegionSettingLocationService {
public class PlatRegionSettingLocationServiceImpl extends ServiceImpl<PlatRegionSettingLocationMapper, PlatRegionSettingLocation> implements PlatRegionSettingLocationService {
}
package com.makeit.service.platform.space.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.entity.platform.space.RegionSetting;
import com.makeit.mapper.platform.space.RegionSettingMapper;
import com.makeit.service.platform.space.RegionSettingService;
import com.makeit.entity.platform.space.PlatRegionSetting;
import com.makeit.mapper.platform.space.PlatRegionSettingMapper;
import com.makeit.service.platform.space.PlatRegionSettingService;
import org.springframework.stereotype.Service;
/**
......@@ -12,5 +12,5 @@ import org.springframework.stereotype.Service;
* @Describe:
*/
@Service
public class RegionSettingServiceImpl extends ServiceImpl<RegionSettingMapper, RegionSetting> implements RegionSettingService {
public class PlatRegionSettingServiceImpl extends ServiceImpl<PlatRegionSettingMapper, PlatRegionSetting> implements PlatRegionSettingService {
}
package com.makeit.service.platform.space.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.entity.platform.space.Room;
import com.makeit.mapper.platform.space.RoomMapper;
import com.makeit.service.platform.space.RoomService;
import com.makeit.entity.platform.space.PlatRoom;
import com.makeit.mapper.platform.space.PlatRoomMapper;
import com.makeit.service.platform.space.PlatRoomService;
/**
* @Author:lzy
* @Date:2023/8/31 16:15
* @Describe:
*/
public class RoomServiceImpl extends ServiceImpl<RoomMapper, Room> implements RoomService {
public class PlatRoomServiceImpl extends ServiceImpl<PlatRoomMapper, PlatRoom> implements PlatRoomService {
}
package com.makeit.service.platform.space.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.dto.platform.space.PlatSpaceAddDTO;
import com.makeit.entity.platform.space.PlatSpace;
import com.makeit.enums.CodeMessageEnum;
import com.makeit.exception.BusinessException;
import com.makeit.mapper.platform.space.PlatSpaceMapper;
import com.makeit.service.platform.space.PlatSpaceService;
import com.makeit.utils.data.convert.BeanDtoVoUtils;
import jodd.util.StringUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* @Author:lzy
* @Date:2023/8/31 16:17
* @Describe:
*/
@Service
public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace> implements PlatSpaceService {
private void check(PlatSpaceAddDTO dto){
LambdaQueryWrapper<PlatSpace> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PlatSpace::getParentId,dto.getParentId());
queryWrapper.eq(PlatSpace::getName,dto.getName());
queryWrapper.ne(StringUtil.isNotEmpty(dto.getId()), PlatSpace::getId,dto.getId());
if(this.count(queryWrapper) > 0){
throw new BusinessException(CodeMessageEnum.PLATFORM_ERROR_SPACE_NAME_DUPLICATE);
}
}
@Override
@Transactional
public void add(PlatSpaceAddDTO dto) {
check(dto);
PlatSpace space = BeanDtoVoUtils.convert(dto, PlatSpace.class);
save(space);
}
@Override
@Transactional
public void edit(PlatSpaceAddDTO dto) {
check(dto);
PlatSpace space = this.getById(dto.getId());
space.setName(dto.getName());
space.setType(dto.getType());
space.setAddress(dto.getAddress());
space.setLatitude(dto.getLatitude());
space.setLongitude(dto.getLongitude());
space.setParentId(dto.getParentId());
this.updateById(space);
}
@Override
public void del(String id) {
this.removeById(id);
}
}
package com.makeit.service.platform.space.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.entity.platform.space.Space;
import com.makeit.mapper.platform.space.SpaceMapper;
import com.makeit.service.platform.space.SpaceService;
import org.springframework.stereotype.Service;
/**
* @Author:lzy
* @Date:2023/8/31 16:17
* @Describe:
*/
@Service
public class SpaceServiceImpl extends ServiceImpl<SpaceMapper, Space> implements SpaceService {
}
......@@ -128,7 +128,7 @@ implements PlatTenantService {
TntUserJoinUtil.join(platUserService,voList,qw->qw.eq(PlatUser::getIsTenant, IsTenantAccountEnum.YES.getValue()),
PlatTenantVO::getTntUserId,(t, u) -> {
t.setUserAccount(u.getAccount());
t.setUserAccount(u.getMobile());
t.setUserName(u.getUsername());
}, BaseEntity::getId);
......@@ -202,7 +202,7 @@ implements PlatTenantService {
//组织表增加一条数据
PlatOrg platOrg = convertToPlatOrg(tntTenant);
platOrgService.add(platOrg);
platOrgService.save(platOrg);
return tntTenant.getId();
}
......@@ -236,6 +236,8 @@ implements PlatTenantService {
platOrg.setName(platTenant.getName());
platOrg.setStatus(platTenant.getStatus());
platOrg.setId(platTenant.getId());
//租户没有父级
platOrg.setParentId("1");
return platOrg;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment