diff --git a/src/main/java/com/peanut/modules/book/controller/MedicaldesController.java b/src/main/java/com/peanut/modules/book/controller/MedicaldesController.java new file mode 100644 index 00000000..adcfccea --- /dev/null +++ b/src/main/java/com/peanut/modules/book/controller/MedicaldesController.java @@ -0,0 +1,234 @@ +package com.peanut.modules.book.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.yulichang.wrapper.MPJLambdaWrapper; +import com.peanut.common.utils.R; +import com.peanut.modules.book.entity.*; +import com.peanut.modules.book.entity.SysDictDataEntity; +import com.peanut.modules.book.service.*; +import com.peanut.modules.sys.service.SysDictDataService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.awt.print.Book; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Slf4j +@RestController +@RequestMapping("book/medicaldes") +public class MedicaldesController { + + @Autowired + private MedicaldesLightService lightService; + @Autowired + private MedicaldesBookService medicaldesBookService; + @Autowired + private MedicaldesInheritService inheritService; + @Autowired + private MedicaldesInheritRelationService relationService; + @Autowired + private SysDictDataService sysDictDataService; + @Autowired + private BookService bookService; + + + /** + * 类型列表 + */ + @RequestMapping(path = "/typeList") + public R typeList(String label) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper(); + wrapper.eq(SysDictDataEntity::getDictLabel,label); + return R.ok().put("result",sysDictDataService.list(wrapper)); + } + + /** + * 专著出版关系列表 + */ + @RequestMapping(path = "/bookRelationListByType") + public R bookRelationListByType(@RequestBody Map map) { + MPJLambdaWrapper wrapper = new MPJLambdaWrapper(); + wrapper.selectAll(MedicaldesBook.class); + wrapper.leftJoin(BookEntity.class,BookEntity::getId,MedicaldesBook::getBookId); + if (map.containsKey("dictType")&&StringUtils.isNotEmpty(map.get("dictType").toString())){ + wrapper.eq(MedicaldesBook::getTypeId,map.get("dictType")); + } + if (map.containsKey("bookName")&&StringUtils.isNotEmpty(map.get("bookName").toString())){ + wrapper.like(BookEntity::getName,map.get("bookName")); + } + Page res = medicaldesBookService.page(new Page( + Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())), wrapper); + List list = res.getRecords(); + if (list.size() > 0) { + for (MedicaldesBook b : list) { + b.setBook(bookService.getById(b.getBookId())); + } + res.setRecords(list); + } + return R.ok().put("result", res); + } + + /** + * 专著出版列表 + */ + @RequestMapping(path = "/bookListByType") + public R bookListByType(String type) { + MPJLambdaWrapper wrapper = new MPJLambdaWrapper(); + wrapper.selectAll(BookEntity.class); + wrapper.leftJoin(MedicaldesBook.class,MedicaldesBook::getBookId,BookEntity::getId); + wrapper.eq(MedicaldesBook::getTypeId,type); + List list = bookService.list(wrapper); + return R.ok().put("result", list); + } + + @RequestMapping(path = "/saveOrUpdateBookRelation") + public R saveOrUpdateBookRelation(@RequestBody MedicaldesBook medicaldesBook) { + medicaldesBookService.saveOrUpdate(medicaldesBook); + return R.ok(); + } + + @RequestMapping(path = "/delBookRelation") + public R delBookRelation(String id) { + medicaldesBookService.removeById(id); + return R.ok(); + } + + /** + * 学术传承列表分页 + */ + @RequestMapping(path = "/inheritListByPage") + public R inheritListByPage(@RequestBody Map map) { + MPJLambdaWrapper wrapper = new MPJLambdaWrapper(); + wrapper.leftJoin(MedicaldesInheritRelation.class,MedicaldesInheritRelation::getInheritId,MedicaldesInherit::getId); + wrapper.leftJoin(City.class,City::getCityId,MedicaldesInherit::getCityId); + wrapper.leftJoin(Province.class,Province::getProvId,City::getProvId); + wrapper.selectAll(MedicaldesInherit.class); + if (map.containsKey("dictType")&&StringUtils.isNotEmpty(map.get("dictType").toString())){ + wrapper.eq(MedicaldesInheritRelation::getTypeId,map.get("dictType")); + } + if (map.containsKey("name")&&StringUtils.isNotEmpty(map.get("name").toString())){ + wrapper.like(MedicaldesInherit::getName,map.get("name")); + } + Page page = inheritService.page(new Page<>( + Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())),wrapper); + return R.ok().put("result", page); + } + + /** + * 学术传承列表按类型、地区 + */ + @RequestMapping(path = "/inheritListByTypeProvId") + public R inheritListByTypeProvId(String type,String provId) { + MPJLambdaWrapper wrapper = new MPJLambdaWrapper(); + wrapper.leftJoin(MedicaldesInheritRelation.class,MedicaldesInheritRelation::getInheritId,MedicaldesInherit::getId); + wrapper.eq(MedicaldesInheritRelation::getTypeId,type); + wrapper.leftJoin(City.class,City::getCityId,MedicaldesInherit::getCityId); + wrapper.leftJoin(Province.class,Province::getProvId,City::getProvId); + wrapper.selectAll(MedicaldesInherit.class); + wrapper.eq(Province::getProvId,provId); + List list = inheritService.list(wrapper); + return R.ok().put("result", list); + } + + @RequestMapping(path = "/getInheritById") + public R getInheritById(String id) { + return R.ok().put("result",inheritService.getById(id)); + } + + @RequestMapping(path = "/saveOrUpdateInherit") + public R addInherit(@RequestBody MedicaldesInherit inherit) { + MedicaldesInheritRelation relation = null; + if (inherit.getId()==null) { + relation = new MedicaldesInheritRelation(); + }else { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper(); + wrapper.eq(MedicaldesInheritRelation::getInheritId,inherit.getId()); + relation = relationService.getOne(wrapper); + } + inheritService.saveOrUpdate(inherit); + relation.setTypeId(inherit.getType()); + relation.setInheritId(inherit.getId()); + relationService.saveOrUpdate(relation); + return R.ok(); + } + + @RequestMapping(path = "/delInherit") + public R delInherit(String id) { + inheritService.removeById(id); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper(); + wrapper.eq(MedicaldesInheritRelation::getInheritId,id); + relationService.removeById(relationService.getOne(wrapper)); + return R.ok(); + } + + @RequestMapping(path = "/getList") + public List> getList(String type) { + MPJLambdaWrapper wrapper = new MPJLambdaWrapper(); + wrapper.leftJoin(MedicaldesInheritRelation.class,MedicaldesInheritRelation::getInheritId,MedicaldesInherit::getId); + wrapper.eq(MedicaldesInheritRelation::getTypeId,type); + wrapper.leftJoin(City.class,City::getCityId,MedicaldesInherit::getCityId); + wrapper.leftJoin(Province.class,Province::getProvId,City::getProvId); + wrapper.selectAs(Province::getProvName,"provinceName"); + wrapper.selectAs(Province::getProvId,"provinceId"); + wrapper.select("count(*) as count"); + wrapper.groupBy("provinceName"); + List> list = inheritService.listMaps(wrapper); + return list; + } + + /** + * 吴门之光列表 + */ + @RequestMapping(path = "/lightListByType") + public R lightListByType(String type) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper(); + if (StringUtils.isNotEmpty(type)){ + wrapper.eq(MedicaldesLight::getType,type); + } + List list = lightService.list(wrapper); + return R.ok().put("result", list); + } + + /** + * 吴门之光列表 + */ + @RequestMapping(path = "/lightListByPage") + public R lightListByPage(@RequestBody Map map) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper(); + if (map.containsKey("type")&&StringUtils.isNotEmpty(map.get("type").toString())){ + wrapper.eq(MedicaldesLight::getType,map.get("type")); + } + if (map.containsKey("name")&&StringUtils.isNotEmpty(map.get("name").toString())){ + wrapper.like(MedicaldesLight::getName,map.get("name")); + } + Page page = lightService.page(new Page<>( + Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())),wrapper); + return R.ok().put("result", page); + } + + @RequestMapping(path = "/getLightById") + public R getLightById(String id) { + return R.ok().put("result",lightService.getById(id)); + } + + @RequestMapping(path = "/saveOrUpdateLight") + public R addLight(@RequestBody MedicaldesLight light) { + lightService.saveOrUpdate(light); + return R.ok(); + } + + @RequestMapping(path = "/delLight") + public R delLight(String id) { + lightService.removeById(id); + return R.ok(); + } + +} diff --git a/src/main/java/com/peanut/modules/book/controller/MyUserController.java b/src/main/java/com/peanut/modules/book/controller/MyUserController.java index 9e56e562..49c1aad4 100644 --- a/src/main/java/com/peanut/modules/book/controller/MyUserController.java +++ b/src/main/java/com/peanut/modules/book/controller/MyUserController.java @@ -80,6 +80,7 @@ public class MyUserController { wrapper.and(p.getKey()!="",k->k.like(MyUserEntity::getName,p.getKey()).or().like(MyUserEntity::getTel,p.getKey())); wrapper.orderByDesc(MyUserEntity::getCreateTime); Page myUserEntityPage = userService.getBaseMapper().selectPage(new Page(p.getPage(), p.getLimit()), wrapper); + return R.ok().put("user",myUserEntityPage); } @@ -92,6 +93,7 @@ public class MyUserController { return null; } + /** * 信息 */ @@ -99,6 +101,10 @@ public class MyUserController { // @RequiresPermissions("book:user:info") public R info(@PathVariable("id") Integer id){ MyUserEntity user = userService.getById(id); +// List list = couponHistoryService.getBaseMapper().selectList(new QueryWrapper().eq("member_id", id) +// .eq("use_status", 0)); +// user.setConponsCount(list.size()); + return R.ok().put("user", user); } @@ -111,6 +117,7 @@ public class MyUserController { String saltMD5 = MD5Utils.getSaltMD5(password); user.setPassword(saltMD5); userService.save(user); + return R.ok(); } @@ -157,12 +164,15 @@ public class MyUserController { } + /** * 删除 */ @RequestMapping("/delete") +// @RequiresPermissions("book:user:delete") public R delete(@RequestBody Integer[] ids){ userService.removeByIds(Arrays.asList(ids)); + return R.ok(); } @@ -230,18 +240,70 @@ public class MyUserController { return MailUtil.sendMail("疯子读书邮箱验证码",code,email); } + /** + * 绑定用户电话号 + * @return + */ + @RequestMapping("/updateUserTel") + public R updateUserTel(@RequestBody Map map){ + String phone = map.get("phone").toString(); + String code = map.get("code").toString(); + Integer id = Integer.valueOf(map.get("id").toString()); + String redisCode = redisTemplate.opsForValue().get("RegistCode"+phone); + if(StringUtils.isEmpty(redisCode)){ + return R.error("验证码已过期,请重试"); + } + String lcode = redisCode.split("_")[0]; + if (!lcode.equals(code)) { + return R.error("短信验证码不符!"); + } + MyUserEntity userInfo = userService.getById(id); + userInfo.setTel(phone); + userService.updateById(userInfo); + return R.ok(); + } + + /** + * 绑定用户邮件 + * @return + */ + @RequestMapping("/updateUserEmail") + public R updateUserEmail(@RequestBody Map map){ + String email = map.get("email").toString(); + String code = map.get("code").toString(); + Integer id = Integer.valueOf(map.get("id").toString()); + String redisCode = redisTemplate.opsForValue().get("RegistCode"+email); + if(StringUtils.isEmpty(redisCode)){ + return R.error("验证码已过期,请重试"); + } + String lcode = redisCode.split("_")[0]; + if (!lcode.equals(code)) { + return R.error("短信验证码不符!"); + } + MyUserEntity userInfo = userService.getById(id); + userInfo.setEmail(email); + userService.updateById(userInfo); + return R.ok(); + + } + @RequestMapping("/register") public R register(@RequestParam("tel") String tel, @RequestParam("code") String code, @RequestParam("password") String password){ String redisCode = redisTemplate.opsForValue().get("RegistCode" + tel); + + if (StringUtils.isEmpty(redisCode)){ return R.error(500,"短信验证码已过期,请重试"); } + String lcode = redisCode.split("_")[0]; + if (!lcode.equals(code)) { return R.error(500,"短信验证码不符!"); } + MyUserEntity user = userService.getBaseMapper().selectOne(new QueryWrapper().eq("tel", tel)); if(!ObjectUtil.isEmpty(user)){ return R.error(500,"该手机号已经注册!"); @@ -253,6 +315,7 @@ public class MyUserController { userService.save(myUserEntity); R r = sysUserTokenService.createToken(myUserEntity.getId()); return R.ok("注册成功").put("userInfo",myUserEntity).put("token",r); + } /** * 常规注册 / 验证码 登录 @@ -301,6 +364,7 @@ public class MyUserController { @RequestMapping("/login") public R login(@RequestParam("phone") String phone, @RequestParam("password") String password) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper(); if (phone.contains("@")) { wrapper.eq(MyUserEntity::getEmail,phone); @@ -314,7 +378,7 @@ public class MyUserController { }else { int flag = 0; for (MyUserEntity user : userList) { - if (user.getPassword() == null) { + if (user.getPassword() == null|| user.getPassword().equals("")) { flag++; continue; } @@ -371,40 +435,70 @@ public class MyUserController { public R getEverhealthInfo(@RequestParam("phone") String phone, @RequestParam("password") String password, @RequestParam(value = "hsuserId", required = false) Integer hsuserId) { + String s = HttpUtil.get("http://101.201.146.165:8088/App-EH/app/phone.do?login&loginName="+ phone +"&loginPwd="+ password +""); + + System.out.println(s); + + + //将结果转成json 取值 JSONObject jsonObject = JSON.parseObject(s); + if (jsonObject.getString("msg").equals("登录名或密码错误!")) { + return R.error(404,jsonObject.getString("msg")); } + + String yljkOid = jsonObject.getJSONObject("obj").getString("customerOid"); String cellPhone = jsonObject.getJSONObject("obj").getString("cellPhone"); String customerIcons = jsonObject.getJSONObject("obj").getString("customerIcons"); String nameCN = jsonObject.getJSONObject("obj").getString("nameCN"); +// String password = jsonObject.getJSONObject("obj").getString("pass"); + + System.out.println("=====================yljkOid=============================="+yljkOid); + + //查询 当前 花生账号 和 当前绑定的 一路健康账号是否有绑定 关系 + MyUserEntity user = userService.getBaseMapper().selectOne(new QueryWrapper().eq("yljk_oid", yljkOid)); + if (user != null ) { + // 判断 hsuserId 是否为空 查询 传入的 花生id 和 查询的花生 id 是否一致 if (hsuserId != null && user.getId() == hsuserId){ + MyUserEntity myUserEntity = userService.getBaseMapper().selectById(hsuserId); //绑定 myUserEntity.setYljkOid(yljkOid); userService.updateById(myUserEntity); + return R.ok("绑定成功!"); + } + //如果系统存在该用户 并且绑定关系 成立 登录成功 ,返回用户信息 R r = sysUserTokenService.createToken(user.getId()); + return R.ok("登陆成功").put("userInfo",user).put("token",r); } + + + //不存在 返回 手机号 oid 姓名 头像 + HashMap map = new HashMap<>(); map.put("cellPhone",cellPhone); map.put("customerIcons",customerIcons); map.put("yljkOid",yljkOid); map.put("nameCN",nameCN); + return R.ok("绑定信息").put("everhealthInfo",map); } + + /** * 一路健康账号注册花生 */ @@ -414,14 +508,22 @@ public class MyUserController { @RequestParam("yljkOid") String yljkOid, @RequestParam("userName") String userName, @RequestParam("customerIcons") String customerIcons) { + String redisCode = redisTemplate.opsForValue().get("RegistCode" + phone); + + System.out.println(redisCode); + if (StringUtils.isEmpty(redisCode)){ return R.error(500,"短信验证码已过期,请重试"); } + String lcode = redisCode.split("_")[0]; + if (!lcode.equals(code)) { return R.error(500,"短信验证码不符!"); } + + //查询是否存在当前用户手机号 MyUserEntity userEntity = userService.getBaseMapper().selectOne(new QueryWrapper().eq("tel", phone)); if (userEntity == null) { @@ -447,6 +549,7 @@ public class MyUserController { R r = sysUserTokenService.createToken(userEntity.getId()); // todo 为什么验证成功以后不能实现页面跳转登录 R返回更新生成的token和电话 return R.ok().put("userInfo",userEntity).put("token",r); + } @RequestMapping("/test") @@ -474,6 +577,7 @@ public class MyUserController { } } msg = userService.buyEbook(userId, bookId,couponId); + if (msg.equals("当前书籍以购买,请勿重复购买!")) { return R.ok().put("msg",msg).put("status","error"); }else if (msg.equals("余额不足,请充值!")) { @@ -504,7 +608,9 @@ public class MyUserController { }else { return R.error("余额不足!扣除失败!"); } + } + TransactionDetailsEntity transactionDetailsEntity = new TransactionDetailsEntity(); transactionDetailsEntity.setUserId(Integer.valueOf(id)); transactionDetailsEntity.setOrderType("后台充扣操作"); @@ -521,6 +627,8 @@ public class MyUserController { BigDecimal balance = new BigDecimal(i); transactionDetailsEntity.setUserBalance(balance); transactionDetailsService.save(transactionDetailsEntity); + + // 插入 花生币 充值记录 // IosPayOrderEntity payPaymentOrderEntity = new IosPayOrderEntity(); // payPaymentOrderEntity.setUserId(Integer.valueOf(id)); @@ -530,6 +638,7 @@ public class MyUserController { // payPaymentOrderEntity.setRechargeStatus("success"); // payPaymentOrderEntity.setSuccessTime(new Date()); // payPaymentOrderService.save(payPaymentOrderEntity); + userService.updateById(byId); return R.ok(); } @@ -541,6 +650,7 @@ public class MyUserController { */ @RequestMapping("/openVipByVirtualCoin") public R openVipByVirtualCoin(@RequestParam Map params){ + Integer configId = Integer.valueOf(params.get("configId").toString()); String orderSn = params.get("orderSn").toString(); Integer userId = Integer.valueOf(params.get("userId").toString()); @@ -549,8 +659,14 @@ public class MyUserController { BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(configId); String month = bookBuyConfigEntity.getMonth(); BigDecimal amount = new BigDecimal(bookBuyConfigEntity.getRealMoney()); + + + + + if(user.getPeanutCoin().compareTo(amount) >= 0){ user.setPeanutCoin(user.getPeanutCoin().subtract(amount)); + this.userService.updateById(user); // 添加消费信息 TransactionDetailsEntity transactionDetailsEntity = new TransactionDetailsEntity(); @@ -568,9 +684,14 @@ public class MyUserController { }else{ return R.error(500,"余额不足,请检查后操作!"); } + return R.ok(); } + + + + // // /** // * @Description: app微信登陆 diff --git a/src/main/java/com/peanut/modules/book/dao/MedicaldesBookDao.java b/src/main/java/com/peanut/modules/book/dao/MedicaldesBookDao.java new file mode 100644 index 00000000..c7fbacaa --- /dev/null +++ b/src/main/java/com/peanut/modules/book/dao/MedicaldesBookDao.java @@ -0,0 +1,9 @@ +package com.peanut.modules.book.dao; + +import com.github.yulichang.base.MPJBaseMapper; +import com.peanut.modules.book.entity.MedicaldesBook; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface MedicaldesBookDao extends MPJBaseMapper { +} diff --git a/src/main/java/com/peanut/modules/book/dao/MedicaldesInheritDao.java b/src/main/java/com/peanut/modules/book/dao/MedicaldesInheritDao.java new file mode 100644 index 00000000..5f2d35a6 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/dao/MedicaldesInheritDao.java @@ -0,0 +1,9 @@ +package com.peanut.modules.book.dao; + +import com.github.yulichang.base.MPJBaseMapper; +import com.peanut.modules.book.entity.MedicaldesInherit; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface MedicaldesInheritDao extends MPJBaseMapper { +} diff --git a/src/main/java/com/peanut/modules/book/dao/MedicaldesInheritRelationDao.java b/src/main/java/com/peanut/modules/book/dao/MedicaldesInheritRelationDao.java new file mode 100644 index 00000000..497f164c --- /dev/null +++ b/src/main/java/com/peanut/modules/book/dao/MedicaldesInheritRelationDao.java @@ -0,0 +1,9 @@ +package com.peanut.modules.book.dao; + +import com.github.yulichang.base.MPJBaseMapper; +import com.peanut.modules.book.entity.MedicaldesInheritRelation; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface MedicaldesInheritRelationDao extends MPJBaseMapper { +} diff --git a/src/main/java/com/peanut/modules/book/dao/MedicaldesLightDao.java b/src/main/java/com/peanut/modules/book/dao/MedicaldesLightDao.java new file mode 100644 index 00000000..a13f4a37 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/dao/MedicaldesLightDao.java @@ -0,0 +1,9 @@ +package com.peanut.modules.book.dao; + +import com.github.yulichang.base.MPJBaseMapper; +import com.peanut.modules.book.entity.MedicaldesLight; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface MedicaldesLightDao extends MPJBaseMapper { +} diff --git a/src/main/java/com/peanut/modules/book/entity/MedicaldesBook.java b/src/main/java/com/peanut/modules/book/entity/MedicaldesBook.java new file mode 100644 index 00000000..4db1f409 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/entity/MedicaldesBook.java @@ -0,0 +1,37 @@ +package com.peanut.modules.book.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; +import java.util.List; + +@Data +@TableName("medicaldes_book") +public class MedicaldesBook implements Serializable { + private static final long serialVersionUID = 1L; + + + + @TableField(exist = false) + private BookEntity book; + @TableField(exist = false) + private com.peanut.modules.book.entity.SysDictDataEntity sysDictData; + + @TableId + private Integer id; + + private Integer bookId; + + /** + * 书类型id,sys_dict_data-medicaldesBookType + */ + private Integer typeId; + + private Integer sort; + + @TableLogic + private Integer delFlag; +} diff --git a/src/main/java/com/peanut/modules/book/entity/MedicaldesInherit.java b/src/main/java/com/peanut/modules/book/entity/MedicaldesInherit.java new file mode 100644 index 00000000..bcd9134f --- /dev/null +++ b/src/main/java/com/peanut/modules/book/entity/MedicaldesInherit.java @@ -0,0 +1,56 @@ +package com.peanut.modules.book.entity; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +@Data +@TableName("medicaldes_inherit") +public class MedicaldesInherit implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId + private Integer id; + + @TableField(exist = false) + private Integer type; + @TableField(exist = false) + private Integer count; + + /** + * 传承人 + */ + private String name; + + /** + * 超链接 + */ + private String url; + + /** + * 图片 + */ + private String img; + + /** + * 简介内容 + */ + private String content; + + /** + * 所在城市 + */ + private Integer cityId; + + @TableField(exist = false) + private String provinceName; + + @TableLogic + private Integer delFlag; + + +} diff --git a/src/main/java/com/peanut/modules/book/entity/MedicaldesInheritRelation.java b/src/main/java/com/peanut/modules/book/entity/MedicaldesInheritRelation.java new file mode 100644 index 00000000..0b6dfd41 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/entity/MedicaldesInheritRelation.java @@ -0,0 +1,29 @@ +package com.peanut.modules.book.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +@Data +@TableName("medicaldes_inherit_relation") +public class MedicaldesInheritRelation implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId + private Integer id; + /** + * 传承人id + */ + private Integer inheritId; + + /** + * 传承人类型id,sys_dict_data表inheritType + */ + private Integer typeId; + + @TableLogic + private Integer delFlag; +} diff --git a/src/main/java/com/peanut/modules/book/entity/MedicaldesLight.java b/src/main/java/com/peanut/modules/book/entity/MedicaldesLight.java new file mode 100644 index 00000000..302c6073 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/entity/MedicaldesLight.java @@ -0,0 +1,36 @@ +package com.peanut.modules.book.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import java.io.Serializable; + +@Data +@TableName("medicaldes_light") +public class MedicaldesLight implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId + private Integer id; + + /** + * 名称 + */ + private String name; + + /** + * 文件地址 + */ + private String url; + + /** + * 类型1吴门之歌2巴山夜雨3吴门之徽 + */ + private Integer type; + + @TableLogic + private Integer delFlag; + + +} diff --git a/src/main/java/com/peanut/modules/book/service/MedicaldesBookService.java b/src/main/java/com/peanut/modules/book/service/MedicaldesBookService.java new file mode 100644 index 00000000..26c2236d --- /dev/null +++ b/src/main/java/com/peanut/modules/book/service/MedicaldesBookService.java @@ -0,0 +1,9 @@ +package com.peanut.modules.book.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.peanut.modules.book.entity.MedicaldesBook; +import org.springframework.stereotype.Service; + +@Service +public interface MedicaldesBookService extends IService { +} diff --git a/src/main/java/com/peanut/modules/book/service/MedicaldesInheritRelationService.java b/src/main/java/com/peanut/modules/book/service/MedicaldesInheritRelationService.java new file mode 100644 index 00000000..a5fa30c0 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/service/MedicaldesInheritRelationService.java @@ -0,0 +1,9 @@ +package com.peanut.modules.book.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.peanut.modules.book.entity.MedicaldesInheritRelation; +import org.springframework.stereotype.Service; + +@Service +public interface MedicaldesInheritRelationService extends IService { +} diff --git a/src/main/java/com/peanut/modules/book/service/MedicaldesInheritService.java b/src/main/java/com/peanut/modules/book/service/MedicaldesInheritService.java new file mode 100644 index 00000000..13e194b9 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/service/MedicaldesInheritService.java @@ -0,0 +1,9 @@ +package com.peanut.modules.book.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.peanut.modules.book.entity.MedicaldesInherit; +import org.springframework.stereotype.Service; + +@Service +public interface MedicaldesInheritService extends IService { +} diff --git a/src/main/java/com/peanut/modules/book/service/MedicaldesLightService.java b/src/main/java/com/peanut/modules/book/service/MedicaldesLightService.java new file mode 100644 index 00000000..27d43fd8 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/service/MedicaldesLightService.java @@ -0,0 +1,9 @@ +package com.peanut.modules.book.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.peanut.modules.book.entity.MedicaldesLight; +import org.springframework.stereotype.Service; + +@Service +public interface MedicaldesLightService extends IService { +} diff --git a/src/main/java/com/peanut/modules/book/service/impl/MedicaldesBookServiceImpl.java b/src/main/java/com/peanut/modules/book/service/impl/MedicaldesBookServiceImpl.java new file mode 100644 index 00000000..87d52627 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/service/impl/MedicaldesBookServiceImpl.java @@ -0,0 +1,11 @@ +package com.peanut.modules.book.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.peanut.modules.book.dao.MedicaldesBookDao; +import com.peanut.modules.book.entity.MedicaldesBook; +import com.peanut.modules.book.service.MedicaldesBookService; +import org.springframework.stereotype.Service; + +@Service +public class MedicaldesBookServiceImpl extends ServiceImpl implements MedicaldesBookService { +} diff --git a/src/main/java/com/peanut/modules/book/service/impl/MedicaldesInheritRelationServiceImpl.java b/src/main/java/com/peanut/modules/book/service/impl/MedicaldesInheritRelationServiceImpl.java new file mode 100644 index 00000000..74a5dce0 --- /dev/null +++ b/src/main/java/com/peanut/modules/book/service/impl/MedicaldesInheritRelationServiceImpl.java @@ -0,0 +1,11 @@ +package com.peanut.modules.book.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.peanut.modules.book.dao.MedicaldesInheritRelationDao; +import com.peanut.modules.book.entity.MedicaldesInheritRelation; +import com.peanut.modules.book.service.MedicaldesInheritRelationService; +import org.springframework.stereotype.Service; + +@Service +public class MedicaldesInheritRelationServiceImpl extends ServiceImpl implements MedicaldesInheritRelationService { +} diff --git a/src/main/java/com/peanut/modules/book/service/impl/MedicaldesInheritServiceImpl.java b/src/main/java/com/peanut/modules/book/service/impl/MedicaldesInheritServiceImpl.java new file mode 100644 index 00000000..0525d85e --- /dev/null +++ b/src/main/java/com/peanut/modules/book/service/impl/MedicaldesInheritServiceImpl.java @@ -0,0 +1,11 @@ +package com.peanut.modules.book.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.peanut.modules.book.dao.MedicaldesInheritDao; +import com.peanut.modules.book.entity.MedicaldesInherit; +import com.peanut.modules.book.service.MedicaldesInheritService; +import org.springframework.stereotype.Service; + +@Service +public class MedicaldesInheritServiceImpl extends ServiceImpl implements MedicaldesInheritService { +} diff --git a/src/main/java/com/peanut/modules/book/service/impl/MedicaldesLightServiceImpl.java b/src/main/java/com/peanut/modules/book/service/impl/MedicaldesLightServiceImpl.java new file mode 100644 index 00000000..59f65ecf --- /dev/null +++ b/src/main/java/com/peanut/modules/book/service/impl/MedicaldesLightServiceImpl.java @@ -0,0 +1,11 @@ +package com.peanut.modules.book.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.peanut.modules.book.dao.MedicaldesLightDao; +import com.peanut.modules.book.entity.MedicaldesLight; +import com.peanut.modules.book.service.MedicaldesLightService; +import org.springframework.stereotype.Service; + +@Service +public class MedicaldesLightServiceImpl extends ServiceImpl implements MedicaldesLightService { +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 6a542f65..ef47e47e 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -11,7 +11,7 @@ connection-timeout: 6000000ms spring: # 环境 dev|test|prod profiles: - active: test + active: dev # jackson时间格式化 jackson: time-zone: GMT+8