|
@@ -59,7 +59,7 @@ public class TaPointsRecordsController extends BaseController {
|
59
|
59
|
* @param pageSize
|
60
|
60
|
* @return
|
61
|
61
|
*/
|
62
|
|
- @RequestMapping(value="/taPointsRecords",method= RequestMethod.GET)
|
|
62
|
+ @RequestMapping(value="/admin/taPointsRecords",method= RequestMethod.GET)
|
63
|
63
|
public ResponseBean taPointsRecordsList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
64
|
64
|
@RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
|
65
|
65
|
ResponseBean responseBean = new ResponseBean();
|
|
@@ -79,12 +79,47 @@ public class TaPointsRecordsController extends BaseController {
|
79
|
79
|
return responseBean;
|
80
|
80
|
}
|
81
|
81
|
|
|
82
|
+ /**
|
|
83
|
+ * 分页查询列表
|
|
84
|
+ * @param pageNum
|
|
85
|
+ * @param pageSize
|
|
86
|
+ * @return
|
|
87
|
+ */
|
|
88
|
+ @RequestMapping(value="/wx/taPointsRecords",method= RequestMethod.GET)
|
|
89
|
+ public ResponseBean taWxPointsRecordsList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
|
90
|
+ @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
|
91
|
+ HttpServletRequest request){
|
|
92
|
+ ResponseBean responseBean = new ResponseBean();
|
|
93
|
+ try {
|
|
94
|
+ String openid = JWTUtils.getSubject(request);
|
|
95
|
+ Integer orgId = getOrgId(request);
|
|
96
|
+ List<TaPerson> taPersons = taPersonService.getPersonsByOpenId(openid);
|
|
97
|
+ if (null == taPersons || taPersons.size() != 1) {
|
|
98
|
+ return ResponseBean.error("验证人员信息失败", ResponseBean.ERROR_UNAVAILABLE);
|
|
99
|
+ }
|
|
100
|
+ TaPerson person = taPersons.get(0);
|
|
101
|
+ //使用分页插件
|
|
102
|
+ IPage<TaPointsRecords> pg = new Page<>(pageNum, pageSize);
|
|
103
|
+ QueryWrapper<TaPointsRecords> queryWrapper = new QueryWrapper<>();
|
|
104
|
+ queryWrapper.eq("person_id",person.getPersonId());
|
|
105
|
+ queryWrapper.orderByDesc("create_date");
|
|
106
|
+
|
|
107
|
+ IPage<TaPointsRecords> result = iTaPointsRecordsService.page(pg, queryWrapper);
|
|
108
|
+ responseBean.addSuccess(result);
|
|
109
|
+ }catch (Exception e){
|
|
110
|
+ e.printStackTrace();
|
|
111
|
+ logger.error("taPointsRecordsList -=- {}",e.toString());
|
|
112
|
+ responseBean.addError(e.getMessage());
|
|
113
|
+ }
|
|
114
|
+ return responseBean;
|
|
115
|
+ }
|
|
116
|
+
|
82
|
117
|
/**
|
83
|
118
|
* 保存对象
|
84
|
119
|
* @param taPointsRecords 实体对象
|
85
|
120
|
* @return
|
86
|
121
|
*/
|
87
|
|
- @RequestMapping(value="/taPointsRecords",method= RequestMethod.POST)
|
|
122
|
+ @RequestMapping(value="/admin/taPointsRecords",method= RequestMethod.POST)
|
88
|
123
|
public ResponseBean taPointsRecordsAdd(@RequestBody TaPointsRecords taPointsRecords){
|
89
|
124
|
ResponseBean responseBean = new ResponseBean();
|
90
|
125
|
try {
|
|
@@ -106,7 +141,7 @@ public class TaPointsRecordsController extends BaseController {
|
106
|
141
|
* @param id 实体ID
|
107
|
142
|
*/
|
108
|
143
|
@ResponseBody
|
109
|
|
- @RequestMapping(value="/taPointsRecords/{id}", method= RequestMethod.DELETE)
|
|
144
|
+ @RequestMapping(value="/admin/taPointsRecords/{id}", method= RequestMethod.DELETE)
|
110
|
145
|
public ResponseBean taPointsRecordsDelete(@PathVariable Integer id){
|
111
|
146
|
ResponseBean responseBean = new ResponseBean();
|
112
|
147
|
try {
|
|
@@ -129,7 +164,7 @@ public class TaPointsRecordsController extends BaseController {
|
129
|
164
|
* @param taPointsRecords 实体对象
|
130
|
165
|
* @return
|
131
|
166
|
*/
|
132
|
|
- @RequestMapping(value="/taPointsRecords/{id}",method= RequestMethod.PUT)
|
|
167
|
+ @RequestMapping(value="/admin/taPointsRecords/{id}",method= RequestMethod.PUT)
|
133
|
168
|
public ResponseBean taPointsRecordsUpdate(@PathVariable Integer id,
|
134
|
169
|
@RequestBody TaPointsRecords taPointsRecords){
|
135
|
170
|
ResponseBean responseBean = new ResponseBean();
|
|
@@ -152,7 +187,7 @@ public class TaPointsRecordsController extends BaseController {
|
152
|
187
|
* 根据id查询对象
|
153
|
188
|
* @param id 实体ID
|
154
|
189
|
*/
|
155
|
|
- @RequestMapping(value="/taPointsRecords/{id}",method= RequestMethod.GET)
|
|
190
|
+ @RequestMapping(value="/admin/taPointsRecords/{id}",method= RequestMethod.GET)
|
156
|
191
|
public ResponseBean taPointsRecordsGet(@PathVariable Integer id){
|
157
|
192
|
ResponseBean responseBean = new ResponseBean();
|
158
|
193
|
try {
|
|
@@ -165,34 +200,34 @@ public class TaPointsRecordsController extends BaseController {
|
165
|
200
|
return responseBean;
|
166
|
201
|
}
|
167
|
202
|
|
168
|
|
- /**
|
169
|
|
- * 分页查询列表
|
170
|
|
- * @param pageNum
|
171
|
|
- * @param pageSize
|
172
|
|
- * @return
|
173
|
|
- */
|
174
|
|
- @RequestMapping(value="/wx/taPointsRecords",method= RequestMethod.GET)
|
175
|
|
- public ResponseBean wxPointsRecordsList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
176
|
|
- @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
177
|
|
- HttpServletRequest request){
|
178
|
|
- ResponseBean responseBean = new ResponseBean();
|
179
|
|
- try {
|
180
|
|
- String openid = JWTUtils.getSubject(request);
|
181
|
|
- TaPerson taPerson = taPersonService.getPersonsByOpenId(openid).get(0);
|
182
|
|
- //使用分页插件
|
183
|
|
- IPage<TaPointsRecords> pg = new Page<>(pageNum, pageSize);
|
184
|
|
- QueryWrapper<TaPointsRecords> queryWrapper = new QueryWrapper<>();
|
185
|
|
- queryWrapper.eq("person_id",taPerson.getPersonId());
|
186
|
|
- queryWrapper.orderByDesc("create_date");
|
187
|
|
- IPage<TaPointsRecords> result = iTaPointsRecordsService.page(pg, queryWrapper);
|
188
|
|
- responseBean.addSuccess(result);
|
189
|
|
- }catch (Exception e){
|
190
|
|
- e.printStackTrace();
|
191
|
|
- logger.error("taPointsRecordsList -=- {}",e.toString());
|
192
|
|
- responseBean.addError(e.getMessage());
|
193
|
|
- }
|
194
|
|
- return responseBean;
|
195
|
|
- }
|
|
203
|
+// /**
|
|
204
|
+// * 分页查询列表
|
|
205
|
+// * @param pageNum
|
|
206
|
+// * @param pageSize
|
|
207
|
+// * @return
|
|
208
|
+// */
|
|
209
|
+// @RequestMapping(value="/wx/taPointsRecords",method= RequestMethod.GET)
|
|
210
|
+// public ResponseBean wxPointsRecordsList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
|
211
|
+// @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
|
212
|
+// HttpServletRequest request){
|
|
213
|
+// ResponseBean responseBean = new ResponseBean();
|
|
214
|
+// try {
|
|
215
|
+// String openid = JWTUtils.getSubject(request);
|
|
216
|
+// TaPerson taPerson = taPersonService.getPersonsByOpenId(openid).get(0);
|
|
217
|
+// //使用分页插件
|
|
218
|
+// IPage<TaPointsRecords> pg = new Page<>(pageNum, pageSize);
|
|
219
|
+// QueryWrapper<TaPointsRecords> queryWrapper = new QueryWrapper<>();
|
|
220
|
+// queryWrapper.eq("person_id",taPerson.getPersonId());
|
|
221
|
+// queryWrapper.orderByDesc("create_date");
|
|
222
|
+// IPage<TaPointsRecords> result = iTaPointsRecordsService.page(pg, queryWrapper);
|
|
223
|
+// responseBean.addSuccess(result);
|
|
224
|
+// }catch (Exception e){
|
|
225
|
+// e.printStackTrace();
|
|
226
|
+// logger.error("taPointsRecordsList -=- {}",e.toString());
|
|
227
|
+// responseBean.addError(e.getMessage());
|
|
228
|
+// }
|
|
229
|
+// return responseBean;
|
|
230
|
+// }
|
196
|
231
|
|
197
|
232
|
/**
|
198
|
233
|
* 分页查询列表
|
|
@@ -200,7 +235,7 @@ public class TaPointsRecordsController extends BaseController {
|
200
|
235
|
* @param pageSize
|
201
|
236
|
* @return
|
202
|
237
|
*/
|
203
|
|
- @RequestMapping(value="/admin/taPointsRecords/{id}",method= RequestMethod.GET)
|
|
238
|
+ @RequestMapping(value="/admin/mine/taPointsRecords/{id}",method= RequestMethod.GET)
|
204
|
239
|
public ResponseBean CustomerPointsRecordsList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
205
|
240
|
@RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
206
|
241
|
@PathVariable(value = "id") String id){
|