Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qianhe-slsy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuwenhao
qianhe-slsy
Commits
57feeaee
Commit
57feeaee
authored
Dec 08, 2023
by
yuanchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1208问题整改
parent
44e10559
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
81 additions
and
14 deletions
+81
-14
qianhe-admin/src/main/java/com/qianhe/system/controller/WaterGoodsController.java
+5
-0
qianhe-admin/src/main/java/com/qianhe/system/domain/WaterGoodsCart.java
+2
-2
qianhe-admin/src/main/java/com/qianhe/system/domain/WaterStation.java
+8
-3
qianhe-admin/src/main/java/com/qianhe/system/mapper/WaterGoodsMapper.java
+1
-0
qianhe-admin/src/main/java/com/qianhe/system/mapper/WaterGoodsSpeMapper.java
+1
-1
qianhe-admin/src/main/java/com/qianhe/system/service/IWaterGoodsService.java
+3
-0
qianhe-admin/src/main/java/com/qianhe/system/service/impl/WaterGoodsServiceImpl.java
+10
-0
qianhe-admin/src/main/java/com/qianhe/system/service/impl/WaterStationServiceImpl.java
+28
-0
qianhe-admin/src/main/java/com/qianhe/system/vo/WaterStationVo.java
+6
-4
qianhe-admin/src/main/resources/mapper/WaterGoodsMapper.xml
+5
-0
qianhe-admin/src/main/resources/mapper/WaterGoodsSpeMapper.xml
+1
-1
qianhe-admin/src/main/resources/mapper/WaterStationMapper.xml
+11
-3
No files found.
qianhe-admin/src/main/java/com/qianhe/system/controller/WaterGoodsController.java
View file @
57feeaee
...
@@ -123,6 +123,11 @@ public class WaterGoodsController extends BaseController
...
@@ -123,6 +123,11 @@ public class WaterGoodsController extends BaseController
return
getDataTable
(
waterGoodsVos
);
return
getDataTable
(
waterGoodsVos
);
}
}
@GetMapping
(
"/zyImgList"
)
public
List
imgList
(){
return
waterGoodsService
.
selectWaterGoodsList1
();
}
/**
/**
* 查询首页商品列表(订水端小程序)
* 查询首页商品列表(订水端小程序)
*/
*/
...
...
qianhe-admin/src/main/java/com/qianhe/system/domain/WaterGoodsCart.java
View file @
57feeaee
...
@@ -29,10 +29,10 @@ public class WaterGoodsCart {
...
@@ -29,10 +29,10 @@ public class WaterGoodsCart {
private
String
goodsTypeName
;
private
String
goodsTypeName
;
/** 商品规格id */
/** 商品规格id */
private
Lo
ng
goodsSpeId
;
private
Stri
ng
goodsSpeId
;
/** 商品规格值id */
/** 商品规格值id */
private
Lo
ng
goodsSpeValId
;
private
Stri
ng
goodsSpeValId
;
/** 商品规格详情 */
/** 商品规格详情 */
private
String
goodsSpeVal
;
private
String
goodsSpeVal
;
...
...
qianhe-admin/src/main/java/com/qianhe/system/domain/WaterStation.java
View file @
57feeaee
...
@@ -40,12 +40,17 @@ public class WaterStation
...
@@ -40,12 +40,17 @@ public class WaterStation
/** 经度 */
/** 经度 */
@Excel
(
name
=
"经度"
)
@Excel
(
name
=
"经度"
)
private
BigDecimal
stationLon
;
private
double
stationLon
;
/** 纬度 */
/** 纬度 */
@Excel
(
name
=
"纬度"
)
@Excel
(
name
=
"纬度"
)
private
BigDecimal
stationLat
;
private
double
stationLat
;
/**高德转腾讯经度**/
private
double
stationLonTen
;
/**高德转腾讯纬度**/
private
double
stationLatTen
;
/** 省份 */
/** 省份 */
@Excel
(
name
=
"省份"
)
@Excel
(
name
=
"省份"
)
private
String
province
;
private
String
province
;
...
@@ -60,7 +65,7 @@ public class WaterStation
...
@@ -60,7 +65,7 @@ public class WaterStation
/** 是否打烊(1营业0打烊) */
/** 是否打烊(1营业0打烊) */
@Excel
(
name
=
"是否打烊(1营业0打烊)"
)
@Excel
(
name
=
"是否打烊(1营业0打烊)"
)
private
Lo
ng
isOpen
;
private
Stri
ng
isOpen
;
/** 创建人 */
/** 创建人 */
@Excel
(
name
=
"创建人"
)
@Excel
(
name
=
"创建人"
)
...
...
qianhe-admin/src/main/java/com/qianhe/system/mapper/WaterGoodsMapper.java
View file @
57feeaee
...
@@ -31,6 +31,7 @@ public interface WaterGoodsMapper
...
@@ -31,6 +31,7 @@ public interface WaterGoodsMapper
*/
*/
public
List
<
WaterGoods
>
selectWaterGoodsList
(
WaterGoods
waterGoods
);
public
List
<
WaterGoods
>
selectWaterGoodsList
(
WaterGoods
waterGoods
);
List
<
WaterGoods
>
selectWaterGoodsList1
();
/**
/**
* 新增商品
* 新增商品
*
*
...
...
qianhe-admin/src/main/java/com/qianhe/system/mapper/WaterGoodsSpeMapper.java
View file @
57feeaee
...
@@ -28,7 +28,7 @@ public interface WaterGoodsSpeMapper
...
@@ -28,7 +28,7 @@ public interface WaterGoodsSpeMapper
* @param id 商品关联规格值主键
* @param id 商品关联规格值主键
* @return 商品关联规格值
* @return 商品关联规格值
*/
*/
public
WaterGoodsSpeVal
selectWaterGoodsSpeValById
(
Lo
ng
id
);
public
WaterGoodsSpeVal
selectWaterGoodsSpeValById
(
Stri
ng
id
);
/**
/**
* 查询商品关联规格列表
* 查询商品关联规格列表
...
...
qianhe-admin/src/main/java/com/qianhe/system/service/IWaterGoodsService.java
View file @
57feeaee
...
@@ -29,6 +29,9 @@ public interface IWaterGoodsService
...
@@ -29,6 +29,9 @@ public interface IWaterGoodsService
*/
*/
public
List
<
WaterGoods
>
selectWaterGoodsList
(
WaterGoods
waterGoods
);
public
List
<
WaterGoods
>
selectWaterGoodsList
(
WaterGoods
waterGoods
);
List
<
WaterGoods
>
selectWaterGoodsList1
();
/**
/**
* 新增商品
* 新增商品
*
*
...
...
qianhe-admin/src/main/java/com/qianhe/system/service/impl/WaterGoodsServiceImpl.java
View file @
57feeaee
...
@@ -149,6 +149,16 @@ public class WaterGoodsServiceImpl implements IWaterGoodsService
...
@@ -149,6 +149,16 @@ public class WaterGoodsServiceImpl implements IWaterGoodsService
}
}
/**
/**
* 主页轮播图
* @param
* @return
*/
@Override
public
List
<
WaterGoods
>
selectWaterGoodsList1
()
{
return
waterGoodsMapper
.
selectWaterGoodsList1
();
}
/**
* 新增商品
* 新增商品
*
*
* @param waterGoodsVo 商品
* @param waterGoodsVo 商品
...
...
qianhe-admin/src/main/java/com/qianhe/system/service/impl/WaterStationServiceImpl.java
View file @
57feeaee
...
@@ -77,6 +77,9 @@ public class WaterStationServiceImpl implements IWaterStationService
...
@@ -77,6 +77,9 @@ public class WaterStationServiceImpl implements IWaterStationService
@Transactional
@Transactional
public
int
insertWaterStation
(
WaterStation
waterStation
)
public
int
insertWaterStation
(
WaterStation
waterStation
)
{
{
WaterStation
w
=
gaodeToTencent
(
waterStation
.
getStationLon
(),
waterStation
.
getStationLat
());
waterStation
.
setStationLonTen
(
w
.
getStationLonTen
());
waterStation
.
setStationLatTen
(
w
.
getStationLatTen
());
waterStation
.
setCreateUser
(
"管理员"
);
waterStation
.
setCreateUser
(
"管理员"
);
waterStation
.
setCreateTime
(
DateUtils
.
getNowDate
());
waterStation
.
setCreateTime
(
DateUtils
.
getNowDate
());
int
i
=
waterStationMapper
.
insertWaterStation
(
waterStation
);
int
i
=
waterStationMapper
.
insertWaterStation
(
waterStation
);
...
@@ -84,6 +87,28 @@ public class WaterStationServiceImpl implements IWaterStationService
...
@@ -84,6 +87,28 @@ public class WaterStationServiceImpl implements IWaterStationService
}
}
/**
/**
* 将高德地图的经纬度坐标转换为腾讯地图的经纬度坐标
*
* @param lng 高德地图经度
* @param lat 高德地图纬度
* @return 腾讯地图经纬度数组,第一个元素为腾讯地图经度,第二个元素为腾讯地图纬度
*/
public
static
WaterStation
gaodeToTencent
(
double
lng
,
double
lat
)
{
WaterStation
w
=
new
WaterStation
();
double
tx_lng
=
lng
+
0.0065
,
tx_lat
=
lat
+
0.006
;
double
x
=
tx_lng
,
y
=
tx_lat
;
double
z
=
Math
.
sqrt
(
x
*
x
+
y
*
y
)
+
0.00002
*
Math
.
sin
(
y
*
Math
.
PI
);
double
theta
=
Math
.
atan2
(
y
,
x
)
+
0.000003
*
Math
.
cos
(
x
*
Math
.
PI
);
tx_lng
=
z
*
Math
.
cos
(
theta
);
tx_lat
=
z
*
Math
.
sin
(
theta
);
w
.
setStationLonTen
(
tx_lng
);
w
.
setStationLatTen
(
tx_lat
);
return
w
;
}
/**
* 修改站点
* 修改站点
*
*
* @param waterStation 站点
* @param waterStation 站点
...
@@ -95,6 +120,9 @@ public class WaterStationServiceImpl implements IWaterStationService
...
@@ -95,6 +120,9 @@ public class WaterStationServiceImpl implements IWaterStationService
{
{
//删除该站点用户
//删除该站点用户
waterStationMapper
.
deleteWaterStationUserByStationId
(
waterStation
.
getId
());
waterStationMapper
.
deleteWaterStationUserByStationId
(
waterStation
.
getId
());
WaterStation
w
=
gaodeToTencent
(
waterStation
.
getStationLon
(),
waterStation
.
getStationLat
());
waterStation
.
setStationLonTen
(
w
.
getStationLonTen
());
waterStation
.
setStationLatTen
(
w
.
getStationLatTen
());
return
waterStationMapper
.
updateWaterStation
(
waterStation
);
return
waterStationMapper
.
updateWaterStation
(
waterStation
);
}
}
...
...
qianhe-admin/src/main/java/com/qianhe/system/vo/WaterStationVo.java
View file @
57feeaee
...
@@ -31,12 +31,14 @@ public class WaterStationVo {
...
@@ -31,12 +31,14 @@ public class WaterStationVo {
/** 经度 */
/** 经度 */
@Excel
(
name
=
"经度"
)
@Excel
(
name
=
"经度"
)
private
BigDecimal
stationLon
;
private
double
stationLon
;
/** 纬度 */
/** 纬度 */
@Excel
(
name
=
"纬度"
)
@Excel
(
name
=
"纬度"
)
private
BigDecimal
stationLat
;
private
double
stationLat
;
private
double
stationLonTen
;
private
double
stationLatTen
;
/** 省份 */
/** 省份 */
@Excel
(
name
=
"省份"
)
@Excel
(
name
=
"省份"
)
private
String
province
;
private
String
province
;
...
@@ -51,7 +53,7 @@ public class WaterStationVo {
...
@@ -51,7 +53,7 @@ public class WaterStationVo {
/** 是否打烊(1营业0打烊) */
/** 是否打烊(1营业0打烊) */
@Excel
(
name
=
"是否打烊(1营业0打烊)"
)
@Excel
(
name
=
"是否打烊(1营业0打烊)"
)
private
Lo
ng
isOpen
;
private
Stri
ng
isOpen
;
/** 创建人 */
/** 创建人 */
@Excel
(
name
=
"创建人"
)
@Excel
(
name
=
"创建人"
)
...
...
qianhe-admin/src/main/resources/mapper/WaterGoodsMapper.xml
View file @
57feeaee
...
@@ -38,6 +38,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -38,6 +38,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by create_time DESC
order by create_time DESC
</select>
</select>
<select
id=
"selectWaterGoodsList1"
resultMap=
"WaterGoodsResult"
>
select url cover_img from water_goods_img where img_type = 1 and goods_id = (select id from water_goods where title = '主页轮播图')
</select>
<select
id=
"selectWaterGoodsById"
parameterType=
"Long"
resultMap=
"WaterGoodsResult"
>
<select
id=
"selectWaterGoodsById"
parameterType=
"Long"
resultMap=
"WaterGoodsResult"
>
<include
refid=
"selectWaterGoodsVo"
/>
<include
refid=
"selectWaterGoodsVo"
/>
where id = #{id}
where id = #{id}
...
...
qianhe-admin/src/main/resources/mapper/WaterGoodsSpeMapper.xml
View file @
57feeaee
...
@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
where id = #{id}
</select>
</select>
<select
id=
"selectWaterGoodsSpeValById"
parameterType=
"
Lo
ng"
resultType=
"WaterGoodsSpeVal"
>
<select
id=
"selectWaterGoodsSpeValById"
parameterType=
"
Stri
ng"
resultType=
"WaterGoodsSpeVal"
>
select id, spe_id, spe, spe_val, price from water_goods_spe_val
select id, spe_id, spe, spe_val, price from water_goods_spe_val
where id = #{id}
where id = #{id}
</select>
</select>
...
...
qianhe-admin/src/main/resources/mapper/WaterStationMapper.xml
View file @
57feeaee
...
@@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"stationAddress"
column=
"station_address"
/>
<result
property=
"stationAddress"
column=
"station_address"
/>
<result
property=
"stationLon"
column=
"station_lon"
/>
<result
property=
"stationLon"
column=
"station_lon"
/>
<result
property=
"stationLat"
column=
"station_lat"
/>
<result
property=
"stationLat"
column=
"station_lat"
/>
<result
property=
"stationLonTen"
column=
"station_lon_ten"
/>
<result
property=
"stationLatTen"
column=
"station_lat_ten"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"province"
column=
"province"
/>
<result
property=
"province"
column=
"province"
/>
<result
property=
"city"
column=
"city"
/>
<result
property=
"city"
column=
"city"
/>
...
@@ -20,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -20,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
</resultMap>
<sql
id=
"selectWaterStationVo"
>
<sql
id=
"selectWaterStationVo"
>
select id, station_name, phone_num, station_address, station_lon, station_l
at
, create_time, province, city, area, is_open, create_user from water_station
select id, station_name, phone_num, station_address, station_lon, station_l
on_ten,station_lat,station_lat_ten
, create_time, province, city, area, is_open, create_user from water_station
</sql>
</sql>
<select
id=
"selectWaterStationList"
parameterType=
"WaterStation"
resultMap=
"WaterStationResult"
>
<select
id=
"selectWaterStationList"
parameterType=
"WaterStation"
resultMap=
"WaterStationResult"
>
...
@@ -30,8 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -30,8 +32,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"stationName != null and stationName != ''"
>
and station_name like concat('%', #{stationName}, '%')
</if>
<if
test=
"stationName != null and stationName != ''"
>
and station_name like concat('%', #{stationName}, '%')
</if>
<if
test=
"phoneNum != null "
>
and phone_num = #{phoneNum}
</if>
<if
test=
"phoneNum != null "
>
and phone_num = #{phoneNum}
</if>
<if
test=
"stationAddress != null and stationAddress != ''"
>
and station_address = #{stationAddress}
</if>
<if
test=
"stationAddress != null and stationAddress != ''"
>
and station_address = #{stationAddress}
</if>
<if
test=
"stationLon != null "
>
and station_lon = #{stationLon}
</if>
<!--
<if test="stationLon != null "> and station_lon = #{stationLon}</if>
<if
test=
"stationLat != null "
>
and station_lat = #{stationLat}
</if>
<if test="stationLat != null "> and station_lat = #{stationLat}</if>
-->
<if
test=
"province != null and province != ''"
>
and province = #{province}
</if>
<if
test=
"province != null and province != ''"
>
and province = #{province}
</if>
<if
test=
"city != null and city != ''"
>
and city = #{city}
</if>
<if
test=
"city != null and city != ''"
>
and city = #{city}
</if>
<if
test=
"area != null and area != ''"
>
and area = #{area}
</if>
<if
test=
"area != null and area != ''"
>
and area = #{area}
</if>
...
@@ -57,7 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -57,7 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"phoneNum != null"
>
phone_num,
</if>
<if
test=
"phoneNum != null"
>
phone_num,
</if>
<if
test=
"stationAddress != null"
>
station_address,
</if>
<if
test=
"stationAddress != null"
>
station_address,
</if>
<if
test=
"stationLon != null"
>
station_lon,
</if>
<if
test=
"stationLon != null"
>
station_lon,
</if>
<if
test=
"stationLonTen != null"
>
station_lon_ten,
</if>
<if
test=
"stationLat != null"
>
station_lat,
</if>
<if
test=
"stationLat != null"
>
station_lat,
</if>
<if
test=
"stationLatTen != null"
>
station_lat_ten,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"province != null"
>
province,
</if>
<if
test=
"province != null"
>
province,
</if>
<if
test=
"city != null"
>
city,
</if>
<if
test=
"city != null"
>
city,
</if>
...
@@ -70,7 +74,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -70,7 +74,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"phoneNum != null"
>
#{phoneNum},
</if>
<if
test=
"phoneNum != null"
>
#{phoneNum},
</if>
<if
test=
"stationAddress != null"
>
#{stationAddress},
</if>
<if
test=
"stationAddress != null"
>
#{stationAddress},
</if>
<if
test=
"stationLon != null"
>
#{stationLon},
</if>
<if
test=
"stationLon != null"
>
#{stationLon},
</if>
<if
test=
"stationLonTen != null"
>
#{stationLonTen},
</if>
<if
test=
"stationLat != null"
>
#{stationLat},
</if>
<if
test=
"stationLat != null"
>
#{stationLat},
</if>
<if
test=
"stationLatTen != null"
>
#{stationLatTen},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"province != null"
>
#{province},
</if>
<if
test=
"province != null"
>
#{province},
</if>
<if
test=
"city != null"
>
#{city},
</if>
<if
test=
"city != null"
>
#{city},
</if>
...
@@ -87,7 +93,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -87,7 +93,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"phoneNum != null"
>
phone_num = #{phoneNum},
</if>
<if
test=
"phoneNum != null"
>
phone_num = #{phoneNum},
</if>
<if
test=
"stationAddress != null"
>
station_address = #{stationAddress},
</if>
<if
test=
"stationAddress != null"
>
station_address = #{stationAddress},
</if>
<if
test=
"stationLon != null"
>
station_lon = #{stationLon},
</if>
<if
test=
"stationLon != null"
>
station_lon = #{stationLon},
</if>
<if
test=
"stationLonTen != null"
>
station_lon_ten = #{stationLonTen},
</if>
<if
test=
"stationLat != null"
>
station_lat = #{stationLat},
</if>
<if
test=
"stationLat != null"
>
station_lat = #{stationLat},
</if>
<if
test=
"stationLatTen != null"
>
station_lat_ten = #{stationLatTen},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"province != null"
>
province = #{province},
</if>
<if
test=
"province != null"
>
province = #{province},
</if>
<if
test=
"city != null"
>
city = #{city},
</if>
<if
test=
"city != null"
>
city = #{city},
</if>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment