Commit 0941138d by 张富康

省份枚举

1 parent 292a41c5
...@@ -15,10 +15,13 @@ public class MerchantProvinceDTO implements Serializable { ...@@ -15,10 +15,13 @@ public class MerchantProvinceDTO implements Serializable {
private String provinceName; private String provinceName;
@ApiModelProperty(notes = "省份code") @ApiModelProperty(notes = "省份code")
private String provinceCode; private Integer provinceCode;
@ApiModelProperty(notes = "商户id") @ApiModelProperty(notes = "商户id")
private Integer merchantId; private Integer merchantId;
@ApiModelProperty(notes = "商户名称")
private String merchantName;
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.model.response; package cn.com.glsx.merchants.model.response;
import cn.com.glsx.merchants.dto.MerchantBrandDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@Data @Data
public class MerchantSimpleResponse implements Serializable { public class MerchantSimpleResponse implements Serializable {
...@@ -18,10 +14,14 @@ public class MerchantSimpleResponse implements Serializable { ...@@ -18,10 +14,14 @@ public class MerchantSimpleResponse implements Serializable {
*/ */
private String merchantName; private String merchantName;
/** /**
* 商户号 * 商户号
*/ */
private Integer merchantNo; private Integer merchantNo;
/**
* 省份id
*/
private Integer provinceId;
} }
\ No newline at end of file \ No newline at end of file
...@@ -546,7 +546,7 @@ public interface MerchantRemote { ...@@ -546,7 +546,7 @@ public interface MerchantRemote {
@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("查询商户列表(对外简化)")
RpcResponse<List<MerchantSimpleResponse>> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO); RpcResponse<List<MerchantProvinceDTO>> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO);
RpcResponse<List<MerchantProvinceDTO>> findMerchantProvinceListByIds(List<Integer> merchantIds); RpcResponse<List<MerchantProvinceDTO>> findMerchantProvinceListByIds(List<Integer> merchantIds);
} }
...@@ -173,7 +173,7 @@ public interface MerchantMapper extends CommonBaseMapper<Merchant> { ...@@ -173,7 +173,7 @@ public interface MerchantMapper extends CommonBaseMapper<Merchant> {
List<MerchantBrandResponse> getBrand(Integer merchantId); List<MerchantBrandResponse> getBrand(Integer merchantId);
List<MerchantSimpleResponse> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO); List<MerchantProvinceDTO> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO);
List<MerchantProvinceDTO> findMerchantProvinceListByIds(@Param("merchantIds")List<Integer> merchantIds); List<MerchantProvinceDTO> findMerchantProvinceListByIds(@Param("merchantIds")List<Integer> merchantIds);
} }
\ No newline at end of file \ No newline at end of file
...@@ -917,7 +917,7 @@ public class MerchantRemoteImpl implements MerchantRemote { ...@@ -917,7 +917,7 @@ public class MerchantRemoteImpl implements MerchantRemote {
} }
@Override @Override
public RpcResponse<List<MerchantSimpleResponse>> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO){ public RpcResponse<List<MerchantProvinceDTO>> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO){
try { try {
return RpcResponse.success(merchantService.findMerchantListByBrandIdsProvince(requestDTO)); return RpcResponse.success(merchantService.findMerchantListByBrandIdsProvince(requestDTO));
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
......
...@@ -2786,7 +2786,7 @@ public class MerchantService { ...@@ -2786,7 +2786,7 @@ public class MerchantService {
return merchantStaffMapper.qryPhoneInStaffList(phones); return merchantStaffMapper.qryPhoneInStaffList(phones);
} }
public List<MerchantSimpleResponse> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO) { public List<MerchantProvinceDTO> findMerchantListByBrandIdsProvince(CarBrandProvinceRequestDTO requestDTO) {
return merchantMapper.findMerchantListByBrandIdsProvince(requestDTO); return merchantMapper.findMerchantListByBrandIdsProvince(requestDTO);
} }
......
...@@ -1217,8 +1217,10 @@ ...@@ -1217,8 +1217,10 @@
</select> </select>
<select id="findMerchantListByBrandIdsProvince" <select id="findMerchantListByBrandIdsProvince"
resultType="cn.com.glsx.merchants.model.response.MerchantSimpleResponse"> resultType="cn.com.glsx.merchants.model.response.MerchantProvinceDTO">
SELECT DISTINCT pm.merchantNo as merchantNo, pm.merchant_name as merchantName SELECT DISTINCT pm.merchantNo as merchantId,
pm.merchant_name as merchantName,
pm.province_code as provinceCode,
FROM platform_merchant pm FROM platform_merchant pm
INNER JOIN platform_merchant_brand pmb INNER JOIN platform_merchant_brand pmb
ON pm.merchantNo = pmb.merchant_id ON pm.merchantNo = pmb.merchant_id
...@@ -1241,7 +1243,8 @@ ...@@ -1241,7 +1243,8 @@
<select id="findMerchantProvinceListByIds" <select id="findMerchantProvinceListByIds"
resultType="cn.com.glsx.merchants.model.response.MerchantProvinceDTO"> resultType="cn.com.glsx.merchants.model.response.MerchantProvinceDTO">
SELECT province_code provinceCode,province_name provinceName,merchantNo merchantId SELECT province_code provinceCode,
merchantNo merchantId
FROM platform_merchant FROM platform_merchant
WHERE del_flag = 0 WHERE del_flag = 0
<if test="merchantIds != null and merchantIds.size() > 0"> <if test="merchantIds != null and merchantIds.size() > 0">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!