com.macro.mall.portal.domain.MemberBrandAttention Java Examples
The following examples show how to use
com.macro.mall.portal.domain.MemberBrandAttention.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MemberAttentionController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("显示关注列表") @RequestMapping(value = "/list/{memberId}", method = RequestMethod.GET) @ResponseBody public CommonResult<List<MemberBrandAttention>> list(@PathVariable Long memberId) { List<MemberBrandAttention> memberBrandAttentionList = memberAttentionService.list(memberId); return CommonResult.success(memberBrandAttentionList); }
Example #2
Source File: MemberAttentionServiceImpl.java From macrozheng-mall with MIT License | 5 votes |
@Override public int add(MemberBrandAttention memberBrandAttention) { int count = 0; MemberBrandAttention findAttention = memberBrandAttentionRepository.findByMemberIdAndBrandId(memberBrandAttention.getMemberId(), memberBrandAttention.getBrandId()); if (findAttention == null) { memberBrandAttentionRepository.save(memberBrandAttention); count = 1; } return count; }
Example #3
Source File: MemberAttentionController.java From macrozheng-mall with MIT License | 5 votes |
@ApiOperation("显示关注列表") @RequestMapping(value = "/list/{memberId}", method = RequestMethod.GET) @ResponseBody public Object list(@PathVariable Long memberId) { List<MemberBrandAttention> memberBrandAttentionList = memberAttentionService.list(memberId); return new CommonResult().success(memberBrandAttentionList); }
Example #4
Source File: MemberAttentionController.java From macrozheng-mall with MIT License | 5 votes |
@ApiOperation("添加品牌关注") @RequestMapping(value = "/add", method = RequestMethod.POST) @ResponseBody public Object add(@RequestBody MemberBrandAttention memberBrandAttention) { int count = memberAttentionService.add(memberBrandAttention); if(count>0){ return new CommonResult().success(count); }else{ return new CommonResult().failed(); } }
Example #5
Source File: MemberAttentionServiceImpl.java From mall with Apache License 2.0 | 5 votes |
@Override public int add(MemberBrandAttention memberBrandAttention) { int count = 0; UmsMember member = memberService.getCurrentMember(); memberBrandAttention.setMemberId(member.getId()); memberBrandAttention.setMemberNickname(member.getNickname()); memberBrandAttention.setMemberIcon(member.getIcon()); memberBrandAttention.setCreateTime(new Date()); MemberBrandAttention findAttention = memberBrandAttentionRepository.findByMemberIdAndBrandId(memberBrandAttention.getMemberId(), memberBrandAttention.getBrandId()); if (findAttention == null) { memberBrandAttentionRepository.save(memberBrandAttention); count = 1; } return count; }
Example #6
Source File: MemberAttentionController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("显示关注品牌详情") @RequestMapping(value = "/detail", method = RequestMethod.GET) @ResponseBody public CommonResult<MemberBrandAttention> detail(@RequestParam Long brandId) { MemberBrandAttention memberBrandAttention = memberAttentionService.detail(brandId); return CommonResult.success(memberBrandAttention); }
Example #7
Source File: MemberAttentionController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("显示关注列表") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult<CommonPage<MemberBrandAttention>> list(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) { Page<MemberBrandAttention> page = memberAttentionService.list(pageNum,pageSize); return CommonResult.success(CommonPage.restPage(page)); }
Example #8
Source File: MemberAttentionController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("添加品牌关注") @RequestMapping(value = "/add", method = RequestMethod.POST) @ResponseBody public CommonResult add(@RequestBody MemberBrandAttention memberBrandAttention) { int count = memberAttentionService.add(memberBrandAttention); if(count>0){ return CommonResult.success(count); }else{ return CommonResult.failed(); } }
Example #9
Source File: MemberAttentionServiceImpl.java From macrozheng with Apache License 2.0 | 5 votes |
@Override public int add(MemberBrandAttention memberBrandAttention) { int count = 0; MemberBrandAttention findAttention = memberBrandAttentionRepository.findByMemberIdAndBrandId(memberBrandAttention.getMemberId(), memberBrandAttention.getBrandId()); if (findAttention == null) { memberBrandAttentionRepository.save(memberBrandAttention); count = 1; } return count; }
Example #10
Source File: MemberAttentionController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("添加品牌关注") @RequestMapping(value = "/add", method = RequestMethod.POST) @ResponseBody public CommonResult add(@RequestBody MemberBrandAttention memberBrandAttention) { int count = memberAttentionService.add(memberBrandAttention); if(count>0){ return CommonResult.success(count); }else{ return CommonResult.failed(); } }
Example #11
Source File: MemberAttentionController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("添加品牌关注") @RequestMapping(value = "/add", method = RequestMethod.POST) @ResponseBody public CommonResult add(@RequestBody MemberBrandAttention memberBrandAttention) { int count = memberAttentionService.add(memberBrandAttention); if(count>0){ return CommonResult.success(count); }else{ return CommonResult.failed(); } }
Example #12
Source File: MemberAttentionServiceImpl.java From mall-swarm with Apache License 2.0 | 5 votes |
@Override public int add(MemberBrandAttention memberBrandAttention) { int count = 0; MemberBrandAttention findAttention = memberBrandAttentionRepository.findByMemberIdAndBrandId(memberBrandAttention.getMemberId(), memberBrandAttention.getBrandId()); if (findAttention == null) { memberBrandAttentionRepository.save(memberBrandAttention); count = 1; } return count; }
Example #13
Source File: MemberAttentionController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("显示关注列表") @RequestMapping(value = "/list/{memberId}", method = RequestMethod.GET) @ResponseBody public CommonResult<List<MemberBrandAttention>> list(@PathVariable Long memberId) { List<MemberBrandAttention> memberBrandAttentionList = memberAttentionService.list(memberId); return CommonResult.success(memberBrandAttentionList); }
Example #14
Source File: MemberAttentionServiceImpl.java From macrozheng-mall with MIT License | 4 votes |
@Override public List<MemberBrandAttention> list(Long memberId) { return memberBrandAttentionRepository.findByMemberId(memberId); }
Example #15
Source File: MemberAttentionServiceImpl.java From macrozheng with Apache License 2.0 | 4 votes |
@Override public List<MemberBrandAttention> list(Long memberId) { return memberBrandAttentionRepository.findByMemberId(memberId); }
Example #16
Source File: MemberAttentionServiceImpl.java From mall-swarm with Apache License 2.0 | 4 votes |
@Override public List<MemberBrandAttention> list(Long memberId) { return memberBrandAttentionRepository.findByMemberId(memberId); }
Example #17
Source File: MemberAttentionServiceImpl.java From mall with Apache License 2.0 | 4 votes |
@Override public MemberBrandAttention detail(Long brandId) { UmsMember member = memberService.getCurrentMember(); return memberBrandAttentionRepository.findByMemberIdAndBrandId(member.getId(), brandId); }
Example #18
Source File: MemberAttentionServiceImpl.java From mall with Apache License 2.0 | 4 votes |
@Override public Page<MemberBrandAttention> list(Integer pageNum, Integer pageSize) { UmsMember member = memberService.getCurrentMember(); Pageable pageable = PageRequest.of(pageNum-1,pageSize); return memberBrandAttentionRepository.findByMemberId(member.getId(),pageable); }
Example #19
Source File: MemberAttentionService.java From mall with Apache License 2.0 | 2 votes |
/** * 获取用户关注列表 */ Page<MemberBrandAttention> list(Integer pageNum, Integer pageSize);
Example #20
Source File: MemberAttentionService.java From macrozheng-mall with MIT License | 2 votes |
/** * 获取用户关注列表 */ List<MemberBrandAttention> list(Long memberId);
Example #21
Source File: MemberAttentionService.java From macrozheng-mall with MIT License | 2 votes |
/** * 添加关注 */ int add(MemberBrandAttention memberBrandAttention);
Example #22
Source File: MemberAttentionService.java From mall-swarm with Apache License 2.0 | 2 votes |
/** * 添加关注 */ int add(MemberBrandAttention memberBrandAttention);
Example #23
Source File: MemberAttentionService.java From mall with Apache License 2.0 | 2 votes |
/** * 获取用户关注详情 */ MemberBrandAttention detail(Long brandId);
Example #24
Source File: MemberAttentionService.java From mall with Apache License 2.0 | 2 votes |
/** * 添加关注 */ int add(MemberBrandAttention memberBrandAttention);
Example #25
Source File: MemberAttentionService.java From mall-swarm with Apache License 2.0 | 2 votes |
/** * 获取用户关注列表 */ List<MemberBrandAttention> list(Long memberId);
Example #26
Source File: MemberAttentionService.java From macrozheng with Apache License 2.0 | 2 votes |
/** * 获取用户关注列表 */ List<MemberBrandAttention> list(Long memberId);
Example #27
Source File: MemberAttentionService.java From macrozheng with Apache License 2.0 | 2 votes |
/** * 添加关注 */ int add(MemberBrandAttention memberBrandAttention);
Example #28
Source File: MemberBrandAttentionRepository.java From mall with Apache License 2.0 | votes |
Page<MemberBrandAttention> findByMemberId(Long memberId, Pageable pageable);
Example #29
Source File: MemberBrandAttentionRepository.java From mall with Apache License 2.0 | votes |
MemberBrandAttention findByMemberIdAndBrandId(Long memberId, Long brandId);
Example #30
Source File: MemberBrandAttentionRepository.java From mall-swarm with Apache License 2.0 | votes |
List<MemberBrandAttention> findByMemberId(Long memberId);