|
@@ -9,13 +9,20 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
9
|
9
|
import com.example.wholeestate.common.Constant;
|
10
|
10
|
import com.example.wholeestate.common.resp.ResponseBean;
|
11
|
11
|
import com.example.wholeestate.common.uuid.IdGen;
|
|
12
|
+import com.example.wholeestate.dao.ActivityEnrollMapper;
|
|
13
|
+import com.example.wholeestate.dao.AppointmentMapper;
|
12
|
14
|
import com.example.wholeestate.dao.CustomerMapper;
|
13
|
15
|
|
|
16
|
+import com.example.wholeestate.dao.TaCollectionMapper;
|
|
17
|
+import com.example.wholeestate.model.Activity;
|
|
18
|
+import com.example.wholeestate.model.Appointment;
|
14
|
19
|
import com.example.wholeestate.model.Customer;
|
|
20
|
+import com.example.wholeestate.model.Building;
|
15
|
21
|
import com.example.wholeestate.service.ICustomerService;
|
16
|
22
|
import com.example.wholeestate.utils.BeanTools;
|
17
|
23
|
import com.example.wholeestate.wx.mini.IWxMini;
|
18
|
24
|
import org.apache.http.HttpStatus;
|
|
25
|
+import org.checkerframework.checker.units.qual.A;
|
19
|
26
|
import org.springframework.beans.factory.annotation.Autowired;
|
20
|
27
|
import org.springframework.stereotype.Service;
|
21
|
28
|
|
|
@@ -23,7 +30,6 @@ import java.time.LocalDateTime;
|
23
|
30
|
import java.util.Date;
|
24
|
31
|
import java.util.HashMap;
|
25
|
32
|
import java.util.List;
|
26
|
|
-
|
27
|
33
|
/**
|
28
|
34
|
* <p>
|
29
|
35
|
* 服务实现类
|
|
@@ -43,6 +49,15 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
43
|
49
|
|
44
|
50
|
private IdGen idGen = IdGen.get();
|
45
|
51
|
|
|
52
|
+ @Autowired
|
|
53
|
+ private ActivityEnrollMapper activityEnrollMapper;
|
|
54
|
+
|
|
55
|
+ @Autowired
|
|
56
|
+ private AppointmentMapper appointmentMapper;
|
|
57
|
+
|
|
58
|
+ @Autowired
|
|
59
|
+ private TaCollectionMapper taCollectionMapper;
|
|
60
|
+
|
46
|
61
|
@Override
|
47
|
62
|
public ResponseBean customerList(Integer pageNum, Integer pageSize, String phone, Date beginDate, Date endDate, String name , String cardNo) {
|
48
|
63
|
ResponseBean response= new ResponseBean();
|
|
@@ -112,6 +127,18 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
112
|
127
|
return responseBean;
|
113
|
128
|
}
|
114
|
129
|
|
|
130
|
+ // 获取用户报名活动信息
|
|
131
|
+ List<Activity> activitys = activityEnrollMapper.selectOpenidActivityEnrollList(openid);
|
|
132
|
+ customer.setActivity(activitys);
|
|
133
|
+
|
|
134
|
+ // 获取用户预约信息
|
|
135
|
+ List<Appointment> appointments = appointmentMapper.getOpenidAppendables(openid);
|
|
136
|
+ customer.setAppointment(appointments);
|
|
137
|
+
|
|
138
|
+ // 获取用户收藏记录
|
|
139
|
+ List<Building> taCollections = taCollectionMapper.openidCollectionBuildingList(openid);
|
|
140
|
+ customer.setCollectionBuilding(taCollections);
|
|
141
|
+
|
115
|
142
|
responseBean.addSuccess(customer);
|
116
|
143
|
return responseBean;
|
117
|
144
|
}
|
|
@@ -125,6 +152,17 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> i
|
125
|
152
|
queryWrapper.eq("openid", openid);
|
126
|
153
|
Customer customer = customerMapper.selectOne(queryWrapper);
|
127
|
154
|
if (null != customer) {
|
|
155
|
+ // 获取用户报名活动信息
|
|
156
|
+ List<Activity> activitys = activityEnrollMapper.selectOpenidActivityEnrollList(openid);
|
|
157
|
+ customer.setActivity(activitys);
|
|
158
|
+
|
|
159
|
+ // 获取用户预约信息
|
|
160
|
+ List<Appointment> appointments = appointmentMapper.getOpenidAppendables(openid);
|
|
161
|
+ customer.setAppointment(appointments);
|
|
162
|
+
|
|
163
|
+ // 获取用户收藏记录
|
|
164
|
+ List<Building> taCollections = taCollectionMapper.openidCollectionBuildingList(openid);
|
|
165
|
+ customer.setCollectionBuilding(taCollections);
|
128
|
166
|
responseBean.addSuccess(customer);
|
129
|
167
|
return responseBean;
|
130
|
168
|
}
|