Commit f11398c9 authored by hezhen's avatar hezhen

修改认证

parent fc1b9c20
...@@ -43,7 +43,7 @@ public class GoodSiteDTO { ...@@ -43,7 +43,7 @@ public class GoodSiteDTO {
* 地址-省/直辖市(名称) * 地址-省/直辖市(名称)
*/ */
@ApiModelProperty("地址-省/直辖市(名称)") @ApiModelProperty("地址-省/直辖市(名称)")
private Integer provinceName; private String provinceName;
/** /**
* 地址-市(编码) * 地址-市(编码)
...@@ -55,7 +55,7 @@ public class GoodSiteDTO { ...@@ -55,7 +55,7 @@ public class GoodSiteDTO {
* 地址-市(名称) * 地址-市(名称)
*/ */
@ApiModelProperty("地址-市(名称)") @ApiModelProperty("地址-市(名称)")
private Integer cityName; private String cityName;
//出发时间 //出发时间
@ApiModelProperty(value = "出发时间") @ApiModelProperty(value = "出发时间")
......
...@@ -43,7 +43,7 @@ public class TourDepartVo { ...@@ -43,7 +43,7 @@ public class TourDepartVo {
* 地址-省/直辖市(名称) * 地址-省/直辖市(名称)
*/ */
@ApiModelProperty("地址-省/直辖市(名称)") @ApiModelProperty("地址-省/直辖市(名称)")
private Integer provinceName; private String provinceName;
/** /**
* 地址-市(编码) * 地址-市(编码)
...@@ -55,7 +55,7 @@ public class TourDepartVo { ...@@ -55,7 +55,7 @@ public class TourDepartVo {
* 地址-市(名称) * 地址-市(名称)
*/ */
@ApiModelProperty("地址-市(名称)") @ApiModelProperty("地址-市(名称)")
private Integer cityName; private String cityName;
//出发时间 //出发时间
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<!-- 获取出行时间 --> <!-- 获取出行时间 -->
<select id="getlistByGoodId" resultMap="tourDepartVoMap"> <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 WHERE good_id=#{goodId} and is_del=0
</select> </select>
......
...@@ -8,6 +8,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -8,6 +8,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.universal.entity.IdInformation; import com.xxfc.platform.universal.entity.IdInformation;
import com.xxfc.platform.universal.service.CertificationService; import com.xxfc.platform.universal.service.CertificationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -20,6 +21,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -20,6 +21,7 @@ import javax.servlet.http.HttpServletRequest;
@RestController @RestController
@RequestMapping("certif") @RequestMapping("certif")
@Slf4j
public class CertificationController { public class CertificationController {
...@@ -37,7 +39,6 @@ public class CertificationController { ...@@ -37,7 +39,6 @@ public class CertificationController {
@PostMapping("/app/certificate") @PostMapping("/app/certificate")
public ObjectRestResponse certificate(@RequestBody IdInformation idInformation, HttpServletRequest request) { public ObjectRestResponse certificate(@RequestBody IdInformation idInformation, HttpServletRequest request) {
if (idInformation == null) { if (idInformation == null) {
ObjectRestResponse.createDefaultFail(); ObjectRestResponse.createDefaultFail();
} }
...@@ -45,8 +46,7 @@ public class CertificationController { ...@@ -45,8 +46,7 @@ public class CertificationController {
String token = request.getHeader("Authorization"); String token = request.getHeader("Authorization");
System.out.println(token); log.info("------token======"+token);
if (StringUtils.isEmpty(token)) { if (StringUtils.isEmpty(token)) {
ObjectRestResponse.createFailedResult(ResultCode.RSTOKEN_NULL_CODE,"token为空"); ObjectRestResponse.createFailedResult(ResultCode.RSTOKEN_NULL_CODE,"token为空");
} }
...@@ -54,8 +54,7 @@ public class CertificationController { ...@@ -54,8 +54,7 @@ public class CertificationController {
//获得用户信息 //获得用户信息
ObjectRestResponse<AppUserDTO> appUserDTOObjectRestResponse= userFeign.userDetailByToken(token); ObjectRestResponse<AppUserDTO> appUserDTOObjectRestResponse= userFeign.userDetailByToken(token);
log.info("----用户信息========="+appUserDTOObjectRestResponse.getData());
System.out.println(appUserDTOObjectRestResponse.getData());
if (appUserDTOObjectRestResponse==null||appUserDTOObjectRestResponse.getData()==null||appUserDTOObjectRestResponse.getData().getId()==0) { if (appUserDTOObjectRestResponse==null||appUserDTOObjectRestResponse.getData()==null||appUserDTOObjectRestResponse.getData().getId()==0) {
...@@ -79,20 +78,17 @@ public class CertificationController { ...@@ -79,20 +78,17 @@ public class CertificationController {
return orr; return orr;
} }
Integer type = idInformation.getCertificateType(); Integer type = idInformation.getCertificateType();
log.info("----type========="+type);
try { try {
if (type!=null&&type==0){ if (type!=null&&type==0){
return certificationService.certificate(idInformation); return certificationService.certificate(idInformation);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return ObjectRestResponse.createFailedResult(ResultCode.SUCCESS_CODE,"错误"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"错误");
} }
......
...@@ -10,7 +10,7 @@ import tk.mybatis.mapper.common.Mapper; ...@@ -10,7 +10,7 @@ import tk.mybatis.mapper.common.Mapper;
@Repository @Repository
public interface IdInformationMapper extends Mapper<IdInformation> { 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) " + @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},#{authenticationMethods})") "values (#{userLonginId},#{name},#{idNumber},#{certificateType},#{frontUrl},#{backUrl},#{expirationDate})")
void addIdInformation(IdInformation idInformation); 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