update 小程序查询充电站列表

This commit is contained in:
Lemon
2023-08-18 09:27:22 +08:00
parent fe5389ce7a
commit 128a2e76e3
8 changed files with 59 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
package com.jsowell.api.uniapp;/**
* TODO
*
* @Date 2023/8/18 8:55
* @author Lemon
*/public class OccupyOrderController {
}

View File

@@ -59,9 +59,9 @@ public class PileController extends BaseController {
// 获取appid第三方平台用
String appId = request.getHeader("appId");
if (StringUtils.isNotBlank(appId)) {
// 获取merchantId
String merchantId = pileMerchantInfoService.getFirstLevelMerchantIdByAppId(appId);
queryStationDTO.setMerchantId(merchantId);
// 获取deptIds
List<String> deptIds = pileMerchantInfoService.getDeptIdsByAppId(appId);
queryStationDTO.setMerchantDeptIds(deptIds);
}
PageResponse pageResponse = pileStationInfoService.uniAppQueryStationInfoList(queryStationDTO);
response = new RestApiResponse<>(pageResponse);

View File

@@ -0,0 +1,7 @@
package com.jsowell.pile.dto;/**
* TODO
*
* @Date 2023/8/18 9:00
* @author Lemon
*/public class GenerateOccupyOrderDTO {
}

View File

@@ -6,6 +6,8 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 站点管理前台参数
*
@@ -73,4 +75,9 @@ public class QueryStationDTO extends BaseEntity {
* 站点二维码前缀
*/
private String qrcodePrefix;
/**
* 运营商部门id
*/
private List<String> merchantDeptId;
}

View File

@@ -96,4 +96,11 @@ public interface PileMerchantInfoMapper {
* @return
*/
String getFirstLevelMerchantIdByAppId(String appId);
/**
* 通过appid查询运营商部门id
* @param appId
* @return
*/
List<String> getDeptIdsByAppId(@Param("appId") String appId);
}

View File

@@ -98,4 +98,11 @@ public interface IPileMerchantInfoService {
List<PileMerchantInfo> queryFirstLevelMerchant();
String queryAppIdByMerchantId(String merchantId);
/**
* 通过appid获取运营商部门id
* @param appId
* @return
*/
List<String> getDeptIdsByAppId(String appId);
}

View File

@@ -378,5 +378,15 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
return appId;
}
/**
* 通过appid查询运营商部门id
* @param appId
* @return
*/
@Override
public List<String> getDeptIdsByAppId(String appId) {
return pileMerchantInfoMapper.getDeptIdsByAppId(appId);
}
}

View File

@@ -343,4 +343,15 @@
and merchant_level = '1'
and app_id = #{appId,jdbcType=VARCHAR}
</select>
<select id="getDeptIdsByAppId" resultType="java.lang.String">
select
dept_id as deptId
from
pile_merchant_info
where 1 = 1
<if test="appId != null and appId != ''">
and app_id = #{appId,jdbcType=VARCHAR}
</if>
</select>
</mapper>