user_info表中添加 calculation_time 上一次计算统计时间。
This commit is contained in:
parent
e3ddadd395
commit
d27d4a0808
@ -1,11 +1,19 @@
|
||||
package com.ruoyi.web.controller.app.baidu;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class TestBaidu {
|
||||
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
OcrIdCardBAI ocrIdCardBAI = new OcrIdCardBAI();
|
||||
String result = ocrIdCardBAI.idcard("D:/ruoyi/uploadPath/id_card/18321826195_card_front.jpg", "front", "true", "true", "true", "false");
|
||||
System.out.println(result);
|
||||
// OcrIdCardBAI ocrIdCardBAI = new OcrIdCardBAI();
|
||||
// String result = ocrIdCardBAI.idcard("D:/ruoyi/uploadPath/id_card/18321826195_card_front.jpg", "front", "true", "true", "true", "false");
|
||||
// System.out.println(result);
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
// 利用毫秒值构造Date对象
|
||||
Date calculationTime = new Date(currentTimeMillis-1000000000);
|
||||
|
||||
System.out.println(calculationTime);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,6 +201,10 @@ public class SysRegisterService
|
||||
Date currentDate = new Date(currentTimeMillis);
|
||||
userInfo.setUpdateTime(currentDate);
|
||||
|
||||
//设置上一次计算时间大约为10天前
|
||||
Date calculationTime = new Date(currentTimeMillis-1000000000);
|
||||
userInfo.setCalculationTime(calculationTime);
|
||||
|
||||
int infoFlag = userInfoService.insertUserInfo(userInfo);
|
||||
if (infoFlag == 0) {
|
||||
msg = "个人信息注册失败,请联系系统管理人员";
|
||||
|
||||
@ -112,6 +112,9 @@ public class UserInfo extends BaseEntity
|
||||
@Excel(name = "背景图地址")
|
||||
private String backGround;
|
||||
|
||||
@Excel(name = "上一次计算时间")
|
||||
private Date calculationTime;
|
||||
|
||||
|
||||
|
||||
public void setUserId(Long userId)
|
||||
@ -339,6 +342,12 @@ public class UserInfo extends BaseEntity
|
||||
this.backGround = backGround;
|
||||
}
|
||||
|
||||
public Date getCalculationTime()
|
||||
{
|
||||
return calculationTime;
|
||||
}
|
||||
public void setCalculationTime(Date calculationTime){this.calculationTime = calculationTime;}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@ -368,6 +377,8 @@ public class UserInfo extends BaseEntity
|
||||
.append("tConsumption", gettConsumption())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("birth", getBirth())
|
||||
.append("backGround", getBackGround())
|
||||
.append("calculationTime", getCalculationTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,10 +30,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="birth" column="date_of_birth"/>
|
||||
<result property="backGround" column="back_ground"/>
|
||||
<result property="calculationTime" column="calculation_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserInfoVo">
|
||||
select user_id, authentication_status, real_name, id_card, sex, signature, avatar, card_front, card_back, email, receive_rockets, send_rockets, shares, followers, s_online_time, s_mr_time, s_consumption, th_consumption, phonenumber, t_mr_time, t_online_time, t_consumption, update_time, date_of_birth, back_ground from user_info
|
||||
select user_id, authentication_status, real_name, id_card, sex, signature, avatar, card_front, card_back, email, receive_rockets, send_rockets, shares, followers, s_online_time, s_mr_time, s_consumption, th_consumption, phonenumber, t_mr_time, t_online_time, t_consumption, update_time, date_of_birth, back_ground, calculation_time from user_info
|
||||
</sql>
|
||||
|
||||
<select id="selectUserInfoList" parameterType="UserInfo" resultMap="UserInfoResult">
|
||||
@ -63,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null"> and update_time = #{updateTime}</if>
|
||||
<if test="birth != null"> and date_of_birth = #{birth}</if>
|
||||
<if test="backGround != null"> and back_ground = #{backGround}</if>
|
||||
<if test="calculationTime != null"> and calculation_time = #{calculationTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -99,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null">update_time</if>
|
||||
<if test="birth != null">date_of_birth</if>
|
||||
<if test="backGround != null">back_ground</if>
|
||||
<if test="calculationTime != null">calculation_time</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
@ -126,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="birth != null">#{birth},</if>
|
||||
<if test="backGround != null">#{backGround},</if>
|
||||
<if test="calculationTime != null">#{calculationTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -156,6 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="birth != null">date_of_birth = #{birth},</if>
|
||||
<if test="backGround != null">back_ground = #{backGround},</if>
|
||||
<if test="calculationTime != null">calculation_time = #{calculationTime},</if>
|
||||
</trim>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user