master:代发认证没有权限处理;
parent
6b02bee1b2
commit
d789eb9a45
|
|
@ -30,14 +30,14 @@ public class UserAuthenticationController extends XktBaseController {
|
|||
|
||||
final IUserAuthenticationService userAuthService;
|
||||
|
||||
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin')")
|
||||
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin,seller')")
|
||||
@ApiOperation(value = "新增代发 ", httpMethod = "POST", response = R.class)
|
||||
@PostMapping()
|
||||
public R<Integer> create(@Validated @RequestBody UserAuthCreateVO createVO) {
|
||||
return R.ok(userAuthService.create(BeanUtil.toBean(createVO, UserAuthCreateDTO.class)));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin')")
|
||||
@PreAuthorize("@ss.hasAnyRoles('admin,general_admin,seller')")
|
||||
@ApiOperation(value = "APP 代发列表 ", httpMethod = "POST", response = R.class)
|
||||
@PostMapping("/app/page")
|
||||
public R<Page<UserAuthAppPageResDTO>> appPage(@Validated @RequestBody UserAuthPageVO pageVO) {
|
||||
|
|
|
|||
|
|
@ -58,11 +58,5 @@ public class UserNoticeController extends XktBaseController {
|
|||
return R.ok(userNoticeService.appBatchRead());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "APP - 未读的分类,点击进入分类列表时调用变为已读", httpMethod = "PUT", response = R.class)
|
||||
@PutMapping("/app/read/type/{targetNoticeType}")
|
||||
public R<Integer> appTypeRead(@PathVariable Integer targetNoticeType) {
|
||||
return R.ok(userNoticeService.appTypeRead(targetNoticeType));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class StoreProductCategoryAttribute extends XktBaseEntity {
|
|||
*/
|
||||
private String shaftLiningMaterial;
|
||||
/**
|
||||
* 靴筒面材质
|
||||
* 鞋面材质(靴筒面材质)
|
||||
*/
|
||||
private String shaftMaterial;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -84,10 +84,23 @@ public class UserNoticeServiceImpl implements IUserNoticeService {
|
|||
* @return List<UserNoticeAppResDTO>
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
@Transactional
|
||||
public Page<UserNoticeAppResDTO> appTypePage(UserNoticeAppTypePageDTO pageDTO) {
|
||||
Long userId = SecurityUtils.getUserIdSafe();
|
||||
if (ObjectUtils.isEmpty(userId)) {
|
||||
throw new ServiceException("用户未登录,请先登录!", HttpStatus.ERROR);
|
||||
}
|
||||
PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize());
|
||||
List<UserNoticeAppResDTO> list = this.userNoticeMapper.selectAppTypePage(SecurityUtils.getUserId(), pageDTO.getTargetNoticeType());
|
||||
// 将用户所有未读消息设为已读
|
||||
List<UserNotice> targetUserNoticeList = this.userNoticeMapper.selectList(new LambdaQueryWrapper<UserNotice>()
|
||||
.eq(UserNotice::getUserId, userId).eq(UserNotice::getReadStatus, 0)
|
||||
.eq(UserNotice::getTargetNoticeType, pageDTO.getTargetNoticeType())
|
||||
.eq(UserNotice::getDelFlag, Constants.UNDELETED));
|
||||
if (CollectionUtils.isNotEmpty(targetUserNoticeList)) {
|
||||
targetUserNoticeList.forEach(x -> x.setReadStatus(1));
|
||||
this.userNoticeMapper.updateById(targetUserNoticeList);
|
||||
}
|
||||
return Page.convert(new PageInfo<>(list));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue