Commit 61776c67 authored by taabe's avatar taabe

测试mybatis

parent 2c0696aa
package org.amos.boot.module.tzs.biz.controller; package org.amos.boot.module.tzs.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.amos.boot.biz.common.controller.BaseController; import org.amos.boot.biz.common.controller.BaseController;
import org.amos.boot.biz.common.utils.CommonResponseUtil; import org.amos.boot.biz.common.utils.CommonResponseUtil;
import org.amos.boot.module.tzs.biz.dao.mapper.Test2Mapper;
import org.amos.boot.module.tzs.biz.dao.mapper.TestMapper; import org.amos.boot.module.tzs.biz.dao.mapper.TestMapper;
import org.amos.boot.module.tzs.biz.vo.Arrange;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -22,10 +25,14 @@ public class TestController extends BaseController { ...@@ -22,10 +25,14 @@ public class TestController extends BaseController {
@Autowired @Autowired
TestMapper testMapper; TestMapper testMapper;
@Autowired
Test2Mapper test2Mapper;
@ApiOperation(value = "测试接口") @ApiOperation(value = "测试接口")
@GetMapping(value = "/testGet") @GetMapping(value = "/testGet")
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
public ResponseModel test() { public ResponseModel test() {
return CommonResponseUtil.success(testMapper.countById()); testMapper.countById();
return CommonResponseUtil.success(test2Mapper.selectList(new QueryWrapper<Arrange>().select("id")));
} }
} }
package org.amos.boot.module.tzs.biz.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.amos.boot.module.tzs.biz.vo.Arrange;
/**
* @author DELL
*/
public interface Test2Mapper extends BaseMapper<Arrange> {
}
package org.amos.boot.module.tzs.biz.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.amos.boot.biz.common.entity.BaseEntity;
@Data
@TableName("d_arrange")
public class Arrange extends BaseEntity {
@ApiModelProperty(value = "orgCode")
private String orgCode;
@ApiModelProperty(value = "name")
private String name;
@ApiModelProperty(value = "startTime")
private String startTime;
@ApiModelProperty(value = "endTime")
private String endTime;
@ApiModelProperty(value = "appKey")
private String appKey;
@ApiModelProperty(value = "creater")
private String creater;
@ApiModelProperty(value = "updater")
private String updater;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment