no message
This commit is contained in:
parent
fa616c8de6
commit
bd78980529
|
|
@ -44,6 +44,7 @@ public class BaiduController extends BaseController {
|
|||
JSONObject resultJson = JSONObject.parseObject(result);
|
||||
if("0".equals(resultJson.getString("status"))){
|
||||
JSONObject addressJson = resultJson.getJSONObject("result").getJSONObject("addressComponent");
|
||||
logger.info("百度地图获取到的地址 :" + addressJson);
|
||||
String provinceName = addressJson.getString("province");
|
||||
logger.info("provinceName :" + provinceName);
|
||||
SysArea provinceArea = iSysAreaService.selectByName(provinceName, null);
|
||||
|
|
@ -53,9 +54,13 @@ public class BaiduController extends BaseController {
|
|||
String countryName = addressJson.getString("district");
|
||||
logger.info("countryName :" + countryName);
|
||||
SysArea countryArea = iSysAreaService.selectByName(countryName, cityArea.getAreaCode());
|
||||
String streetName = addressJson.getString("town");
|
||||
logger.info("streetName :" + countryName);
|
||||
SysArea streetArea = iSysAreaService.selectByName(streetName, countryArea.getAreaCode());
|
||||
json.put("provinceArea", provinceArea);
|
||||
json.put("cityArea", cityArea);
|
||||
json.put("countryArea", countryArea);
|
||||
json.put("streetArea", streetArea);
|
||||
}else {
|
||||
return AjaxResult.error("Api服务异常!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ public class Goods extends BaseEntity {
|
|||
@Excel(name = "店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@Excel(name = "店铺名称")
|
||||
private String shopName;
|
||||
|
||||
@Excel(name = "名称")
|
||||
private String goodsName;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<result property="goodsCode" column="goods_code" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="shopId" column="shop_id" />
|
||||
<result property="shopName" column="shop_name" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsDesc" column="goods_desc" />
|
||||
<result property="goodsUnit" column="goods_unit" />
|
||||
|
|
@ -31,14 +32,14 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectGoods">
|
||||
SELECT goods_id, goods_code, dept_id, shop_id, goods_name, goods_desc, warranty_period, serv_activity, goods_unit, expect_duration, goods_sort, worker_id,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword
|
||||
SELECT goods_id, goods_code, dept_id, shop_id, shop_name, goods_name, goods_desc, warranty_period, serv_activity, goods_unit, expect_duration, goods_sort, worker_id,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword,type
|
||||
FROM goods
|
||||
</sql>
|
||||
|
||||
<sql id="selectGoodsWithArea">
|
||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, shop_id, goods_name, goods_desc, goods_sort, worker_id, goods_unit, warranty_period, serv_activity, expect_duration,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark, g.area_desc, g.keyword
|
||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, shop_id, shop_name, goods_name, goods_desc, goods_sort, worker_id, goods_unit, warranty_period, serv_activity, expect_duration,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark, g.area_desc, g.keyword,g.type
|
||||
FROM goods g
|
||||
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
|
||||
</sql>
|
||||
|
|
@ -62,6 +63,7 @@
|
|||
<if test="areaDesc != null and areaDesc != ''">area_desc = #{areaDesc},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="shopId != null">shop_id = #{shopId},</if>
|
||||
<if test="shopName != null and shopName != ''">shop_name = #{shopName},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
WHERE goods_id = #{goodsId}
|
||||
|
|
@ -78,6 +80,7 @@
|
|||
<if test="goodsCode != null and goodsCode != ''">goods_code,</if>
|
||||
<if test="deptId != null and deptId != ''">dept_id,</if>
|
||||
<if test="shopId != null">shop_id,</if>
|
||||
<if test="shopName != null and shopName != ''">shop_name,</if>
|
||||
<if test="goodsName != null and goodsName != ''">goods_name,</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">goods_unit,</if>
|
||||
|
|
@ -99,6 +102,7 @@
|
|||
<if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="shopId != null">#{shopId},</if>
|
||||
<if test="shopName != null and shopName != ''">#{shopName},</if>
|
||||
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">#{goodsUnit},</if>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<id property="shopId" column="shop_id"/>
|
||||
<result property="shopName" column="shop_name"/>
|
||||
<result property="imageUrl" column="image_url"/>
|
||||
<result property="workerId" column="worker_id"/>
|
||||
<result property="provinceId" column="province_id"/>
|
||||
<result property="provinceName" column="province_name"/>
|
||||
<result property="cityId" column="city_id"/>
|
||||
|
|
@ -29,9 +30,9 @@
|
|||
|
||||
<insert id="insert" parameterType="com.ghy.shop.domain.Shop">
|
||||
INSERT INTO shop (
|
||||
shop_name, image_url, 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
|
||||
) VALUES (
|
||||
#{shopName}, #{imageUrl}, #{provinceId}, #{provinceName}, #{cityId}, #{cityName}, #{countryId}, #{countryName}, #{streetId}, #{streetName}, #{address}, #{phone}
|
||||
#{shopName}, #{imageUrl}, #{workerId}, #{provinceId}, #{provinceName}, #{cityId}, #{cityName}, #{countryId}, #{countryName}, #{streetId}, #{streetName}, #{address}, #{phone}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
|
@ -39,6 +40,7 @@
|
|||
UPDATE shop
|
||||
SET shop_name = #{shopName},
|
||||
image_url = #{imageUrl},
|
||||
worker_id = #{workerId},
|
||||
province_id = #{provinceId},
|
||||
province_name = #{provinceName},
|
||||
city_id = #{cityId},
|
||||
|
|
@ -61,7 +63,7 @@
|
|||
</select>
|
||||
|
||||
<select id="selectAll" resultMap="ShopResultMap">
|
||||
SELECT * FROM shop
|
||||
SELECT * FROM shop
|
||||
</select>
|
||||
|
||||
<select id="selectShopsByWorkerId" resultMap="ShopResultMap">
|
||||
|
|
|
|||
Loading…
Reference in New Issue