项目初始化

master
kk 4 years ago
parent f359264d03
commit 94b6eb6f5f

@ -1,2 +1 @@
# sm
一个使用mybatis-plus 配置多数据源的demo工程

@ -0,0 +1,15 @@
package com.study.viewpoint;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan("com.study.viewpoint.mapper")
public class ViewpointApplication {
public static void main(String[] args) {
SpringApplication.run(ViewpointApplication.class, args);
}
}

@ -0,0 +1,61 @@
package com.study.viewpoint.comm;
/**
* @author yu
* @date 20211203 15:30
*/
import lombok.Data;
import java.io.Serializable;
/**
*
* @author yu
* @date 20211202 17:50
*/
@Data
public class PageResult<T> implements Serializable {
private static final long serialVersionUID = -1L;
/**
*
*/
private Integer code = 0;
/**
*
*/
private String msg = "请求成功";
/**
*
*/
private Integer page = 1;
/**
*
*/
private Integer limit = 20;
/**
*
*/
private Long count ;
/**
*
*/
private T data;
public PageResult() {
}
public PageResult(int code, String msg, long count, T data){
this.code = code;
this.msg = msg;
this.count = count;
this.data = data;
}
}

@ -0,0 +1,56 @@
package com.study.viewpoint.comm;
import lombok.Data;
import java.io.Serializable;
/**
*
* @author yu
* @date 20211203 15:27
*/
@Data
public class Result<T> implements Serializable {
public int code;
public String msg;
public T data;
public Result(){
}
protected Result(int code, String msg, T data) {
this.code = code;
this.msg = msg;
this.data = data;
}
/**
*
*
* @param msg
* @param data
*/
public static<T> Result<T> success(String msg, T data) {
return new Result<T>(200, msg, data);
}
public static<T> Result<T> success( T data) {
return new Result<T>(200,"操作成功", data);
}
public static<T> Result<T> success( ) {
return new Result<T>(200,"操作成功", null);
}
/**
*
*
* @param code
* @param msg
*/
public static <T> Result<T> fail(int code, String msg) {
return new Result<>(code, msg, null);
}
}

@ -0,0 +1,46 @@
package com.study.viewpoint.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;
/**
* @author yu
* @date 20211203 11:36
*/
@Configuration
@MapperScan("com.study.viewpoint.mapper*")
public class MybatisPlusConfig {
@Bean
public PaginationInterceptor paginationInterceptor() {
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
// 设置请求的页面大于最大页后操作, true调回到首页false 继续请求 默认false
// paginationInterceptor.setOverflow(false);
// 设置最大单页限制数量,默认 500 条,-1 不受限制
// paginationInterceptor.setLimit(500);
// 开启 count 的 join 优化,只针对部分 left join
paginationInterceptor.setCountSqlParser(new JsqlParserCountOptimize(true));
return paginationInterceptor;
}
}

@ -0,0 +1,164 @@
package com.study.viewpoint.controller;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.study.viewpoint.comm.PageResult;
import com.study.viewpoint.comm.Result;
import com.study.viewpoint.mapper.firstmapper.WageMapper;
import com.study.viewpoint.mapper.secondmapper.AddressMapper;
import com.study.viewpoint.model.first.Wage;
import com.study.viewpoint.model.second.Address;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
* @author yu
* @date 20211203 14:08
*/
@RestController
@Slf4j
@CrossOrigin
@DS("second")
public class AddressController {
@Autowired
private AddressMapper addressMapper;
@Autowired
private WageMapper wageMapper;
/**
* 使 @DS
* @DS
* @Author yu
* @date 2021/12/3 14:58
* @Param [id]
* @return java.lang.String
**/
@GetMapping("get")
@ResponseBody
@DS("second")
public Address getAddress(String id){
Address address = addressMapper.selectById(id);
return addressMapper.selectById(id);
}
/**
* 使mysql limit
* @Author yu
* @date 2021/12/3 17:02
* @Param [page, current]
* @return com.study.viewpoint.comm.PageResult<com.study.viewpoint.model.second.Address>
**/
@PostMapping("getAddress")
@DS("second")
public PageResult<Address> pageAddress(int page, int current, Address queryAddress){
//创建page对象传入两个参数当前页和每页数,调用方法实现分页调用方法时底层封装把分页所有数据封装到pageTeacher对象里面
Page<Address> addressPage = new Page<>(page,current);
String addressId = queryAddress.getAddressAreaId();
String addressName = queryAddress.getAddressName();
String addressRegionId = queryAddress.getAddressRegionId();
QueryWrapper<Address> queryWrapper = new QueryWrapper<>();
// 构造查询条条件
if (addressId != null) {
queryWrapper.eq("address_area_id",addressId);
}
if (addressName != null) {
queryWrapper.eq("address_name",addressName);
}
if (addressRegionId != null) {
queryWrapper.eq("address_region_id",addressRegionId);
}
addressMapper.selectPage(addressPage,queryWrapper);
List<Address> addressList = addressMapper.listAddressInfo(page,current);
System.out.println(addressList);
int count = addressMapper.selectCount(null);
log.info("count:"+count);
return new PageResult(0,"", count,addressList);
//return new PageResult<>()
}
/**
* 使mybatis-plus
* @Author yu
* @date 2021/12/3 17:01
* @Param [page, current]
* @return com.study.viewpoint.comm.PageResult<com.study.viewpoint.model.second.Address>
**/
@PostMapping("getAddress1")
@DS("second")
public PageResult<Address> pageAddress1(int page, int current ,Address queryAddress){
//创建page对象传入两个参数当前页和每页数,调用方法实现分页调用方法时底层封装把分页所有数据封装到pageTeacher对象里面
Page<Address> addressPage = new Page<>(page,current);
String addressId = queryAddress.getAddressAreaId();
String addressName = queryAddress.getAddressName();
String addressRegionId = queryAddress.getAddressRegionId();
log.info("queryAddress:"+addressId+addressName+addressRegionId);
QueryWrapper<Address> queryWrapper = new QueryWrapper<>();
// 构造查询条条件
if (addressId != null) {
queryWrapper.eq("address_area_id",addressId);
}
if (addressName != null) {
queryWrapper.eq("address_name",addressName);
}
if (addressRegionId != null) {
queryWrapper.eq("address_region_id",addressRegionId);
}
addressMapper.selectPage(addressPage,queryWrapper);
long total = addressPage.getTotal();//总记录数
log.info("total:"+total);
List<Address> list = addressPage.getRecords();
return new PageResult(0,"", total,list);
}
@GetMapping("init")
public String init() throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = simpleDateFormat.parse("1900-01-01 08:00:00");
System.out.println(simpleDateFormat.format(date));
return simpleDateFormat.format(date);
}
/**
*
* @Author yu
* @date 2021/12/10
* @Param [id, name, phone]
* @return com.study.viewpoint.comm.Result
**/
@GetMapping("wage")
@DS("first")
public Result getWage(String id, String name, String phone){
//Wage wage = wageMapper.selectById(id);
List<Wage> wage = wageMapper.listWage();
return Result.success(wage);
}
@GetMapping("insertWage")
@DS("first")
public Result insertWage(){
Wage wage = new Wage();
int result = wageMapper.insert(wage);
return Result.success(result);
}
}

@ -0,0 +1,171 @@
package com.study.viewpoint.controller;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.study.viewpoint.comm.Result;
import com.study.viewpoint.mapper.three.BagMapper;
import com.study.viewpoint.model.BagCount;
import com.study.viewpoint.model.three.Bag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author yu
* @date 20220111 16:09
*/
@RestController
public class BagController {
@Autowired
private BagMapper bagMapper;
/**
*
* @Author yu
* @date 2022/1/11 16:11
* @Param [employeeId]
* @return com.study.viewpoint.comm.Result
**/
@GetMapping("bag")
@DS("three")
public Result addBag(String employeeId){
QueryWrapper<Bag> bagQueryWrapper = new QueryWrapper<>();
bagQueryWrapper.eq("employee_id",employeeId);
Bag bag = bagMapper.selectOne(bagQueryWrapper);
int integrity = bag.getIntegrity();
int industry = bag.getIndustry();
int work = bag.getWork();
int develop = bag.getDevelop();
int innovation = bag.getInnovation();
int country = bag.getCountry();
int universal = bag.getUniversal();
int moreBetter = bag.getMoreBetter();
List<BagCount> bagCounts = new ArrayList<>();
bagCounts.add(new BagCount("integrity",integrity));
bagCounts.add(new BagCount("industry",industry));
bagCounts.add(new BagCount("work",work));
bagCounts.add(new BagCount("develop",develop));
bagCounts.add(new BagCount("innovation",innovation));
bagCounts.add(new BagCount("country",country));
List<BagCount> collect = bagCounts.stream().filter(x -> x.getNum() <= 0).collect(Collectors.toList());
System.out.println("collect:"+collect);
if (collect.size() <=0 ) {
System.out.println("所有福签都存在可以合成");
bagMapper.updateBge(employeeId);
return Result.success("所有福签都存在可以合成");
}
if (collect.size() >1 ) {
System.out.println("缺少两种以上的福签,不能进行合成");
return Result.success("缺少两种以上的福签,不能进行合成");
}
if (collect.size() <=1 && universal<=0) {
System.out.println("缺少一种福签,并且没有万能签不能合成");
return Result.success("缺少一种福签,并且没有万能签不能合成");
}
String name;
if (collect.size() <=1 && universal>0) {
for (BagCount b : collect) {
name = b.getName();
System.out.println("具体为0的福签name:"+name);
}
bagMapper.updateBge1(bag);
System.out.println("缺少一种福签,但有万能签可以合成");
return Result.success("缺少一种福签,但有万能签可以合成");
}
Map<String,Integer> map = new HashMap<>();
map.put("integrity",integrity);
map.put("industry",industry);
map.put("work",work);
map.put("develop",develop);
map.put("innovation",innovation);
map.put("country",country);
// 把7种福签装入到list中
List<Map<String,Integer>> list1 = new ArrayList<>();
list1.add(map);
List<Integer> list = new ArrayList<>();
// list.add(integrity);
// list.add(industry);
// list.add(work);
// list.add(develop);
// list.add(innovation);
// list.add(country);
// list.add(universal);
List<Integer> collect1 = list.stream().filter(x -> x <= 0).collect(Collectors.toList());
// if (integrity>0 && industry>0 && work>0 && develop>0 && innovation>0 && country>0) {
// // 1.每一种福签都有的情况,直接合成一个“越来悦好”
// int result = bagMapper.updateBge(employeeId);
// System.out.println("result:"+result);
// return Result.success("合成成功");
// }
// if (integrity<=0 && industry>0 && work>0 && develop>0 && innovation>0 && country>0) {
// System.out.println("诚信符为0其他都有的情况");
// // 2.诚信符为0其他符都存在的情况
// if (universal>0) {
// QueryWrapper<Bag> bagQueryWrapper1 = new QueryWrapper<>();
// bagQueryWrapper1.eq("employee_id",employeeId);
// //并且万能符存在,可以合成
// bag.setIndustry(industry-1);
// bag.setWork(work-1);
// bag.setDevelop(develop-1);
// bag.setInnovation(innovation-1);
// bag.setCountry(country-1);
// bag.setUniversal(universal-1);
// bag.setMoreBetter(moreBetter+1);
// bagMapper.update(bag,bagQueryWrapper1);
// return Result.success("合成成功");
// }
//
// }
return Result.success(bag);
}
}

@ -0,0 +1,21 @@
package com.study.viewpoint.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @author yu
* @date 20211220 13:53
*/
public class MainTest {
public static void main(String[] args) throws ParseException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//Date date = simpleDateFormat.parse("1900-01-01 08:00:00");
Date date = simpleDateFormat.parse("1900-01-01 08:00:00");
System.out.println(simpleDateFormat.format(date));
}
}

@ -0,0 +1,47 @@
package com.study.viewpoint.controller;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.study.viewpoint.comm.Result;
import com.study.viewpoint.mapper.three.TaskCardMapper;
import com.study.viewpoint.model.three.TaskCard;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
/**
* @author yu
* @date 20220113 17:01
*/
@RestController
@Slf4j
@DS("three")
public class TaskCardController {
@Autowired
private TaskCardMapper taskCardMapper;
@GetMapping("taskCard")
public Result taskCard(String employeeId){
QueryWrapper<TaskCard> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("employee_id",employeeId);
TaskCard taskCard = taskCardMapper.selectOne(queryWrapper);
Date now = new Date();
Date taskStart1 = taskCard.getTaskStartTime1();
Date taskEnd1 = taskCard.getTaskEndTime1();
if (now.after(taskStart1) && now.before(taskEnd1)) {
log.info("还在定点任务时间之内");
}else{
log.info("不在定点任务时间之内");
}
return Result.success();
}
}

@ -0,0 +1,46 @@
package com.study.viewpoint.controller;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.study.viewpoint.comm.Result;
import com.study.viewpoint.mapper.firstmapper.WageMapper;
import com.study.viewpoint.model.first.Wage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author yu
* @date 20220123 14:33
*/
@RestController
@RequestMapping("api/wage")
@DS("first")
public class WageController {
@Autowired
private WageMapper wageMapper;
/**
*
* @Author yu
* @date 2022/1/23 14:35
* @Param []
* @return com.study.viewpoint.comm.Result
**/
@GetMapping("updateWage")
public Result updateWage(){
Wage wage = new Wage();
String w = wage.toString();
System.out.println(w);
//wage.setId("1465587370541641729");
wage.setStaffName("张晓晓");
int result = wageMapper.updateById(wage);
if (result < 1) {
return Result.fail(500,"更新失败");
}
return Result.success();
}
}

@ -0,0 +1,358 @@
package com.study.viewpoint.mapper.firstmapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study.viewpoint.model.first.Wage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author yu
* @date 20211203 10:59
*/
@Mapper
public interface WageMapper extends BaseMapper<Wage>{
@Select("select employee_id,staff_name from wage")
List<Wage> listWage();
/**
*
*
* "张杰",
* "刘之正",
* "刘铎",
* "陆宽",
* "宁宝佳",
* "段伟群",
* "吴超",
* "殷力争",
* "王艳秋",
* "佟帅",
* "乔伟",
* "李志强",
* "安波",
* "吴倩",
* "王志强",
* "张博宇",
* "贾志军",
* "吴彬",
* "马瑞",
* "王小可",
* "任鹏",
* "陈昱飞",
* "杨斌",
* "刘珣",
* "梁冰寒",
* "沈东方",
* "杨帆",
* "李京华",
* "马明杰",
* "吕学",
* "高路",
* "于东江",
* "吕锟",
* "刘国权",
* "李泽宇",
* "欧劢",
* "金永亮",
* "冯娟",
* "马强",
* "张燕",
* "李磊",
* "陆宇晨",
* "王峰",
* "华山",
* "岳国梁",
* "谷书超",
* "柏松",
* "郝鹏",
* "李海歌",
* "仇秀丽",
* "赵亮",
* "陈冰玉",
* "李良杰",
* "李佳济",
* "董斌",
* "张玉保",
* "成昊",
* "钟学建",
* "张尧",
* "李炀华",
* "张益铭",
* "王雪刚",
* "王龙",
* "陈孟桐",
* "王建",
* "吴敏娟",
* "南永会",
* "郑程均",
* "郭文赞",
* "康成",
* "李莹",
* "王树栋",
* "尚旭光",
* "仝占超",
* "王兵",
* "张娴",
* "李平",
* "朱晓彤",
* "康卫梅",
* "杨东",
* "侯长林",
* "刘学欣",
* "韩志鹏",
* "方正",
* "雷开航",
* "董志威",
* "李佳熠",
* "赵伟伟",
* "郭勇旭",
* "宋雷",
* "赵洪亮",
* "刘力",
* "庞磊",
* "何富华",
* "陈路广",
* "张艳腾",
* "王建",
* "徐亮",
* "王庆伟",
* "王丽影",
* "甘迎军",
* "杨艳晨",
* "马宏超",
* "赵毅",
* "刘伯洋",
* "艾星宇",
* "韩志超",
* "徐龙硕",
* "齐蜜源",
* "刘云",
* "李燕彬",
* "李海鹏",
* "袁洪亮",
* "李龙博",
* "蒲井哥",
* "江春",
* "高继南",
* "李龙坤",
* "许付晨",
* "李强",
* "范家猛",
* "李兆龙",
* "牛汉龙",
* "王河东",
* "代东升",
* "赵龙雨",
* "董拾",
* "高波",
* "孟涛",
* "周亚男",
* "王臻昌",
* "张进",
* "张书忠",
* "刘嘉斌",
* "张卫民",
* "周进良",
* "孔伟",
* "田瑞锋",
* "王伟刚",
* "梅小龙",
* "吕琛",
* "魏晓伟",
* "李浩祥",
* "李威",
* "黄涛",
* "李永辉",
* "常文磊",
* "王宏清",
* "范利君",
* "孙超",
* "池浩冰",
* "张雯文",
* "王春",
* "牛宣瑞",
* "毕显达",
* "邵云华",
* "雷伟英",
* "张萌",
* "云鹏",
* "郑文东",
* "张成贺",
* "吴志先",
* "张龙君",
* "谢荣华",
* "李浩勋",
* "王金玥",
* "邱喜成",
* "李洋",
* "潘东奎",
* "马强",
* "王瑞玚",
* "李延",
* "李传玉",
* "杨松",
* "贾磊",
* "任忠",
* "孙春",
* "杨永铎",
* "滕昕龙",
* "任俊杰",
* "康豪杰",
* "陈亮",
* "李东辉",
* "孟昱",
* "陈延慧",
* "黄丹青",
* "刘文化",
* "朱岩",
* "姜洋",
* "韩晨浠",
* "杨梅",
* "徐文东",
* "周丽君",
* "董国旭",
* "刘玉剑",
* "刘伟斌",
* "崔慧林",
* "胡菡",
* "李爽爽",
* "张合永",
* "杨永利",
* "金海燕",
* "宋祯君",
* "李超",
* "杨存",
* "张洋",
* "段莉娜",
* "王文远",
* "李晨程",
* "陶强",
* "宋冬冬",
* "王聪",
* "张庆飞",
* "蒋鹏",
* "宋宁军",
* "曹文涛",
* "赵蕾",
* "张积怡",
* "王春秋",
* "季洪亮",
* "陈川",
* "吴迪飞",
* "郭霄峰",
* "刘军",
* "侯东泽",
* "韩磊",
* "刘雯",
* "柴新尧",
* "董伟伟",
* "黄建辉",
* "李宁",
* "王卿",
* "钱钰",
* "邵明君",
* "张涛",
* "李庚",
* "雷明华",
* "杜浩",
* "李梦钰",
* "张勇",
* "李飞杰",
* "张嵩",
* "郭梦晨",
* "谭富元",
* "闫齐",
* "张明远",
* "何超",
* "李秀帆",
* "李树平",
* "赵宇",
* "赵静",
* "张丽君",
* "王伟",
* "石晶",
* "刘超",
* "刘海根",
* "王锋",
* "刘伟",
* "单志",
* "杨斌",
* "刘珣",
* "梁冰寒",
* "沈东方",
* "杨帆",
* "李京华",
* "马明杰",
* "吕学",
* "高路",
* "于东江",
* "吕锟",
* "刘国权",
* "李泽宇",
* "欧劢",
* "张电",
* "李阁",
* "柳明伟",
* "屈小飞",
* "赵鹏飞",
* "闫永健",
* "李骁",
* "陈昊",
* "张志强",
* "徐达",
* "谷亚蒙",
* "金永亮",
* "冯娟",
* "马强",
* "张燕",
* "李磊",
* "杨广友",
* "杜佳鹏",
* "张智荣",
* "于宁",
* "刘博",
* "任天奇",
* "绳辰",
* "闫颉",
* "盛希宇",
* "牛子豪",
* "王宝国",
* "郑志岗",
* "张利强",
* "苏志亮",
* "林浩",
* "贾婷婷",
* "高乐",
* "李京",
* "秦朋",
* "高崇君",
* "王于伟",
* "李力",
* "薛正荣",
* "孙宝存",
* "彭冠儒",
* "郑波",
* "吴扣宏",
* "叶芃",
* "陈燕巧",
* "袁会博",
* "陈树芳",
* "刘源",
* "孙文义",
* "田海新",
* "杨涛",
* "孙鹏",
* "于西瑞",
* "刑景生",
* "郑波",
* "王雄浩",
* "张志强",
* "张杨",
* "杨雪强",
* "@return
**/
}

@ -0,0 +1,17 @@
package com.study.viewpoint.mapper.secondmapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study.viewpoint.model.second.Address;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface AddressMapper extends BaseMapper<Address> {
@Select("select address_area_id,address_name,address_region_id from address limit #{page},#{current}")
List<Address> listAddressInfo(int page, int current);
}

@ -0,0 +1,14 @@
package com.study.viewpoint.mapper.three;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study.viewpoint.model.three.Bag;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BagMapper extends BaseMapper<Bag> {
// 每一种福签都存在的情况
int updateBge(String employeeId);
int updateBge1(Bag bag);
}

@ -0,0 +1,14 @@
package com.study.viewpoint.mapper.three;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study.viewpoint.model.three.TaskCard;
import org.apache.ibatis.annotations.Mapper;
/**
* @author yu
* @date 20220113 16:58
*/
@Mapper
public interface TaskCardMapper extends BaseMapper<TaskCard> {
}

@ -0,0 +1,16 @@
package com.study.viewpoint.model;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* @author yu
* @date 20220111 17:50
*/
@Data
@AllArgsConstructor
public class BagCount {
private String name;
private int num;
}

@ -0,0 +1,96 @@
package com.study.viewpoint.model.first;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
* @author yu
* @date 20211203 10:56
*/
@Data
@TableName("wage")
public class Wage {
/**
* id
*/
@TableId(type = IdType.ASSIGN_UUID)
private String id;
/**
* id
*/
private String employeeId;
/**
*
*/
private String staffName;
/**
*
*/
private String phone;
/**
*
*/
private Float wage;
/**
*
*/
private Float commission;
/**
*
*/
private Float serviceAnnuity;
/**
*
*/
private Date grantTime;
/**
*
*/
private Date effectTime;
/**
*
*/
private Date endTime;
/**
*
*/
private Float grantMoney;
/**
*
*/
private Float interest;
/**
*
*/
private Float prospectiveEarn;
/**
* 1- 2- 3-
*/
private String wageType;
/**
1- 2- 3-
*/
private String serviceAnnuityStatus;
}

@ -0,0 +1,23 @@
package com.study.viewpoint.model.second;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* @author yu
* @date 20211203 10:57
*/
@Data
@TableName("address")
public class Address {
@TableId(type = IdType.ASSIGN_ID)
private String addressAreaId;
private String addressName;
private String addressRegionId;
}

@ -0,0 +1,38 @@
package com.study.viewpoint.model.three;
import lombok.Data;
/**
* @author yu
* @date 20220111 16:01
*/
@Data
public class Bag {
// 主键
private int id;
// 员工id
private String employeeId;
// 诚信符
private int integrity;
// 实干符
private int work;
// 开拓符
private int develop;
// 创新符
private int innovation;
// 报国符
private int country;
// 产业符
private int industry;
// 万能符
private int universal;
// 越来悦好
private int moreBetter;
}

@ -0,0 +1,22 @@
package com.study.viewpoint.model.three;
import lombok.Data;
import java.util.Date;
/**
* @author yu
* @date 20220113 16:54
*/
@Data
public class TaskCard {
private int id;
private String employeeId;
private int count;
private Date taskStartTime1;
private Date taskEndTime1;
private Date taskStartTime2;
private Date taskEndTime2;
}
Loading…
Cancel
Save