Commit 07351378 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-admin-api]: 更新操作有误

parent c4b6e64c
......@@ -187,7 +187,7 @@ public class AdminGoodsService {
attributeService.add(attribute);
}
else if(attribute.getDeleted()){
attributeService.deleteByGid(attribute.getId());
attributeService.deleteById(attribute.getId());
}
else if(attribute.getUpdateTime() == null){
attributeService.updateById(attribute);
......
......@@ -36,6 +36,10 @@ public class LitemallGoodsAttributeService {
goodsAttributeMapper.logicalDeleteByExample(example);
}
public void deleteById(Integer id) {
goodsAttributeMapper.logicalDeleteByPrimaryKey(id);
}
public void updateById(LitemallGoodsAttribute attribute) {
attribute.setUpdateTime(LocalDateTime.now());
goodsAttributeMapper.updateByPrimaryKeySelective(attribute);
......
Supports Markdown
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