Examples of Iouser


Examples of net.yanhl.iouser.pojo.Iouser

   * @throws Exception
   */
  public ActionForward getUserTree(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    String currentUserName = null;
    Iouser user = null;
    try {
      currentUserName = UserUtil.getCurrentUserName(request);
      String currentUserId = UserUtil.getCurrentUserId(request);
      String parentId = StringUtil.getValue(request, "gid");
      String basePath = StringUtil.getValue(request, "basePath");
View Full Code Here

Examples of net.yanhl.iouser.pojo.Iouser

   * @throws Exception
   */
  public ActionForward getGroupTree(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    String currentUserName = null;
    Iouser user = null;
    try {
      currentUserName = UserUtil.getCurrentUserName(request);
      String currentUserId = UserUtil.getCurrentUserId(request);
      String parentId = StringUtil.getValue(request, "gid");
      String basePath = StringUtil.getValue(request, "basePath");
View Full Code Here

Examples of net.yanhl.iouser.pojo.Iouser

      String borrowUserId = jsonObject.getString("borrowUser");
      if (borrowUserId == null) {
        print(response, "债务人不能为空");
        throw new Exception("债务人不能为空");
      }
      Iouser borrowUser = (Iouser) getBaseManager().get(Iouser.class, Long.parseLong(borrowUserId));
      financeMoney.setBorrowUser(borrowUser);
      getBaseManager().save(financeMoney);
      print(response, RESBONSE_SUCCESS + "|" + financeMoney.getId());
      log.info(currentUserName + ">增加借入款项[" + financeMoney + "]");
    } catch (JSONException je) {
View Full Code Here

Examples of net.yanhl.iouser.pojo.Iouser

      String borrowUserId = jsonObject.getString("borrowUser");
      if (borrowUserId == null) {
        print(response, "债务人不能为空");
        throw new Exception("债务人不能为空");
      }
      Iouser borrowUser = (Iouser) getBaseManager().get(Iouser.class, Long.parseLong(borrowUserId));
      financeMoney.setBorrowUser(borrowUser);
      getBaseManager().update(financeMoney);
      print(response, RESBONSE_SUCCESS);
    } catch (JSONException je) {
      je.printStackTrace();
View Full Code Here

Examples of net.yanhl.iouser.pojo.Iouser

   * @throws Exception
   */
  public ActionForward addUser(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    String currentUserName = null;
    Iouser user = null;
    try {
      currentUserName = UserUtil.getCurrentUserName(request);
      JSONObject jsonObject = readJson(request);
      user = (Iouser) JSONObject.toBean(jsonObject, Iouser.class);
      user.setCreatorId(new Integer(UserUtil.getCurrentUserId(request)));
      // 设置电话号码
      String tmpComPhone = jsonObject.get("tel_area") + "-" + jsonObject.get("tel_number") + "-"
          + jsonObject.get("tel_ext");
      user.setCompanyPhone(tmpComPhone);
      // 设置分组关系
      Long groupId = jsonObject.getLong("groupId");
      if(groupId != null) {
        GroupRelation group = (GroupRelation) getBaseManager().get(GroupRelation.class, groupId);
        if(group == null) {
          throw new IouserException("债务人关系->分组为空");
        }
        user.setGroup(group);
      }
      getBaseManager().save(user);
      log.info(currentUserName + ">新增债务人:" + user);
      print(response, RESBONSE_SUCCESS + "|" + user.getId());
    } catch(JSONException je) {
      je.printStackTrace();
      log.error(currentUserName + ">增加债务人>解析JSON数据出错:" + je.getMessage());
    } catch (Exception ex) {
      ex.printStackTrace();
View Full Code Here

Examples of net.yanhl.iouser.pojo.Iouser

   * @throws Exception
   */
  public ActionForward updateUser(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    String currentUserName = null;
    Iouser user = null;
    try {
      currentUserName = UserUtil.getCurrentUserName(request);
      JSONObject jsonObject = readJson(request);
      user = (Iouser) JSONObject.toBean(jsonObject, Iouser.class);
      user.setCreatorId(new Integer(UserUtil.getCurrentUserId(request)));
      // 设置电话号码
      String tmpComPhone = jsonObject.get("tel_area") + "-" + jsonObject.get("tel_number") + "-"
          + jsonObject.get("tel_ext");
      user.setCompanyPhone(tmpComPhone);
      // 设置分组关系
      Long groupId = jsonObject.getLong("groupId");
      if(groupId != null) {
        GroupRelation group = (GroupRelation) getBaseManager().get(GroupRelation.class, groupId);
        if(group == null) {
          throw new IouserException("债务人关系->分组为空");
        }
        user.setGroup(group);
      }
      getBaseManager().update(user);
      print(response, RESBONSE_SUCCESS);
      log.info(currentUserName + ">修改债务人[" + user + "]信息");
    } catch(JSONException je) {
View Full Code Here

Examples of net.yanhl.iouser.pojo.Iouser

            return false;
          }
        }
       
      });
      Iouser user = (Iouser) getBaseManager().get(Iouser.class, iouserId);
      JSONObject jsonObject = JSONObject.fromObject(user, config);
      print(response, jsonObject.toString());
      log.info(currentUserName + ">载入债务人:" + user + "");
    } catch(JSONException je) {
      je.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.