bug修改
This commit is contained in:
parent
c491e98c11
commit
c1905e88c3
@ -89,6 +89,20 @@ public class LoginController {
|
|||||||
return Result.success(resultMap);
|
return Result.success(resultMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperLog(operModul = "人员/设备登录", operType = "人员/设备登录", operDesc = "人员/设备登录")
|
||||||
|
@ApiOperation(value = "人员/设备登录", notes = "人员/设备登录", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "name", required = true, value = "姓名", paramType = "body"),
|
||||||
|
@ApiImplicitParam(name = "idCard", required = true, value = "身份证号", paramType = "body"),
|
||||||
|
@ApiImplicitParam(name = "carNumber", required = true, value = "车牌号", paramType = "body"),
|
||||||
|
@ApiImplicitParam(name = "type", required = true, value = "1人员2设备", paramType = "body"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/device/login")
|
||||||
|
public Result<Map<String, Object>> deviceLogin(@RequestBody Map<String, Object> map) {
|
||||||
|
Map<String, Object> resultMap = systemUserService.deviceLogin(map);
|
||||||
|
return Result.success(resultMap);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/getLoginInfoByToken")
|
@PostMapping("/getLoginInfoByToken")
|
||||||
@ApiOperation(value = "根据token获取用户登录信息", notes = "根据token获取用户登录信息", httpMethod = "POST")
|
@ApiOperation(value = "根据token获取用户登录信息", notes = "根据token获取用户登录信息", httpMethod = "POST")
|
||||||
public Result getLoginInfoByToken(@RequestBody LoginInfoByTokenDto dto) {
|
public Result getLoginInfoByToken(@RequestBody LoginInfoByTokenDto dto) {
|
||||||
|
|||||||
@ -90,4 +90,6 @@ public interface ISystemUserService extends IService<SystemUser> {
|
|||||||
void resetPwByEmail(HashMap<String, Object> paramMap);
|
void resetPwByEmail(HashMap<String, Object> paramMap);
|
||||||
|
|
||||||
Page<SystemUser> getSystemUserBySnPage(Map<String, Object> map);
|
Page<SystemUser> getSystemUserBySnPage(Map<String, Object> map);
|
||||||
|
|
||||||
|
Map<String, Object> deviceLogin(Map<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,11 +22,16 @@ import com.zhgd.xmgl.modules.basicdata.mapper.*;
|
|||||||
import com.zhgd.xmgl.modules.basicdata.service.IBaseMenuService;
|
import com.zhgd.xmgl.modules.basicdata.service.IBaseMenuService;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
|
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||||
|
import com.zhgd.xmgl.modules.mechanicalequipmentposition.entity.MechanicalEquipmentPositionDev;
|
||||||
|
import com.zhgd.xmgl.modules.mechanicalequipmentposition.mapper.MechanicalEquipmentPositionDataMapper;
|
||||||
|
import com.zhgd.xmgl.modules.mechanicalequipmentposition.mapper.MechanicalEquipmentPositionDevMapper;
|
||||||
import com.zhgd.xmgl.modules.project.entity.Project;
|
import com.zhgd.xmgl.modules.project.entity.Project;
|
||||||
import com.zhgd.xmgl.modules.project.entity.ProjectExternalSystemService;
|
import com.zhgd.xmgl.modules.project.entity.ProjectExternalSystemService;
|
||||||
import com.zhgd.xmgl.modules.project.mapper.ProjectExternalSystemServiceMapper;
|
import com.zhgd.xmgl.modules.project.mapper.ProjectExternalSystemServiceMapper;
|
||||||
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
||||||
import com.zhgd.xmgl.modules.quality.mapper.QualityRegionMapper;
|
import com.zhgd.xmgl.modules.quality.mapper.QualityRegionMapper;
|
||||||
|
import com.zhgd.xmgl.modules.safetyhat.entity.SafetyHatDev;
|
||||||
|
import com.zhgd.xmgl.modules.safetyhat.mapper.SafetyHatDevMapper;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.UserEnterprise;
|
import com.zhgd.xmgl.modules.worker.entity.UserEnterprise;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
|
import com.zhgd.xmgl.modules.worker.mapper.WorkerInfoMapper;
|
||||||
@ -51,6 +56,7 @@ import org.springframework.security.core.AuthenticationException;
|
|||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -67,6 +73,12 @@ import java.util.*;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemUser> implements ISystemUserService {
|
public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemUser> implements ISystemUserService {
|
||||||
|
@Autowired
|
||||||
|
private MechanicalEquipmentPositionDevMapper mechanicalEquipmentPositionDevMapper;
|
||||||
|
@Autowired
|
||||||
|
private WorkerInfoMapper workerInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private SafetyHatDevMapper safetyHatDevMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemLogoConfigMapper systemLogoConfigMapper;
|
private SystemLogoConfigMapper systemLogoConfigMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -102,8 +114,6 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|||||||
@Autowired
|
@Autowired
|
||||||
private BaseActionMapper baseActionMapper;
|
private BaseActionMapper baseActionMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private WorkerInfoMapper workerInfoMapper;
|
|
||||||
@Autowired
|
|
||||||
private IUserEnterpriseService userEnterpriseService;
|
private IUserEnterpriseService userEnterpriseService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BaseRoleMapper baseRoleMapper;
|
private BaseRoleMapper baseRoleMapper;
|
||||||
@ -651,6 +661,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class, propagation = Propagation.NESTED)
|
||||||
public Long saveSystemUser(SystemUser systemUser) {
|
public Long saveSystemUser(SystemUser systemUser) {
|
||||||
QueryWrapper<SystemUser> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<SystemUser> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(SystemUser::getAccount, systemUser.getAccount());
|
queryWrapper.lambda().eq(SystemUser::getAccount, systemUser.getAccount());
|
||||||
@ -1280,6 +1291,28 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|||||||
return systemUserMapper.getSystemUserBySn(map, page);
|
return systemUserMapper.getSystemUserBySn(map, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> deviceLogin(Map<String, Object> map) {
|
||||||
|
Integer type = MapUtils.getInteger(map, "type");
|
||||||
|
String idCard = MapUtils.getString(map, "idCard");
|
||||||
|
String carNumber = MapUtils.getString(map, "carNumber");
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
if (Objects.equals(type, 1)) {
|
||||||
|
List<SafetyHatDev> devs = safetyHatDevMapper.selectDevListByIdCard(idCard);
|
||||||
|
if (CollUtil.isEmpty(devs)) {
|
||||||
|
throw new OpenAlertException("该人员的安全帽设备不存在");
|
||||||
|
}
|
||||||
|
result.put("devInfoList", devs);
|
||||||
|
} else if (Objects.equals(type, 2)) {
|
||||||
|
//List<MechanicalEquipmentPositionDev> devs =mechanicalEquipmentPositionDevMapper.selectDevListByIdCard(carNumber);
|
||||||
|
//if (CollUtil.isEmpty(devs)) {
|
||||||
|
// throw new OpenAlertException("该人员的安全帽设备不存在");
|
||||||
|
//}
|
||||||
|
//result.put("devInfoList", devs);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String timestamp = "1711613997695";
|
String timestamp = "1711613997695";
|
||||||
String pw = "123";
|
String pw = "123";
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.dangerous.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringTypeDescribeControl;
|
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringTypeDescribeControl;
|
||||||
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringTypeDescribeControlMapper;
|
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringTypeDescribeControlMapper;
|
||||||
import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringTypeDescribeControlService;
|
import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringTypeDescribeControlService;
|
||||||
@ -10,15 +11,13 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 危大工程类别-类别描述和管控要点关联表
|
* @Description: 危大工程类别-类别描述和管控要点关联表
|
||||||
* @author: pds
|
* @author: pds
|
||||||
* @date: 2021-08-25
|
* @date: 2021-08-25
|
||||||
* @version: V1.0
|
* @version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@ -28,34 +27,32 @@ public class DangerousEngineeringTypeDescribeControlServiceImpl extends ServiceI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveTypeDescribeControlData(Map<String, Object> map) {
|
public void saveTypeDescribeControlData(Map<String, Object> map) {
|
||||||
String describeId= MapUtils.getString(map,"describeId");
|
String describeId = MapUtils.getString(map, "describeId");
|
||||||
String controlId= MapUtils.getString(map,"controlId");
|
String controlId = MapUtils.getString(map, "controlId");
|
||||||
if(StringUtils.isNotEmpty(controlId)){
|
if (StringUtils.isNotEmpty(controlId)) {
|
||||||
for(String id:controlId.split(",")){
|
for (String id : controlId.split(",")) {
|
||||||
QueryWrapper<DangerousEngineeringTypeDescribeControl> queryWrapper=new QueryWrapper<>();
|
QueryWrapper<DangerousEngineeringTypeDescribeControl> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(DangerousEngineeringTypeDescribeControl::getControlId,id)
|
queryWrapper.lambda().eq(DangerousEngineeringTypeDescribeControl::getControlId, id)
|
||||||
.eq(DangerousEngineeringTypeDescribeControl::getDescribeId,describeId);
|
.eq(DangerousEngineeringTypeDescribeControl::getDescribeId, describeId);
|
||||||
int count=dangerousEngineeringTypeDescribeControlMapper.selectCount(queryWrapper);
|
dangerousEngineeringTypeDescribeControlMapper.delete(queryWrapper);
|
||||||
if(count==0){
|
DangerousEngineeringTypeDescribeControl typeDescribeControl = new DangerousEngineeringTypeDescribeControl();
|
||||||
DangerousEngineeringTypeDescribeControl typeDescribeControl=new DangerousEngineeringTypeDescribeControl();
|
typeDescribeControl.setControlId(Long.valueOf(id));
|
||||||
typeDescribeControl.setControlId(Long.valueOf(id));
|
typeDescribeControl.setDescribeId(Long.valueOf(describeId));
|
||||||
typeDescribeControl.setDescribeId(Long.valueOf(describeId));
|
dangerousEngineeringTypeDescribeControlMapper.insert(typeDescribeControl);
|
||||||
dangerousEngineeringTypeDescribeControlMapper.insert(typeDescribeControl);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteTypeDescribeControlData(Map<String, Object> map) {
|
public void deleteTypeDescribeControlData(Map<String, Object> map) {
|
||||||
String describeId= MapUtils.getString(map,"describeId");
|
String describeId = MapUtils.getString(map, "describeId");
|
||||||
String controlId= MapUtils.getString(map,"controlId");
|
String controlId = MapUtils.getString(map, "controlId");
|
||||||
if(StringUtils.isNotEmpty(controlId)){
|
if (StringUtils.isNotEmpty(controlId)) {
|
||||||
String[] arr=controlId.split(",");
|
String[] arr = controlId.split(",");
|
||||||
List<String> list= CollectionUtil.toList(arr);
|
List<String> list = CollectionUtil.toList(arr);
|
||||||
QueryWrapper<DangerousEngineeringTypeDescribeControl> queryWrapper=new QueryWrapper<>();
|
QueryWrapper<DangerousEngineeringTypeDescribeControl> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(DangerousEngineeringTypeDescribeControl::getDescribeId,describeId)
|
queryWrapper.lambda().eq(DangerousEngineeringTypeDescribeControl::getDescribeId, describeId)
|
||||||
.in(DangerousEngineeringTypeDescribeControl::getControlId,list);
|
.in(DangerousEngineeringTypeDescribeControl::getControlId, list);
|
||||||
dangerousEngineeringTypeDescribeControlMapper.delete(queryWrapper);
|
dangerousEngineeringTypeDescribeControlMapper.delete(queryWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -228,6 +228,10 @@ public class ProjectUfaceConfigServiceImpl extends ServiceImpl<ProjectUfaceConfi
|
|||||||
} else if (tempProjectUfaceConfig.getSupplierType() == 7) {
|
} else if (tempProjectUfaceConfig.getSupplierType() == 7) {
|
||||||
//海康门禁sdk
|
//海康门禁sdk
|
||||||
HikvisionUfaceSDKUtil.deletePerson(workerInfo, tempProjectUfaceConfig, workerInfo.getUfaceDevId());
|
HikvisionUfaceSDKUtil.deletePerson(workerInfo, tempProjectUfaceConfig, workerInfo.getUfaceDevId());
|
||||||
|
} else if (tempProjectUfaceConfig.getSupplierType() == 9) {
|
||||||
|
//海康门禁isc
|
||||||
|
String notDevSns = StrUtil.join(",", list.stream().map(UfaceDev::getDevSn).collect(Collectors.toList()));
|
||||||
|
asyncHikvision.deletePersonAuth(workerInfo, notDevSns);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,4 +27,6 @@ public interface SafetyHatDevMapper extends BaseMapper<SafetyHatDev> {
|
|||||||
List<SafetyHatDev> queryList(@Param(Constants.WRAPPER) QueryWrapper<SafetyHatDev> queryWrapper);
|
List<SafetyHatDev> queryList(@Param(Constants.WRAPPER) QueryWrapper<SafetyHatDev> queryWrapper);
|
||||||
|
|
||||||
CountVehiclePositionDevVo countSafetyHatDev(HashMap<String, Object> paramMap);
|
CountVehiclePositionDevVo countSafetyHatDev(HashMap<String, Object> paramMap);
|
||||||
|
|
||||||
|
List<SafetyHatDev> selectDevListByIdCard(String idCard);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,4 +23,10 @@
|
|||||||
</if>
|
</if>
|
||||||
)t
|
)t
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDevListByIdCard" resultType="com.zhgd.xmgl.modules.safetyhat.entity.SafetyHatDev">
|
||||||
|
select distinct shd.*,wi.worker_name from safety_hat_dev shd
|
||||||
|
join worker_info wi on shd.worker_info_id = wi.id
|
||||||
|
where wi.id_card = #{idCard}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import cn.hutool.core.util.IdUtil;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.wf.captcha.base.Captcha;
|
import com.wf.captcha.base.Captcha;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
import com.zhgd.jeecg.common.api.vo.Result;
|
||||||
|
import com.zhgd.redis.lock.RedisDistributedLock;
|
||||||
import com.zhgd.redis.lock.RedisRepository;
|
import com.zhgd.redis.lock.RedisRepository;
|
||||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||||
import com.zhgd.xmgl.modules.xz.captcha.LoginCode;
|
import com.zhgd.xmgl.modules.xz.captcha.LoginCode;
|
||||||
@ -40,6 +41,7 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Api(tags = "星纵-用户和供应商注册相关Api")
|
@Api(tags = "星纵-用户和供应商注册相关Api")
|
||||||
public class XzRegistryController {
|
public class XzRegistryController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IXzRegistryService xzRegistryService;
|
private IXzRegistryService xzRegistryService;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -166,10 +168,6 @@ public class XzRegistryController {
|
|||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
System.out.println(DateUtil.parse("2024-03-30").getTime() / 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "根据账号查询注册邮箱", notes = "根据账号查询注册邮箱", httpMethod = "POST")
|
@ApiOperation(value = "根据账号查询注册邮箱", notes = "根据账号查询注册邮箱", httpMethod = "POST")
|
||||||
@PostMapping(value = "/getRegistryEmail")
|
@PostMapping(value = "/getRegistryEmail")
|
||||||
public Result<HashMap<String, Object>> getRegistryEmail(@RequestBody SystemUser systemUser) {
|
public Result<HashMap<String, Object>> getRegistryEmail(@RequestBody SystemUser systemUser) {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.zhgd.xmgl.modules.xz.service.impl;
|
package com.zhgd.xmgl.modules.xz.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import com.zhgd.redis.lock.RedisDistributedLock;
|
||||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemLogoConfig;
|
import com.zhgd.xmgl.modules.basicdata.entity.SystemLogoConfig;
|
||||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||||
import com.zhgd.xmgl.modules.basicdata.mapper.SystemLogoConfigMapper;
|
import com.zhgd.xmgl.modules.basicdata.mapper.SystemLogoConfigMapper;
|
||||||
@ -23,6 +25,7 @@ import com.zhgd.xmgl.util.PageUtil;
|
|||||||
import com.zhgd.xmgl.util.RefUtil;
|
import com.zhgd.xmgl.util.RefUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.dao.DuplicateKeyException;
|
||||||
import org.springframework.mail.MailSendException;
|
import org.springframework.mail.MailSendException;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -40,6 +43,8 @@ import java.util.Objects;
|
|||||||
@Service
|
@Service
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public class XzRegistryServiceImpl extends ServiceImpl<XzRegistryMapper, XzRegistry> implements IXzRegistryService {
|
public class XzRegistryServiceImpl extends ServiceImpl<XzRegistryMapper, XzRegistry> implements IXzRegistryService {
|
||||||
|
@Autowired
|
||||||
|
private RedisDistributedLock redisDistributedLock;
|
||||||
@Autowired
|
@Autowired
|
||||||
private XzRegistryMapper xzRegistryMapper;
|
private XzRegistryMapper xzRegistryMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -161,7 +166,13 @@ public class XzRegistryServiceImpl extends ServiceImpl<XzRegistryMapper, XzRegis
|
|||||||
systemUser.setRealName(xz.getAccount());
|
systemUser.setRealName(xz.getAccount());
|
||||||
systemUser.setAccountType(10);
|
systemUser.setAccountType(10);
|
||||||
systemUser.setHeadquartersSn(xz.getHeadquartersSn());
|
systemUser.setHeadquartersSn(xz.getHeadquartersSn());
|
||||||
Long userId = systemUserService.saveSystemUser(systemUser);
|
Long userId = null;
|
||||||
|
try {
|
||||||
|
userId = systemUserService.saveSystemUser(systemUser);
|
||||||
|
} catch (DuplicateKeyException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
//处理组织权限
|
//处理组织权限
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
map.put("userId", userId);
|
map.put("userId", userId);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user