fix: 修复材料属性被删除的问题
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package mjkf.xinke.main.model.db;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -190,21 +191,21 @@ public class Material extends Model<Material> {
|
||||
}
|
||||
|
||||
public void edit(MaterialEditRequest params, SaBaseLoginUser user) {
|
||||
// this.category1 = params.getCategory1();
|
||||
// this.category2 = params.getCategory2();
|
||||
// this.category3 = params.getCategory3();
|
||||
// this.category4 = params.getCategory4();
|
||||
this.name = params.getName();
|
||||
this.unit = params.getUnit();
|
||||
this.spec = params.getSpec();
|
||||
this.tax = params.getTax();
|
||||
this.type = params.getType();
|
||||
this.sort = params.getSort();
|
||||
this.roundBit = params.getRoundBit();
|
||||
this.roundMethod = params.getRoundMethod();
|
||||
this.code = buildCode(category1, category2, category3, category4);
|
||||
this.updateTime = LocalDateTime.now();
|
||||
this.updateUserName = user.getName();
|
||||
this.updateUserId = user.getId();
|
||||
if (ObjectUtil.isNotEmpty(params.getRoundBit())) {
|
||||
this.roundBit = params.getRoundBit();
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(params.getRoundMethod())) {
|
||||
this.roundMethod = params.getRoundMethod();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user