protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
String url = request.getParameter("url");
ApplicationContext ac = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
IMerchantDao merchantDao = (IMerchantDao) ac.getBean("merchantDao");
if(id == null || "".equals(id))
{
id = "0";
}
IPointsRecordDao pointsRecordDao = (IPointsRecordDao) ac.getBean("pointsRecordDao");
String recordIP = request.getRemoteAddr();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date();
String recordTime = format.format(date);
Merchant merchant = merchantDao.getMerchantById(Long.parseLong(id));
if(merchant != null)
{
Boolean flag = pointsRecordDao.checkPointsRecordExists(id, "1", recordIP, recordTime);
if(flag)
{
double score = merchant.getSYJFSL();
merchant.setSYJFSL(score-1);
merchantDao.updateMerchant(merchant);
PointsRecord record = new PointsRecord();
record.setEntityId(id);
record.setType("1");
record.setEntityName(merchant.getSJMC());