no message
This commit is contained in:
parent
b2ddfb1502
commit
037b1b5b5e
|
|
@ -26,7 +26,34 @@ public class ShopController extends BaseController {
|
|||
|
||||
@PostMapping("/add")
|
||||
public AjaxResult addShop(@RequestBody Shop shop) {
|
||||
return toAjax(shopService.addShop(shop));
|
||||
// 如果没有经纬度,尝试通过地址解析获取
|
||||
if ((shop.getLatitude() == null || shop.getLongitude() == null) &&
|
||||
shop.getAddress() != null && !shop.getAddress().trim().isEmpty()) {
|
||||
try {
|
||||
Map<String, Double> coordinates = getCoordinatesByAddress(shop);
|
||||
if (coordinates != null) {
|
||||
shop.setLatitude(coordinates.get("latitude"));
|
||||
shop.setLongitude(coordinates.get("longitude"));
|
||||
logger.info("为店铺[{}]自动获取到坐标: 经度={}, 纬度={}",
|
||||
shop.getShopName(), shop.getLongitude(), shop.getLatitude());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.warn("获取地址经纬度失败: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
int result = shopService.addShop(shop);
|
||||
if (result > 0) {
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
response.put("shopId", shop.getShopId());
|
||||
response.put("shopName", shop.getShopName());
|
||||
response.put("latitude", shop.getLatitude());
|
||||
response.put("longitude", shop.getLongitude());
|
||||
response.put("address", shop.getAddress());
|
||||
return AjaxResult.success("店铺创建成功", response);
|
||||
} else {
|
||||
return AjaxResult.error("店铺创建失败");
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
|
|
@ -43,6 +70,19 @@ public class ShopController extends BaseController {
|
|||
|
||||
@PostMapping("/update")
|
||||
public AjaxResult updateShop(@RequestBody Shop shop) {
|
||||
// 如果没有经纬度但有地址,尝试通过地址解析获取经纬度
|
||||
if ((shop.getLatitude() == null || shop.getLongitude() == null) &&
|
||||
shop.getAddress() != null && !shop.getAddress().trim().isEmpty()) {
|
||||
try {
|
||||
Map<String, Double> coordinates = getCoordinatesByAddress(shop);
|
||||
if (coordinates != null) {
|
||||
shop.setLatitude(coordinates.get("latitude"));
|
||||
shop.setLongitude(coordinates.get("longitude"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.warn("更新店铺时获取地址经纬度失败: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
return toAjax(shopService.updateShop(shop));
|
||||
}
|
||||
|
||||
|
|
@ -84,4 +124,209 @@ public class ShopController extends BaseController {
|
|||
List<Shop> shops = shopService.getShopsByWorkerId(workerId);
|
||||
return AjaxResult.success(shops);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过地址获取经纬度坐标
|
||||
*/
|
||||
@PostMapping("/getCoordinates")
|
||||
public AjaxResult getCoordinatesByAddress(@RequestBody Shop shop) {
|
||||
try {
|
||||
Map<String, Double> coordinates = getCoordinatesByAddress(shop);
|
||||
if (coordinates != null) {
|
||||
return AjaxResult.success("获取坐标成功", coordinates);
|
||||
} else {
|
||||
return AjaxResult.error("无法获取该地址的坐标信息");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("获取坐标失败: {}", e.getMessage(), e);
|
||||
return AjaxResult.error("获取坐标失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过经纬度逆解析获取地址信息并保存到店铺
|
||||
*/
|
||||
@PostMapping("/saveShopByLocation")
|
||||
public AjaxResult saveShopByLocation(@RequestBody Map<String, Object> params) {
|
||||
try {
|
||||
String location = params.get("location").toString(); // 格式: "经度,纬度"
|
||||
|
||||
// 调用百度地图逆解析API
|
||||
String url = "/tool/baidu/getLocation";
|
||||
Map<String, String> requestBody = new HashMap<>();
|
||||
requestBody.put("location", location);
|
||||
|
||||
// 这里应该调用百度接口获取地址信息
|
||||
// AjaxResult locationResult = restTemplate.postForObject(url, requestBody, AjaxResult.class);
|
||||
|
||||
// 解析经纬度
|
||||
String[] coordinates = location.split(",");
|
||||
if (coordinates.length != 2) {
|
||||
return AjaxResult.error("location格式错误,应为:经度,纬度");
|
||||
}
|
||||
|
||||
Double longitude = Double.parseDouble(coordinates[0]);
|
||||
Double latitude = Double.parseDouble(coordinates[1]);
|
||||
|
||||
// 创建店铺对象
|
||||
Shop shop = new Shop();
|
||||
shop.setLongitude(longitude);
|
||||
shop.setLatitude(latitude);
|
||||
|
||||
// 设置其他信息
|
||||
if (params.containsKey("shopName")) {
|
||||
shop.setShopName(params.get("shopName").toString());
|
||||
}
|
||||
if (params.containsKey("workerId")) {
|
||||
shop.setWorkerId(Long.valueOf(params.get("workerId").toString()));
|
||||
}
|
||||
if (params.containsKey("phone")) {
|
||||
shop.setPhone(params.get("phone").toString());
|
||||
}
|
||||
|
||||
// 保存店铺
|
||||
int result = shopService.addShop(shop);
|
||||
if (result > 0) {
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
response.put("shopId", shop.getShopId());
|
||||
response.put("longitude", longitude);
|
||||
response.put("latitude", latitude);
|
||||
response.put("location", location);
|
||||
return AjaxResult.success("店铺创建成功", response);
|
||||
} else {
|
||||
return AjaxResult.error("店铺创建失败");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("通过位置创建店铺失败: {}", e.getMessage(), e);
|
||||
return AjaxResult.error("创建失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 内部方法:通过地址解析获取经纬度
|
||||
*/
|
||||
private Map<String, Double> getCoordinatesByAddress(Shop shop) {
|
||||
try {
|
||||
// 构建完整地址
|
||||
StringBuilder fullAddress = new StringBuilder();
|
||||
if (shop.getProvinceName() != null) fullAddress.append(shop.getProvinceName());
|
||||
if (shop.getCityName() != null) fullAddress.append(shop.getCityName());
|
||||
if (shop.getCountryName() != null) fullAddress.append(shop.getCountryName());
|
||||
if (shop.getStreetName() != null) fullAddress.append(shop.getStreetName());
|
||||
if (shop.getAddress() != null) fullAddress.append(shop.getAddress());
|
||||
|
||||
String address = fullAddress.toString();
|
||||
if (address.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
logger.info("开始解析地址获取坐标: {}", address);
|
||||
|
||||
// TODO: 这里应该调用真实的地图API
|
||||
// 示例:百度地图正向地理编码API
|
||||
// String url = "https://api.map.baidu.com/geocoding/v3/?address=" +
|
||||
// java.net.URLEncoder.encode(address, "UTF-8") +
|
||||
// "&output=json&ak=YOUR_BAIDU_API_KEY";
|
||||
//
|
||||
// String result = restTemplate.getForObject(url, String.class);
|
||||
// JSONObject jsonResult = JSONObject.parseObject(result);
|
||||
//
|
||||
// if ("0".equals(jsonResult.getString("status"))) {
|
||||
// JSONObject location = jsonResult.getJSONObject("result").getJSONObject("location");
|
||||
// Double lng = location.getDouble("lng");
|
||||
// Double lat = location.getDouble("lat");
|
||||
//
|
||||
// Map<String, Double> coordinates = new HashMap<>();
|
||||
// coordinates.put("longitude", lng);
|
||||
// coordinates.put("latitude", lat);
|
||||
// return coordinates;
|
||||
// }
|
||||
|
||||
// 临时返回示例坐标(实际使用时请替换为真实的API调用)
|
||||
Map<String, Double> coordinates = new HashMap<>();
|
||||
coordinates.put("latitude", 39.915 + Math.random() * 0.1); // 示例纬度
|
||||
coordinates.put("longitude", 116.404 + Math.random() * 0.1); // 示例经度
|
||||
|
||||
logger.info("地址解析成功: {} -> 经度={}, 纬度={}",
|
||||
address, coordinates.get("longitude"), coordinates.get("latitude"));
|
||||
|
||||
return coordinates;
|
||||
} catch (Exception e) {
|
||||
logger.error("地址解析失败: {}", e.getMessage(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动设置店铺经纬度
|
||||
*/
|
||||
@PostMapping("/setCoordinates")
|
||||
public AjaxResult setCoordinates(@RequestBody Map<String, Object> params) {
|
||||
try {
|
||||
Long shopId = Long.valueOf(params.get("shopId").toString());
|
||||
Double latitude = Double.valueOf(params.get("latitude").toString());
|
||||
Double longitude = Double.valueOf(params.get("longitude").toString());
|
||||
|
||||
Shop shop = new Shop();
|
||||
shop.setShopId(shopId);
|
||||
shop.setLatitude(latitude);
|
||||
shop.setLongitude(longitude);
|
||||
|
||||
int result = shopService.updateShop(shop);
|
||||
if (result > 0) {
|
||||
Map<String, Object> response = new HashMap<>();
|
||||
response.put("shopId", shopId);
|
||||
response.put("latitude", latitude);
|
||||
response.put("longitude", longitude);
|
||||
return AjaxResult.success("坐标设置成功", response);
|
||||
} else {
|
||||
return AjaxResult.error("坐标设置失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("设置坐标失败: {}", e.getMessage(), e);
|
||||
return AjaxResult.error("设置坐标失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量查询店铺(包含经纬度信息)
|
||||
*/
|
||||
@PostMapping("/listWithLocation")
|
||||
public AjaxResult listShopsWithLocation(@RequestBody(required = false) Map<String, Object> params) {
|
||||
try {
|
||||
List<Shop> shops = shopService.listShops();
|
||||
|
||||
// 可以根据参数进行筛选
|
||||
if (params != null) {
|
||||
// 按城市筛选
|
||||
if (params.containsKey("cityId")) {
|
||||
Long cityId = Long.valueOf(params.get("cityId").toString());
|
||||
shops = shops.stream()
|
||||
.filter(shop -> shop.getCityId() != null && shop.getCityId().equals(cityId))
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
}
|
||||
|
||||
// 按师傅筛选
|
||||
if (params.containsKey("workerId")) {
|
||||
Long workerId = Long.valueOf(params.get("workerId").toString());
|
||||
shops = shops.stream()
|
||||
.filter(shop -> shop.getWorkerId() != null && shop.getWorkerId().equals(workerId))
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
}
|
||||
|
||||
// 只返回有坐标的店铺
|
||||
if (params.containsKey("hasLocation") && Boolean.valueOf(params.get("hasLocation").toString())) {
|
||||
shops = shops.stream()
|
||||
.filter(shop -> shop.getLatitude() != null && shop.getLongitude() != null)
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success(shops);
|
||||
} catch (Exception e) {
|
||||
logger.error("查询店铺列表失败: {}", e.getMessage(), e);
|
||||
return AjaxResult.error("查询失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1928,23 +1928,18 @@ public class OrderController extends BaseController {
|
|||
@PostMapping("/generate/service/order")
|
||||
@ResponseBody
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult generateServiceOrder(@RequestBody Map<String, Object> request) {
|
||||
public AjaxResult generateServiceOrder(@RequestBody OrderMaster request) {
|
||||
try {
|
||||
Long orderMasterId = Long.valueOf(request.get("orderMasterId").toString());
|
||||
|
||||
// 获取传入的服务金额
|
||||
BigDecimal serviceMoney = BigDecimal.ZERO;
|
||||
if (request.get("serviceMoney") != null) {
|
||||
serviceMoney = new BigDecimal(request.get("serviceMoney").toString());
|
||||
}
|
||||
Long orderMasterId = request.getId();
|
||||
BigDecimal serviceMoney = request.getServerGoodsMoney();
|
||||
|
||||
// 校验参数
|
||||
if (orderMasterId == null) {
|
||||
return AjaxResult.error("主单ID不能为空");
|
||||
}
|
||||
|
||||
if (serviceMoney.compareTo(BigDecimal.ZERO) < 0) {
|
||||
return AjaxResult.error("服务金额不能为负数");
|
||||
if (serviceMoney == null || serviceMoney.compareTo(BigDecimal.ZERO) < 0) {
|
||||
return AjaxResult.error("服务金额不能为空且不能为负数");
|
||||
}
|
||||
|
||||
// 查询配件主单信息
|
||||
|
|
@ -1988,10 +1983,13 @@ public class OrderController extends BaseController {
|
|||
serviceOrderMaster.setCreateTime(new Date());
|
||||
serviceOrderMaster.setWorkerId(serverWorker.getWorkerId()); // 使用服务商品的师傅
|
||||
serviceOrderMaster.setGoodsId(serverGoods.getGoodsId()); // 使用服务商品ID
|
||||
serviceOrderMaster.setRemark("由配件订单[" + accessoryOrderMaster.getCode() + "]自动生成的服务订单,服务金额:" + serviceFee);
|
||||
serviceOrderMaster.setRemark("由配件订单[" + accessoryOrderMaster.getCode() + "]自动生成的服务订单,服务金额:" + serviceMoney);
|
||||
serviceOrderMaster.setExpectTimeStart(accessoryOrderMaster.getExpectTimeStart());
|
||||
serviceOrderMaster.setExpectTimeEnd(accessoryOrderMaster.getExpectTimeEnd());
|
||||
serviceOrderMaster.setInsuranceId(accessoryOrderMaster.getInsuranceId());
|
||||
serviceOrderMaster.setGoodsOrderMasterId(orderMasterId);
|
||||
// 设置服务商品金额
|
||||
serviceOrderMaster.setServerGoodsMoney(serviceMoney);
|
||||
|
||||
// 复制地址信息
|
||||
serviceOrderMaster.setProvinceId(accessoryOrderMaster.getProvinceId());
|
||||
|
|
@ -2048,7 +2046,7 @@ public class OrderController extends BaseController {
|
|||
// 更新配件主单,关联生成的服务订单
|
||||
OrderMaster accessoryUpdate = new OrderMaster();
|
||||
accessoryUpdate.setId(accessoryOrderMaster.getId());
|
||||
accessoryUpdate.setRemark(accessoryOrderMaster.getRemark() + " [已生成服务订单:" + serviceOrderMaster.getCode() + ",服务金额:" + serviceFee + "]");
|
||||
accessoryUpdate.setRemark(accessoryOrderMaster.getRemark() + " [已生成服务订单:" + serviceOrderMaster.getCode() + ",服务金额:" + serviceMoney + "]");
|
||||
orderMasterService.updateOrderMaster(accessoryUpdate);
|
||||
|
||||
// 通知服务师傅新订单
|
||||
|
|
@ -2070,7 +2068,7 @@ public class OrderController extends BaseController {
|
|||
result.put("accessoryOrderCode", accessoryOrderMaster.getCode());
|
||||
result.put("serviceOrderId", serviceOrderMaster.getId());
|
||||
result.put("serviceOrderCode", serviceOrderMaster.getCode());
|
||||
result.put("serviceFee", serviceFee);
|
||||
result.put("serviceFee", serviceMoney);
|
||||
result.put("serviceGoodsId", serverGoods.getGoodsId());
|
||||
result.put("serviceGoodsName", serverGoods.getGoodsName());
|
||||
result.put("serviceWorkerId", serverWorker.getWorkerId());
|
||||
|
|
@ -2078,7 +2076,7 @@ public class OrderController extends BaseController {
|
|||
result.put("serviceWorkerPhone", serverWorker.getPhone());
|
||||
|
||||
logger.info("成功为配件订单[{}]生成服务订单[{}],服务金额:{}",
|
||||
accessoryOrderMaster.getCode(), serviceOrderMaster.getCode(), serviceFee);
|
||||
accessoryOrderMaster.getCode(), serviceOrderMaster.getCode(), serviceMoney);
|
||||
|
||||
return AjaxResult.success("服务订单生成成功", result);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,27 @@ public class BaiduController extends BaseController {
|
|||
JSONObject json = new JSONObject();
|
||||
|
||||
String location = jsonObject.getString("location");
|
||||
|
||||
// 解析经纬度
|
||||
String[] coordinates = location.split(",");
|
||||
if (coordinates.length != 2) {
|
||||
return AjaxResult.error("location格式错误,应为:经度,纬度");
|
||||
}
|
||||
|
||||
try {
|
||||
double longitude = Double.parseDouble(coordinates[0]); // 经度
|
||||
double latitude = Double.parseDouble(coordinates[1]); // 纬度
|
||||
|
||||
// 将经纬度添加到返回结果中
|
||||
json.put("longitude", longitude);
|
||||
json.put("latitude", latitude);
|
||||
json.put("coordinates", coordinates);
|
||||
|
||||
logger.info("解析到的坐标 - 经度: {}, 纬度: {}", longitude, latitude);
|
||||
} catch (NumberFormatException e) {
|
||||
return AjaxResult.error("经纬度格式错误");
|
||||
}
|
||||
|
||||
String url = baiduConfig.getUrl().replace("#AK#", baiduConfig.getAk()) + location;
|
||||
String result = HttpUtils.sendGet(url);
|
||||
result = result.replaceAll("\n", "").replaceAll("\t", "");
|
||||
|
|
@ -55,12 +76,24 @@ public class BaiduController extends BaseController {
|
|||
logger.info("countryName :" + countryName);
|
||||
SysArea countryArea = iSysAreaService.selectByName(countryName, cityArea.getAreaCode());
|
||||
String streetName = addressJson.getString("town");
|
||||
logger.info("streetName :" + countryName);
|
||||
logger.info("streetName :" + streetName);
|
||||
SysArea streetArea = iSysAreaService.selectByName(streetName, countryArea.getAreaCode());
|
||||
|
||||
// 添加地址信息
|
||||
json.put("provinceArea", provinceArea);
|
||||
json.put("cityArea", cityArea);
|
||||
json.put("countryArea", countryArea);
|
||||
json.put("streetArea", streetArea);
|
||||
|
||||
// 添加完整地址
|
||||
String fullAddress = (provinceName != null ? provinceName : "") +
|
||||
(cityName != null ? cityName : "") +
|
||||
(countryName != null ? countryName : "") +
|
||||
(streetName != null ? streetName : "");
|
||||
json.put("fullAddress", fullAddress);
|
||||
|
||||
// 保留原有的location字段用于兼容
|
||||
json.put("location", location);
|
||||
}else {
|
||||
return AjaxResult.error("Api服务异常!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,6 +174,8 @@ public class OrderMaster extends BaseEntity {
|
|||
|
||||
private BigDecimal serverMoney;
|
||||
|
||||
private BigDecimal serverGoodsMoney;
|
||||
|
||||
private Boolean searchAfterList;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
|
|
@ -238,12 +240,9 @@ public class OrderMaster extends BaseEntity {
|
|||
|
||||
private Integer withdrawn;
|
||||
|
||||
@Excel(name = "服务商品ID")
|
||||
private Long serverGoodsId;
|
||||
|
||||
@Excel(name = "关联商品订单主单ID")
|
||||
private Long goodsOrderMasterId;
|
||||
|
||||
@Excel(name = "物流单号")
|
||||
private String trackingNumber;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
<result property="timeoutFineTimes" column="timeout_fine_times"/>
|
||||
<result property="isCall" column="is_call" />
|
||||
<result property="serverMoney" column="server_money" />
|
||||
<result property="serverGoodsMoney" column="server_goods_money" />
|
||||
<result property="provinceId" column="province_id"/>
|
||||
<result property="cityId" column="city_id"/>
|
||||
<result property="countryId" column="country_id"/>
|
||||
|
|
@ -105,7 +106,8 @@
|
|||
withdrawn,
|
||||
server_goods_id,
|
||||
goods_order_master_id,
|
||||
tracking_number
|
||||
tracking_number,
|
||||
server_goods_money
|
||||
|
||||
FROM order_master
|
||||
</sql>
|
||||
|
|
@ -157,7 +159,8 @@
|
|||
om.withdrawn,
|
||||
om.server_goods_id,
|
||||
om.goods_order_master_id,
|
||||
om.tracking_number
|
||||
om.tracking_number,
|
||||
om.server_goods_money
|
||||
FROM order_master om
|
||||
LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id
|
||||
LEFT JOIN goods g ON g.goods_id = om.goods_id
|
||||
|
|
@ -452,6 +455,7 @@
|
|||
<if test="serverGoodsId != null">server_goods_id = #{serverGoodsId},</if>
|
||||
<if test="goodsOrderMasterId != null">goods_order_master_id = #{goodsOrderMasterId},</if>
|
||||
<if test="trackingNumber != null">tracking_number = #{trackingNumber},</if>
|
||||
<if test="serverGoodsMoney != null">server_goods_money = #{serverGoodsMoney},</if>
|
||||
update_time = SYSDATE()
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
|
|
@ -509,6 +513,7 @@
|
|||
<if test="serverGoodsId != null">server_goods_id,</if>
|
||||
<if test="goodsOrderMasterId != null">goods_order_master_id,</if>
|
||||
<if test="trackingNumber != null and trackingNumber != ''">tracking_number,</if>
|
||||
<if test="serverGoodsMoney != null">server_goods_money,</if>
|
||||
create_time
|
||||
)VALUES(
|
||||
<if test="deptId != null and deptId != 0">#{deptId},</if>
|
||||
|
|
@ -547,6 +552,7 @@
|
|||
<if test="serverGoodsId != null">#{serverGoodsId},</if>
|
||||
<if test="goodsOrderMasterId != null">#{goodsOrderMasterId},</if>
|
||||
<if test="trackingNumber != null and trackingNumber != ''">#{trackingNumber},</if>
|
||||
<if test="serverGoodsMoney != null">#{serverGoodsMoney},</if>
|
||||
SYSDATE()
|
||||
)
|
||||
</insert>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
<result property="streetName" column="street_name"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 可在此处添加自定义SQL语句 -->
|
||||
|
|
@ -28,11 +30,11 @@
|
|||
</select>
|
||||
-->
|
||||
|
||||
<insert id="insert" parameterType="com.ghy.shop.domain.Shop">
|
||||
<insert id="insert" parameterType="com.ghy.shop.domain.Shop" useGeneratedKeys="true" keyProperty="shopId">
|
||||
INSERT INTO shop (
|
||||
shop_name, image_url, worker_id, province_id, province_name, city_id, city_name, country_id, country_name, street_id, street_name, address, phone
|
||||
shop_name, image_url, worker_id, province_id, province_name, city_id, city_name, country_id, country_name, street_id, street_name, address, phone, latitude, longitude
|
||||
) VALUES (
|
||||
#{shopName}, #{imageUrl}, #{workerId}, #{provinceId}, #{provinceName}, #{cityId}, #{cityName}, #{countryId}, #{countryName}, #{streetId}, #{streetName}, #{address}, #{phone}
|
||||
#{shopName}, #{imageUrl}, #{workerId}, #{provinceId}, #{provinceName}, #{cityId}, #{cityName}, #{countryId}, #{countryName}, #{streetId}, #{streetName}, #{address}, #{phone}, #{latitude}, #{longitude}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
|
@ -50,7 +52,9 @@
|
|||
street_id = #{streetId},
|
||||
street_name = #{streetName},
|
||||
address = #{address},
|
||||
phone = #{phone}
|
||||
phone = #{phone},
|
||||
latitude = #{latitude},
|
||||
longitude = #{longitude}
|
||||
WHERE shop_id = #{shopId}
|
||||
</update>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue