dev-discount
袁野 3 years ago
parent 8853512488
commit 95c1c9bef3
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java
  2. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  3. 16
      hai-cweb/src/main/java/com/cweb/controller/CommonController.java
  4. 10
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  5. 10
      hai-service/src/main/java/com/hai/service/CommonService.java
  6. 10
      hai-service/src/main/java/com/hai/service/HighTestService.java
  7. 17
      hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java
  8. 16
      hai-service/src/main/java/com/hai/service/impl/HighTestServiceImpl.java

@ -881,6 +881,8 @@ public class HighOrderController {
if (salesmanIds.length() == 0) { if (salesmanIds.length() == 0) {
map.put("gasSalesmanId" , null); map.put("gasSalesmanId" , null);
} else if (salesmanIds.length() == 1){
map.put("gasSalesmanId" , salesmanIds.toString());
} else { } else {
salesmanIds.deleteCharAt(salesmanIds.length() - 1); salesmanIds.deleteCharAt(salesmanIds.length() - 1);
map.put("gasSalesmanId" , salesmanIds.toString()); map.put("gasSalesmanId" , salesmanIds.toString());

File diff suppressed because one or more lines are too long

@ -276,5 +276,21 @@ public class CommonController {
} }
} }
@RequestMapping(value = "/findByLatAndLng", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取定位信息")
public ResponseData findByLatAndLng(
@RequestParam(name = "lng", required = true) String lng,
@RequestParam(name = "lat", required = true) String lat
) {
try {
return ResponseMsgUtil.success(commonService.findByLatAndLng(lng , lat));
} catch (Exception e) {
log.error("HighOrderController --> unionStagingPay() error!", e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -963,7 +963,7 @@ public interface HighOrderMapperExt {
"<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " , "<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " ,
"<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " + "<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " +
"<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " + "<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " +
"<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( #{map.gasSalesmanId} ) </if> " , "<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( ${map.gasSalesmanId} ) </if> " ,
") as hh; " , ") as hh; " ,
"</script>" "</script>"
}) })
@ -986,7 +986,7 @@ public interface HighOrderMapperExt {
"<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " , "<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " ,
"<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " + "<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " +
"<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " + "<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " +
"<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( #{map.gasSalesmanId} ) </if> " , "<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( ${map.gasSalesmanId} ) </if> " ,
") as hh; " , ") as hh; " ,
"</script>" "</script>"
}) })
@ -1006,7 +1006,7 @@ public interface HighOrderMapperExt {
"<if test='map.totalPrice != null'> <![CDATA[ and ho.total_price < #{map.totalPrice} ]]> </if> " , "<if test='map.totalPrice != null'> <![CDATA[ and ho.total_price < #{map.totalPrice} ]]> </if> " ,
"<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " , "<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " ,
"<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " , "<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " ,
"<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( #{map.gasSalesmanId} ) </if> " , "<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( ${map.gasSalesmanId} ) </if> " ,
") as hh; " , ") as hh; " ,
"</script>" "</script>"
}) })
@ -1023,7 +1023,7 @@ public interface HighOrderMapperExt {
"<if test='map.gasOilNo != null'> and hco.gas_oil_no = #{map.gasOilNo} </if> " , "<if test='map.gasOilNo != null'> and hco.gas_oil_no = #{map.gasOilNo} </if> " ,
"<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " , "<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " ,
"<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " , "<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " ,
"<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( #{map.gasSalesmanId} ) </if> " , "<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( ${map.gasSalesmanId} ) </if> " ,
"<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " , "<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " ,
"<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " , "<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " ,
"group by pay_type " , "group by pay_type " ,
@ -1043,7 +1043,7 @@ public interface HighOrderMapperExt {
"<if test='map.gasOilNo != null'> and hco.gas_oil_no = #{map.gasOilNo} </if> " , "<if test='map.gasOilNo != null'> and hco.gas_oil_no = #{map.gasOilNo} </if> " ,
"<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " , "<if test='map.gasOilType != null'> and hco.gas_oil_type = #{map.gasOilType} </if> " ,
"<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " , "<if test='map.goodsId != null'> and hco.goods_id = #{map.goodsId} </if> " ,
"<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( #{map.gasSalesmanId} ) </if> " , "<if test='map.gasSalesmanId != null'> and hco.gas_salesman_id in ( ${map.gasSalesmanId} ) </if> " ,
"<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " , "<if test='map.createTimeS != null'> <![CDATA[ and ho.create_time >= #{map.createTimeS} ]]> </if> " ,
"<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " , "<if test='map.createTimeE != null'> <![CDATA[ and ho.create_time <= #{map.createTimeE} ]]> </if> " ,
"group by hco.gas_oil_no " , "group by hco.gas_oil_no " ,

@ -229,4 +229,14 @@ public interface CommonService {
*/ */
LineCountModel getLineCount(); LineCountModel getLineCount();
/**
* @Author Sum1Dream
* @name findByLatAndLng.java
* @Description // 获取定位信息
* @Date 10:59 2022/4/2
* @Param [java.lang.String, java.lang.String]
* @return com.alibaba.fastjson.JSONObject
*/
JSONObject findByLatAndLng( String lng , String lat) throws Exception;
} }

@ -42,4 +42,14 @@ public interface HighTestService {
*/ */
JSONObject getMobile(String phone , Integer amount , String orderNo) throws Exception; JSONObject getMobile(String phone , Integer amount , String orderNo) throws Exception;
/**
* @Author Sum1Dream
* @name findByLatAndLng.java
* @Description // 获取定位信息
* @Date 10:59 2022/4/2
* @Param [java.lang.String, java.lang.String]
* @return com.alibaba.fastjson.JSONObject
*/
JSONObject findByLatAndLng( String lng , String lat) throws Exception;
} }

@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.common.utils.HttpsUtils;
import com.hai.dao.SecDictionaryMapper; import com.hai.dao.SecDictionaryMapper;
import com.hai.dao.SecRegionMapper; import com.hai.dao.SecRegionMapper;
import com.hai.entity.*; import com.hai.entity.*;
@ -494,4 +495,20 @@ public class CommonServiceImpl implements CommonService {
lineCount.setUserCount(highOrderService.getDateCountByUser()); lineCount.setUserCount(highOrderService.getDateCountByUser());
return lineCount; return lineCount;
} }
@Override
public JSONObject findByLatAndLng(String lng, String lat) throws Exception {
Map<String,Object> map = new HashMap<>();//参数
map.put("ak", "SfrwGH7INvjPq7BwCrYrioBQZm9XXxrR");//申请百度开放平台KEY(ak)
map.put("output", "json");// 输出Json数据
map.put("extensions_town", "true");// 行政区划返回乡镇级数据(town),仅国内召回乡镇数据
map.put("coordtype", "wgs84ll"); // GPS 经纬度类型
map.put("location", lat+","+lng+"");//百度经纬度
String url = "http://api.map.baidu.com/reverse_geocoding/v3/";
return HttpsUtils.doGet(url , map);
}
} }

@ -157,4 +157,20 @@ public class HighTestServiceImpl implements HighTestService {
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getCzUrl() , map); return HttpsUtils.doPost(CommonSysConst.getSysConfig().getCzUrl() , map);
} }
@Override
public JSONObject findByLatAndLng(String lng, String lat) throws Exception {
Map<String,Object> map = new HashMap<>();//参数
map.put("ak", "SfrwGH7INvjPq7BwCrYrioBQZm9XXxrR");//申请百度开放平台KEY(ak)
map.put("output", "json");// 输出Json数据
map.put("extensions_town", "true");// 行政区划返回乡镇级数据(town),仅国内召回乡镇数据
map.put("coordtype", "wgs84ll"); // GPS 经纬度类型
map.put("location", lat+","+lng+"");//百度经纬度
String url = "http://api.map.baidu.com/reverse_geocoding/v3/";
return HttpsUtils.doGet(url , map);
}
} }

Loading…
Cancel
Save