Commit 9dfa829a authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents 86458040 ecdcbe34
......@@ -57,23 +57,23 @@ public class UserBiz {
String result = this.doPost(imUrl + "/xxfcim/user/register",str) ;
JSONObject json = JSONObject.parseObject(result);
//如果已经注册过,查询出手机号对应用户信息执行登录返回
if(0 == json.getInteger("resultCode")){
String phone = map.get("telephone").toString();
Query query = new Query(Criteria.where("phone").is(phone));
User mgt = mongoTemplate.findOne(query, User.class);
if(mgt == null){
result = "系统错误";
}else{
Map<String,Object>params = new HashMap<String,Object>();
params.put("userId",mgt.getUserId());
params.put("telephone",mgt.getPhone());
params.put("password",mgt.getPassword());
result = this.login(params);
}
}else{
json.put("password",map.get("password").toString());
result = json.toJSONString();
}
// if(0 == json.getInteger("resultCode")){
// String phone = map.get("telephone").toString();
// Query query = new Query(Criteria.where("phone").is(phone));
// User mgt = mongoTemplate.findOne(query, User.class);
// if(mgt == null){
// result = "系统错误";
// }else{
// Map<String,Object>params = new HashMap<String,Object>();
// params.put("userId",mgt.getUserId());
// params.put("telephone",mgt.getPhone());
// params.put("password",mgt.getPassword());
// result = this.login(params);
// }
// }else{
// json.put("password",map.get("password").toString());
// result = json.toJSONString();
// }
baseResponse.setStatus(200);
baseResponse.setMessage(result);
......
......@@ -117,23 +117,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
return ObjectRestResponse.createDefaultFail();
}
if(orderPageVo.getStatus() >= 5) {//出行中 已交车
OrderVehicleCrosstownDto orderVehicleCrosstownDto = new OrderVehicleCrosstownDto();
orderVehicleCrosstownDto.setOrderId(orderPageVo.getId());
orderVehicleCrosstownDto.setOrderNo(orderPageVo.getNo());
List<OrderVehicaleCrosstown> orderVehicaleCrosstowns = orderVehicalCrosstownBiz.selectByOrderId(orderVehicleCrosstownDto);
if(orderVehicaleCrosstowns != null && orderVehicaleCrosstowns.size() > 0) {
List<OrderUserLicense> orderUserLicenses = orderUserLicenseBiz.selectByIds(orderVehicaleCrosstowns.get(0).getUserLicenseId()).getData();
if(orderUserLicenses != null && orderUserLicenses.size() > 0) {
orderVehicleCrosstownDto.setLicenseIdCard(orderUserLicenses.get(0).getLicenseIdCard());
orderVehicleCrosstownDto.setLicenseImg(orderUserLicenses.get(0).getLicenseImg());
orderVehicleCrosstownDto.setLicenseName(orderUserLicenses.get(0).getLicenseName());
orderVehicleCrosstownDto.setLicensePhone(orderUserLicenses.get(0).getLicensePhone());
}
}
orderPageVo.setOrderVehicleCrosstownDto(orderVehicleCrosstownDto);
} else { //未交车
if(orderPageVo.getStatus() == 4) { //未交车
List<VehicleUserLicense> vehicleUserLicenses = Lists.newArrayList();
String myDriverIds = orderPageVo.getOrderRentVehicleDetail().getMyDriverIds();
if(StringUtils.isNotBlank(myDriverIds)) {
......@@ -151,13 +135,29 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
}
} else {
try {
vehicleUserLicenses.add(vehicleFeign.one(Integer.parseInt(myDriverIds)).getData());
vehicleUserLicenses.add(vehicleFeign.getOne(Integer.parseInt(myDriverIds.trim())).getData());
}catch (Exception e){
e.printStackTrace();
}
}
}
orderPageVo.setVehicleUserLicenses(vehicleUserLicenses);
} else if(orderPageVo.getStatus() >= 5) {//出行中 已交车
OrderVehicleCrosstownDto orderVehicleCrosstownDto = new OrderVehicleCrosstownDto();
orderVehicleCrosstownDto.setOrderId(orderPageVo.getId());
orderVehicleCrosstownDto.setOrderNo(orderPageVo.getNo());
List<OrderVehicaleCrosstown> orderVehicaleCrosstowns = orderVehicalCrosstownBiz.selectByOrderId(orderVehicleCrosstownDto);
if(orderVehicaleCrosstowns != null && orderVehicaleCrosstowns.size() > 0) {
List<OrderUserLicense> orderUserLicenses = orderUserLicenseBiz.selectByIds(orderVehicaleCrosstowns.get(0).getUserLicenseId()).getData();
if(orderUserLicenses != null && orderUserLicenses.size() > 0) {
orderVehicleCrosstownDto.setLicenseIdCard(orderUserLicenses.get(0).getLicenseIdCard());
orderVehicleCrosstownDto.setLicenseImg(orderUserLicenses.get(0).getLicenseImg());
orderVehicleCrosstownDto.setLicenseName(orderUserLicenses.get(0).getLicenseName());
orderVehicleCrosstownDto.setLicensePhone(orderUserLicenses.get(0).getLicensePhone());
}
}
orderPageVo.setOrderVehicleCrosstownDto(orderVehicleCrosstownDto);
}
return ObjectRestResponse.succ(orderPageVo);
......
......@@ -174,7 +174,7 @@ public class BaseOrderController extends CommonBaseController {
public ObjectRestResponse<List<OrderPageVO>> getTourList(QueryOrderList dto) {
if (dto.getStartTime() != null) {
if (dto.getEndTime() == null) {
dto.setEndTime(new Date().getTime());
dto.setEndTime(dto.getStartTime());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment