no message

This commit is contained in:
cb 2025-06-19 14:49:23 +08:00
parent fa616c8de6
commit bd78980529
4 changed files with 21 additions and 7 deletions

View File

@ -44,6 +44,7 @@ public class BaiduController extends BaseController {
JSONObject resultJson = JSONObject.parseObject(result); JSONObject resultJson = JSONObject.parseObject(result);
if("0".equals(resultJson.getString("status"))){ if("0".equals(resultJson.getString("status"))){
JSONObject addressJson = resultJson.getJSONObject("result").getJSONObject("addressComponent"); JSONObject addressJson = resultJson.getJSONObject("result").getJSONObject("addressComponent");
logger.info("百度地图获取到的地址 :" + addressJson);
String provinceName = addressJson.getString("province"); String provinceName = addressJson.getString("province");
logger.info("provinceName :" + provinceName); logger.info("provinceName :" + provinceName);
SysArea provinceArea = iSysAreaService.selectByName(provinceName, null); SysArea provinceArea = iSysAreaService.selectByName(provinceName, null);
@ -53,9 +54,13 @@ public class BaiduController extends BaseController {
String countryName = addressJson.getString("district"); String countryName = addressJson.getString("district");
logger.info("countryName :" + countryName); logger.info("countryName :" + countryName);
SysArea countryArea = iSysAreaService.selectByName(countryName, cityArea.getAreaCode()); 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("provinceArea", provinceArea);
json.put("cityArea", cityArea); json.put("cityArea", cityArea);
json.put("countryArea", countryArea); json.put("countryArea", countryArea);
json.put("streetArea", streetArea);
}else { }else {
return AjaxResult.error("Api服务异常!"); return AjaxResult.error("Api服务异常!");
} }

View File

@ -31,6 +31,9 @@ public class Goods extends BaseEntity {
@Excel(name = "店铺id") @Excel(name = "店铺id")
private Long shopId; private Long shopId;
@Excel(name = "店铺名称")
private String shopName;
@Excel(name = "名称") @Excel(name = "名称")
private String goodsName; private String goodsName;

View File

@ -8,6 +8,7 @@
<result property="goodsCode" column="goods_code" /> <result property="goodsCode" column="goods_code" />
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="shopId" column="shop_id" /> <result property="shopId" column="shop_id" />
<result property="shopName" column="shop_name" />
<result property="goodsName" column="goods_name" /> <result property="goodsName" column="goods_name" />
<result property="goodsDesc" column="goods_desc" /> <result property="goodsDesc" column="goods_desc" />
<result property="goodsUnit" column="goods_unit" /> <result property="goodsUnit" column="goods_unit" />
@ -31,14 +32,14 @@
</resultMap> </resultMap>
<sql id="selectGoods"> <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, 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 dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword,type
FROM goods FROM goods
</sql> </sql>
<sql id="selectGoodsWithArea"> <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, 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 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 FROM goods g
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
</sql> </sql>
@ -62,6 +63,7 @@
<if test="areaDesc != null and areaDesc != ''">area_desc = #{areaDesc},</if> <if test="areaDesc != null and areaDesc != ''">area_desc = #{areaDesc},</if>
<if test="type != null">type = #{type},</if> <if test="type != null">type = #{type},</if>
<if test="shopId != null">shop_id = #{shopId},</if> <if test="shopId != null">shop_id = #{shopId},</if>
<if test="shopName != null and shopName != ''">shop_name = #{shopName},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
WHERE goods_id = #{goodsId} WHERE goods_id = #{goodsId}
@ -78,6 +80,7 @@
<if test="goodsCode != null and goodsCode != ''">goods_code,</if> <if test="goodsCode != null and goodsCode != ''">goods_code,</if>
<if test="deptId != null and deptId != ''">dept_id,</if> <if test="deptId != null and deptId != ''">dept_id,</if>
<if test="shopId != null">shop_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="goodsName != null and goodsName != ''">goods_name,</if>
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if> <if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
<if test="goodsUnit != null and goodsUnit != ''">goods_unit,</if> <if test="goodsUnit != null and goodsUnit != ''">goods_unit,</if>
@ -99,6 +102,7 @@
<if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if> <if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if>
<if test="deptId != null and deptId != ''">#{deptId},</if> <if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="shopId != null">#{shopId},</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="goodsName != null and goodsName != ''">#{goodsName},</if>
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if> <if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
<if test="goodsUnit != null and goodsUnit != ''">#{goodsUnit},</if> <if test="goodsUnit != null and goodsUnit != ''">#{goodsUnit},</if>

View File

@ -8,6 +8,7 @@
<id property="shopId" column="shop_id"/> <id property="shopId" column="shop_id"/>
<result property="shopName" column="shop_name"/> <result property="shopName" column="shop_name"/>
<result property="imageUrl" column="image_url"/> <result property="imageUrl" column="image_url"/>
<result property="workerId" column="worker_id"/>
<result property="provinceId" column="province_id"/> <result property="provinceId" column="province_id"/>
<result property="provinceName" column="province_name"/> <result property="provinceName" column="province_name"/>
<result property="cityId" column="city_id"/> <result property="cityId" column="city_id"/>
@ -29,9 +30,9 @@
<insert id="insert" parameterType="com.ghy.shop.domain.Shop"> <insert id="insert" parameterType="com.ghy.shop.domain.Shop">
INSERT INTO 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 ( ) 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> </insert>
@ -39,6 +40,7 @@
UPDATE shop UPDATE shop
SET shop_name = #{shopName}, SET shop_name = #{shopName},
image_url = #{imageUrl}, image_url = #{imageUrl},
worker_id = #{workerId},
province_id = #{provinceId}, province_id = #{provinceId},
province_name = #{provinceName}, province_name = #{provinceName},
city_id = #{cityId}, city_id = #{cityId},