Commit 94463c26 authored by Junling Bu's avatar Junling Bu
Browse files

litemall-db模块更新:

1. mybatis generator更新1.3.7
2. mybatis-generator-plugin更新1.2.12
3. 更新所有自动生成代码
4. OrderMapper,实现基于update_time的乐观锁更新
parent d4b95ef2
......@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
@Service
......@@ -57,6 +58,7 @@ public class LitemallAdService {
}
public int updateById(LitemallAd ad) {
ad.setUpdateTime(LocalDateTime.now());
return adMapper.updateByPrimaryKeySelective(ad);
}
......@@ -65,6 +67,8 @@ public class LitemallAdService {
}
public void add(LitemallAd ad) {
ad.setAddTime(LocalDateTime.now());
ad.setUpdateTime(LocalDateTime.now());
adMapper.insertSelective(ad);
}
......
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