first commit

This commit is contained in:
2025-02-20 15:14:38 +08:00
commit 70e3764011
1113 changed files with 107789 additions and 0 deletions
@@ -0,0 +1,64 @@
package lingtao.net.service;
import java.util.List;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lingtao.net.bean.Msg;
import lingtao.net.bean.SysUser;
import lingtao.net.bean.UpdateLog;
import lingtao.net.dao.UpdateLogMapper;
@Service
public class UpdateLogService {
@Autowired
private UpdateLogMapper updateLogMapper;
public List<UpdateLog> getUpdateLogs(UpdateLog updateLog) {
return updateLogMapper.getUpdateLogs(updateLog);
}
public Msg addLog(UpdateLog updateLog, HttpSession session) {
SysUser user = (SysUser) session.getAttribute("USER_SESSION");
updateLog.setCreateBy(user.getRealname());
try {
updateLogMapper.addLog(updateLog);
return Msg.success();
} catch (Exception e) {
return Msg.fail();
}
}
public Msg updateLogById(UpdateLog updateLog, HttpSession session) {
try {
updateLogMapper.updateLogById(updateLog);
return Msg.success();
} catch (Exception e) {
return Msg.fail();
}
}
public Msg deleteLogById(Integer id) {
try {
updateLogMapper.deleteLogById(id);
return Msg.success();
} catch (Exception e) {
return Msg.fail();
}
}
public Msg changeReadLogStatus() {
try {
updateLogMapper.changeReadLogStatus();
return Msg.success();
} catch (Exception e) {
return Msg.fail();
}
}
}