Commit 94662d07 authored by 曹盼盼's avatar 曹盼盼

修改管材校验

parent 084bedb0
package com.yeejoin.amos.boot.module.ugp.api.Enum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
/**
* @Author cpp
* @Description
* @Date 2022/11/18
*/
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum ImageEnum {
JPG("jpg"),
JPEG("jpeg"),
GIF("gif"),
PNG ("png"),
BMP ("bmp"),
PSD ("psd");
private String name;
}
......@@ -169,8 +169,11 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
return jsonObject;
}
public Material getMaterial(Long materialId){
Material material = materialMapper.selectById(materialId);
return material;
// 根据管材编号查询管材(管材编号必须唯一,报错一因为脏数据管材编号不唯一)
public Material getMaterial(String code){
LambdaQueryWrapper<Material> wrapper = new LambdaQueryWrapper<>( );
wrapper.eq(Material ::getCode,code);
Material material = materialMapper.selectOne(wrapper);
return material;
}
}
\ No newline at end of file
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 to comment