Commit 292a41c5 by 蔡茜

产值排名

1 parent 8413f676
package cn.com.glsx.merchants.model.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class MerchantProvinceDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(notes = "省份名称")
private String provinceName;
@ApiModelProperty(notes = "省份code")
private String provinceCode;
@ApiModelProperty(notes = "商户id")
private Integer merchantId;
}
\ No newline at end of file \ No newline at end of file
...@@ -547,4 +547,6 @@ public interface MerchantRemote { ...@@ -547,4 +547,6 @@ public interface MerchantRemote {
@ApiParams({@ApiParam(name = "requestDTO", notes = "查询商户列表", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)}) @ApiParams({@ApiParam(name = "requestDTO", notes = "查询商户列表", dataType = ApiParam.DataTypeEnum.OBJECT, required = true)})
@ApiResponse("查询商户列表(对外简化)") @ApiResponse("查询商户列表(对外简化)")
RpcResponse<List<MerchantSimpleResponse>> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO); RpcResponse<List<MerchantSimpleResponse>> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO);
RpcResponse<List<MerchantProvinceDTO>> findMerchantProvinceListByIds(List<Integer> merchantIds);
} }
...@@ -174,4 +174,6 @@ public interface MerchantMapper extends CommonBaseMapper<Merchant> { ...@@ -174,4 +174,6 @@ public interface MerchantMapper extends CommonBaseMapper<Merchant> {
List<MerchantBrandResponse> getBrand(Integer merchantId); List<MerchantBrandResponse> getBrand(Integer merchantId);
List<MerchantSimpleResponse> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO); List<MerchantSimpleResponse> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO);
List<MerchantProvinceDTO> findMerchantProvinceListByIds(@Param("merchantIds")List<Integer> merchantIds);
} }
\ No newline at end of file \ No newline at end of file
...@@ -925,4 +925,14 @@ public class MerchantRemoteImpl implements MerchantRemote { ...@@ -925,4 +925,14 @@ public class MerchantRemoteImpl implements MerchantRemote {
return RpcResponse.error(e); return RpcResponse.error(e);
} }
} }
@Override
public RpcResponse<List<MerchantProvinceDTO>> findMerchantProvinceListByIds(List<Integer> merchantIds){
try {
return RpcResponse.success(merchantService.findMerchantProvinceListByIds(merchantIds));
} catch (RpcServiceException e) {
log.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
} }
...@@ -2789,4 +2789,8 @@ public class MerchantService { ...@@ -2789,4 +2789,8 @@ public class MerchantService {
public List<MerchantSimpleResponse> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO) { public List<MerchantSimpleResponse> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO) {
return merchantMapper.findMerchantListByBrandIdsProvince(requestDTO); return merchantMapper.findMerchantListByBrandIdsProvince(requestDTO);
} }
public List<MerchantProvinceDTO> findMerchantProvinceListByIds(List<Integer> merchantIds) {
return merchantMapper.findMerchantProvinceListByIds(merchantIds);
}
} }
...@@ -1239,4 +1239,17 @@ ...@@ -1239,4 +1239,17 @@
ORDER BY pm.id; ORDER BY pm.id;
</select> </select>
<select id="findMerchantProvinceListByIds"
resultType="cn.com.glsx.merchants.model.response.MerchantProvinceDTO">
SELECT province_code provinceCode,province_name provinceName,merchantNo merchantId
FROM platform_merchant
WHERE del_flag = 0
<if test="merchantIds != null and merchantIds.size() > 0">
AND merchantNo 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!