package org.kin.live.live_account.action;

import org.kin.live.live_account.dao.UserMapper;
import org.kin.live.live_account.domain.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.Date;
import java.util.UUID;

/**
 * Created by kingsir on 16-9-8.
 */
@Controller
@RequestMapping("/test")
public class TestAction {

    @Resource
    private UserMapper userMapper;

    @RequestMapping(value = {"index",""})
    public String index(){
//        return "redirect:/test/index2";
        return "index";
    }

    @RequestMapping(value = "index2")
    public String index2(){
        User user = new User();
        user.setCreateTime(new Date());
        user.setEmail("kinminghao.king.sir@gmail.com");
        user.setEnable(1);
        user.setId(UUID.randomUUID().toString().substring(0,13));
        user.setNickName("kin");
        user.setPasswd("paass");
        user.setPhone("18941651359");
        user.setWxNo(470147789);
        userMapper.insertSelective(user);

        return "index";
    }
}

@@ -40,103 +40,8 @@
 n;%0A%0A
-import org.kin.live.live_account.dao.UserMapper;%0Aimport org.kin.live.live_account.domain.User;%0A
 impo
@@ -154,89 +154,8 @@
 g;%0A%0A
-import javax.annotation.Resource;%0Aimport java.util.Date;%0Aimport java.util.UUID;%0A%0A
 /**%0A
@@ -207,33 +207,8 @@
 ler%0A
-@RequestMapping(%22/test%22)%0A
 publ
@@ -234,58 +234,8 @@
  %7B%0A%0A
-    @Resource%0A    private UserMapper userMapper;%0A%0A
     
@@ -303,10 +303,8 @@
 ()%7B%0A
-//
     
@@ -329,13 +329,8 @@
 ct:/
-test/
 inde
@@ -338,32 +338,8 @@
 2%22;%0A
-        return %22index%22;%0A
     
@@ -411,409 +411,8 @@
 ()%7B%0A
-        User user = new User();%0A        user.setCreateTime(new Date());%0A        user.setEmail(%22kinminghao.king.sir@gmail.com%22);%0A        user.setEnable(1);%0A        user.setId(UUID.randomUUID().toString().substring(0,13));%0A        user.setNickName(%22kin%22);%0A        user.setPasswd(%22paass%22);%0A        user.setPhone(%2218941651359%22);%0A        user.setWxNo(470147789);%0A        userMapper.insertSelective(user);%0A%0A
     

Revert "test"