修改--数据库插入增加判断条件
This commit is contained in:
parent
5c3676d892
commit
0915176b7b
|
|
@ -108,7 +108,7 @@ public class OcrRecogServiceImpl implements IOcrRecogService {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.info("base64格式的图片:{}",base64Strings);
|
log.info("转换base64格式的图片:");
|
||||||
return base64Strings;
|
return base64Strings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -161,7 +161,7 @@ public class OcrRecogServiceImpl implements IOcrRecogService {
|
||||||
.recognizeTime(LocalDateTime.now())
|
.recognizeTime(LocalDateTime.now())
|
||||||
.responseLong(responseTime)
|
.responseLong(responseTime)
|
||||||
.invokeIp(IpUtils.getIpAddr(ServletUtils.getRequest()))
|
.invokeIp(IpUtils.getIpAddr(ServletUtils.getRequest()))
|
||||||
// .updateBy(loginUser.getUserid()) // 假设getUserid()已返回正确用户ID
|
.updateBy(String.valueOf(loginUser.getUserid())) // 假设getUserid()已返回正确用户ID
|
||||||
.updateTime(LocalDateTime.now())
|
.updateTime(LocalDateTime.now())
|
||||||
.build();
|
.build();
|
||||||
aiIdcardrecognizeMapper.insert(aiIdcardrecognizeResult);
|
aiIdcardrecognizeMapper.insert(aiIdcardrecognizeResult);
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,45 @@
|
||||||
|
|
||||||
<insert id="insert" parameterType="com.bonus.ai.domain.po.AiIdcardrecognizeResult">
|
<insert id="insert" parameterType="com.bonus.ai.domain.po.AiIdcardrecognizeResult">
|
||||||
INSERT INTO ai_idcardrecognize_result
|
INSERT INTO ai_idcardrecognize_result
|
||||||
(service_id, name, sex, enthnic, birthday, address, idcard_number,
|
(
|
||||||
issuing_authority, idcard_validity, if_complete, frontImge_address,
|
<if test="serviceId != null and serviceId != '' ">service_id,</if>
|
||||||
backImg_address, recognize_time, response_long, invoke_ip,
|
<if test="name != null and name != '' ">name,</if>
|
||||||
update_by, update_time)
|
<if test="sex != null and sex != '' ">sex,</if>
|
||||||
|
<if test="enthnic != null and enthnic != '' ">enthnic,</if>
|
||||||
|
birthday,
|
||||||
|
<if test="address != null and address != '' ">address,</if>
|
||||||
|
<if test="idcardNumber != null and idcardNumber != '' ">idcard_number,</if>
|
||||||
|
<if test="issuingAuthority != null and issuingAuthority != '' ">issuing_authority,</if>
|
||||||
|
idcard_validity,
|
||||||
|
<if test="ifComplete != null and ifComplete != '' ">if_complete,</if>
|
||||||
|
<if test="frontImageAddress != null and frontImageAddress != '' ">frontImge_address,</if>
|
||||||
|
<if test="backImageAddress != null and backImageAddress != '' ">backImg_address,</if>
|
||||||
|
recognize_time,
|
||||||
|
<if test="responseLong != null and responseLong != '' ">response_long,</if>
|
||||||
|
<if test="invokeIp != null and invokeIp != '' ">invoke_ip,</if>
|
||||||
|
<if test="updateBy != null and updateBy != '' ">update_by,</if>
|
||||||
|
update_time
|
||||||
|
)
|
||||||
VALUES
|
VALUES
|
||||||
(#{serviceId}, #{name}, #{sex}, #{enthnic}, #{birthday}, #{address}, #{idcardNumber},
|
(<if test="serviceId != null and serviceId != ''">
|
||||||
#{issuingAuthority}, #{idcardValidity}, #{ifComplete}, #{frontImageAddress},
|
#{serviceId},</if>
|
||||||
#{backImageAddress}, #{recognizeTime}, #{responseLong}, #{invokeIp},
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
#{updateBy}, #{updateTime})
|
<if test="sex != null and sex != ''">#{sex},</if>
|
||||||
|
<if test="enthnic != null and enthnic != ''">#{enthnic},</if>
|
||||||
|
#{birthday},
|
||||||
|
<if test="address != null and address != ''">#{address},</if>
|
||||||
|
<if test="idcardNumber != null and idcardNumber != ''">#{idcardNumber},</if>
|
||||||
|
<if test="issuingAuthority != null and issuingAuthority != ''">#{issuingAuthority},</if>
|
||||||
|
#{idcardValidity},
|
||||||
|
<if test="ifComplete != null and ifComplete != ''">#{ifComplete},</if>
|
||||||
|
<if test="frontImageAddress != null and frontImageAddress != ''">#{frontImageAddress},</if>
|
||||||
|
<if test="backImageAddress != null and backImageAddress != ''">#{backImageAddress},</if>
|
||||||
|
#{recognizeTime},
|
||||||
|
<if test="responseLong != null and responseLong != ''">#{responseLong},</if>
|
||||||
|
<if test="invokeIp != null and invokeIp != ''">#{invokeIp},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||||
|
#{updateTime}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue