Compare commits

...

2 Commits

  1. 2
      ALOps_sys_backend/alops-framework/src/main/java/com/alops/framework/web/service/SysLoginService.java
  2. 2
      ALOps_sys_backend/alops-framework/src/main/java/com/alops/framework/web/service/SysRegisterService.java
  3. 10
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquManu.java
  4. 6
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquType.java
  5. 1
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquSupplierAddDto.java
  6. 1
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/dto/EquSupplierUpdateDto.java
  7. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquManuServiceImpl.java
  8. 7
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquSupplierServiceImpl.java
  9. 2
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquTypeServiceImpl.java
  10. 1
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquManuMapper.xml

@ -29,6 +29,8 @@ import com.alops.framework.security.context.AuthenticationContextHolder;
import com.alops.system.service.ISysConfigService; import com.alops.system.service.ISysConfigService;
import com.alops.system.service.ISysUserService; import com.alops.system.service.ISysUserService;
import java.util.Date;
/** /**
* 登录校验方法 * 登录校验方法
* *

@ -19,6 +19,8 @@ import com.alops.framework.manager.factory.AsyncFactory;
import com.alops.system.service.ISysConfigService; import com.alops.system.service.ISysConfigService;
import com.alops.system.service.ISysUserService; import com.alops.system.service.ISysUserService;
import java.util.Date;
/** /**
* 注册校验方法 * 注册校验方法
* *

@ -31,8 +31,8 @@ public class EquManu
@Excel(name = "厂商简介") @Excel(name = "厂商简介")
private String description; private String description;
/** 联系人ID */ /** 联系人*/
@Excel(name = "联系人ID") @Excel(name = "联系人")
private String contactBy; private String contactBy;
/** 联系方式 */ /** 联系方式 */
@ -50,7 +50,7 @@ public class EquManu
private Long status; private Long status;
//@JsonIgnore //@JsonIgnore
private String createBy; // 新增 private Long createBy; // 新增
public EquManu() {} public EquManu() {}
@ -144,11 +144,11 @@ public class EquManu
return status; return status;
} }
public String getCreateBy() { public Long getCreateBy() {
return createBy; return createBy;
} }
public void setCreateBy(String createBy) { public void setCreateBy(Long createBy) {
this.createBy = createBy; this.createBy = createBy;
} }

@ -43,7 +43,7 @@ public class EquType
private Date createDate; private Date createDate;
//@JsonIgnore //@JsonIgnore
private String createBy; private Long createBy;
public EquType() {} public EquType() {}
@ -106,11 +106,11 @@ public class EquType
return createDate; return createDate;
} }
public String getCreateBy() { public Long getCreateBy() {
return createBy; return createBy;
} }
public void setCreateBy(String createBy) { public void setCreateBy(Long createBy) {
this.createBy = createBy; this.createBy = createBy;
} }

@ -13,6 +13,5 @@ public class EquSupplierAddDto {
private String description; private String description;
private String contactBy; private String contactBy;
private String contactWay; private String contactWay;
private Long createBy;
private Long status; private Long status;
} }

@ -6,7 +6,6 @@ import lombok.Data;
public class EquSupplierUpdateDto { public class EquSupplierUpdateDto {
private String contactBy; private String contactBy;
private String contactWay; private String contactWay;
private Long createBy;
private String description; private String description;
private String id; private String id;
private String name; private String name;

@ -60,6 +60,7 @@ public class EquManuServiceImpl implements IEquManuService
equManu.setId(UUID.randomUUID().toString()); equManu.setId(UUID.randomUUID().toString());
equManu.setCreateDate(new Date()); equManu.setCreateDate(new Date());
Long userId = SecurityUtils.getLoginUser().getUserId(); Long userId = SecurityUtils.getLoginUser().getUserId();
equManu.setCreateBy(userId);
return equManuMapper.insertEquManu(equManu); return equManuMapper.insertEquManu(equManu);
} }
@ -73,6 +74,7 @@ public class EquManuServiceImpl implements IEquManuService
public int updateEquManu(EquManu equManu) public int updateEquManu(EquManu equManu)
{ {
Long userId = SecurityUtils.getLoginUser().getUserId(); Long userId = SecurityUtils.getLoginUser().getUserId();
equManu.setCreateBy(userId);
return equManuMapper.updateEquManu(equManu); return equManuMapper.updateEquManu(equManu);
} }

@ -5,6 +5,7 @@ import java.util.List;
import java.util.UUID; import java.util.UUID;
import com.alops.common.utils.DateUtils; import com.alops.common.utils.DateUtils;
import com.alops.common.utils.SecurityUtils;
import com.alops.system.domain.dto.EquSupplierAddDto; import com.alops.system.domain.dto.EquSupplierAddDto;
import com.alops.system.domain.dto.EquSupplierUpdateDto; import com.alops.system.domain.dto.EquSupplierUpdateDto;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -70,11 +71,12 @@ public class EquSupplierServiceImpl implements IEquSupplierService
equSupplier.setDescription(dto.getDescription()); equSupplier.setDescription(dto.getDescription());
equSupplier.setContactBy(dto.getContactBy()); equSupplier.setContactBy(dto.getContactBy());
equSupplier.setContactWay(dto.getContactWay()); equSupplier.setContactWay(dto.getContactWay());
equSupplier.setCreateBy(dto.getCreateBy());
equSupplier.setCreateTime(new Date()); // 自动生成创建时间 equSupplier.setCreateTime(new Date()); // 自动生成创建时间
equSupplier.setStatus(dto.getStatus()); equSupplier.setStatus(dto.getStatus());
Long userId = SecurityUtils.getLoginUser().getUserId();
equSupplier.setCreateBy(userId);
return equSupplierMapper.insertEquSupplier(equSupplier); return equSupplierMapper.insertEquSupplier(equSupplier);
} }
@ -94,12 +96,13 @@ public class EquSupplierServiceImpl implements IEquSupplierService
equSupplier.setDescription(updateDto.getDescription()); equSupplier.setDescription(updateDto.getDescription());
equSupplier.setContactBy(updateDto.getContactBy()); equSupplier.setContactBy(updateDto.getContactBy());
equSupplier.setContactWay(updateDto.getContactWay()); equSupplier.setContactWay(updateDto.getContactWay());
equSupplier.setCreateBy(updateDto.getCreateBy());
equSupplier.setStatus(updateDto.getStatus()); equSupplier.setStatus(updateDto.getStatus());
// 后端自动设置修改时间 // 后端自动设置修改时间
equSupplier.setCreateTime(new Date()); equSupplier.setCreateTime(new Date());
Long userId = SecurityUtils.getLoginUser().getUserId();
equSupplier.setCreateBy(userId);
return equSupplierMapper.updateEquSupplier(equSupplier); return equSupplierMapper.updateEquSupplier(equSupplier);
} }

@ -57,6 +57,7 @@ public class EquTypeServiceImpl implements IEquTypeService
{ {
equType.setId(UUID.randomUUID().toString()); equType.setId(UUID.randomUUID().toString());
Long userId = SecurityUtils.getLoginUser().getUserId(); Long userId = SecurityUtils.getLoginUser().getUserId();
equType.setCreateBy(userId);
return equTypeMapper.insertEquType(equType); return equTypeMapper.insertEquType(equType);
} }
@ -70,6 +71,7 @@ public class EquTypeServiceImpl implements IEquTypeService
public int updateEquType(EquType equType) public int updateEquType(EquType equType)
{ {
Long userId = SecurityUtils.getLoginUser().getUserId(); Long userId = SecurityUtils.getLoginUser().getUserId();
equType.setCreateBy(userId);
return equTypeMapper.updateEquType(equType); return equTypeMapper.updateEquType(equType);
} }

@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="contactWay != null and contactWay != ''"> and contact_way = #{contactWay}</if> <if test="contactWay != null and contactWay != ''"> and contact_way = #{contactWay}</if>
<if test="createDate != null "> and create_date = #{createDate}</if> <if test="createDate != null "> and create_date = #{createDate}</if>
<if test="status != null "> and status = #{status}</if> <if test="status != null "> and status = #{status}</if>
<if test="createBy != null "> and create_by = #{createBy}</if>
</where> </where>
</select> </select>

Loading…
Cancel
Save