package com.ag.web.mobile;

import com.wb.util.DbUtil;
import org.springframework.stereotype.Component;


import javax.servlet.http.HttpServletRequest;
//import javax.mail.Message;
//import javax.mail.Session;
//import javax.mail.Transport;
//import javax.mail.internet.*;
import java.sql.ResultSet;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by wanglele on 2017/3/10.
 */
@Component
public class MobileWordService {
    /**
     * 手机端实例
     * @param moneyId
     * @param rmb
     * @param usd
     */
    public void saveMoney(HttpServletRequest request,String moneyId, String rmb, String usd) throws Exception {
        Map dataMap = new HashMap();
        if (moneyId!= null && !moneyId.equals(""))
            dataMap.put("moneyId", moneyId);
        if (rmb != null && !rmb.equals(""))
            dataMap.put("rmb", rmb);
        if (usd!= null && !usd.equals(""))
            dataMap.put("usd", usd);
        String sql = " insert into money(money_id,low_usd,cap_usd)\n" +
                "        values('"+moneyId+",'"+rmb+",'"+usd+"')";
        ResultSet resultSet = (ResultSet) DbUtil.run(request,sql);

    }
}
