You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.2 KiB
30 lines
1.2 KiB
6 years ago
|
package WeChat;
|
||
|
|
||
|
import javax.servlet.ServletException;
|
||
|
import javax.servlet.annotation.WebServlet;
|
||
|
import javax.servlet.http.HttpServlet;
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
import java.io.IOException;
|
||
|
|
||
|
@WebServlet(name = "ModifyStatus", urlPatterns = {"/ModifyStatus"}, loadOnStartup = 2)
|
||
|
public class ModifyStatus extends HttpServlet {
|
||
|
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||
|
if(Authentication.islegal(request)){
|
||
|
String OrderID = request.getParameter("OrderID");
|
||
|
String Status = request.getParameter("Status");
|
||
|
String Extra = request.getParameter("Extra");
|
||
|
if(Extra == null) Extra = "";
|
||
|
if(sqlfilter.isNumber(OrderID) && sqlfilter.isNumber(Status)){
|
||
|
String sql = "update Info set Status='"+ Status + "' " +
|
||
|
",Extra='" + Extra + "' where OrderID=" + OrderID;
|
||
|
ExecuteUpd.execute(request,sql);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||
|
doPost(request, response);
|
||
|
}
|
||
|
}
|