|
@@ -10,8 +10,8 @@ public interface WindowsMapper {
|
|
|
* @param windows
|
|
|
* @return
|
|
|
*/
|
|
|
- @Insert("INSERT INTO t_windows(dept_no,windows_no,print_index,zy_print_index,cg_print_index,user_id_code,ip_address, create_date,update_date) VALUES " +
|
|
|
- "(#{deptNo,jdbcType=VARCHAR},#{windowsNo,jdbcType=INTEGER},#{printIndex,jdbcType=INTEGER},#{zyPrintIndex,jdbcType=INTEGER},#{cgPrintIndex,jdbcType=INTEGER},#{userIdCode,jdbcType=VARCHAR},#{ipAddress,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateDate,jdbcType=TIMESTAMP})")
|
|
|
+ @Insert("INSERT INTO t_windows(dept_no,windows_no,print_index,zy_print_index,cg_print_index,user_id_code,ip_address, create_date,update_date,client_ip_address) VALUES " +
|
|
|
+ "(#{deptNo,jdbcType=VARCHAR},#{windowsNo,jdbcType=INTEGER},#{printIndex,jdbcType=INTEGER},#{zyPrintIndex,jdbcType=INTEGER},#{cgPrintIndex,jdbcType=INTEGER},#{userIdCode,jdbcType=VARCHAR},#{ipAddress,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateDate,jdbcType=TIMESTAMP},#{clientIpAddress,jdbcType=VARCHAR})")
|
|
|
@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
|
|
|
int insertUser(Windows windows);
|
|
|
|
|
@@ -38,7 +38,7 @@ public interface WindowsMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"<script>",
|
|
|
- "select id,dept_no,windows_no,print_index,zy_print_index,cg_print_index,user_id_code,ip_address, create_date,update_date from t_windows where ip_address= #{ipAddress,jdbcType=VARCHAR} " +
|
|
|
+ "select id,dept_no,windows_no,print_index,zy_print_index,cg_print_index,user_id_code,ip_address, create_date,update_date,client_ip_address from t_windows where ip_address= #{ipAddress,jdbcType=VARCHAR} " +
|
|
|
"order by create_date desc limit 1",
|
|
|
"</script>"})
|
|
|
Windows selectLastWindowsByIpAddress(@Param("ipAddress") String ipAddress);
|
|
@@ -73,6 +73,9 @@ public interface WindowsMapper {
|
|
|
"<when test='updateDate!=null'>",
|
|
|
",update_date=#{updateDate,jdbcType=TIMESTAMP}",
|
|
|
"</when>",
|
|
|
+ "<when test='clientIpAddress!=null'>",
|
|
|
+ ",client_ip_address=#{clientIpAddress}",
|
|
|
+ "</when>",
|
|
|
"</trim>",
|
|
|
"</script>"})
|
|
|
int updateWindows(Windows windows);
|