Commit f11398c9 authored by hezhen's avatar hezhen

修改认证

parent fc1b9c20
......@@ -43,7 +43,7 @@ public class GoodSiteDTO {
* 地址-省/直辖市(名称)
*/
@ApiModelProperty("地址-省/直辖市(名称)")
private Integer provinceName;
private String provinceName;
/**
* 地址-市(编码)
......@@ -55,7 +55,7 @@ public class GoodSiteDTO {
* 地址-市(名称)
*/
@ApiModelProperty("地址-市(名称)")
private Integer cityName;
private String cityName;
//出发时间
@ApiModelProperty(value = "出发时间")
......
......@@ -43,7 +43,7 @@ public class TourDepartVo {
* 地址-省/直辖市(名称)
*/
@ApiModelProperty("地址-省/直辖市(名称)")
private Integer provinceName;
private String provinceName;
/**
* 地址-市(编码)
......@@ -55,7 +55,7 @@ public class TourDepartVo {
* 地址-市(名称)
*/
@ApiModelProperty("地址-市(名称)")
private Integer cityName;
private String cityName;
//出发时间
......
......@@ -39,7 +39,7 @@
<!-- 获取出行时间 -->
<select id="getlistByGoodId" resultMap="tourDepartVoMap">
SELECT id,good_id,name,address,company_id,depart_time,longitude,latitude,type,intro FROM tour_good_site
SELECT * FROM tour_good_site
WHERE good_id=#{goodId} and is_del=0
</select>
......
......@@ -8,6 +8,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.universal.entity.IdInformation;
import com.xxfc.platform.universal.service.CertificationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -20,6 +21,7 @@ import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("certif")
@Slf4j
public class CertificationController {
......@@ -37,7 +39,6 @@ public class CertificationController {
@PostMapping("/app/certificate")
public ObjectRestResponse certificate(@RequestBody IdInformation idInformation, HttpServletRequest request) {
if (idInformation == null) {
ObjectRestResponse.createDefaultFail();
}
......@@ -45,8 +46,7 @@ public class CertificationController {
String token = request.getHeader("Authorization");
System.out.println(token);
log.info("------token======"+token);
if (StringUtils.isEmpty(token)) {
ObjectRestResponse.createFailedResult(ResultCode.RSTOKEN_NULL_CODE,"token为空");
}
......@@ -54,8 +54,7 @@ public class CertificationController {
//获得用户信息
ObjectRestResponse<AppUserDTO> appUserDTOObjectRestResponse= userFeign.userDetailByToken(token);
System.out.println(appUserDTOObjectRestResponse.getData());
log.info("----用户信息========="+appUserDTOObjectRestResponse.getData());
if (appUserDTOObjectRestResponse==null||appUserDTOObjectRestResponse.getData()==null||appUserDTOObjectRestResponse.getData().getId()==0) {
......@@ -79,20 +78,17 @@ public class CertificationController {
return orr;
}
Integer type = idInformation.getCertificateType();
log.info("----type========="+type);
try {
if (type!=null&&type==0){
return certificationService.certificate(idInformation);
}
} catch (Exception e) {
e.printStackTrace();
}
return ObjectRestResponse.createFailedResult(ResultCode.SUCCESS_CODE,"错误");
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"错误");
}
......
......@@ -10,7 +10,7 @@ import tk.mybatis.mapper.common.Mapper;
@Repository
public interface IdInformationMapper extends Mapper<IdInformation> {
@Insert(value = "insert into id_information (user_login_id,name,id_number,certificate_type,front_url,back_url,expiration_date,authentication_methods) " +
"values (#{userLonginId},#{name},#{idNumber},#{certificateType},#{frontUrl},#{backUrl},#{expirationDate},#{authenticationMethods})")
@Insert(value = "insert into id_information (user_login_id,name,id_number,certificate_type,front_url,back_url,expiration_date) " +
"values (#{userLonginId},#{name},#{idNumber},#{certificateType},#{frontUrl},#{backUrl},#{expirationDate})")
void addIdInformation(IdInformation idInformation);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment