Commit 770121d9 by jinfeng.wang

fix

parent cab8f76d
......@@ -15,6 +15,9 @@ public interface ResultDao {
@Insert("REPLACE INTO tag_result(package_name,app_name,platform,feat_id,comment,user_id,update_time) VALUES(#{packageName}, #{appName}, #{platform}, #{featId}, #{comment}, #{userId}, #{updateTime})")
boolean save(TagResult tagResult);
@Delete("DELETE FROM tag_result WHERE package_name = #{packageName}")
boolean delete(String packageName);
@Select("SELECT * FROM tag_result WHERE package_name = #{packageName} AND user_id = #{userId}")
@Results({@Result(property = "packageName", column = "package_name"),
@Result(property = "appName", column = "app_name"),
......
......@@ -54,6 +54,9 @@ public class ResultServiceImpl implements ResultService {
tagResult.setComment("comment");
tagResult.setUserId(user.getUserId());
tagResult.setUpdateTime(new Date());
if (user.getRole() == 1) {
resultDao.delete(packageName);
}
return this.resultDao.save(tagResult);
}
......
Markdown is supported
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