You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.9 KiB
Plaintext
54 lines
1.9 KiB
Plaintext
|
|
<%@ page import="com.engine.email.entity.EmailFlockSendAccountComInfo" %>
|
|
<%@ page import="com.alibaba.fastjson.JSONObject" %>
|
|
<%@ page import="weaver.hrm.User" %>
|
|
<%@ page import="weaver.hrm.HrmUserVarify" %>
|
|
<%@ page import="weaver.conn.RecordSet" %>
|
|
<%@ page import="java.time.LocalDate" %>
|
|
<%@ page import="java.time.format.DateTimeFormatter" %>
|
|
<%@ page import="weaver.general.Util" %>
|
|
<%@ page import="java.util.HashMap" %>
|
|
<%@ page import="java.util.Map" %>
|
|
<%@page contentType="text/html; charset=UTF-8" %>
|
|
|
|
<%
|
|
Map<String, Object> apidatas = new HashMap<String, Object>();
|
|
try {
|
|
//获取当前用户
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
String userid = user.getUID()+"";
|
|
String mainid = Util.null2String(request.getParameter("id"));
|
|
String sql = "insert into uf_homePageDialo_dt1 (mainid,userid) values ('"+mainid+"','"+userid+"')";
|
|
RecordSet rs = new RecordSet();
|
|
boolean status = rs.executeUpdate(sql);
|
|
//删除其它版本用户查看记录
|
|
sql = "delete uf_homePageDialo_dt1 where mainid != '"+ mainid +"'";
|
|
rs.execute(sql);
|
|
rs.next();
|
|
apidatas.put("status", status);
|
|
apidatas.put("api_status", true);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
apidatas.put("api_status", false);
|
|
apidatas.put("api_errormsg", "addDialogUser catch exception : " + e.getMessage());
|
|
}
|
|
out.print(JSONObject.toJSONString(apidatas));
|
|
|
|
|
|
%>
|
|
|
|
|
|
<%!
|
|
/**
|
|
* 获取当前日期,格式为 yyyy-MM-dd
|
|
* @return 当前日期的字符串
|
|
*/
|
|
public static String getCurrentDate() {
|
|
// 获取当前日期
|
|
LocalDate currentDate = LocalDate.now();
|
|
// 定义日期格式
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
// 格式化日期为 yyyy-MM-dd 格式的字符串
|
|
return currentDate.format(formatter);
|
|
}
|
|
%> |