添加 service->bot->update 无效更新判断规则
This commit is contained in:
parent
3de67ee47c
commit
7524007b9c
|
@ -19,6 +19,7 @@ public class UpdateServiceImpl implements UpdateService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BotMapper botMapper;
|
private BotMapper botMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> update(Map<String, String> data) {
|
public Map<String, String> update(Map<String, String> data) {
|
||||||
// 先获取当前用户,用于判断更新对象是否有权限
|
// 先获取当前用户,用于判断更新对象是否有权限
|
||||||
|
@ -72,6 +73,11 @@ public class UpdateServiceImpl implements UpdateService {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bot.getTitle().equals(title) && bot.getDescription().equals(description) && bot.getContent().equals(content)) {
|
||||||
|
map.put("error_message", "未作出修改");
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
Date createTime = bot.getCreatetime();
|
Date createTime = bot.getCreatetime();
|
||||||
int rating = bot.getRating();
|
int rating = bot.getRating();
|
||||||
|
|
Loading…
Reference in New Issue