|
@@ -6,7 +6,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
6
|
6
|
import com.huiju.estateagents.base.BaseController;
|
7
|
7
|
import com.huiju.estateagents.base.ResponseBean;
|
8
|
8
|
import com.huiju.estateagents.common.CommConstant;
|
|
9
|
+import com.huiju.estateagents.entity.TaGoods;
|
9
|
10
|
import com.huiju.estateagents.entity.TaPointsExchange;
|
|
11
|
+import com.huiju.estateagents.service.ITaGoodsService;
|
10
|
12
|
import com.huiju.estateagents.service.ITaPointsExchangeService;
|
11
|
13
|
import org.slf4j.Logger;
|
12
|
14
|
import org.slf4j.LoggerFactory;
|
|
@@ -21,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
21
|
23
|
|
22
|
24
|
import javax.servlet.http.HttpServletRequest;
|
23
|
25
|
import java.time.LocalDateTime;
|
|
26
|
+import java.util.List;
|
24
|
27
|
|
25
|
28
|
/**
|
26
|
29
|
* <p>
|
|
@@ -39,6 +42,8 @@ public class TaPointsExchangeController extends BaseController {
|
39
|
42
|
@Autowired
|
40
|
43
|
public ITaPointsExchangeService iTaPointsExchangeService;
|
41
|
44
|
|
|
45
|
+ @Autowired
|
|
46
|
+ private ITaGoodsService taGoodsService;
|
42
|
47
|
|
43
|
48
|
/**
|
44
|
49
|
* 分页查询列表
|
|
@@ -226,6 +231,14 @@ public class TaPointsExchangeController extends BaseController {
|
226
|
231
|
queryWrapper.orderByDesc("create_date");
|
227
|
232
|
|
228
|
233
|
IPage<TaPointsExchange> result = iTaPointsExchangeService.page(pg, queryWrapper);
|
|
234
|
+ List<TaPointsExchange> records = result.getRecords();
|
|
235
|
+ records.forEach(e -> {
|
|
236
|
+ if (null == e.getStatus() || e.getStatus().equals(CommConstant.STATUS_UNACCALIMED)){
|
|
237
|
+ TaGoods goods = taGoodsService.getById(e.getTargetId());
|
|
238
|
+ e.setAddress(goods.getAddress());
|
|
239
|
+ }
|
|
240
|
+ });
|
|
241
|
+ result.setRecords(records);
|
229
|
242
|
responseBean.addSuccess(result);
|
230
|
243
|
}catch (Exception e){
|
231
|
244
|
e.printStackTrace();
|