You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.supervision.controller;
|
|
|
|
|
|
|
|
import cn.hutool.core.map.MapUtil;
|
|
|
|
import com.supervision.ngbatis.dao.tag.ItemBranchDao;
|
|
|
|
import com.supervision.ngbatis.domain.tag.ItemBranch;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("test")
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
public class TestController {
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
private ItemBranchDao itemBranchDao;
|
|
|
|
|
|
|
|
@GetMapping("testInsert")
|
|
|
|
public void testInsert() {
|
|
|
|
ItemBranch itemBranch = new ItemBranch();
|
|
|
|
itemBranch.setItemName("退休");
|
|
|
|
itemBranchDao.insert(itemBranch);
|
|
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("testQuery")
|
|
|
|
public List<ItemBranch> testQuery(){
|
|
|
|
Map<String, Object> param = MapUtil.builder(new HashMap<String, Object>()).put("item_name", "退休").build();
|
|
|
|
return itemBranchDao.selectByMap(param);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|