test:(测试)
parent
ced68c06c0
commit
a06d845b7a
|
@ -102,6 +102,19 @@ public class SysUser extends BaseEntity {
|
|||
@Excel(name = "最后登录IP", type = Type.EXPORT)
|
||||
private String loginIp;
|
||||
|
||||
/**
|
||||
* 匹配企业id
|
||||
* */
|
||||
private Long entId;
|
||||
|
||||
public Long getEntId() {
|
||||
return entId;
|
||||
}
|
||||
|
||||
public void setEntId(Long entId) {
|
||||
this.entId = entId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
|
|
|
@ -22,9 +22,7 @@ import java.util.HashMap;
|
|||
*/
|
||||
@Log4j2
|
||||
public class Test {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
// 测试
|
||||
String url="http://115.159.67.205:10006/webhook/%E5%A2%9E%E5%80%BC%E6%9C%8D%E5%8A%A1";
|
||||
HashMap<String, String> hashMap = new HashMap<>();
|
||||
|
@ -33,7 +31,6 @@ public class Test {
|
|||
String json = JSON.toJSONString(hashMap);
|
||||
// 创建连接与设置连接参数
|
||||
URL urlObj=null;
|
||||
|
||||
try {
|
||||
URL postMan = new URL(url);
|
||||
HttpURLConnection httpConn = (HttpURLConnection) urlObj.openConnection();
|
||||
|
@ -57,8 +54,5 @@ public class Test {
|
|||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.muyu.networking.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.Information;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -11,7 +12,7 @@ import java.util.List;
|
|||
* @author ruoyi
|
||||
* @date 2024-05-27
|
||||
*/
|
||||
public interface InformationMapper
|
||||
public interface InformationMapper extends BaseMapper<Information>
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
package com.muyu.networking.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.Enterprise;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -9,7 +10,7 @@ import java.util.List;
|
|||
* @author ruoyi
|
||||
* @date 2024-05-25
|
||||
*/
|
||||
public interface EnterpriseService
|
||||
public interface EnterpriseService extends IService<Enterprise>
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
|
|
|
@ -7,12 +7,15 @@ package com.muyu.networking.service.impl;
|
|||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.common.system.domain.SysUser;
|
||||
import com.muyu.common.system.remote.RemoteUserService;
|
||||
import com.muyu.domain.Enterprise;
|
||||
|
||||
import com.muyu.networking.mapper.EnterpriseMapper;
|
||||
import com.muyu.networking.service.EnterpriseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -20,19 +23,6 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
|
||||
|
||||
import com.github.dockerjava.api.DockerClient;
|
||||
import com.github.dockerjava.api.command.CreateContainerCmd;
|
||||
import com.github.dockerjava.api.command.CreateContainerResponse;
|
||||
import com.github.dockerjava.api.command.ExecCreateCmdResponse;
|
||||
import com.github.dockerjava.api.command.InspectContainerResponse;
|
||||
import com.github.dockerjava.core.DefaultDockerClientConfig;
|
||||
import com.github.dockerjava.core.DockerClientBuilder;
|
||||
import com.github.dockerjava.core.command.ExecStartResultCallback;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
@ -45,7 +35,7 @@ import java.util.UUID;
|
|||
* @date 2024-05-25
|
||||
*/
|
||||
@Service
|
||||
public class EnterpriseServiceImpl implements EnterpriseService
|
||||
public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper,Enterprise> implements EnterpriseService
|
||||
{
|
||||
@Autowired
|
||||
private EnterpriseMapper enterpriseMapper;
|
||||
|
@ -71,8 +61,24 @@ public class EnterpriseServiceImpl implements EnterpriseService
|
|||
@Override
|
||||
public List<Enterprise> selectEnterpriseList(Enterprise enterprise)
|
||||
{
|
||||
return enterpriseMapper.selectEnterpriseList(enterprise);
|
||||
//
|
||||
// SysUser sysUser = SysUser.builder()
|
||||
// .entId(enterprise.getId())
|
||||
// .build();
|
||||
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName("admin");
|
||||
if (sysUser.getUserName().equals("admin")){
|
||||
return enterpriseMapper.selectEnterpriseList(enterprise);
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<Enterprise> lambdaQueryWrapper = new LambdaQueryWrapper<>() {{
|
||||
eq(Enterprise::getId, enterprise.getId());
|
||||
}};
|
||||
return enterpriseMapper.selectList(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private RemoteUserService remoteUserService;
|
||||
/**
|
||||
|
@ -90,8 +96,10 @@ public class EnterpriseServiceImpl implements EnterpriseService
|
|||
enterprise.setStatus("1");
|
||||
enterprise.setCertification("1");
|
||||
enterprise.setOpenAdd("0");
|
||||
SysUser sysUser = SysUser.builder().userName(enterprise.getEnterpriseName())
|
||||
SysUser sysUser = SysUser.builder().userName(
|
||||
enterprise.getEnterpriseName())
|
||||
.password("admin")
|
||||
.entId(enterprise.getId())
|
||||
.nickName(enterprise.getEnterpriseName()).
|
||||
userType(String.valueOf(enterprise.getId()))
|
||||
.build();
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package com.muyu.networking.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import com.muyu.common.system.remote.factory.RemoteUserFallbackFactory;
|
||||
import com.muyu.domain.Information;
|
||||
|
@ -17,7 +20,7 @@ import org.springframework.stereotype.Service;
|
|||
* @date 2024-05-27
|
||||
*/
|
||||
@Service
|
||||
public class InformationServiceImpl implements IInformationService
|
||||
public class InformationServiceImpl extends ServiceImpl<InformationMapper, Information> implements IInformationService
|
||||
{
|
||||
@Autowired
|
||||
private InformationMapper informationMapper;
|
||||
|
@ -45,6 +48,8 @@ public class InformationServiceImpl implements IInformationService
|
|||
@Override
|
||||
public List<Information> selectInformationList(Information information)
|
||||
{
|
||||
|
||||
|
||||
return informationMapper.selectInformationList(information);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue