Commit 846a5515 authored by hezhen's avatar hezhen

Merge branch 'hz_dev' into base-modify

# Conflicts:
#	xx-campsite/xx-campsite-server/src/main/resources/mapper/CampsiteShopMapper.xml
parents 54878130 488574e8
...@@ -96,6 +96,10 @@ public class CampsiteShopBiz extends BaseBiz<CampsiteShopMapper, CampsiteShop> { ...@@ -96,6 +96,10 @@ public class CampsiteShopBiz extends BaseBiz<CampsiteShopMapper, CampsiteShop> {
PageDataVO<CampsiteShopPageDTO> pageDataVO = PageDataVO.pageInfo(campsiteShopFindDTO.getPage(), campsiteShopFindDTO.getLimit(), () -> mapper.findAllCampsiteShopsByTypeOrCode(campsiteShopFindDTO.getType(),campsiteShopFindDTO.getAddrProvince(),campsiteShopFindDTO.getAddrCity())); PageDataVO<CampsiteShopPageDTO> pageDataVO = PageDataVO.pageInfo(campsiteShopFindDTO.getPage(), campsiteShopFindDTO.getLimit(), () -> mapper.findAllCampsiteShopsByTypeOrCode(campsiteShopFindDTO.getType(),campsiteShopFindDTO.getAddrProvince(),campsiteShopFindDTO.getAddrCity()));
List<CampsiteShopPageDTO> campsiteShopPageDTOS = pageDataVO.getData(); List<CampsiteShopPageDTO> campsiteShopPageDTOS = pageDataVO.getData();
if (CollectionUtils.isEmpty(campsiteShopPageDTOS)) { if (CollectionUtils.isEmpty(campsiteShopPageDTOS)) {
campsiteShopPageDataVO.setPageNum(campsiteShopFindDTO.getPage());
campsiteShopPageDataVO.setTotalCount(0L);
campsiteShopPageDataVO.setTotalPage(0);
campsiteShopPageDataVO.setPageSize(campsiteShopFindDTO.getLimit());
campsiteShopPageDataVO.setData(Collections.EMPTY_LIST); campsiteShopPageDataVO.setData(Collections.EMPTY_LIST);
return campsiteShopPageDataVO; return campsiteShopPageDataVO;
} }
......
...@@ -37,12 +37,28 @@ ...@@ -37,12 +37,28 @@
<!--根据类型查询全部--> <!--根据类型查询全部-->
<select id="findAllCampsiteShopsByTypeOrCode" resultType="com.xxfc.platform.campsite.dto.CampsiteShopPageDTO"> <select id="findAllCampsiteShopsByTypeOrCode" resultType="com.xxfc.platform.campsite.dto.CampsiteShopPageDTO">
select cs.id as `id`,cs.name as `name`,cs.logo as `logo`,cs.url as `url`,cs.province_name as `provinceName`,cs.city_name as `cityName`,cs.service_phone as `phone`,cs.alt SELECT
cs.longitude as `longitude`,cs.latitude as `latitude`,`address` as `address`,cs.hot as `hot`,cs.crt_time as `crtTime`,cs.concat as `concat`,ct.id as `storeId`,ct.name as `storeTypeName` cs.id AS `id`,
FROM `campsite_shop_tag` cst cs. NAME AS `name`,
left JOIN `campsite_shop` cs on cst.shop_id=cs.id cs.logo AS `logo`,
left JOIN `campsite_tag` ct on cst.tag_id=ct.id cs.url AS `url`,
where cs.sale_state=1 and cs.is_del=0 cs.province_name AS `provinceName`,
cs.city_name AS `cityName`,
cs.service_phone AS `phone`,
cs.longitude AS `longitude`,
cs.latitude AS `latitude`,
cs.`address` AS `address`,
cs.hot AS `hot`,
cs.crt_time AS `crtTime`,
cs.concat AS `concat`,
REPLACE(GROUP_CONCAT( DISTINCT ct.`name` ),',','|') AS `storeTypeName`
FROM campsite_shop cs
LEFT JOIN campsite_shop_tag cst ON cs.id = cst.shop_id
LEFT JOIN campsite_tag ct ON cst.tag_id = ct.id
WHERE
cs.sale_state = 1
AND cs.is_del = 0
<if test="typeId!=null"> <if test="typeId!=null">
and cst.tag_id=#{typeId} and cst.tag_id=#{typeId}
</if> </if>
...@@ -52,6 +68,7 @@ ...@@ -52,6 +68,7 @@
<if test="cityCode != null"> <if test="cityCode != null">
and `city`=#{cityCode} and `city`=#{cityCode}
</if> </if>
GROUP BY cs.id
order by `crtTime` DESC order by `crtTime` DESC
</select> </select>
......
...@@ -141,7 +141,6 @@ public class SmsService { ...@@ -141,7 +141,6 @@ public class SmsService {
log.info("RequestId=" + sendSmsResponse.getRequestId()); log.info("RequestId=" + sendSmsResponse.getRequestId());
log.info("BizId=" + sendSmsResponse.getBizId()); log.info("BizId=" + sendSmsResponse.getBizId());
if(sendSmsResponse.getCode() != null && sendSmsResponse.getCode().equals("OK")) { if(sendSmsResponse.getCode() != null && sendSmsResponse.getCode().equals("OK")) {
log.info("发送成功");
//请求成功 //请求成功
return true; return true;
} }
...@@ -240,8 +239,8 @@ public class SmsService { ...@@ -240,8 +239,8 @@ public class SmsService {
public static void main(String[] args) throws ClientException, InterruptedException { public static void main(String[] args) throws ClientException, InterruptedException {
SmsService smsService=new SmsService(); SmsService smsService=new SmsService();
//发短信 //发短信
String params="{\"param7\":\"\",\"param8\":\"2019-10-09 09:00:00\",\"param5\":\"\",\"param6\":\"欣新房车控股集团\",\"param9\":\"2019-10-09 18:00:00\",\"param10\":\"1\",\"param3\":\"测试依维柯后拓展房车(仅供测试使用,不提供任何服务)\",\"param4\":\"欣新房车控股集团\",\"param1\":\"肖少林\",\"param2\":\"18681032646\"}"; String[] params={"1","2","3","2019-08-29","【松山湖】"};
sendTemplate("13612688539",params,"SMS_173345572"); SmsService.sendTemplateToJson("13612688539,13265487972",params,"SMS_169904346");
/*System.out.println("短信接口返回的数据----------------"); /*System.out.println("短信接口返回的数据----------------");
System.out.println("Code=" + response.getCode()); System.out.println("Code=" + response.getCode());
System.out.println("Message=" + response.getMessage()); System.out.println("Message=" + response.getMessage());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment