From 94b6eb6f5f3a8310d0c5466735023bee69d27901 Mon Sep 17 00:00:00 2001 From: kk <3088437949@qq.com> Date: Sun, 23 Jan 2022 16:15:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +- .../study/viewpoint/ViewpointApplication.java | 15 + .../com/study/viewpoint/comm/PageResult.java | 61 +++ .../java/com/study/viewpoint/comm/Result.java | 56 +++ .../viewpoint/config/MybatisPlusConfig.java | 46 +++ .../controller/AddressController.java | 164 ++++++++ .../viewpoint/controller/BagController.java | 171 +++++++++ .../study/viewpoint/controller/MainTest.java | 21 + .../controller/TaskCardController.java | 47 +++ .../viewpoint/controller/WageController.java | 46 +++ .../mapper/firstmapper/WageMapper.java | 358 ++++++++++++++++++ .../mapper/secondmapper/AddressMapper.java | 17 + .../viewpoint/mapper/three/BagMapper.java | 14 + .../mapper/three/TaskCardMapper.java | 14 + .../com/study/viewpoint/model/BagCount.java | 16 + .../com/study/viewpoint/model/first/Wage.java | 96 +++++ .../study/viewpoint/model/second/Address.java | 23 ++ .../com/study/viewpoint/model/three/Bag.java | 38 ++ .../study/viewpoint/model/three/TaskCard.java | 22 ++ 19 files changed, 1226 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/study/viewpoint/ViewpointApplication.java create mode 100644 src/main/java/com/study/viewpoint/comm/PageResult.java create mode 100644 src/main/java/com/study/viewpoint/comm/Result.java create mode 100644 src/main/java/com/study/viewpoint/config/MybatisPlusConfig.java create mode 100644 src/main/java/com/study/viewpoint/controller/AddressController.java create mode 100644 src/main/java/com/study/viewpoint/controller/BagController.java create mode 100644 src/main/java/com/study/viewpoint/controller/MainTest.java create mode 100644 src/main/java/com/study/viewpoint/controller/TaskCardController.java create mode 100644 src/main/java/com/study/viewpoint/controller/WageController.java create mode 100644 src/main/java/com/study/viewpoint/mapper/firstmapper/WageMapper.java create mode 100644 src/main/java/com/study/viewpoint/mapper/secondmapper/AddressMapper.java create mode 100644 src/main/java/com/study/viewpoint/mapper/three/BagMapper.java create mode 100644 src/main/java/com/study/viewpoint/mapper/three/TaskCardMapper.java create mode 100644 src/main/java/com/study/viewpoint/model/BagCount.java create mode 100644 src/main/java/com/study/viewpoint/model/first/Wage.java create mode 100644 src/main/java/com/study/viewpoint/model/second/Address.java create mode 100644 src/main/java/com/study/viewpoint/model/three/Bag.java create mode 100644 src/main/java/com/study/viewpoint/model/three/TaskCard.java diff --git a/README.md b/README.md index a6633e2..e7bcba8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ -# sm - +一个使用mybatis-plus 配置多数据源的demo工程 \ No newline at end of file diff --git a/src/main/java/com/study/viewpoint/ViewpointApplication.java b/src/main/java/com/study/viewpoint/ViewpointApplication.java new file mode 100644 index 0000000..ca098e1 --- /dev/null +++ b/src/main/java/com/study/viewpoint/ViewpointApplication.java @@ -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); + } + +} diff --git a/src/main/java/com/study/viewpoint/comm/PageResult.java b/src/main/java/com/study/viewpoint/comm/PageResult.java new file mode 100644 index 0000000..4ceeb98 --- /dev/null +++ b/src/main/java/com/study/viewpoint/comm/PageResult.java @@ -0,0 +1,61 @@ +package com.study.viewpoint.comm; + +/** + * @author yu + * @date 2021年12月03日 15:30 + */ + +import lombok.Data; + +import java.io.Serializable; + +/** + * 用于分页的返回结果 + * @author yu + * @date 2021年12月02日 17:50 + */ +@Data +public class PageResult 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; + } +} \ No newline at end of file diff --git a/src/main/java/com/study/viewpoint/comm/Result.java b/src/main/java/com/study/viewpoint/comm/Result.java new file mode 100644 index 0000000..ac2c86a --- /dev/null +++ b/src/main/java/com/study/viewpoint/comm/Result.java @@ -0,0 +1,56 @@ +package com.study.viewpoint.comm; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 公共的返回结果 + * @author yu + * @date 2021年12月03日 15:27 + */ +@Data +public class Result 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 Result success(String msg, T data) { + return new Result(200, msg, data); + } + public static Result success( T data) { + return new Result(200,"操作成功", data); + } + public static Result success( ) { + return new Result(200,"操作成功", null); + } + + /** + * 操作失败返回结果 + * + * @param code 自定义返回码 + * @param msg 自定义返回信息 + */ + public static Result fail(int code, String msg) { + + return new Result<>(code, msg, null); + } + +} \ No newline at end of file diff --git a/src/main/java/com/study/viewpoint/config/MybatisPlusConfig.java b/src/main/java/com/study/viewpoint/config/MybatisPlusConfig.java new file mode 100644 index 0000000..73b2201 --- /dev/null +++ b/src/main/java/com/study/viewpoint/config/MybatisPlusConfig.java @@ -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 2021年12月03日 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; + } + + + + + + + + +} diff --git a/src/main/java/com/study/viewpoint/controller/AddressController.java b/src/main/java/com/study/viewpoint/controller/AddressController.java new file mode 100644 index 0000000..6c76cc1 --- /dev/null +++ b/src/main/java/com/study/viewpoint/controller/AddressController.java @@ -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 2021年12月03日 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 + **/ + @PostMapping("getAddress") + @DS("second") + public PageResult
pageAddress(int page, int current, Address queryAddress){ + //创建page对象,传入两个参数,当前页和每页数,调用方法实现分页,调用方法时底层封装,把分页所有数据封装到pageTeacher对象里面 + Page
addressPage = new Page<>(page,current); + String addressId = queryAddress.getAddressAreaId(); + String addressName = queryAddress.getAddressName(); + String addressRegionId = queryAddress.getAddressRegionId(); + QueryWrapper
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
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 + **/ + @PostMapping("getAddress1") + @DS("second") + public PageResult
pageAddress1(int page, int current ,Address queryAddress){ + //创建page对象,传入两个参数,当前页和每页数,调用方法实现分页,调用方法时底层封装,把分页所有数据封装到pageTeacher对象里面 + Page
addressPage = new Page<>(page,current); + String addressId = queryAddress.getAddressAreaId(); + String addressName = queryAddress.getAddressName(); + String addressRegionId = queryAddress.getAddressRegionId(); + log.info("queryAddress:"+addressId+addressName+addressRegionId); + QueryWrapper
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
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 = 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); + } + + + +} diff --git a/src/main/java/com/study/viewpoint/controller/BagController.java b/src/main/java/com/study/viewpoint/controller/BagController.java new file mode 100644 index 0000000..63e52af --- /dev/null +++ b/src/main/java/com/study/viewpoint/controller/BagController.java @@ -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 2022年01月11日 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 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 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 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 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> list1 = new ArrayList<>(); + list1.add(map); + List 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 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 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); + } + + + + + + +} + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/study/viewpoint/controller/MainTest.java b/src/main/java/com/study/viewpoint/controller/MainTest.java new file mode 100644 index 0000000..cd56eb6 --- /dev/null +++ b/src/main/java/com/study/viewpoint/controller/MainTest.java @@ -0,0 +1,21 @@ +package com.study.viewpoint.controller; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * @author yu + * @date 2021年12月20日 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)); + + } + +} diff --git a/src/main/java/com/study/viewpoint/controller/TaskCardController.java b/src/main/java/com/study/viewpoint/controller/TaskCardController.java new file mode 100644 index 0000000..a630eb0 --- /dev/null +++ b/src/main/java/com/study/viewpoint/controller/TaskCardController.java @@ -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 2022年01月13日 17:01 + */ +@RestController +@Slf4j +@DS("three") +public class TaskCardController { + + @Autowired + private TaskCardMapper taskCardMapper; + + @GetMapping("taskCard") + public Result taskCard(String employeeId){ + QueryWrapper 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(); + } + +} diff --git a/src/main/java/com/study/viewpoint/controller/WageController.java b/src/main/java/com/study/viewpoint/controller/WageController.java new file mode 100644 index 0000000..7520870 --- /dev/null +++ b/src/main/java/com/study/viewpoint/controller/WageController.java @@ -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 2022年01月23日 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(); + } + +} diff --git a/src/main/java/com/study/viewpoint/mapper/firstmapper/WageMapper.java b/src/main/java/com/study/viewpoint/mapper/firstmapper/WageMapper.java new file mode 100644 index 0000000..4ed4edb --- /dev/null +++ b/src/main/java/com/study/viewpoint/mapper/firstmapper/WageMapper.java @@ -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 2021年12月03日 10:59 + */ +@Mapper +public interface WageMapper extends BaseMapper{ + + @Select("select employee_id,staff_name from wage") + List listWage(); + + /** + * + * 参演人员 + * "张杰", + * "刘之正", + * "刘铎", + * "陆宽", + * "宁宝佳", + * "段伟群", + * "吴超", + * "殷力争", + * "王艳秋", + * "佟帅", + * "乔伟", + * "李志强", + * "安波", + * "吴倩", + * "王志强", + * "张博宇", + * "贾志军", + * "吴彬", + * "马瑞", + * "王小可", + * "任鹏", + * "陈昱飞", + * "杨斌", + * "刘珣", + * "梁冰寒", + * "沈东方", + * "杨帆", + * "李京华", + * "马明杰", + * "吕学", + * "高路", + * "于东江", + * "吕锟", + * "刘国权", + * "李泽宇", + * "欧劢", + * "金永亮", + * "冯娟", + * "马强", + * "张燕", + * "李磊", + * "陆宇晨", + * "王峰", + * "华山", + * "岳国梁", + * "谷书超", + * "柏松", + * "郝鹏", + * "李海歌", + * "仇秀丽", + * "赵亮", + * "陈冰玉", + * "李良杰", + * "李佳济", + * "董斌", + * "张玉保", + * "成昊", + * "钟学建", + * "张尧", + * "李炀华", + * "张益铭", + * "王雪刚", + * "王龙", + * "陈孟桐", + * "王建", + * "吴敏娟", + * "南永会", + * "郑程均", + * "郭文赞", + * "康成", + * "李莹", + * "王树栋", + * "尚旭光", + * "仝占超", + * "王兵", + * "张娴", + * "李平", + * "朱晓彤", + * "康卫梅", + * "杨东", + * "侯长林", + * "刘学欣", + * "韩志鹏", + * "方正", + * "雷开航", + * "董志威", + * "李佳熠", + * "赵伟伟", + * "郭勇旭", + * "宋雷", + * "赵洪亮", + * "刘力", + * "庞磊", + * "何富华", + * "陈路广", + * "张艳腾", + * "王建", + * "徐亮", + * "王庆伟", + * "王丽影", + * "甘迎军", + * "杨艳晨", + * "马宏超", + * "赵毅", + * "刘伯洋", + * "艾星宇", + * "韩志超", + * "徐龙硕", + * "齐蜜源", + * "刘云", + * "李燕彬", + * "李海鹏", + * "袁洪亮", + * "李龙博", + * "蒲井哥", + * "江春", + * "高继南", + * "李龙坤", + * "许付晨", + * "李强", + * "范家猛", + * "李兆龙", + * "牛汉龙", + * "王河东", + * "代东升", + * "赵龙雨", + * "董拾", + * "高波", + * "孟涛", + * "周亚男", + * "王臻昌", + * "张进", + * "张书忠", + * "刘嘉斌", + * "张卫民", + * "周进良", + * "孔伟", + * "田瑞锋", + * "王伟刚", + * "梅小龙", + * "吕琛", + * "魏晓伟", + * "李浩祥", + * "李威", + * "黄涛", + * "李永辉", + * "常文磊", + * "王宏清", + * "范利君", + * "孙超", + * "池浩冰", + * "张雯文", + * "王春", + * "牛宣瑞", + * "毕显达", + * "邵云华", + * "雷伟英", + * "张萌", + * "云鹏", + * "郑文东", + * "张成贺", + * "吴志先", + * "张龙君", + * "谢荣华", + * "李浩勋", + * "王金玥", + * "邱喜成", + * "李洋", + * "潘东奎", + * "马强", + * "王瑞玚", + * "李延", + * "李传玉", + * "杨松", + * "贾磊", + * "任忠", + * "孙春", + * "杨永铎", + * "滕昕龙", + * "任俊杰", + * "康豪杰", + * "陈亮", + * "李东辉", + * "孟昱", + * "陈延慧", + * "黄丹青", + * "刘文化", + * "朱岩", + * "姜洋", + * "韩晨浠", + * "杨梅", + * "徐文东", + * "周丽君", + * "董国旭", + * "刘玉剑", + * "刘伟斌", + * "崔慧林", + * "胡菡", + * "李爽爽", + * "张合永", + * "杨永利", + * "金海燕", + * "宋祯君", + * "李超", + * "杨存", + * "张洋", + * "段莉娜", + * "王文远", + * "李晨程", + * "陶强", + * "宋冬冬", + * "王聪", + * "张庆飞", + * "蒋鹏", + * "宋宁军", + * "曹文涛", + * "赵蕾", + * "张积怡", + * "王春秋", + * "季洪亮", + * "陈川", + * "吴迪飞", + * "郭霄峰", + * "刘军", + * "侯东泽", + * "韩磊", + * "刘雯", + * "柴新尧", + * "董伟伟", + * "黄建辉", + * "李宁", + * "王卿", + * "钱钰", + * "邵明君", + * "张涛", + * "李庚", + * "雷明华", + * "杜浩", + * "李梦钰", + * "张勇", + * "李飞杰", + * "张嵩", + * "郭梦晨", + * "谭富元", + * "闫齐", + * "张明远", + * "何超", + * "李秀帆", + * "李树平", + * "赵宇", + * "赵静", + * "张丽君", + * "王伟", + * "石晶", + * "刘超", + * "刘海根", + * "王锋", + * "刘伟", + * "单志", + * "杨斌", + * "刘珣", + * "梁冰寒", + * "沈东方", + * "杨帆", + * "李京华", + * "马明杰", + * "吕学", + * "高路", + * "于东江", + * "吕锟", + * "刘国权", + * "李泽宇", + * "欧劢", + * "张电", + * "李阁", + * "柳明伟", + * "屈小飞", + * "赵鹏飞", + * "闫永健", + * "李骁", + * "陈昊", + * "张志强", + * "徐达", + * "谷亚蒙", + * "金永亮", + * "冯娟", + * "马强", + * "张燕", + * "李磊", + * "杨广友", + * "杜佳鹏", + * "张智荣", + * "于宁", + * "刘博", + * "任天奇", + * "绳辰", + * "闫颉", + * "盛希宇", + * "牛子豪", + * "王宝国", + * "郑志岗", + * "张利强", + * "苏志亮", + * "林浩", + * "贾婷婷", + * "高乐", + * "李京", + * "秦朋", + * "高崇君", + * "王于伟", + * "李力", + * "薛正荣", + * "孙宝存", + * "彭冠儒", + * "郑波", + * "吴扣宏", + * "叶芃", + * "陈燕巧", + * "袁会博", + * "陈树芳", + * "刘源", + * "孙文义", + * "田海新", + * "杨涛", + * "孙鹏", + * "于西瑞", + * "刑景生", + * "郑波", + * "王雄浩", + * "张志强", + * "张杨", + * "杨雪强", + * "@return + **/ + +} \ No newline at end of file diff --git a/src/main/java/com/study/viewpoint/mapper/secondmapper/AddressMapper.java b/src/main/java/com/study/viewpoint/mapper/secondmapper/AddressMapper.java new file mode 100644 index 0000000..85573dd --- /dev/null +++ b/src/main/java/com/study/viewpoint/mapper/secondmapper/AddressMapper.java @@ -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
{ + + @Select("select address_area_id,address_name,address_region_id from address limit #{page},#{current}") + List
listAddressInfo(int page, int current); + +} diff --git a/src/main/java/com/study/viewpoint/mapper/three/BagMapper.java b/src/main/java/com/study/viewpoint/mapper/three/BagMapper.java new file mode 100644 index 0000000..fad7d80 --- /dev/null +++ b/src/main/java/com/study/viewpoint/mapper/three/BagMapper.java @@ -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 { + + // 每一种福签都存在的情况 + int updateBge(String employeeId); + + int updateBge1(Bag bag); +} diff --git a/src/main/java/com/study/viewpoint/mapper/three/TaskCardMapper.java b/src/main/java/com/study/viewpoint/mapper/three/TaskCardMapper.java new file mode 100644 index 0000000..5cbc85d --- /dev/null +++ b/src/main/java/com/study/viewpoint/mapper/three/TaskCardMapper.java @@ -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 2022年01月13日 16:58 + */ +@Mapper +public interface TaskCardMapper extends BaseMapper { + +} diff --git a/src/main/java/com/study/viewpoint/model/BagCount.java b/src/main/java/com/study/viewpoint/model/BagCount.java new file mode 100644 index 0000000..1ab88d0 --- /dev/null +++ b/src/main/java/com/study/viewpoint/model/BagCount.java @@ -0,0 +1,16 @@ +package com.study.viewpoint.model; + +import lombok.AllArgsConstructor; +import lombok.Data; + +/** + * @author yu + * @date 2022年01月11日 17:50 + */ +@Data +@AllArgsConstructor +public class BagCount { + private String name; + private int num; + +} diff --git a/src/main/java/com/study/viewpoint/model/first/Wage.java b/src/main/java/com/study/viewpoint/model/first/Wage.java new file mode 100644 index 0000000..f684370 --- /dev/null +++ b/src/main/java/com/study/viewpoint/model/first/Wage.java @@ -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 2021年12月03日 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; +} \ No newline at end of file diff --git a/src/main/java/com/study/viewpoint/model/second/Address.java b/src/main/java/com/study/viewpoint/model/second/Address.java new file mode 100644 index 0000000..4df519a --- /dev/null +++ b/src/main/java/com/study/viewpoint/model/second/Address.java @@ -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 2021年12月03日 10:57 + */ +@Data +@TableName("address") +public class Address { + @TableId(type = IdType.ASSIGN_ID) + private String addressAreaId; + private String addressName; + private String addressRegionId; + + + + +} diff --git a/src/main/java/com/study/viewpoint/model/three/Bag.java b/src/main/java/com/study/viewpoint/model/three/Bag.java new file mode 100644 index 0000000..3524e04 --- /dev/null +++ b/src/main/java/com/study/viewpoint/model/three/Bag.java @@ -0,0 +1,38 @@ +package com.study.viewpoint.model.three; + +import lombok.Data; + +/** + * @author yu + * @date 2022年01月11日 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; + + + +} diff --git a/src/main/java/com/study/viewpoint/model/three/TaskCard.java b/src/main/java/com/study/viewpoint/model/three/TaskCard.java new file mode 100644 index 0000000..efd3dfa --- /dev/null +++ b/src/main/java/com/study/viewpoint/model/three/TaskCard.java @@ -0,0 +1,22 @@ +package com.study.viewpoint.model.three; + +import lombok.Data; + +import java.util.Date; + +/** + * @author yu + * @date 2022年01月13日 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; + + +}