📄 cancelquery.java
字号:
package com.dcsoft.gzcx.duanxin;
import java.util.List;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import javax.servlet.http.HttpServletRequest;
import org.coodex.io.IOUtil;
import org.hibernate.Session;
import com.dcsoft.gzcx.util.HSessionMgr;
/**
* 取消包月
* @author Administrator
*
*/
public class CancelQuery extends DxQuery {
public String getReContent(List content, HttpServletRequest request) {
String spcode = request.getParameter("spcode");
/**
* 获得手机号码
*/
String terminal_id = request.getParameter("sjh");
Session session = HSessionMgr.getSession(request);
Connection con = session.connection();
PreparedStatement pstm = null;
String sql = "update tbl_e_duanxin_user set sfqx = '1' where sjh = '"
+ terminal_id + "' and spcode = '" + spcode + "'";
try {
pstm = con.prepareStatement(sql);
int i = pstm.executeUpdate();
if (i < 1)
return "您未订阅包月服务,谢谢!";
} catch (SQLException e) {
e.printStackTrace();
} finally {
IOUtil.close(pstm);
}
return "您所订阅的服务已取消,谢谢使用!";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -