|
@@ -21,16 +21,19 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
import com.qmrb.system.converter.PayOrderConverter;
|
|
|
import com.qmrb.system.mapper.OrderMapper;
|
|
|
+import com.qmrb.system.pojo.entity.CarPark;
|
|
|
import com.qmrb.system.pojo.entity.Order;
|
|
|
import com.qmrb.system.pojo.entity.ToolWxConfig;
|
|
|
import com.qmrb.system.pojo.form.BarnRecordForm;
|
|
|
import com.qmrb.system.pojo.form.PayOrderForm;
|
|
|
import com.qmrb.system.pojo.query.PayOrderQuery;
|
|
|
+import com.qmrb.system.pojo.vo.BarnRecordVO;
|
|
|
import com.qmrb.system.pojo.vo.PayOrderVO;
|
|
|
import com.qmrb.system.pojo.vo.ReCreateOrderVO;
|
|
|
import com.qmrb.system.pojo.vo.ToCreateOrderVO;
|
|
|
import com.qmrb.system.pojo.vo.WxLoginVO;
|
|
|
import com.qmrb.system.service.IBarnRecordService;
|
|
|
+import com.qmrb.system.service.ICarParkService;
|
|
|
import com.qmrb.system.service.OrderService;
|
|
|
import com.qmrb.system.service.ToolWxConfigService;
|
|
|
import com.qmrb.system.utils.WxPayUtil;
|
|
@@ -59,6 +62,7 @@ import java.math.BigDecimal;
|
|
|
import java.net.URISyntaxException;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.security.PrivateKey;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
@@ -91,6 +95,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
@Autowired
|
|
|
private PayOrderConverter converter;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ICarParkService carParkService;
|
|
|
+
|
|
|
/**分页查询
|
|
|
* */
|
|
|
@Override
|
|
@@ -466,10 +473,25 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
int pageNum = queryParams.getPageNum();
|
|
|
int pageSize = queryParams.getPageSize();
|
|
|
//String keywords = queryParams.getKeywords();
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ // 获取停车场信息
|
|
|
+ List<CarPark> list = carParkService.list();
|
|
|
+ HashMap<Long, String> map = new HashMap<>();
|
|
|
+ if (CollectionUtil.isNotEmpty(list)) {
|
|
|
+ list.stream().forEach(item -> {
|
|
|
+ map.put(item.getId(), item.getName());
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
// 实体转换
|
|
|
Page<PayOrderVO> pageResult = baseMapper.getPageByUserId(new Page<>(pageNum, pageSize),queryParams);
|
|
|
+ // 停车场名称转换
|
|
|
+ for (PayOrderVO record : pageResult.getRecords()) {
|
|
|
+ if (record.getCarParkId() != null && map.keySet().contains(record.getCarParkId())) {
|
|
|
+ record.setCarParkName(map.get(record.getCarParkId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
return pageResult;
|
|
|
}
|
|
|
|