Просмотр исходного кода

推荐信息接口格式同步

调整日期格式出参入参
tags/24080901
niohe·erbao 1 год назад
Родитель
Сommit
4feb6f0ab5
4 измененных файлов: 41 добавлений и 16 удалений
  1. +34
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/config/JacksonConfig.java
  2. +3
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java
  3. +3
    -13
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertUserBasicInfoSubmitRequest.java
  4. +1
    -1
      pmapi/src/main/resources/application-dev.yml

+ 34
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/config/JacksonConfig.java Просмотреть файл

@@ -0,0 +1,34 @@
package com.ningdatech.pmapi.common.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
* @author liuxinxin
* @date 2023/3/9 下午1:50
*/
@Configuration
public class JacksonConfig {
@Value("${spring.jackson.local-date-time-format:yyyy-MM-dd HH:mm:ss}")
String localDateTimeFormat;


@Bean
public ObjectMapper objectMapper() {
ObjectMapper om = new ObjectMapper();
JavaTimeModule javaTimeModule = new JavaTimeModule();
javaTimeModule.addSerializer(LocalDateTime.class,
new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(localDateTimeFormat)));
javaTimeModule.addDeserializer(LocalDateTime.class,
new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(localDateTimeFormat)));
return om;
}
}

+ 3
- 2
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java Просмотреть файл

@@ -85,10 +85,11 @@ public class ExpertManage {
expertInfoService.saveExpertInfo(expertFullInfoSaveCmd);
}

ExpertRecommendInfo recommendInfo = request.getRecommendInfo();
// 推荐证明材料
List<DictionaryFieldInfo> recommendedWay = request.getRecommendedWay();
List<DictionaryFieldInfo> recommendedWay = recommendInfo.getRecommendedWay();
// 推荐方式
List<FileBasicInfo> recommendProofFile = request.getRecommendProofFile();
List<FileBasicInfo> recommendProofFile = recommendInfo.getRecommendationProofFile();
expertRecommendProofSubmit(recommendedWay, recommendProofFile);
}



+ 3
- 13
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertUserBasicInfoSubmitRequest.java Просмотреть файл

@@ -1,14 +1,11 @@
package com.ningdatech.pmapi.expert.model.req;

import com.ningdatech.pmapi.common.model.FileBasicInfo;
import com.ningdatech.pmapi.expert.model.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
* @author liuxinxin
@@ -37,15 +34,8 @@ public class ExpertUserBasicInfoSubmitRequest {
/**
* 补充推荐方式
*/
@NotEmpty
@ApiModelProperty("推荐方式")
private List<DictionaryFieldInfo> recommendedWay;

@ApiModelProperty("推荐证明材料")
private List<FileBasicInfo> recommendProofFile;

/**
* 其他信息
*/
@NotNull
@ApiModelProperty("推荐信息")
private ExpertRecommendInfo recommendInfo;

}

+ 1
- 1
pmapi/src/main/resources/application-dev.yml Просмотреть файл

@@ -192,4 +192,4 @@ provincial:
pushUrl: /api/v1/foreign/importantPro
detailUrl: /api/v1/foreign/importantProView
key: 7196317343a64e67895dc0375c098fe7
secret: 75152a97f20e4c4c854dc6301cf72ad4
secret: 75152a97f20e4c4c854dc6301cf72ad4

Загрузка…
Отмена
Сохранить