add worker login
This commit is contained in:
parent
bdd1279167
commit
208d5bcd27
@ -9,7 +9,7 @@
|
|||||||
</option>
|
</option>
|
||||||
<option name="workspaceImportForciblyTurnedOn" value="true" />
|
<option name="workspaceImportForciblyTurnedOn" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="18" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -1,10 +1,12 @@
|
|||||||
package cn.edu.cqwu.repair.service;
|
package cn.edu.cqwu.repair.service;
|
||||||
|
|
||||||
import cn.edu.cqwu.repair.entity.AdminUser;
|
import cn.edu.cqwu.repair.entity.AdminUser;
|
||||||
|
import cn.edu.cqwu.repair.entity.Worker;
|
||||||
import cn.edu.cqwu.repair.util.PageModel;
|
import cn.edu.cqwu.repair.util.PageModel;
|
||||||
|
|
||||||
public interface RecordService {
|
public interface RecordService {
|
||||||
int add(AdminUser user, String ip);
|
int add(AdminUser user, String ip);
|
||||||
|
int add(Worker user, String ip);
|
||||||
|
|
||||||
PageModel pageByLogname(String logname, String group, int pageSize, int pageNo);
|
PageModel pageByLogname(String logname, String group, int pageSize, int pageNo);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package cn.edu.cqwu.repair.service.impl;
|
|||||||
import cn.edu.cqwu.repair.dao.RecordDao;
|
import cn.edu.cqwu.repair.dao.RecordDao;
|
||||||
import cn.edu.cqwu.repair.entity.AdminUser;
|
import cn.edu.cqwu.repair.entity.AdminUser;
|
||||||
import cn.edu.cqwu.repair.entity.Record;
|
import cn.edu.cqwu.repair.entity.Record;
|
||||||
|
import cn.edu.cqwu.repair.entity.Worker;
|
||||||
import cn.edu.cqwu.repair.service.RecordService;
|
import cn.edu.cqwu.repair.service.RecordService;
|
||||||
import cn.edu.cqwu.repair.util.PageModel;
|
import cn.edu.cqwu.repair.util.PageModel;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -26,6 +27,15 @@ public class RecordServiceImpl implements RecordService {
|
|||||||
return recordDao.add(record);
|
return recordDao.add(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int add(Worker user, String ip) {
|
||||||
|
Record record = new Record();
|
||||||
|
record.setLogname(user.getUsername());
|
||||||
|
record.setUsergroup("工人");
|
||||||
|
record.setLogip(ip);
|
||||||
|
return recordDao.add(record);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageModel pageByLogname(String logname, String group, int pageSize, int pageNo) {
|
public PageModel pageByLogname(String logname, String group, int pageSize, int pageNo) {
|
||||||
return recordDao.pageByLogname(logname, group, pageSize, pageNo);
|
return recordDao.pageByLogname(logname, group, pageSize, pageNo);
|
||||||
|
@ -62,6 +62,25 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</c:when>
|
</c:when>
|
||||||
|
<c:when test="${not empty sessionScope.workerUser}">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="${webroot}/admin/state.jsp" class="nav-link link-body-emphasis" aria-current="page">
|
||||||
|
>> 个人中心
|
||||||
|
</a>
|
||||||
|
<a href="${webroot}/admin/state.jsp" class="nav-link link-body-emphasis" aria-current="page">
|
||||||
|
>> 维修列表
|
||||||
|
</a>
|
||||||
|
<a href="${webroot}/admin/state.jsp" class="nav-link link-body-emphasis" aria-current="page">
|
||||||
|
>> 历史维修记录
|
||||||
|
</a>
|
||||||
|
<a href="${webroot}/admin/state.jsp" class="nav-link link-body-emphasis" aria-current="page">
|
||||||
|
>> 历史登录记录
|
||||||
|
</a>
|
||||||
|
<a href="${webroot}/admin/state.jsp" class="nav-link link-body-emphasis" aria-current="page">
|
||||||
|
>> 个人中心
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="${webroot}/" class="nav-link link-body-emphasis" aria-current="page">
|
<a href="${webroot}/" class="nav-link link-body-emphasis" aria-current="page">
|
||||||
|
Loading…
Reference in New Issue
Block a user