Package org.jeecgframework.web.demo.entity.test

Examples of org.jeecgframework.web.demo.entity.test.JeecgJdbcEntity


      sql += " where" + sqlWhere;
    }
    List<Map<String, Object>> mapList = findForJdbc(sql, dataGrid.getPage(), dataGrid.getRows());
   
    List list = new ArrayList();
    JeecgJdbcEntity obj = null;
    for(Map<String,Object> m:mapList){
      try {
        obj = new JeecgJdbcEntity();
        obj.setId((String)m.get("id"));
        obj.setUserName((String)m.get("user_name"));
        obj.setDepId((String)m.get("departname"));
        String sex = (String)m.get("sex");
        if (sex == null) {
          obj.setSex("");
        } else if (sex.equals("0")) {
          obj.setSex("男");
        } else {
          obj.setSex("女");
        }
        obj.setAge((Integer)m.get("age"));
        Date birthday = (Date)m.get("birthday");
        if (birthday != null) {
          obj.setBirthday(birthday);
        }
        obj.setEmail((String)m.get("email"));
        obj.setMobilePhone((String)m.get("mobile_phone"));
        list.add(obj);
      catch (Exception e) {
        e.printStackTrace();
      }
    }
View Full Code Here


  @ResponseBody
  public AjaxJson save(JeecgJdbcEntity jeecgJdbc, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    if (StringUtil.isNotEmpty(jeecgJdbc.getId())) {
      message = "更新成功";
      JeecgJdbcEntity t = jeecgJdbcService.get(JeecgJdbcEntity.class, jeecgJdbc.getId());
      try {
        MyBeanUtils.copyBeanNotNull2Bean(jeecgJdbc, t);
        jeecgJdbcService.saveOrUpdate(t);
        systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
      } catch (Exception e) {
View Full Code Here

   * @throws ParseException
   *@Author JueYue
   *@date   2013-11-12
   */
  private void repairJdbcEntity(){
    JeecgJdbcEntity entity = new JeecgJdbcEntity();
    entity.setAge(12);
//    update-begin--Author:yangyong  Date:20140214 for:[bugfree号]当前时间获取调整--------------------
    entity.setBirthday(DataUtils.str2Date("2014-02-14",new SimpleDateFormat("yyyy-MM-dd")));
//    update-end--Author:yangyong  Date:20140214 for:[bugfree号]当前时间获取调整--------------------
    entity.setDepId("123");
    entity.setEmail("demo@jeecg.com");
    entity.setMobilePhone("13111111111");
    entity.setOfficePhone("66666666");
    entity.setSalary(new BigDecimal(111111));
    entity.setSex("1");
    entity.setUserName("小明");
    commonDao.save(entity);
  }
View Full Code Here

  @ResponseBody
  public AjaxJson save(JeecgJdbcEntity jeecgJdbc, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    if (StringUtil.isNotEmpty(jeecgJdbc.getId())) {
      message = "更新成功";
      JeecgJdbcEntity t = jeecgJdbcService.get(JeecgJdbcEntity.class, jeecgJdbc.getId());
      try {
        MyBeanUtils.copyBeanNotNull2Bean(jeecgJdbc, t);
        jeecgJdbcService.saveOrUpdate(t);
        systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
      } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.jeecgframework.web.demo.entity.test.JeecgJdbcEntity

Copyright © 2018 www.massapicom. 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.