Compare commits

...

2 Commits

  1. 4
      ALOps_sys_backend/alops-admin/src/main/java/com/alops/web/controller/equManagement/EquSupplierController.java
  2. 6
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquManu.java
  3. 8
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquSupplier.java
  4. 6
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/domain/EquType.java
  5. 8
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquManuServiceImpl.java
  6. 8
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquSupplierServiceImpl.java
  7. 8
      ALOps_sys_backend/alops-system/src/main/java/com/alops/system/service/impl/EquTypeServiceImpl.java
  8. 4
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquManuMapper.xml
  9. 3
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquSupplierMapper.xml
  10. 1
      ALOps_sys_backend/alops-system/src/main/resources/mapper/system/EquTypeMapper.xml

@ -88,7 +88,7 @@ public class EquSupplierController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('device:supplier:add')") @PreAuthorize("@ss.hasPermi('device:supplier:add')")
@Log(title = "供应商功能信息", businessType = BusinessType.INSERT) @Log(title = "供应商功能信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping("/add")
@ApiOperation("新增供应商功能信息") @ApiOperation("新增供应商功能信息")
public AjaxResult add(@RequestBody EquSupplierAddDto dto) public AjaxResult add(@RequestBody EquSupplierAddDto dto)
{ {
@ -102,7 +102,7 @@ public class EquSupplierController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('device:supplier:edit')") @PreAuthorize("@ss.hasPermi('device:supplier:edit')")
@Log(title = "供应商功能信息", businessType = BusinessType.UPDATE) @Log(title = "供应商功能信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping("/edit")
@ApiOperation("修改供应商功能信息列表") @ApiOperation("修改供应商功能信息列表")
public AjaxResult edit(@RequestBody EquSupplierUpdateDto updateDto) { public AjaxResult edit(@RequestBody EquSupplierUpdateDto updateDto) {
return toAjax(equSupplierService.updateEquSupplier(updateDto)); return toAjax(equSupplierService.updateEquSupplier(updateDto));

@ -50,7 +50,7 @@ public class EquManu
private Long status; private Long status;
//@JsonIgnore //@JsonIgnore
private Long createBy; // 新增 private String createBy; // 新增
public EquManu() {} public EquManu() {}
@ -144,11 +144,11 @@ public class EquManu
return status; return status;
} }
public Long getCreateBy() { public String getCreateBy() {
return createBy; return createBy;
} }
public void setCreateBy(Long createBy) { public void setCreateBy(String createBy) {
this.createBy = createBy; this.createBy = createBy;
} }

@ -41,8 +41,8 @@ public class EquSupplier
@Excel(name = "l联系方式") @Excel(name = "l联系方式")
private String contactWay; private String contactWay;
/** 联系人姓名 */ /** 联系人姓名 */
@Excel(name = "创建人id") @Excel(name = "创建人")
private long createBy; private String createBy;
@ -117,12 +117,12 @@ public class EquSupplier
return status; return status;
} }
public Long getCreateBy() public String getCreateBy()
{ {
return createBy; return createBy;
} }
public void setCreateBy(Long createBy) public void setCreateBy(String createBy)
{ {
this.createBy = createBy; this.createBy = createBy;
} }

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

@ -59,8 +59,8 @@ 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(); String userName = SecurityUtils.getLoginUser().getUser().getUserName();
equManu.setCreateBy(userId); equManu.setCreateBy(userName);
return equManuMapper.insertEquManu(equManu); return equManuMapper.insertEquManu(equManu);
} }
@ -73,8 +73,8 @@ public class EquManuServiceImpl implements IEquManuService
@Override @Override
public int updateEquManu(EquManu equManu) public int updateEquManu(EquManu equManu)
{ {
Long userId = SecurityUtils.getLoginUser().getUserId(); String userName = SecurityUtils.getLoginUser().getUser().getUserName();
equManu.setCreateBy(userId); equManu.setCreateBy(userName);
return equManuMapper.updateEquManu(equManu); return equManuMapper.updateEquManu(equManu);
} }

@ -75,8 +75,8 @@ public class EquSupplierServiceImpl implements IEquSupplierService
equSupplier.setCreateTime(new Date()); // 自动生成创建时间 equSupplier.setCreateTime(new Date()); // 自动生成创建时间
equSupplier.setStatus(dto.getStatus()); equSupplier.setStatus(dto.getStatus());
Long userId = SecurityUtils.getLoginUser().getUserId(); String userName = SecurityUtils.getLoginUser().getUser().getUserName();
equSupplier.setCreateBy(userId); equSupplier.setCreateBy(userName);
return equSupplierMapper.insertEquSupplier(equSupplier); return equSupplierMapper.insertEquSupplier(equSupplier);
} }
@ -101,8 +101,8 @@ public class EquSupplierServiceImpl implements IEquSupplierService
// 后端自动设置修改时间 // 后端自动设置修改时间
equSupplier.setCreateTime(new Date()); equSupplier.setCreateTime(new Date());
Long userId = SecurityUtils.getLoginUser().getUserId(); String userName = SecurityUtils.getLoginUser().getUser().getUserName();
equSupplier.setCreateBy(userId); equSupplier.setCreateBy(userName);
return equSupplierMapper.updateEquSupplier(equSupplier); return equSupplierMapper.updateEquSupplier(equSupplier);
} }

@ -56,8 +56,8 @@ public class EquTypeServiceImpl implements IEquTypeService
public int insertEquType(EquType equType) public int insertEquType(EquType equType)
{ {
equType.setId(UUID.randomUUID().toString()); equType.setId(UUID.randomUUID().toString());
Long userId = SecurityUtils.getLoginUser().getUserId(); String userName = SecurityUtils.getLoginUser().getUser().getUserName();
equType.setCreateBy(userId); equType.setCreateBy(userName);
return equTypeMapper.insertEquType(equType); return equTypeMapper.insertEquType(equType);
} }
@ -70,8 +70,8 @@ public class EquTypeServiceImpl implements IEquTypeService
@Override @Override
public int updateEquType(EquType equType) public int updateEquType(EquType equType)
{ {
Long userId = SecurityUtils.getLoginUser().getUserId(); String userName = SecurityUtils.getLoginUser().getUser().getUserName();
equType.setCreateBy(userId); equType.setCreateBy(userName);
return equTypeMapper.updateEquType(equType); return equTypeMapper.updateEquType(equType);
} }

@ -32,11 +32,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if> <if test="description != null and description != ''"> and description = #{description}</if>
<if test="contactBy != null "> and contact_by = #{contactBy}</if> <if test="contactBy != null "> and contact_by LIKE CONCAT('%', #{contactBy}, '%')</if>
<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> <if test="createBy != null "> and create_by LIKE CONCAT('%', #{createBy}, '%')</if>
</where> </where>
</select> </select>

@ -30,9 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if> <if test="description != null and description != ''"> and description = #{description}</if>
<if test="contactBy != null and contactBy != ''"> and contact_by = #{contactBy}</if> <if test="contactBy != null and contactBy != ''"> and contact_by LIKE CONCAT('%', #{contactBy}, '%')</if>
<if test="contactWay != null and contactWay != ''"> and contact_way = #{contactWay}</if> <if test="contactWay != null and contactWay != ''"> and contact_way = #{contactWay}</if>
<if test="status != null "> and status = #{status}</if> <if test="status != null "> and status = #{status}</if>
<if test="createBy != null and createBy != ''"> and create_by LIKE CONCAT('%', #{createBy}, '%')</if>
</where> </where>
</select> </select>

@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="description != null and description != ''"> and description = #{description}</if> <if test="description != null and description != ''"> and description = #{description}</if>
<if test="image != null and image != ''"> and image = #{image}</if> <if test="image != null and image != ''"> and image = #{image}</if>
<if test="createDate != null "> and create_date = #{createDate}</if> <if test="createDate != null "> and create_date = #{createDate}</if>
<if test="createBy != null "> and create_by LIKE CONCAT('%', #{createBy}, '%')</if>
</where> </where>
</select> </select>

Loading…
Cancel
Save