Commit 3a2c9b28 by 杨卫

feat:策略中心

1 parent 956c9fe6
package cn.com.glsx.merchants.model.response;
import lombok.Data;
import java.io.Serializable;
/**
* @author yangwei
* @version 1.0
* @since 2026/01/19 16:00
*/
@Data
public class MerchantBrandDTO implements Serializable {
/**
* 商户号
*/
private Integer merchantId;
/**
* 一级品牌id
*/
private Integer firstBrandId;
/**
* 二级品牌id
*/
private Integer secBrandId;
}
...@@ -543,6 +543,11 @@ public interface MerchantRemote { ...@@ -543,6 +543,11 @@ public interface MerchantRemote {
@ApiResponse("品牌") @ApiResponse("品牌")
RpcResponse<List<MerchantBrandResponse>> getBrand(Integer merchantId); RpcResponse<List<MerchantBrandResponse>> getBrand(Integer merchantId);
@ApiMethod("查询品牌列表")
@ApiParams({@ApiParam(name = "merchantId", notes = "查询品牌列表", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("品牌")
RpcResponse<List<MerchantBrandDTO>> getBrandByMerchantIds(List<Integer> merchantId);
@ApiMethod("根据一级品牌,省份id查询商户号列表") @ApiMethod("根据一级品牌,省份id查询商户号列表")
@ApiParams({@ApiParam(name = "requestDTO", notes = "查询商户列表", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)}) @ApiParams({@ApiParam(name = "requestDTO", notes = "查询商户列表", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("查询商户列表(对外简化)") @ApiResponse("查询商户列表(对外简化)")
......
...@@ -176,4 +176,6 @@ public interface MerchantMapper extends CommonBaseMapper<Merchant> { ...@@ -176,4 +176,6 @@ public interface MerchantMapper extends CommonBaseMapper<Merchant> {
List<MerchantProvinceDTO> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO); List<MerchantProvinceDTO> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO);
List<MerchantProvinceDTO> findMerchantProvinceListByIds(@Param("merchantIds") List<Integer> merchantIds); List<MerchantProvinceDTO> findMerchantProvinceListByIds(@Param("merchantIds") List<Integer> merchantIds);
List<MerchantBrandDTO> getBrandByMerchantIds(@Param("merchantIds") List<Integer> merchantIds);
} }
\ No newline at end of file \ No newline at end of file
...@@ -904,6 +904,19 @@ public class MerchantRemoteImpl implements MerchantRemote { ...@@ -904,6 +904,19 @@ public class MerchantRemoteImpl implements MerchantRemote {
} }
@Override @Override
public RpcResponse<List<MerchantBrandDTO>> getBrandByMerchantIds(List<Integer> merchantId) {
try {
return RpcResponse.success(merchantService.getBrandByMerchantIds(merchantId));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
} catch (Exception e) {
log.error("根据商户号列表查询品牌失败:", e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<List<String>> qryPhoneInStaffList(List<String> phones) { public RpcResponse<List<String>> qryPhoneInStaffList(List<String> phones) {
try { try {
return RpcResponse.success(merchantService.qryPhoneInStaffList(phones)); return RpcResponse.success(merchantService.qryPhoneInStaffList(phones));
......
...@@ -2793,4 +2793,8 @@ public class MerchantService { ...@@ -2793,4 +2793,8 @@ public class MerchantService {
public List<MerchantProvinceDTO> findMerchantProvinceListByIds(List<Integer> merchantIds) { public List<MerchantProvinceDTO> findMerchantProvinceListByIds(List<Integer> merchantIds) {
return merchantMapper.findMerchantProvinceListByIds(merchantIds); return merchantMapper.findMerchantProvinceListByIds(merchantIds);
} }
public List<cn.com.glsx.merchants.model.response.MerchantBrandDTO> getBrandByMerchantIds(List<Integer> merchantId) {
return merchantMapper.getBrandByMerchantIds(merchantId);
}
} }
...@@ -1264,4 +1264,19 @@ ...@@ -1264,4 +1264,19 @@
</if> </if>
</select> </select>
<select id="getBrandByMerchantIds" resultType="cn.com.glsx.merchants.model.response.MerchantBrandDTO">
select
merchant_id as merchantId,
first_brand_id as firstBrandId,
sec_brand_id as secBrandId
from platform_merchant_brand
where del_flag = 0
<if test="merchantIds != null and merchantIds.size() > 0">
AND merchant_id IN
<foreach collection="merchantIds" item="item" separator="," index="index" open="(" close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!