fix[litemall-admin-api]: 更新操作有误
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user