rk
2025-12-15 a1a6e227628810259fcba0fff146792e97a80b8a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package com.doumee.api.web;
 
 
import com.doumee.config.annotation.LoginRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.Areas;
import com.doumee.dao.web.dto.*;
import com.doumee.dao.web.dto.activity.ActivityCardDTO;
import com.doumee.dao.web.dto.shop.Position;
import com.doumee.service.business.ShopFollowService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
@Api(tags = "用户member业务")
@Trace(exclude = true)
@LoginRequired
@RestController
@RequestMapping("/web/member")
@Slf4j
public class MemberApi extends ApiController{
 
 
    /**
     * 查询获取关注对象
     * @param memberId
     * @param memberId
     * @return
     */
    @ApiOperation(value = "查询获取关注对象", notes = "小程序端")
    @GetMapping("/getMemberDTO")
    public ApiResponse<MemberDTO> getMemberDTO(@RequestParam  Integer memberId){
        return ApiResponse.success(shopFollowService.getMemberDTO(memberId,getMemberId(), Constants.ONE));
    }
 
 
    /**
     * 分页获取关注的 资讯/探店/活动
     * @param pageWrap
     * @return
     */
    @ApiOperation(value = "分页获取关注的 资讯 探店 活动", notes = "小程序端")
    @PostMapping("/getActivityCard")
    public ApiResponse<PageData<ActivityCardDTO>> getActivityCard(@RequestBody PageWrap pageWrap){
        return ApiResponse.success(activityService.getUserFollowActivityCard(pageWrap,getMemberId()));
    }
 
    @ApiOperation(value = "查询个人信息", notes = "小程序端")
    @PostMapping("/getMemberOwnDTO")
    public  ApiResponse<MemberOwnDTO> getMemberOwnDTO(){
        return ApiResponse.success(memberService.getMemberOwnDTO(getMemberId()));
    }
 
 
 
    @ApiOperation(value = "修改跟人信息", notes = "小程序端")
    @PostMapping("/updateMemberOwnDTO")
    public ApiResponse updateMemberOwnDTO(@RequestBody  MemberOwnDTO memberOwnDTO){
        memberService.updateMemberOwnDTO(memberOwnDTO);
        return ApiResponse.success(null);
    }
    /**
     * 查询关注的人和商铺
     * @param pageWrap
     * @return
     */
    @ApiOperation(value = "修改跟人信息", notes = "小程序端")
    @PostMapping("/getFollowMemberAndShop")
    public ApiResponse<PageData<MemberDTO>> getFollowMemberAndShop(@RequestBody PageWrap<MemberDTO> pageWrap){
        return ApiResponse.success(shopFollowService.getFollowMemberAndShop(pageWrap));
    }
 
    /**
     * 用户定位
     * @param position
     * @return
     */
    @ApiOperation(value = "用户定位", notes = "小程序端")
    @PostMapping("/getMemberAreas")
    @LoginRequired
    public ApiResponse<Areas> getMemberAreas(@RequestBody Position position){
        return ApiResponse.success(memberService.getMemberAreas(position,getMemberId()));
    }
 
    /**
     * 设置用户所在城市
     * @param cityId
 
     * @return
     */
    @ApiOperation(value = "设置用户所在城市", notes = "小程序端")
    @GetMapping("/updateMemberCity")
    @LoginRequired
    public ApiResponse updateMemberCity(@RequestParam Integer cityId){
        memberService.updateMemberCity(cityId,getMemberId());
        return ApiResponse.success(null);
    }
}