Commit 0d53e26b authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/dev' into dev

parents 2a2634ac 48fd0e08
......@@ -176,7 +176,7 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> {
public AppUserLogin checkeUserLogin(String username) {
Example example = new Example(AppUserLogin.class);
example.createCriteria().andEqualTo("username", username).andEqualTo("isdel", 0).andEqualTo("status", 0);
example.createCriteria().andEqualTo("username", username).andEqualTo("isdel", 0);
List<AppUserLogin> userLoginList = mapper.selectByExample(example);
if (userLoginList != null && userLoginList.size() != 0) {
return userLoginList.get(0);
......
......@@ -118,4 +118,14 @@ public class NoticeInfoBiz extends BaseBiz<NoticeInfoMapper,NoticeInfo> {
}
return ObjectRestResponse.succ();
}
public ObjectRestResponse countObj(NoticeInfoDto noticeInfoDto) {
Example example = new Example(NoticeInfo.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("isRead", 1);
criteria.andEqualTo("userId", noticeInfoDto.getUserId());
criteria.andEqualTo("isDel", 0);
return ObjectRestResponse.succ(mapper.selectCountByExample(example));
}
}
\ No newline at end of file
......@@ -48,4 +48,11 @@ public class NoticeInfoWebController extends BaseController<NoticeInfoBiz,Notice
noticeInfoDto.setUserId(Integer.parseInt(getCurrentUserId()));
return baseBiz.updateAll(noticeInfoDto);
}
@GetMapping(value = "countObj")
public ObjectRestResponse countObj(NoticeInfoDto noticeInfoDto) {
noticeInfoDto.setUserId(Integer.parseInt(getCurrentUserId()));
return baseBiz.countObj(noticeInfoDto);
}
}
\ No newline at end of file
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