123 Commits

Author SHA1 Message Date
wuchunlei
e53b954769 修改图书标签方法 2024-03-21 18:05:22 +08:00
wangjinlei
6aa20d72b7 1 2024-03-21 18:02:26 +08:00
wangjinlei
f131faa58b 1 2024-03-21 18:00:21 +08:00
wangjinlei
4014812781 1 2024-03-21 17:46:43 +08:00
wangjinlei
7575a89e4b 1 2024-03-21 17:44:57 +08:00
wangjinlei
20c9e2249b 1 2024-03-21 16:45:29 +08:00
wangjinlei
0a8db2b2cc 1 2024-03-21 16:26:13 +08:00
wangjinlei
e92258dfe6 1 2024-03-21 10:43:40 +08:00
wangjinlei
ad4651da74 1 2024-03-21 10:27:27 +08:00
wangjinlei
2a00c09e0a 1 2024-03-21 10:04:15 +08:00
wangjinlei
229fd2513b 1 2024-03-21 09:45:39 +08:00
wangjinlei
eb1a5c5f9b Merge remote-tracking branch 'origin/master' into wumedical/v1
# Conflicts:
#	src/main/java/com/peanut/modules/common/dao/ShopProductBookLabelDao.java
#	src/main/java/com/peanut/modules/common/dao/ShopProductBookMarketDao.java
#	src/main/java/com/peanut/modules/common/dao/ShopProductToBookLabelDao.java
#	src/main/java/com/peanut/modules/common/dao/ShopProductToBookMarketDao.java
#	src/main/java/com/peanut/modules/common/dao/ShopStoreDao.java
#	src/main/java/com/peanut/modules/common/entity/ShopProductBookLabel.java
#	src/main/java/com/peanut/modules/common/entity/ShopProductBookMarket.java
#	src/main/java/com/peanut/modules/common/entity/ShopProductToBookLabel.java
#	src/main/java/com/peanut/modules/common/entity/ShopProductToBookMarket.java
#	src/main/java/com/peanut/modules/common/entity/ShopStore.java
2024-03-21 09:25:48 +08:00
wuchunlei
b68d7201d6 图书和营销标签、小店 2024-03-21 09:22:27 +08:00
wangjinlei
c536752f14 1 2024-03-19 14:15:11 +08:00
wangjinlei
66b9cb6a0b Merge remote-tracking branch 'origin/master' into wumedical/v1
# Conflicts:
#	src/main/java/com/peanut/modules/common/dao/ChineseMedicineResearchDao.java
#	src/main/java/com/peanut/modules/common/dao/GeneralArticleDao.java
#	src/main/java/com/peanut/modules/common/entity/ChineseMedicineResearch.java
#	src/main/java/com/peanut/modules/common/entity/GeneralArticle.java
2024-03-15 14:27:22 +08:00
wangjinlei
d099c05e90 1 2024-03-15 14:25:19 +08:00
wangjinlei
3cef570c97 1 2024-03-15 10:19:03 +08:00
wuchunlei
63fdd2759e 统一吴门医述里图文文章 2024-03-14 15:38:27 +08:00
wuchunlei
36bb3fc194 添加文件上传进度条 2024-03-14 10:58:13 +08:00
wuchunlei
c3ca9f32f9 Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2024-03-14 09:26:18 +08:00
wangjinlei
0c740d33a0 1 2024-03-13 18:07:33 +08:00
wuchunlei
5385745056 添加文件上传进度条 2024-03-13 17:18:15 +08:00
wuchunlei
ce9fbaa319 添加文件上传进度 2024-03-13 15:46:21 +08:00
wuchunlei
cf2fa5daf6 添加上传文件进度条 2024-03-13 14:44:35 +08:00
wuchunlei
e6d1250cf6 添加文件上传进度条 2024-03-13 14:33:24 +08:00
wuchunlei
fb1426398f 多项目登录token设置 2024-03-08 14:13:12 +08:00
wuchunlei
6526b4f3d3 多项目登录token统一 2024-03-08 10:12:48 +08:00
wuchunlei
81ab5d5b03 中医研究 2024-02-26 16:11:02 +08:00
wuchunlei
bae3ad563d 吴门医述-吴门纪实 2024-02-23 11:29:54 +08:00
wangjinlei
d4ea32c6d7 1 2024-02-06 16:26:55 +08:00
wangjinlei
9a6f2a0da1 1 2024-02-05 13:44:49 +08:00
wangjinlei
f2a015dc1a 书评bug 2024-02-02 18:05:11 +08:00
wangjinlei
a6c2a9fd84 书评bug 2024-02-02 11:12:18 +08:00
wuchunlei
413f63c67c 方药查询-药材列表修改 2024-01-31 14:44:25 +08:00
wangjinlei
8d3a6e11aa 后台修改用户电话或邮箱接口 2024-01-29 16:39:00 +08:00
wangjinlei
a885f2230f Merge remote-tracking branch 'origin/zcc' 2024-01-29 14:54:59 +08:00
wangjinlei
be8303fc2c 后台修改用户电话或邮箱接口 2024-01-29 14:52:59 +08:00
wuchunlei
e8a5bf08ad 吴门医述-学术传承-人员地址展示 2024-01-27 10:08:44 +08:00
wuchunlei
325dd75bfa 方药-药列表返回结果修改,增加排序点击量 2024-01-26 10:16:19 +08:00
wuchunlei
928a959998 吴门医述-专著出版-列表查询删除上下架条件 2024-01-25 13:55:32 +08:00
wuchunlei
25814e03ff 吴门医述-学术传承-人员地址展示 2024-01-25 13:11:15 +08:00
wuchunlei
506e8d6b84 吴门医述-学术传承-外国地址修改为数据字典取值 2024-01-22 17:53:01 +08:00
wuchunlei
3f46c1f562 药材表添加-功效 2024-01-22 13:44:25 +08:00
wuchunlei
89fd0725f7 吴门医述-传承人添加国外地址 2024-01-18 14:37:06 +08:00
wuchunlei
7fa201590c Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2024-01-18 14:11:40 +08:00
wangjinlei
5268a0646d 个人冲扣 2024-01-18 13:16:50 +08:00
wuchunlei
5331ed184f 吴门医述-学术传承-人员地址添加国外 2024-01-18 13:09:32 +08:00
wangjinlei
484946b2f5 后台超找用户时email关键字 2024-01-18 09:30:23 +08:00
wuchunlei
62e33a19fc 我的图书-修复已购图书显示所有 2024-01-17 16:56:37 +08:00
wuchunlei
b3bef83b95 方剂增加药
穴位增加脉络
2024-01-17 15:12:28 +08:00
wuchunlei
ca136ec6a6 吴门医述-专著出版-增加上下架限制 2024-01-17 15:09:43 +08:00
wuchunlei
d0866fbda9 Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2024-01-17 11:47:25 +08:00
wangjinlei
1682e0390b Merge remote-tracking branch 'origin/zcc' 2024-01-15 17:29:48 +08:00
wuchunlei
f7c6e426dd Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2024-01-15 17:21:09 +08:00
wuchunlei
ba6e58f954 图书分类可不选,添加图书分类时书只能是普通 2024-01-15 17:20:48 +08:00
wangjinlei
dd99620669 新手摸商品 2024-01-15 15:10:43 +08:00
wuchunlei
ff5ad58300 吴门医述增加排序 2024-01-15 14:14:05 +08:00
wangjinlei
fc3b9e5118 新手摸商品 2024-01-15 13:16:31 +08:00
wuchunlei
f0c464ab1a 图书管理章节拆分 2024-01-15 11:42:41 +08:00
wuchunlei
1313f78c4a 修改图书时,修改图书类型 2024-01-11 09:56:06 +08:00
wuchunlei
9745cbfefe 图书详细信息返回结果添加图书类型 2024-01-10 16:11:22 +08:00
wuchunlei
bab3941807 图书类型 增加全部选择项 2024-01-09 15:30:36 +08:00
wuchunlei
be33a443dc 图书类型 中医经典 中医基础 各家学说 中医临床 文学 哲学 2024-01-09 15:10:48 +08:00
wuchunlei
27e11c968e Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2024-01-08 09:36:14 +08:00
wangjinlei
c6102c966a Merge remote-tracking branch 'origin/zcc' 2024-01-05 17:07:06 +08:00
wuchunlei
2808e2d3c2 Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2024-01-05 15:03:02 +08:00
wangjinlei
573ae138c5 隐私协议 2024-01-05 14:21:02 +08:00
wangjinlei
39ac9cf4dd 隐私协议 2024-01-05 13:28:24 +08:00
wuchunlei
34882f7d41 Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2024-01-05 10:05:51 +08:00
wuchunlei
ab74b8fa21 传承列表返回添加类型 2024-01-05 09:47:57 +08:00
wangjinlei
a2f023451f 关联书 2024-01-04 13:41:00 +08:00
wangjinlei
812ee419ba 关联书 2024-01-04 10:32:34 +08:00
wuchunlei
e631a38674 游客接口 2024-01-03 16:58:16 +08:00
wuchunlei
ec10376492 游客访问接口类 2024-01-03 16:43:35 +08:00
wuchunlei
3c70438366 Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2024-01-03 16:26:00 +08:00
wuchunlei
8254514f8c 证书工具 2024-01-03 16:25:47 +08:00
wuchunlei
40f2f46da0 商品列表排序从时间换为sort 2024-01-02 16:55:06 +08:00
wangjinlei
62bc356219 Merge remote-tracking branch 'origin/zcc' 2024-01-02 16:45:00 +08:00
wuchunlei
eccc736079 Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2024-01-02 16:07:46 +08:00
wuchunlei
67c645fcd3 吴门医述 2024-01-02 16:07:17 +08:00
wuchunlei
892e29571b Merge remote-tracking branch 'origin/zcc' into zcc
# Conflicts:
#	src/main/java/com/peanut/modules/book/controller/MyUserController.java
2024-01-02 13:36:36 +08:00
wangjinlei
2cf70e4f6a bug 2023-12-29 17:52:48 +08:00
wangjinlei
43ce513550 bug 2023-12-29 15:59:41 +08:00
wangjinlei
889adeb00c bug 2023-12-29 15:43:28 +08:00
wangjinlei
f7659aa7bf bug 2023-12-29 11:54:49 +08:00
wangjinlei
aea90d41a0 Merge remote-tracking branch 'origin/zcc' 2023-12-29 11:19:14 +08:00
wuchunlei
acf3f7522a Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2023-12-29 10:28:28 +08:00
wuchunlei
078c001198 查询商品列表是增加库存大于0限制 2023-12-28 17:25:07 +08:00
wangjinlei
79efe0b151 bug 2023-12-27 16:52:20 +08:00
wangjinlei
f1fb1938ef bug 2023-12-27 16:51:12 +08:00
wuchunlei
cdb6cb79be 修改邮件端口 2023-12-26 14:51:21 +08:00
wuchunlei
e85ad408a6 设置密码添加邮箱 2023-12-26 11:18:11 +08:00
wuchunlei
6c6887c629 登录注册添加邮箱方式 2023-12-26 10:56:58 +08:00
wuchunlei
f9d95718cd 邮箱验证码 2023-12-25 15:37:24 +08:00
wuchunlei
b19d04f09d 收货信息不能有+& 2023-12-25 10:41:45 +08:00
wuchunlei
a2a3904347 微信死信队列更改订单状态 2023-12-25 09:52:20 +08:00
wuchunlei
16039baadd 推荐列表去除中医经典和医学经典 2023-12-21 16:16:18 +08:00
wuchunlei
3e3b3755f9 中医经典加国学经典 2023-12-21 15:39:32 +08:00
wuchunlei
2f6013bbcf 讲书增加视频 2023-12-21 11:36:36 +08:00
wangjinlei
1bde058be9 肿瘤古方 权限 2023-12-20 14:39:34 +08:00
wangjinlei
c93679804b Merge remote-tracking branch 'origin/zcc' 2023-12-20 09:48:22 +08:00
wangjinlei
ef1f48cf9a prescript 2023-12-20 09:47:28 +08:00
wuchunlei
fafa2ecc73 中医经典 2023-12-20 09:46:26 +08:00
wuchunlei
229ce39c5e 微信支付宝退款 2023-12-19 17:04:05 +08:00
wangjinlei
032cfc9266 Merge remote-tracking branch 'origin/zcc' 2023-12-19 16:24:15 +08:00
wangjinlei
d12949549d prescript 2023-12-19 16:23:18 +08:00
wangjinlei
42cbc1155e prescript 2023-12-15 17:46:57 +08:00
wangjinlei
8d88be960e prescript 2023-12-15 15:39:57 +08:00
wangjinlei
065cce514f prescript 2023-12-15 11:23:58 +08:00
wangjinlei
b527976180 prescript 2023-12-14 17:11:46 +08:00
wangjinlei
a3b3c1f5f6 prescript 2023-12-14 15:22:10 +08:00
wangjinlei
af081f6e81 prescript 2023-12-14 14:52:49 +08:00
wangjinlei
6a42c41ec2 prescript 2023-12-14 13:23:18 +08:00
wangjinlei
508a260a5a prescript 2023-12-14 11:47:47 +08:00
wangjinlei
3219a332e6 Merge remote-tracking branch 'origin/wjl/ban1' 2023-12-14 10:00:29 +08:00
wangjinlei
ecaaf81dcf bug 2023-12-13 13:19:22 +08:00
wangjinlei
fa036179b1 bug 2023-12-12 15:31:23 +08:00
wuchunlei
9423e99e20 支付宝退款 2023-12-12 14:05:50 +08:00
wuchunlei
047065b828 Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2023-12-12 14:02:35 +08:00
wangjinlei
c3453e3aa5 bug 2023-12-12 11:29:01 +08:00
wuchunlei
a88a12fd76 修改订单列表总数 2023-12-08 16:19:25 +08:00
wuchunlei
97028bb4ee Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc 2023-12-08 15:21:56 +08:00
wuchunlei
1ff200ba2a 订单详情 2023-12-08 11:09:51 +08:00
477 changed files with 5546 additions and 1182 deletions

View File

@@ -92,7 +92,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>cn.songxinqiang</groupId>
<artifactId>com.baidu.ueditor</artifactId>

View File

@@ -0,0 +1,163 @@
package com.peanut.common.utils;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.Date;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class CertificateUtil extends Thread{
String inputSrc;
String outputSrc;
String no;
String name;
String time;
String des;
String trans;
String trans2;
String trans3;
String endy;
String endm;
String endd;
public CertificateUtil(String inputSrc,String outputSrc,String no,String name,String time,
String des,String trans,String trans2,String trans3,String endy,String endm,String endd){
this.inputSrc=inputSrc;
this.outputSrc = outputSrc;
this.no = no;
this.name = name;
this.time = time;
this.des = des;
this.trans = trans;
this.trans2 = trans2;
this.trans3 = trans3;
this.endy = endy;
this.endm = endm;
this.endd = endd;
}
@Override
public void run() {
// System.out.println(name+"-开始!");
try {
Image src = ImageIO.read(new File(inputSrc));
// 获取图片的高和宽
int wideth = src.getWidth(null);
int height = src.getHeight(null);
// 新增一个图片缓冲
BufferedImage image = new BufferedImage(wideth, height, BufferedImage.TYPE_INT_RGB);
Graphics2D g = image.createGraphics();
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.drawImage(src, 0, 0, wideth, height, null);
// 设置字体颜色颜色也可以直接new定义rgba例如new Color(17, 16, 44)
g.setColor(new Color(51,82,132));
// size字体大小Font.BOLD字体加粗
g.setFont(new Font("Arial", Font.BOLD, 80));
FontMetrics metrics = g.getFontMetrics();
int nox = (wideth - metrics.stringWidth(no))/2;
int noy = 1405 - metrics.getHeight();//1305
g.drawString(no, nox, noy);
// 设置字体颜色颜色也可以直接new定义rgba例如new Color(17, 16, 44)
g.setColor(Color.BLACK);
// size字体大小Font.BOLD字体加粗
g.setFont(new Font("宋体", Font.BOLD, 150));
FontMetrics metricss = g.getFontMetrics();
int namex = (wideth - metricss.stringWidth(name))/2;
int namey = 2055 - metricss.getHeight();//1935
g.drawString(name, namex, namey);
g.setFont(new Font("宋体", Font.BOLD, 115));
FontMetrics times = g.getFontMetrics();
int timex = (wideth - times.stringWidth(time))/2;
int timey = 2370 - times.getHeight();//2270
g.drawString(time, timex, timey);
FontMetrics dess = g.getFontMetrics();
int desx = (wideth - dess.stringWidth(des))/2;
int desy = 2635 - dess.getHeight();//2535
g.drawString(des, desx, desy);
g.setFont(new Font("Arial", Font.BOLD, 75));
FontMetrics transs = g.getFontMetrics();
int transx = (wideth - transs.stringWidth(trans))/2;
int transy = 2735 - transs.getHeight();//2685
g.drawString(trans, transx, transy);
FontMetrics trans2s = g.getFontMetrics();
int trans2x = (wideth - trans2s.stringWidth(trans2))/2;
g.drawString(trans2, trans2x, transy+120);
FontMetrics trans3s = g.getFontMetrics();
int trans3x = (wideth - trans3s.stringWidth(trans3))/2;
g.drawString(trans3, trans3x, transy+240);
g.setFont(new Font("宋体", Font.BOLD, 80));
g.drawString(endy,1800,3440);
g.drawString(endm,2090,3440);
g.drawString(endd,2250,3440);
// 释放资源
g.dispose();
String filename = UUID.randomUUID().toString() + System.currentTimeMillis();
File outputfile = new File(outputSrc+ filename +".jpg");
ImageIO.write(image, "jpg", outputfile);
System.out.println(no +","+ name +","+ filename);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public static void main(String[] args) throws Exception{
String nameflie = "F:\\aimg\\name.txt"; //人名,一列
String inputSrc = "F:\\aimg\\c.png"; //图片模板
String outputSrc = "F:\\aimg\\形质病\\"; //生成地址
String no = "No.XZB202401";
int nostart = 0;
String time = "于2024年1月4日至5日";
String des = "圆满完成中医形质病学培训班";
String trans = "Successful completion of the";
String trans2 = "Training course on TCM somatology";
String trans3 = "on 2024.01.04-05";
//Traditional Chinese Medicine Morphology and Disease Training Course
String endy = "2024";
String endm = "1";
String endd = "6";
// 1、创建服务创建线程池
ExecutorService service = Executors.newFixedThreadPool(30);
try (BufferedReader br = new BufferedReader(new FileReader(nameflie))) {
String line;
while ((line = br.readLine()) != null) {
// 对每一行进行处理
nostart++;
CertificateUtil c1 = new CertificateUtil(inputSrc,outputSrc,no+String.format("%03d",nostart),line,
time,des,trans,trans2,trans3,endy,endm,endd);
service.execute(c1);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,57 @@
package com.peanut.common.utils;
import com.sun.mail.util.MailSSLSocketFactory;
import javax.mail.Authenticator;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import java.util.Properties;
public class MailUtil {
private final static String mailName = "fengzidushu@163.com";
private final static String mailToken = "GJIPUCQLQYTMDMPH";
public static R sendMail(String title,String content,String receiveAddress){
try {
//smtp服务器
Properties pros=new Properties();
pros.put("mail.smtp.host", "smtp.163.com");//主机名
pros.put("mail.smtp.port", "465");//主机端口号
pros.put("mail.smtp.auth", "true");//是否需要用户认证
pros.put("mail.smtp.starttls.enable", "true");//启用TLS加密
// SSL加密
MailSSLSocketFactory sf = null;
sf = new MailSSLSocketFactory();
// 设置信任所有的主机 - 解决Linux无法发送邮箱的问题
sf.setTrustAllHosts(true);
pros.put("mail.smtp.ssl.enable", "true");
pros.put("mail.smtp.ssl.socketFactory", sf);
//创建会话
Session session=Session.getInstance(pros,new Authenticator(){
@Override
protected javax.mail.PasswordAuthentication getPasswordAuthentication(){
return new javax.mail.PasswordAuthentication(mailName, mailToken);
}
});
//设置debug模式便于调试
session.setDebug(true);
MimeMessage message=new MimeMessage(session);
//邮件标题
message.setSubject(title);
//邮件内容(文本)
message.setText(content,"utf-8");
//设置发送方地址
message.setFrom(new InternetAddress(mailName));
//设置收件方地址
message.setRecipient(MimeMessage.RecipientType.TO,new InternetAddress(receiveAddress));
//发送
Transport.send(message);
return R.ok();
}catch (Exception e) {
return R.error(e.getMessage());
}
}
}

View File

@@ -75,6 +75,19 @@ public class R extends HashMap<String, Object> {
return r;
}
public static R code(int code){
R r = new R();
r.put("code",code);
return r;
}
public static R code(int code,String msg){
R r = new R();
r.put("code",code);
r.put("msg",msg);
return r;
}
public static R ok(String msg) {
R r = new R();
r.put("msg", msg);

View File

@@ -3,9 +3,9 @@ package com.peanut.common.utils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.peanut.modules.book.entity.City;
import com.peanut.modules.book.entity.County;
import com.peanut.modules.book.entity.Province;
import com.peanut.modules.common.entity.City;
import com.peanut.modules.common.entity.County;
import com.peanut.modules.common.entity.Province;
import org.apache.commons.io.FileUtils;
import java.io.File;

View File

@@ -9,7 +9,7 @@
package com.peanut.common.utils;
import com.peanut.common.exception.RRException;
import com.peanut.modules.book.entity.MyUserEntity;
import com.peanut.modules.common.entity.MyUserEntity;
import com.peanut.modules.sys.entity.SysUserEntity;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;

View File

@@ -58,6 +58,7 @@ public class ShiroConfig {
filterMap.put("book/task/list","anon"); // 网站接口
filterMap.put("/pay/aliPay/notify","anon"); // 支付宝回调接口
filterMap.put("/pay/payNotify","anon"); // 微信回调接口
filterMap.put("/pay/refundNotify","anon"); // 微信退款回调接口
filterMap.put("/weChat/**","anon");
filterMap.put("/book/baseArea/getAllBaseArea","anon");//登录前获取全部区域
// filterMap.put("/book/bookchaptercontent/**","anon");
@@ -68,10 +69,13 @@ public class ShiroConfig {
filterMap.put("/sys/login", "anon");
filterMap.put("/swagger/**", "anon");
filterMap.put("/v2/api-docs", "anon");
filterMap.put("/sys/agreement/getPrivacyDetail","anon");
filterMap.put("/sys/agreement/getUserDetail","anon");
filterMap.put("/swagger-ui.html", "anon");
filterMap.put("/swagger-resources/**", "anon");
filterMap.put("/captcha.jpg", "anon");
filterMap.put("/aaa.txt", "anon");
filterMap.put("/visitor/**","anon");//游客访问接口
filterMap.put("/**", "oauth2");
filterMap.put("/cent/**","anon");

View File

@@ -12,7 +12,7 @@ package com.peanut.modules.app.controller;
import com.peanut.common.utils.R;
import com.peanut.modules.app.annotation.Login;
import com.peanut.modules.app.annotation.LoginUser;
import com.peanut.modules.book.entity.MyUserEntity;
import com.peanut.modules.common.entity.MyUserEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -10,7 +10,7 @@ package com.peanut.modules.app.resolver;
import com.peanut.modules.app.annotation.LoginUser;
import com.peanut.modules.app.interceptor.AuthorizationInterceptor;
import com.peanut.modules.book.entity.MyUserEntity;
import com.peanut.modules.common.entity.MyUserEntity;
import com.peanut.modules.book.service.MyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.MethodParameter;

View File

@@ -2,8 +2,8 @@ package com.peanut.modules.book.controller;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.*;
import com.peanut.modules.book.service.*;
import com.peanut.modules.common.entity.ActivityEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

View File

@@ -5,7 +5,6 @@ import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.modules.book.service.BookService;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -13,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.AuthorEntity;
import com.peanut.modules.common.entity.AuthorEntity;
import com.peanut.modules.book.service.AuthorService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BaseAreaEntity;
import com.peanut.modules.common.entity.BaseAreaEntity;
import com.peanut.modules.book.service.BaseAreaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -4,10 +4,9 @@ import java.util.Arrays;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.modules.book.entity.BookShelfEntity;
import com.peanut.modules.common.entity.BookShelfEntity;
import com.peanut.modules.book.service.BookShelfService;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -15,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.BookBrowseRecordsEntity;
import com.peanut.modules.common.entity.BookBrowseRecordsEntity;
import com.peanut.modules.book.service.BookBrowseRecordsService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.BookBuyConfigEntity;
import com.peanut.modules.common.entity.BookBuyConfigEntity;
import com.peanut.modules.book.service.BookBuyConfigService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -5,13 +5,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.*;
import com.peanut.modules.book.service.BookCategoryService;
import com.peanut.modules.common.entity.BookCategoryEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

View File

@@ -10,8 +10,8 @@ import com.alibaba.druid.util.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.BaiduVoicesUtils;
import com.peanut.modules.book.entity.*;
import com.peanut.modules.book.service.*;
import com.peanut.modules.common.entity.*;
import com.peanut.modules.oss.service.OssService;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
@@ -345,7 +345,7 @@ public class BookChapterContentController {
UserEbookBuyEntity userEbookBuyEntity = userEbookBuyService.getBaseMapper().selectOne(new LambdaQueryWrapper<UserEbookBuyEntity>().
eq(UserEbookBuyEntity::getUserId, userId).eq(UserEbookBuyEntity::getBookId, bookId));
if (chapter_info.getNumber() > book_info.getFreeChapterCount() && userEbookBuyEntity == null) {
if (book_info.getBookType()==0&&chapter_info.getNumber() > book_info.getFreeChapterCount() && userEbookBuyEntity == null) {
Integer productByBookId = shopProductBookService.getProductByBookId(bookId);
return R.ok().put("jq", false).put("product", productByBookId);
}

View File

@@ -1,12 +1,10 @@
package com.peanut.modules.book.controller;
import java.io.IOException;
import java.text.Collator;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -14,11 +12,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.BookChapterEntity;
import com.peanut.modules.common.entity.BookChapterEntity;
import com.peanut.modules.book.service.BookChapterService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import org.springframework.web.multipart.MultipartFile;
/**

View File

@@ -5,11 +5,10 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BookClockEntryEntity;
import com.peanut.modules.book.entity.BookClockEntryChat;
import com.peanut.modules.book.entity.MyUserEntity;
import com.peanut.modules.common.entity.BookClockEntryEntity;
import com.peanut.modules.common.entity.BookClockEntryChat;
import com.peanut.modules.common.entity.MyUserEntity;
import com.peanut.modules.book.service.BookClockEntryChatService;
import com.peanut.modules.book.service.BookClockEntryService;
import com.peanut.modules.book.service.MyUserService;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BookEntity;
import com.peanut.modules.common.entity.BookEntity;
import com.peanut.modules.book.service.BookService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -6,13 +6,18 @@ import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.Query;
import com.peanut.common.utils.ReadProvinceUtil;
import com.peanut.modules.book.dao.BookDao;
import com.peanut.modules.book.entity.*;
import com.peanut.modules.common.dao.BookDao;
import com.peanut.modules.common.dao.BookForumArticlesDao;
import com.peanut.modules.book.service.*;
import com.peanut.modules.book.vo.BookIndexVo;
import com.peanut.modules.common.entity.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;
@@ -61,6 +66,10 @@ public class BookController {
private ShopProductBookService shopProductBookService;
@Autowired
private ShopProductToLabelService shopProductToLabelService;
@Autowired
private MedicaldesBookService medicaldesBookService;
@Autowired
private BookForumArticlesDao bookForumArticlesDao;
final ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10);
/**
@@ -108,7 +117,21 @@ public class BookController {
// @RequiresPermissions("book:book:info")
public R info(@PathVariable("id") Integer id) {
BookEntity book = bookService.getById(id);
//返回结果添加图书类型
LambdaQueryWrapper<MedicaldesBook> wrapper = new LambdaQueryWrapper();
wrapper.eq(MedicaldesBook::getBookId,id);
List<MedicaldesBook> list = medicaldesBookService.list(wrapper);
if (list.size() > 0) {
String type = "";
for (MedicaldesBook mb : list) {
if (StringUtils.isEmpty(type)){
type += mb.getTypeId();
}else {
type += "," + mb.getTypeId();
}
}
book.setMedicaldesBookType(type);
}
return R.ok().put("book", book);
}
@@ -141,26 +164,14 @@ public class BookController {
// @RequiresPermissions("book:book:info")
public R appinfo(@PathVariable("id") Integer id,
@PathVariable("userId") Integer userId) {
BookEntity book = bookService.getById(id);
book.setIsBuy(true);
boolean b = myUserService.bookAuthen(id, userId);
if (!b) {
// 无权限
book.setIsBuy(false);
}
//书籍详情返回,购买状态,免费章节数
String authorName = "";
String publisherName = "";
String authorId = book.getAuthorId();
@@ -233,7 +244,18 @@ public class BookController {
public R save(@RequestBody BookEntity book) {
bookService.save(book);
//添加图书类型关系表
if (StringUtils.isNotEmpty(book.getMedicaldesBookType())){
String[] types = book.getMedicaldesBookType().split(",");
if (types.length > 0) {
for (int i = 0; i < types.length; i++) {
MedicaldesBook medicaldesBook = new MedicaldesBook();
medicaldesBook.setBookId(book.getId());
medicaldesBook.setTypeId(Integer.parseInt(types[i]));
medicaldesBookService.save(medicaldesBook);
}
}
}
return R.ok();
}
@@ -252,6 +274,7 @@ public class BookController {
// Integer start = (page-1)*limit;
QueryWrapper<BookEntity> wrapper = new QueryWrapper<>();
wrapper.eq("can_listen",1);
wrapper.eq("book_type",0);
if(bids.size()>0){
wrapper.notIn("id",bids);
}
@@ -271,18 +294,47 @@ public class BookController {
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody BookEntity book) {
bookService.updateById(book);
//修改图书类型关系表
//先删除
LambdaQueryWrapper<MedicaldesBook> wrapper = new LambdaQueryWrapper();
wrapper.eq(MedicaldesBook::getBookId,book.getId());
List<MedicaldesBook> list = medicaldesBookService.list(wrapper);
if (list.size() > 0) {
for (MedicaldesBook b : list) {
medicaldesBookService.removeById(b.getId());
}
}
//再添加
if (StringUtils.isNotEmpty(book.getMedicaldesBookType())){
String[] types = book.getMedicaldesBookType().split(",");
if (types.length > 0) {
for (int i = 0; i < types.length; i++) {
MedicaldesBook medicaldesBook = new MedicaldesBook();
medicaldesBook.setBookId(book.getId());
medicaldesBook.setTypeId(Integer.parseInt(types[i]));
medicaldesBookService.save(medicaldesBook);
}
}
}
return R.ok();
}
/**
* 获取全部古籍书
* @return
*/
@RequestMapping("/getAncientBooks")
public R getAncientBooks(){
List<BookEntity> ancientBooks = bookService.getAncientBooks();
return R.ok().put("books",ancientBooks);
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids) {
bookService.removeByIds(Arrays.asList(ids));
@@ -318,7 +370,7 @@ public class BookController {
/**
* 章节拆分 2.0
*/
@RequestMapping("/getWord")
@RequestMapping("/getWord")
public R getWord(@RequestParam("id") Integer id) {
ExecutorService singleThreadExecutor = Executors.newSingleThreadExecutor();
@@ -648,7 +700,7 @@ public class BookController {
bookIndexVo.setBookid(book.getId());
bookIndexVo.setImage(book.getImages());
bookIndexVo.setIntroduce(book.getDescription());
bookIndexVo.setPublisherName(publisherName);
bookIndexVo.setPublisherName(publisherName);
bookIndexVo.setIsVip(book.getIsVip());
bookIndexVo.setPrice(book.getPrice());
bookIndexVo.setSalePrice(book.getSalePrice());
@@ -679,18 +731,29 @@ public class BookController {
* @return
*/
@RequestMapping("/getMyBooks")
public R getMyBooks(@RequestParam Integer userId,@RequestParam Integer limit,@RequestParam Integer page){
public R getMyBooks(Integer userId,Integer limit,Integer page,Integer type){
LambdaQueryWrapper<UserEbookBuyEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(UserEbookBuyEntity::getUserId,userId);
wrapper.groupBy(UserEbookBuyEntity::getBookId);
List<Integer> bookIds = userEbookBuyService.getBaseMapper().selectList(wrapper).stream().map(UserEbookBuyEntity::getBookId).collect(Collectors.toList());
LambdaQueryWrapper<BookEntity> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(BookEntity::getDelFlag,0);
Page<BookEntity> bookEntityPage = null;
if(bookIds.size()>0){
MPJLambdaWrapper<BookEntity> wrapper1 = new MPJLambdaWrapper<>();
wrapper1.eq(BookEntity::getDelFlag,0);
wrapper1.in(BookEntity::getId,bookIds);
if (type!=null){
wrapper1.selectAll(BookEntity.class);
wrapper1.leftJoin(MedicaldesBook.class,MedicaldesBook::getBookId,BookEntity::getId);
wrapper1.eq(MedicaldesBook::getTypeId,type);
}
bookEntityPage = bookService.getBaseMapper().selectPage(new Page<>(page, limit), wrapper1);
}
for (BookEntity b:bookEntityPage.getRecords()){
LambdaQueryWrapper<BookForumArticlesEntity> bookForumArticlesEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
bookForumArticlesEntityLambdaQueryWrapper.eq(BookForumArticlesEntity::getBookid,b.getId());
Integer integer = bookForumArticlesDao.selectCount(bookForumArticlesEntityLambdaQueryWrapper);
b.setForumNum(integer);
}
Page<BookEntity> bookEntityPage = bookService.getBaseMapper().selectPage(new Page<>(page, limit), wrapper1);
return R.ok().put("page",bookEntityPage);
}
@@ -712,6 +775,7 @@ public class BookController {
LambdaQueryWrapper<BookEntity> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(BookEntity::getDelFlag,0);
wrapper1.eq(BookEntity::getState,1);
wrapper1.eq(BookEntity::getBookType,0);
if(bookIds.size()>0){
wrapper1.notIn(BookEntity::getId,bookIds);
}
@@ -787,6 +851,16 @@ public class BookController {
return null;
}
//中医经典列表
@RequestMapping("/getClassicsBookList")
public R getClassicsBookList(@RequestBody Map<String,Object> params) {
LambdaQueryWrapper<BookEntity> wrapper = new LambdaQueryWrapper();
wrapper.eq(BookEntity::getBookType,params.get("bookType"));
IPage<BookEntity> page = bookService.page(
new Query<BookEntity>().getPage(params),wrapper);
return R.ok().put("page", page);
}

View File

@@ -6,10 +6,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.dao.BookForumArticlesDao;
import com.peanut.modules.book.entity.*;
import com.peanut.modules.common.dao.BookForumArticlesDao;
import com.peanut.modules.book.service.*;
import com.peanut.modules.book.vo.BookForumArticlesVO;
import com.peanut.modules.common.entity.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -165,7 +165,7 @@ public class BookForumArticlesServiceController {
@RequestMapping("/getHasForumsAndBook")
public R getHasForumsAndBook(@RequestParam Integer userId,@RequestParam Integer limit,@RequestParam Integer page){
String ex_sql = "select 1 from user_ebook_buy where book.id = book_id and user_id = "+userId;
String existSql = "select 1 from book_forum_articles where book.id = bookid";
String existSql = "select 1 from book_forum_articles where del_flag=0 and book.id = bookid";
LambdaQueryWrapper<BookEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BookEntity::getDelFlag,0);

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.controller;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BookForumCommentEntity;
import com.peanut.modules.common.entity.BookForumCommentEntity;
import com.peanut.modules.book.service.BookForumArticlesService;
import com.peanut.modules.book.service.BookForumCommenService;
import lombok.extern.slf4j.Slf4j;

View File

@@ -0,0 +1,223 @@
package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.common.entity.*;
import com.peanut.modules.book.service.*;
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.util.List;
import java.util.Map;
/**
* 商品书和营销标签
*/
@Slf4j
@RestController
@RequestMapping("book/labelAndMarket")
public class BookLabelAndMarketController {
@Autowired
private ShopProductBookLabelService labelService;
@Autowired
private ShopProductBookMarketService marketService;
@Autowired
private ShopProductToBookLabelService toLabelService;
@Autowired
private ShopProductToBookMarketService toMarketService;
@Autowired
private ShopProductService productService;
/**
* 图书标签树
*/
@RequestMapping(path = "/labelTree")
public R labelTree() {
List<ShopProductBookLabel> labelsTree = labelService.labelTree();
return R.ok().put("result", labelsTree);
}
/**
* 获取图书标签列表
*/
@RequestMapping(path = "/getLabelListByPid")
public R getLabelListByPid(String pid) {
LambdaQueryWrapper<ShopProductBookLabel> wrapper = new LambdaQueryWrapper();
wrapper.eq(ShopProductBookLabel::getPid,pid);
wrapper.orderByAsc(ShopProductBookLabel::getSort);
wrapper.orderByAsc(ShopProductBookLabel::getCreateTime);
List<ShopProductBookLabel> labelTopList = labelService.list(wrapper);
return R.ok().put("result", labelTopList);
}
/**
* 图书营销标签树
*/
@RequestMapping(path = "/marketTree")
public R marketTree() {
List<ShopProductBookMarket> marketsTree = marketService.marketTree();
return R.ok().put("result", marketsTree);
}
/**
* 获取图书营销标签列表
*/
@RequestMapping(path = "/getMakertListByPid")
public R getMakertListByPid(String pid) {
LambdaQueryWrapper<ShopProductBookMarket> wrapper = new LambdaQueryWrapper();
wrapper.eq(ShopProductBookMarket::getPid,pid);
wrapper.orderByAsc(ShopProductBookMarket::getSort);
wrapper.orderByAsc(ShopProductBookMarket::getCreateTime);
List<ShopProductBookMarket> marketTopList = marketService.list(wrapper);
return R.ok().put("result", marketTopList);
}
@RequestMapping(path = "/getLabelById")
public R getLabelById(String id) {
return R.ok().put("result",labelService.getById(id));
}
@RequestMapping(path = "/saveOrUpdateLabel")
public R saveOrUpdateLabel(@RequestBody ShopProductBookLabel label) {
labelService.saveOrUpdate(label);
return R.ok().put("result",label);
}
@RequestMapping(path = "/delLabel")
public R delLabel(String id) {
labelService.removeById(id);
return R.ok();
}
@RequestMapping(path = "/getMarketById")
public R getMarketById(String id) {
return R.ok().put("result",marketService.getById(id));
}
@RequestMapping(path = "/saveOrUpdateMarket")
public R saveOrUpdateMarket(@RequestBody ShopProductBookMarket market) {
marketService.saveOrUpdate(market);
return R.ok().put("result",market);
}
@RequestMapping(path = "/delMarket")
public R delMarket(String id) {
marketService.removeById(id);
return R.ok();
}
/**
* 获取书标签列表
*/
@RequestMapping("/getToLabelList")
public R getToLabelList(@RequestBody Map params){
MPJLambdaWrapper<ShopProductToBookLabel> wrapper = new MPJLambdaWrapper();
wrapper.selectAll(ShopProductToBookLabel.class);
wrapper.leftJoin(ShopProduct.class,ShopProduct::getProductId,ShopProductToBookLabel::getProductId);
if (params.containsKey("productName")&&!"".equals(params.get("productName").toString())){
wrapper.like(ShopProduct::getProductName,params.get("productName").toString());
}
if (params.containsKey("productId")&&!"".equals(params.get("productId").toString())){
wrapper.eq(ShopProductToBookLabel::getProductId,params.get("productId").toString());
}
if (params.containsKey("bookLabelId")&&!"".equals(params.get("bookLabelId").toString())){
wrapper.eq(ShopProductToBookLabel::getBookLabelId,params.get("bookLabelId").toString());
}
Page<ShopProductToBookLabel> page = toLabelService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
List<ShopProductToBookLabel> res = page.getRecords();
if (res.size() > 0) {
for (ShopProductToBookLabel item : res) {
item.setProduct(productService.getById(item.getProductId()));
item.setLabel(labelService.getById(item.getBookLabelId()));
}
}
page.setRecords(res);
return R.ok().put("result", page);
}
/**
* 获取营销标签列表
*/
@RequestMapping("/getToMarketList")
public R getToMarketList(@RequestBody Map params){
MPJLambdaWrapper<ShopProductToBookMarket> wrapper = new MPJLambdaWrapper();
wrapper.selectAll(ShopProductToBookMarket.class);
wrapper.leftJoin(ShopProduct.class,ShopProduct::getProductId,ShopProductToBookMarket::getProductId);
if (params.containsKey("productName")&&!"".equals(params.get("productName").toString())){
wrapper.like(ShopProduct::getProductName,params.get("productName").toString());
}
if (params.containsKey("productId")&&!"".equals(params.get("productId").toString())){
wrapper.eq(ShopProductToBookMarket::getProductId,params.get("productId").toString());
}
if (params.containsKey("bookMarketId")&&!"".equals(params.get("bookMarketId").toString())){
wrapper.eq(ShopProductToBookMarket::getBookMarketId,params.get("bookMarketId").toString());
}
Page<ShopProductToBookMarket> page = toMarketService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
List<ShopProductToBookMarket> res = page.getRecords();
if (res.size() > 0) {
for (ShopProductToBookMarket item : res) {
item.setProduct(productService.getById(item.getProductId()));
item.setMarket(marketService.getById(item.getBookMarketId()));
}
}
page.setRecords(res);
return R.ok().put("result", page);
}
@RequestMapping(path = "/saveToLabel")
public R saveToLabel(@RequestBody Map params) {
LambdaQueryWrapper<ShopProductToBookLabel> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ShopProductToBookLabel::getBookLabelId,params.get("bookLabelId").toString());
toLabelService.remove(wrapper);
if (!StringUtils.isEmpty(params.get("productId").toString())){
String[] ids = params.get("productId").toString().split(",");
if (ids.length > 0) {
for (String id : ids) {
ShopProductToBookLabel toLabel = new ShopProductToBookLabel();
toLabel.setBookLabelId(Integer.parseInt(params.get("bookLabelId").toString()));
toLabel.setProductId(Integer.parseInt(id));
toLabelService.save(toLabel);
}
}
}
return R.ok();
}
@RequestMapping(path = "/saveToMarket")
public R saveToMarket(@RequestBody Map params) {
LambdaQueryWrapper<ShopProductToBookMarket> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ShopProductToBookMarket::getBookMarketId,params.get("bookMarketId").toString());
toMarketService.remove(wrapper);
if (!StringUtils.isEmpty(params.get("productId").toString())){
String[] ids = params.get("productId").toString().split(",");
if (ids.length > 0) {
for (String id : ids) {
ShopProductToBookMarket toMarket = new ShopProductToBookMarket();
toMarket.setBookMarketId(Integer.parseInt(params.get("bookLabelId").toString()));
toMarket.setProductId(Integer.parseInt(id));
toMarketService.save(toMarket);
}
}
}
return R.ok();
}
}

View File

@@ -3,7 +3,7 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BookListeningEntity;
import com.peanut.modules.common.entity.BookListeningEntity;
import com.peanut.modules.book.service.BookListeningService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -1,24 +1,15 @@
package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BookBrowseRecordsEntity;
import com.peanut.modules.book.entity.BookListeningEntity;
import com.peanut.modules.book.entity.BookListeningShelfEntity;
import com.peanut.modules.book.entity.BookShelfEntity;
import com.peanut.modules.common.entity.BookListeningShelfEntity;
import com.peanut.modules.book.service.BookBrowseRecordsService;
import com.peanut.modules.book.service.BookListeningService;
import com.peanut.modules.book.service.BookListeningShelfService;
import com.peanut.modules.book.service.BookShelfService;
import com.peanut.modules.book.vo.BookShelfVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Slf4j

View File

@@ -5,9 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.Query;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BookEntity;
import com.peanut.modules.book.entity.BookMedicalRecordsEntity;
import com.peanut.modules.book.entity.UserEbookBuyEntity;
import com.peanut.modules.common.entity.BookEntity;
import com.peanut.modules.common.entity.BookMedicalRecordsEntity;
import com.peanut.modules.common.entity.UserEbookBuyEntity;
import com.peanut.modules.book.service.BookMedicalRecordsService;
import com.peanut.modules.book.service.BookService;
import lombok.extern.slf4j.Slf4j;

View File

@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.BookReadRateEntity;
import com.peanut.modules.common.entity.BookReadRateEntity;
import com.peanut.modules.book.service.BookReadRateService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -5,11 +5,10 @@ import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.modules.book.entity.BookBrowseRecordsEntity;
import com.peanut.modules.common.entity.BookBrowseRecordsEntity;
import com.peanut.modules.book.service.BookBrowseRecordsService;
import com.peanut.modules.book.vo.BookShelfVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -17,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.BookShelfEntity;
import com.peanut.modules.common.entity.BookShelfEntity;
import com.peanut.modules.book.service.BookShelfService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -3,8 +3,8 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BookEntity;
import com.peanut.modules.book.entity.BookTeachEntity;
import com.peanut.modules.common.entity.BookEntity;
import com.peanut.modules.common.entity.BookTeachEntity;
import com.peanut.modules.book.service.BookService;
import com.peanut.modules.book.service.BookTeachService;
import com.peanut.modules.book.service.ShopProductBookService;
@@ -96,6 +96,7 @@ public class BookTeachController {
LambdaQueryWrapper<BookEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BookEntity::getTeachIn,1);
wrapper.eq(BookEntity::getDelFlag,0);
wrapper.eq(BookEntity::getBookType,0);
wrapper.notExists(exist_sql);
Page<BookEntity> bookEntityPage = bookService.getBaseMapper().selectPage(new Page<>(pageIdDto.getPage(), pageIdDto.getLimit()), wrapper);
return R.ok().put("page",bookEntityPage);

View File

@@ -1,29 +1,24 @@
package com.peanut.modules.book.controller;
import com.alibaba.druid.sql.visitor.functions.Instr;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.Query;
import com.peanut.common.utils.R;
import com.peanut.common.utils.ShiroUtils;
import com.peanut.modules.book.entity.BookTeachCommentEntity;
import com.peanut.modules.book.entity.BookTeachLikeEntity;
import com.peanut.modules.book.entity.MyUserEntity;
import com.peanut.modules.common.entity.BookTeachCommentEntity;
import com.peanut.modules.common.entity.BookTeachLikeEntity;
import com.peanut.modules.book.service.BookTeachCommentService;
import com.peanut.modules.book.service.BookTeachLikeService;
import com.peanut.modules.book.service.MyUserService;
import com.peanut.modules.sys.entity.SysSensitiveWords;
import com.peanut.modules.sys.service.SysSensitiveWordsService;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
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.util.ArrayList;
import java.util.List;
import java.util.Map;

View File

@@ -8,7 +8,6 @@ import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.config.Constants;
import com.peanut.config.DelayQueueConfig;
import com.peanut.modules.book.entity.*;
import com.peanut.modules.book.service.*;
import com.peanut.modules.book.to.UserOrderDto;
import com.peanut.modules.book.vo.UserAddressVo;
@@ -17,8 +16,8 @@ import com.peanut.modules.book.vo.request.ModifyOrderAddressRequestVo;
import com.peanut.modules.book.vo.request.ProductRequestVo;
import com.peanut.modules.book.vo.request.ProductTransportVo;
import com.peanut.modules.book.vo.response.BuyOrderResponseVo;
import com.peanut.modules.book.vo.response.ExpressQueryResponseVo;
import com.peanut.modules.book.vo.response.OrderAddressResponseVo;
import com.peanut.modules.common.entity.*;
import com.peanut.modules.pay.weChatPay.dto.WechatPaymentInfo;
import com.peanut.modules.pay.weChatPay.service.WxpayService;
import com.peanut.modules.sys.entity.SysConfigEntity;
@@ -32,7 +31,6 @@ import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
@@ -200,7 +198,7 @@ public class BuyOrderController {
// 订单总金额
BigDecimal totalPrice = new BigDecimal(0);
//是否存在手摸或脚模,修改用户的脉穴权限
List<Integer> sjc =Arrays.asList(128,129,130,131);
List<Integer> sjc =Arrays.asList(128,129,130,131,136,137);
boolean sj_check = false;
//是否存在时辰取穴的权限触发商品
List<Integer> scqq = Arrays.asList(133,134,135);
@@ -208,6 +206,8 @@ public class BuyOrderController {
//五运六气权限
List<Integer> wylq = Arrays.asList(39,62,123,127);
boolean wylq_check = false;
List<Integer> prescript_b = Arrays.asList(43,62,124);
boolean prescriot_b_check = false;
// 遍历商品总价计算
@@ -221,6 +221,9 @@ public class BuyOrderController {
if(wylq.contains(buyOrderProduct.getProductId())){
wylq_check = true;
}
if(prescript_b.contains(buyOrderProduct.getProductId())){
prescriot_b_check = true;
}
Integer productId = buyOrderProduct.getProductId();
int quantity = buyOrderProduct.getQuantity();
@@ -245,6 +248,10 @@ public class BuyOrderController {
buyOrder.setCity(vo.getCity());
buyOrder.setDistrict(vo.getCounty());
buyOrder.setAddress(userAddress.getDetailAddress());
String str = buyOrder.getShippingUser()+buyOrder.getAddress()+buyOrder.getRemark();
if (str.contains("+")||str.contains("&")) {
return R.error(500, "信息中不能含有“+”、“&”符号!");
}
buyOrderService.save(buyOrder);
//解决购物车相关问题
@@ -259,7 +266,7 @@ public class BuyOrderController {
if (Constants.PAYMENT_METHOD_VIRTUAL.equals(buyOrder.getPaymentMethod())) {
buyOrder.setOrderStatus(Constants.ORDER_STATUS_TO_BE_SHIPPED);
MyUserEntity user = this.myUserService.getById(buyOrder.getUserId());
if (usePeanutCoin(user, totalPrice,sj_check,scqq_check,wylq_check)) {
if (usePeanutCoin(user, totalPrice,sj_check,scqq_check,wylq_check,prescriot_b_check)) {
// 更新订单状态
buyOrderService.updateOrderStatus(user.getId(), buyOrder.getOrderSn(), "0");
recordTransaction(buyOrder, user, totalPrice);
@@ -597,6 +604,10 @@ public class BuyOrderController {
buyOrder.setShippingUser(addressRequestVo.getConsigneeName());
buyOrder.setUserPhone(addressRequestVo.getConsigneeMobile());
buyOrder.setAddress(addressRequestVo.getAddress());
String str = buyOrder.getShippingUser()+buyOrder.getAddress()+buyOrder.getRemark();
if (str.contains("+")||str.contains("&")) {
return R.error(500, "信息中不能含有“+”、“&”符号!");
}
buyOrderService.updateById(buyOrder);
return R.ok();
}
@@ -809,7 +820,7 @@ public class BuyOrderController {
* @param totalPrice
* @return
*/
private boolean usePeanutCoin(MyUserEntity user, BigDecimal totalPrice,boolean sj_check,boolean scqq_check,boolean wylq_check) {
private boolean usePeanutCoin(MyUserEntity user, BigDecimal totalPrice,boolean sj_check,boolean scqq_check,boolean wylq_check,boolean prescript_b_check) {
if (user.getPeanutCoin().compareTo(totalPrice) >= 0) {
user.setPeanutCoin(user.getPeanutCoin().subtract(totalPrice));
if (sj_check){
@@ -821,6 +832,9 @@ public class BuyOrderController {
if(wylq_check){
user.setWylqPower(1);
}
if(prescript_b_check){
user.setPrescriptBPower(1);
}
this.myUserService.updateById(user);
return true;
}

View File

@@ -0,0 +1,71 @@
package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.ChineseMedicineResearch;
import com.peanut.modules.book.service.ChineseMedicineResearchService;
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.util.List;
import java.util.Map;
@Slf4j
@RestController
@RequestMapping("book/chineseMedicineResearch")
public class ChineseMedicineResearchController {
@Autowired
private ChineseMedicineResearchService chineseMedicineResearchService;
/**
* 中医研究列表
*/
@RequestMapping(path = "/researchByType")
public R researchByType(String type) {
LambdaQueryWrapper<ChineseMedicineResearch> wrapper = new LambdaQueryWrapper();
if (StringUtils.isNotEmpty(type)){
wrapper.eq(ChineseMedicineResearch::getType,type);
}
wrapper.orderByAsc(ChineseMedicineResearch::getSort);
List<ChineseMedicineResearch> list = chineseMedicineResearchService.list(wrapper);
return R.ok().put("result", list);
}
/**
* 中医研究列表
*/
@RequestMapping(path = "/researchByPage")
public R researchByPage(@RequestBody Map map) {
LambdaQueryWrapper<ChineseMedicineResearch> wrapper = new LambdaQueryWrapper();
if (map.containsKey("type")&&StringUtils.isNotEmpty(map.get("type").toString())){
wrapper.eq(ChineseMedicineResearch::getType,map.get("type"));
}
wrapper.orderByAsc(ChineseMedicineResearch::getSort);
Page<ChineseMedicineResearch> page = chineseMedicineResearchService.page(new Page<>(
Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())),wrapper);
return R.ok().put("result", page);
}
@RequestMapping(path = "/getResearchById")
public R getResearchById(String id) {
return R.ok().put("result",chineseMedicineResearchService.getById(id));
}
@RequestMapping(path = "/saveOrUpdateResearch")
public R saveOrUpdateResearch(@RequestBody ChineseMedicineResearch research) {
chineseMedicineResearchService.saveOrUpdate(research);
return R.ok();
}
@RequestMapping(path = "/delResearch")
public R delResearch(String id) {
chineseMedicineResearchService.removeById(id);
return R.ok();
}
}

View File

@@ -2,15 +2,8 @@ package com.peanut.modules.book.controller;
import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.modules.book.entity.CouponHistoryEntity;
import com.peanut.modules.book.service.CouponHistoryService;
import com.peanut.modules.book.service.CouponProductCategoryRelationService;
import com.peanut.modules.book.vo.UserCouponVo;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -18,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.CouponEntity;
import com.peanut.modules.common.entity.CouponEntity;
import com.peanut.modules.book.service.CouponService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -6,12 +6,10 @@ import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.Query;
import com.peanut.modules.book.entity.CouponEntity;
import com.peanut.modules.common.entity.CouponEntity;
import com.peanut.modules.book.service.CouponService;
import com.peanut.modules.book.vo.UserCouponVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
@@ -20,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.CouponHistoryEntity;
import com.peanut.modules.common.entity.CouponHistoryEntity;
import com.peanut.modules.book.service.CouponHistoryService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -5,7 +5,6 @@ import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -13,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.CouponProductCategoryRelationEntity;
import com.peanut.modules.common.entity.CouponProductCategoryRelationEntity;
import com.peanut.modules.book.service.CouponProductCategoryRelationService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -5,7 +5,6 @@ import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -13,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.CouponProductRelationEntity;
import com.peanut.modules.common.entity.CouponProductRelationEntity;
import com.peanut.modules.book.service.CouponProductRelationService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -7,14 +7,13 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.HttpsUtil;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.ExpressCompany;
import com.peanut.modules.book.entity.ExpressOrder;
import com.peanut.modules.common.entity.ExpressCompany;
import com.peanut.modules.common.entity.ExpressOrder;
import com.peanut.modules.book.service.ExpressCompanyService;
import com.peanut.modules.book.service.ExpressOrderService;
import com.peanut.modules.book.to.ExpressPrintDto;
import com.peanut.modules.book.vo.ExpressCompanyVo;
import com.peanut.modules.book.vo.response.PrintTemplateVo;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

View File

@@ -0,0 +1,57 @@
package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.GeneralArticle;
import com.peanut.modules.book.service.GeneralArticleService;
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.util.List;
import java.util.Map;
@Slf4j
@RestController
@RequestMapping("book/generalArticle")
public class GeneralArticleController {
@Autowired
private GeneralArticleService generalArticleService;
/**
* 文章列表分页
*/
@RequestMapping(path = "/articleByPage")
public R articleByPage(@RequestBody Map map) {
LambdaQueryWrapper<GeneralArticle> wrapper = new LambdaQueryWrapper();
if (StringUtils.isNotEmpty(map.get("type").toString())){
wrapper.eq(GeneralArticle::getType,map.get("type"));
}
wrapper.orderByAsc(GeneralArticle::getSort);
Page<GeneralArticle> page = generalArticleService.page(new Page<>(
Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())),wrapper);
return R.ok().put("result", page);
}
@RequestMapping(path = "/getArticleById")
public R getArticleById(String id) {
return R.ok().put("result",generalArticleService.getById(id));
}
@RequestMapping(path = "/saveOrUpdateArticle")
public R saveOrUpdateArticle(@RequestBody GeneralArticle article) {
generalArticleService.saveOrUpdate(article);
return R.ok();
}
@RequestMapping(path = "/delArticle")
public R delArticle(String id) {
generalArticleService.removeById(id);
return R.ok();
}
}

View File

@@ -0,0 +1,356 @@
package com.peanut.modules.book.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
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.SysDictDataEntity;
import com.peanut.modules.book.service.*;
import com.peanut.modules.common.entity.*;
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.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
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;
@Autowired
private StringRedisTemplate redisTemplate;
@Autowired
private ProvinceService provinceService;
@Autowired
private CityService cityService;
/**
* 类型列表
*/
@RequestMapping(path = "/typeList")
public R typeList(String label) {
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper();
wrapper.eq(SysDictDataEntity::getDictLabel,label);
return R.ok().put("result",sysDictDataService.list(wrapper));
}
/**
* 书列表
*/
@RequestMapping(path = "/bookList")
public R bookList() {
LambdaQueryWrapper<BookEntity> wrapper = new LambdaQueryWrapper();
wrapper.eq(BookEntity::getBookType,0);
wrapper.orderByDesc(BookEntity::getCreateTime);
return R.ok().put("result",bookService.list(wrapper));
}
/**
* 专著出版关系列表
*/
@RequestMapping(path = "/bookRelationListByType")
public R bookRelationListByType(@RequestBody Map map) {
MPJLambdaWrapper<MedicaldesBook> wrapper = new MPJLambdaWrapper();
wrapper.selectAll(MedicaldesBook.class);
wrapper.leftJoin(BookEntity.class,BookEntity::getId,MedicaldesBook::getBookId);
wrapper.eq(BookEntity::getBookType,0);
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"));
}
wrapper.orderByAsc(MedicaldesBook::getSort);
Page<MedicaldesBook> res = medicaldesBookService.page(new Page<MedicaldesBook>(
Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())), wrapper);
List<MedicaldesBook> 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<BookEntity> wrapper = new MPJLambdaWrapper();
wrapper.selectAll(BookEntity.class);
wrapper.leftJoin(MedicaldesBook.class,MedicaldesBook::getBookId,BookEntity::getId);
wrapper.eq(MedicaldesBook::getTypeId,type);
wrapper.eq(BookEntity::getBookType,0);
wrapper.orderByAsc(MedicaldesBook::getSort);
List<BookEntity> list = bookService.list(wrapper);
return R.ok().put("result", list);
}
@RequestMapping(path = "/saveOrUpdateBookRelation")
public R saveOrUpdateBookRelation(@RequestBody MedicaldesBook medicaldesBook) {
MPJLambdaWrapper<MedicaldesBook> wrapper = new MPJLambdaWrapper();
wrapper.eq(MedicaldesBook::getBookId,medicaldesBook.getBookId());
wrapper.eq(MedicaldesBook::getTypeId,medicaldesBook.getTypeId());
if (medicaldesBookService.getOne(wrapper)!=null){
medicaldesBookService.remove(wrapper);
}
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<MedicaldesInherit> 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"));
}
wrapper.selectAs(MedicaldesInheritRelation::getTypeId,"type");
wrapper.selectAs(MedicaldesInheritRelation::getSort,"sort");
wrapper.orderByAsc(MedicaldesInheritRelation::getSort);
Page<MedicaldesInherit> page = inheritService.page(new Page<>(
Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())),wrapper);
return R.ok().put("result", page);
}
//国际医师可能来自国外在省市里加入外国
public List<SysDictDataEntity> getCounts() {
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper();
wrapper.eq(SysDictDataEntity::getDictLabel,"inheritPro");
List<SysDictDataEntity> dataList = sysDictDataService.list(wrapper);
return dataList;
}
public List getCityList(String cityName,int countId) {
List<City> cityList = new ArrayList<>();
City city = new City();
city.setProvId((long)countId);
city.setCityName(cityName);
city.setCityId((long)countId);
cityList.add(city);
return cityList;
}
/**
* 学术传承列表按类型、地区
*/
@RequestMapping(path = "/inheritListByTypeProvId")
public R inheritListByTypeProvId(String type,String provId) {
MPJLambdaWrapper<MedicaldesInherit> 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);
if ("0".equals(provId)){
int[] val = new int[] {0};
//未知地址
if (getCounts()!=null&&getCounts().size() > 0){
for (int i=1;i<=getCounts().size(); i++){
val[i] = i;
}
}
wrapper.in(MedicaldesInherit::getCityId,val);
}else {
wrapper.eq(Province::getProvId,provId);
}
wrapper.selectAs(MedicaldesInheritRelation::getSort,"sort");
wrapper.orderByAsc(MedicaldesInheritRelation::getSort);
List<MedicaldesInherit> list = inheritService.list(wrapper);
return R.ok().put("result", list);
}
//获取地址
@RequestMapping(path = "/getMedicaldesProList")
public R getMedicaldesProList() {
String s = redisTemplate.opsForValue().get("Province");
List<Province> provinceList = new ArrayList<>();
if (getCounts() != null&&getCounts().size() > 0){
for (int i=0;i<getCounts().size();i++){
Province p = new Province();
p.setProvName(getCounts().get(i).getDictValue());
p.setProvId(Long.valueOf(getCounts().get(i).getDictType()));
p.setCityList(getCityList(getCounts().get(i).getDictValue(),Integer.parseInt(getCounts().get(i).getDictType())));
provinceList.add(p);
}
}
if (StringUtils.isNotBlank(s)) {
List<Object> redisData = JSONArray.parseArray(s);
for (Object object : redisData) {
Province ret = JSONObject.parseObject(object.toString(), Province.class);
provinceList.add(ret);
}
return R.ok().put("provinceEntity", provinceList);
}else {
provinceList.addAll(provinceService.getCity());
}
return R.ok().put("provinceEntity", provinceList);
}
//获取市列表
@RequestMapping(path = "/getCityByPro")
public R getCityByPro(@RequestParam("provId") Integer provId) {
List<City> prov = new ArrayList<>();
List<SysDictDataEntity> list = getCounts();
boolean flag = false;
if (list != null && list.size() > 0) {
for (SysDictDataEntity data:list) {
if (provId==Integer.parseInt(data.getDictType())){
prov.addAll(getCityList(data.getDictValue(),Integer.parseInt(data.getDictType())));
flag = true;
}
}
}
if (!flag) {
prov = cityService.getBaseMapper().selectList(new QueryWrapper<City>()
.eq("prov_id", provId));
}
return R.ok().put("prov", prov);
}
@RequestMapping(path = "/getInheritById")
public R getInheritById(String id) {
MPJLambdaWrapper<MedicaldesInherit> wrapper = new MPJLambdaWrapper();
wrapper.eq(MedicaldesInherit::getId,id);
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.leftJoin(" (select dict_type,dict_value from sys_dict_data where dict_label = 'inheritPro') dd on dd.dict_type = t.city_id");
wrapper.select("t.*,ifnull(t2.city_name,ifnull(dd.dict_value,'其他')) as city_name,ifnull(t3.prov_name,ifnull(dd.dict_value,'其他')) as prov_name,t1.sort as sort");
Map<String,Object> inherit = inheritService.getMap(wrapper);
return R.ok().put("result",inherit);
}
@RequestMapping(path = "/saveOrUpdateInherit")
public R addInherit(@RequestBody MedicaldesInherit inherit) {
MedicaldesInheritRelation relation = null;
if (inherit.getId()==null) {
relation = new MedicaldesInheritRelation();
}else {
LambdaQueryWrapper<MedicaldesInheritRelation> wrapper = new LambdaQueryWrapper();
wrapper.eq(MedicaldesInheritRelation::getInheritId,inherit.getId());
relation = relationService.getOne(wrapper);
}
inheritService.saveOrUpdate(inherit);
relation.setTypeId(inherit.getType());
relation.setInheritId(inherit.getId());
relation.setSort(inherit.getSort());
relationService.saveOrUpdate(relation);
return R.ok();
}
@RequestMapping(path = "/delInherit")
public R delInherit(String id) {
inheritService.removeById(id);
LambdaQueryWrapper<MedicaldesInheritRelation> wrapper = new LambdaQueryWrapper();
wrapper.eq(MedicaldesInheritRelation::getInheritId,id);
relationService.removeById(relationService.getOne(wrapper));
return R.ok();
}
@RequestMapping(path = "/getList")
public List<Map<String,Object>> getList(String type) {
MPJLambdaWrapper<MedicaldesInherit> wrapper = new MPJLambdaWrapper();
wrapper.select("count(1) count,ifnull(t3.prov_id,ifnull(dd.dict_type,'0')) AS prov_id,ifnull(t3.prov_name,ifnull(dd.dict_value,'其他')) AS prov_name ");
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.leftJoin(" (select dict_type,dict_value from sys_dict_data where dict_label = 'inheritPro') dd on dd.dict_type = t.city_id");
wrapper.groupBy("prov_name","dict_value");
wrapper.orderByAsc("t3.region_code","dict_value");
List<Map<String,Object>> list = inheritService.listMaps(wrapper);
return list;
}
/**
* 吴门之光列表
*/
@RequestMapping(path = "/lightListByType")
public R lightListByType(String type) {
LambdaQueryWrapper<MedicaldesLight> wrapper = new LambdaQueryWrapper();
if (StringUtils.isNotEmpty(type)){
wrapper.eq(MedicaldesLight::getType,type);
}
wrapper.orderByAsc(MedicaldesLight::getSort);
List<MedicaldesLight> list = lightService.list(wrapper);
return R.ok().put("result", list);
}
/**
* 吴门之光列表
*/
@RequestMapping(path = "/lightListByPage")
public R lightListByPage(@RequestBody Map map) {
LambdaQueryWrapper<MedicaldesLight> 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"));
}
wrapper.orderByAsc(MedicaldesLight::getSort);
Page<MedicaldesLight> 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();
}
}

View File

@@ -0,0 +1,196 @@
package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.common.entity.MedicinalDrug;
import com.peanut.modules.common.entity.MedicinalMaterials;
import com.peanut.modules.book.entity.SysDictDataEntity;
import com.peanut.modules.book.service.MedicinalDrugService;
import com.peanut.modules.book.service.MedicinalMaterialsService;
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.util.Map;
@Slf4j
@RestController
@RequestMapping("book/materials")
public class MedicinalMaterialsController {
@Autowired
private MedicinalMaterialsService materialsService;
@Autowired
private MedicinalDrugService drugService;
@Autowired
private SysDictDataService sysDictDataService;
/**
* 类型列表
*/
@RequestMapping(path = "/getTypeList")
public R getTypeList(String label) {
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper();
wrapper.select(SysDictDataEntity::getDictValue);
wrapper.eq(SysDictDataEntity::getDictLabel,label);
return R.ok().put("result",sysDictDataService.list(wrapper));
}
/**
* 获取中药材列表
* @return
*/
@RequestMapping("/getMaterialsList")
public R getMaterialsList(@RequestBody Map params){
MPJLambdaWrapper<MedicinalMaterials> wrapper = new MPJLambdaWrapper();
wrapper.select("id,name,img,latinname,othername,effect,taste,property,tropism,type,sort,hits");
if (StringUtils.isNotEmpty(params.get("name").toString())){
wrapper.and(t->t.like(MedicinalMaterials::getName,params.get("name"))
.or().like(MedicinalMaterials::getOthername,params.get("name")));
}
if (StringUtils.isNotEmpty(params.get("type").toString())){
wrapper.like(MedicinalMaterials::getType,params.get("type"));
}
if (StringUtils.isNotEmpty(params.get("effect").toString())){
String[] str = params.get("effect").toString().split(",");
String effect = "";
for (String s : str) {
if ("".equals(effect)){
effect += " effect like '%" + s +"%'";
}else {
effect += " or effect like '%" + s +"%'";
}
}
wrapper.apply("("+effect+")");
}
if (StringUtils.isNotEmpty(params.get("taste").toString())){
String[] str = params.get("taste").toString().split(",");
String taste = "";
for (String s : str) {
if ("".equals(taste)){
taste += " taste like '%" + s +"%'";
}else {
taste += " or taste like '%" + s +"%'";
}
}
wrapper.apply("("+taste+")");
}
if (StringUtils.isNotEmpty(params.get("property").toString())){
String[] str = params.get("property").toString().split(",");
String property = "";
for (String s : str) {
if ("".equals(property)){
property += " property like '%" + s +"%'";
}else {
property += " or property like '%" + s +"%'";
}
}
wrapper.apply("("+property+")");
}
if (StringUtils.isNotEmpty(params.get("tropism").toString())){
String[] str = params.get("tropism").toString().split(",");
String tropism = "";
for (String s : str) {
if ("".equals(tropism)){
tropism += " tropism like '%" + s +"%'";
}else {
tropism += " or tropism like '%" + s +"%'";
}
}
wrapper.apply("("+tropism+")");
}
wrapper.orderByAsc(MedicinalMaterials::getSort);
wrapper.orderByDesc(MedicinalMaterials::getHits);
wrapper.orderByAsc(MedicinalMaterials::getId);
Page<MedicinalMaterials> page = materialsService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
return R.ok().put("result", page);
}
@RequestMapping(path = "/getMaterials")
public R getMaterials(String id) {
MedicinalMaterials materials = materialsService.getById(id);
int hits = materials.getHits() + 1;
materials.setHits(hits);
materialsService.saveOrUpdate(materials);
return R.ok().put("result", materials);
}
@RequestMapping(path = "/saveOrUpdateMaterials")
public R saveOrUpdateMaterials(@RequestBody MedicinalMaterials materials) {
materialsService.saveOrUpdate(materials);
return R.ok();
}
@RequestMapping(path = "/delMaterials")
public R delMaterials(String id) {
materialsService.removeById(id);
return R.ok();
}
/**
* 获取药品列表
* @return
*/
@RequestMapping("/getDrugList")
public R getDrugList(@RequestBody Map params){
MPJLambdaWrapper<MedicinalDrug> wrapper = new MPJLambdaWrapper();
wrapper.select("id,name,english_name,pinyin_name,kind,prescription_type,insurance_type,type,sort,hits");
if (StringUtils.isNotEmpty(params.get("name").toString())){
wrapper.and(t->t.like(MedicinalDrug::getName,params.get("name"))
.or().like(MedicinalDrug::getEnglishName,params.get("name"))
.or().like(MedicinalDrug::getPinyinName,params.get("name")));
}
if (StringUtils.isNotEmpty(params.get("kind").toString())){
if (params.get("kind").toString().contains("麻醉")){
wrapper.like(MedicinalDrug::getKind,params.get("kind").toString().substring(0,2));
}else {
wrapper.like(MedicinalDrug::getKind,params.get("kind").toString().replace("",""));
}
}
if (StringUtils.isNotEmpty(params.get("prescriptionType").toString())){
wrapper.like(MedicinalDrug::getPrescriptionType,params.get("prescriptionType"));
}
if (StringUtils.isNotEmpty(params.get("insuranceType").toString())){
wrapper.like(MedicinalDrug::getInsuranceType,params.get("insuranceType"));
}
if (StringUtils.isNotEmpty(params.get("type").toString())){
wrapper.eq(MedicinalDrug::getType,params.get("type"));
}
wrapper.orderByAsc(MedicinalDrug::getSort);
wrapper.orderByDesc(MedicinalDrug::getHits);
Page<MedicinalDrug> page = drugService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
return R.ok().put("result", page);
}
@RequestMapping(path = "/getDrug")
public R getDrug(String id) {
MedicinalDrug drug = drugService.getById(id);
int hits = drug.getHits() + 1;
drug.setHits(hits);
drugService.saveOrUpdate(drug);
return R.ok().put("result", drug);
}
@RequestMapping(path = "/saveOrUpdateDrug")
public R saveOrUpdateDrug(@RequestBody MedicinalDrug drug) {
drugService.saveOrUpdate(drug);
return R.ok();
}
@RequestMapping(path = "/delDrug")
public R delDrug(String id) {
drugService.removeById(id);
return R.ok();
}
}

View File

@@ -0,0 +1,54 @@
package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.common.entity.Meridians;
import com.peanut.modules.book.service.MeridiansService;
import lombok.extern.slf4j.Slf4j;
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.util.Map;
@Slf4j
@RestController
@RequestMapping("book/meridians")
public class MeridiansController {
@Autowired
private MeridiansService meridiansService;
/**
* 获取经络列表
* @return
*/
@RequestMapping("/getMeridiansList")
public R getMeridiansList(@RequestBody Map params){
MPJLambdaWrapper<Meridians> wrapper = new MPJLambdaWrapper();
wrapper.orderByAsc(Meridians::getSort);
Page<Meridians> page = meridiansService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
return R.ok().put("result", page);
}
@RequestMapping(path = "/getMeridians")
public R getMeridians(String id) {
return R.ok().put("result", meridiansService.getById(id));
}
@RequestMapping(path = "/saveOrUpdateMeridians")
public R saveOrUpdateMeridians(@RequestBody Meridians meridians) {
meridiansService.saveOrUpdate(meridians);
return R.ok();
}
@RequestMapping(path = "/delMeridians")
public R delMeridians(String id) {
meridiansService.removeById(id);
return R.ok();
}
}

View File

@@ -3,7 +3,6 @@ package com.peanut.modules.book.controller;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.TimeUnit;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.druid.util.StringUtils;
@@ -13,9 +12,13 @@ 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.peanut.common.utils.MD5Utils;
import com.peanut.modules.book.entity.*;
import com.peanut.common.utils.MailUtil;
import com.peanut.modules.book.service.*;
import com.peanut.modules.book.to.PageIdDto;
import com.peanut.modules.common.entity.BookBuyConfigEntity;
import com.peanut.modules.common.entity.BookEntity;
import com.peanut.modules.common.entity.MyUserEntity;
import com.peanut.modules.common.entity.TransactionDetailsEntity;
import com.peanut.modules.sys.service.SysUserTokenService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -26,12 +29,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
/**
*
*
@@ -79,9 +80,7 @@ public class MyUserController {
@RequestMapping("/getUserList")
public R getUserList(@RequestBody PageIdDto p){
LambdaQueryWrapper<MyUserEntity> wrapper = new LambdaQueryWrapper<>();
if(!p.getKey().equals(null)&&p.getKey()!=""){
wrapper.eq(MyUserEntity::getTel,p.getKey()).or().eq(MyUserEntity::getName,p.getKey());
}
wrapper.and(p.getKey()!="",k->k.like(MyUserEntity::getName,p.getKey()).or().like(MyUserEntity::getTel,p.getKey()).or().like(MyUserEntity::getEmail,p.getKey()));
wrapper.orderByDesc(MyUserEntity::getCreateTime);
Page<MyUserEntity> myUserEntityPage = userService.getBaseMapper().selectPage(new Page<MyUserEntity>(p.getPage(), p.getLimit()), wrapper);
@@ -103,7 +102,7 @@ public class MyUserController {
*/
@RequestMapping("/info/{id}")
// @RequiresPermissions("book:user:info")
public R info(@PathVariable("id") Integer id){
public R info(@PathVariable("id") String id){
MyUserEntity user = userService.getById(id);
// List<CouponHistoryEntity> list = couponHistoryService.getBaseMapper().selectList(new QueryWrapper<CouponHistoryEntity>().eq("member_id", id)
// .eq("use_status", 0));
@@ -130,7 +129,10 @@ public class MyUserController {
*/
@RequestMapping("/update")
public R update(@RequestBody MyUserEntity user){
System.out.println(user.toString());
boolean b = userService.checkUserTelOrEmail(user);
if(!b){
return R.error("电话或邮箱已存在");
}
userService.updateById(user);
return R.ok();
}
@@ -220,13 +222,84 @@ public class MyUserController {
return R.ok();
}
/**
* 常规注册 发送邮箱验证码
*/
@RequestMapping("/getMailCaptcha")
public R getMailCaptcha(String email) throws Exception {
//验证一分钟内是否已经发过
String redisCode = redisTemplate.opsForValue().get("RegistCode" + email);
if (!StringUtils.isEmpty(redisCode)) {
long l = Long.parseLong(redisCode.split("_")[1]);
if (System.currentTimeMillis() - l < 60000) {
//60s 内不能再发
return R.error(500,"验证码频率过高,请稍后再试!");
}
}
//生成随机五位数
Random random = new Random();
String code = random.nextInt(99999) + "";
String timeCode = code + "_"+System.currentTimeMillis();
//redis 缓存验证码
redisTemplate.opsForValue().set("RegistCode"+email,timeCode,5, TimeUnit.MINUTES);
//发送
return MailUtil.sendMail("疯子读书邮箱验证码",code,email);
}
/**
* 绑定用户电话号
* @return
*/
@RequestMapping("/updateUserTel")
public R updateUserTel(@RequestBody Map<String,Object> 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<String,Object> 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);
System.out.println(redisCode);
if (StringUtils.isEmpty(redisCode)){
return R.error(500,"短信验证码已过期,请重试");
@@ -255,43 +328,41 @@ public class MyUserController {
* 常规注册 / 验证码 登录
*/
@RequestMapping("/registerOrLogin")
public R register(@RequestParam("tel") String tel,
@RequestParam("code") String code) {
public R register(String tel, String code) {
String redisCode = redisTemplate.opsForValue().get("RegistCode" + tel);
System.out.println(redisCode);
if (StringUtils.isEmpty(redisCode)){
return R.error(500,"短信验证码已过期,请重试");
return R.error(500,"验证码已过期,请重试");
}
String lcode = redisCode.split("_")[0];
if (!lcode.equals(code)) {
return R.error(500,"短信验证码不符!");
return R.error(500,"验证码不符!");
}
//查询是否存在当前用户手机号
MyUserEntity userEntity = userService.getBaseMapper().selectOne(new QueryWrapper<MyUserEntity>().eq("tel", tel));
if (userEntity == null) {
// 用户不存在则创建用户 注册成功
MyUserEntity myUserEntity = new MyUserEntity();
LambdaQueryWrapper<MyUserEntity> wrapper = new LambdaQueryWrapper();
if (tel.contains("@")){
wrapper.eq(MyUserEntity::getEmail,tel);
}else {
wrapper.eq(MyUserEntity::getTel,tel);
}
wrapper.orderByDesc(MyUserEntity::getLastLoginTime);
//防止多账号报错
List<MyUserEntity> userList = userService.getBaseMapper().selectList(wrapper);
if (userList == null || userList.size() == 0) {
// 用户不存在则创建用户 注册成功
MyUserEntity myUserEntity = new MyUserEntity();
if (tel.contains("@")){
myUserEntity.setEmail(tel);
}else {
myUserEntity.setTel(tel);
userService.save(myUserEntity);
R r = sysUserTokenService.createToken(myUserEntity.getId());
return R.ok("注册成功").put("userInfo",myUserEntity).put("token",r);
}
if (userEntity != null) {
R r = sysUserTokenService.createToken(userEntity.getId());
return R.ok("登录成功!").put("userInfo",userEntity).put("token",r);
}
return R.ok();
userService.save(myUserEntity);
R r = sysUserTokenService.createToken(myUserEntity.getId());
return R.ok("注册成功").put("userInfo",myUserEntity).put("token",r);
}else {
R r = sysUserTokenService.createToken(userList.get(0).getId());
return R.ok("登录成功!").put("userInfo",userList.get(0)).put("token",r);
}
}
/**
@@ -301,22 +372,33 @@ public class MyUserController {
public R login(@RequestParam("phone") String phone,
@RequestParam("password") String password) {
MyUserEntity user = userService.getBaseMapper().selectOne(new QueryWrapper<MyUserEntity>().eq("tel", phone));
if (user == null) {
return R.error(500,"用户不存在!");
}
if (user.getPassword() == null) {
return R.error(500,"当前未设置密码,请使用验证码登录!");
}
if (MD5Utils.getSaltverifyMD5(password,user.getPassword())){
// if(true){
R r = sysUserTokenService.createToken(user.getId());
return R.ok("登陆成功!").put("userInfo",user).put("token",r);
LambdaQueryWrapper<MyUserEntity> wrapper = new LambdaQueryWrapper();
if (phone.contains("@")) {
wrapper.eq(MyUserEntity::getEmail,phone);
}else {
wrapper.eq(MyUserEntity::getTel,phone);
}
//防止多账号报错
List<MyUserEntity> userList = userService.getBaseMapper().selectList(wrapper);
if (userList == null || userList.size() == 0) {
return R.error(500,"用户不存在!");
}else {
int flag = 0;
for (MyUserEntity user : userList) {
if (user.getPassword() == null|| user.getPassword().equals("")) {
flag++;
continue;
}
if (MD5Utils.getSaltverifyMD5(password,user.getPassword())){
R r = sysUserTokenService.createToken(user.getId());
return R.ok("登陆成功!").put("userInfo",user).put("token",r);
}
}
if (flag>0){
return R.error(500,"当前未设置密码,请使用验证码登录!");
}
return R.error(500,"密码不正确,请重试!");
}
}
/**
@@ -326,34 +408,29 @@ public class MyUserController {
public R setPassword(@RequestParam("phone") String phone,
@RequestParam("password") String password,
@RequestParam("code") String code) {
String redisCode = redisTemplate.opsForValue().get("RegistCode" + phone);
System.out.println(redisCode);
if (StringUtils.isEmpty(redisCode)){
return R.error(500,"短信验证码已过期,请重试");
return R.error(500,"验证码已过期,请重试");
}
String lcode = redisCode.split("_")[0];
if (!lcode.equals(code)) {
return R.error(500,"短信验证码不符!");
return R.error(500,"验证码不符!");
}
//查询是否存在当前用户手机号
MyUserEntity userEntity = userService.getBaseMapper().selectOne(new QueryWrapper<MyUserEntity>().eq("tel", phone));
if (userEntity == null) {
// 用户不存在则创建用户 注册成功
return R.error(500,"当前用户手机号不存在!");
LambdaQueryWrapper<MyUserEntity> wrapper = new LambdaQueryWrapper<>();
if (phone.contains("@")){
wrapper.eq(MyUserEntity::getEmail, phone);
}else {
wrapper.eq(MyUserEntity::getTel, phone);
}
MyUserEntity userEntity = userService.getBaseMapper().selectOne(wrapper);
if (userEntity == null) {
return R.error(500,"当前用户不存在!");
}
String saltMD5 = MD5Utils.getSaltMD5(password);
userEntity.setPassword(saltMD5);
userService.updateById(userEntity);
return R.ok("成功");
}
@@ -619,6 +696,9 @@ public class MyUserController {
}
//
// /**
// * @Description: app微信登陆

View File

@@ -6,7 +6,6 @@ import java.util.Map;
import com.peanut.modules.book.vo.ShopCartVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -14,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.OrderCartEntity;
import com.peanut.modules.common.entity.OrderCartEntity;
import com.peanut.modules.book.service.OrderCartService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -4,7 +4,6 @@ import java.util.Arrays;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -12,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.PayPaymentOrderEntity;
import com.peanut.modules.common.entity.PayPaymentOrderEntity;
import com.peanut.modules.book.service.PayPaymentOrderService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -4,7 +4,6 @@ import java.util.Arrays;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -12,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.PayZfbOrderEntity;
import com.peanut.modules.common.entity.PayZfbOrderEntity;
import com.peanut.modules.book.service.PayZfbOrderService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -4,8 +4,8 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.PointCategoryEntity;
import com.peanut.modules.book.entity.PointEntity;
import com.peanut.modules.common.entity.PointCategoryEntity;
import com.peanut.modules.common.entity.PointEntity;
import com.peanut.modules.book.service.PointCategoryService;
import com.peanut.modules.book.service.PointService;
import lombok.extern.slf4j.Slf4j;

View File

@@ -1,7 +1,11 @@
package com.peanut.modules.book.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.PrescriptCategoryEntity;
import com.peanut.modules.common.entity.PrescriptCategoryEntity;
import com.peanut.modules.common.entity.PrescriptEntity;
import com.peanut.modules.book.service.PrescriptCategoryService;
import com.peanut.modules.book.service.PrescriptService;
import lombok.extern.slf4j.Slf4j;
@@ -22,6 +26,137 @@ public class PrescriptController {
@Autowired
private PrescriptCategoryService prescriptCategoryService;
/**
* 获取方剂文章列表
* @param map
* @return
*/
@RequestMapping("/getPrescriptList")
public R getPrescriptList(@RequestBody Map<String,Object> map){
return getR(map);
}
/**
* 获取方剂文章详情
* @param map
* @return
*/
@RequestMapping("/getPrescriptDetail")
public R getPrescriptDetail(@RequestBody Map<String,Object> map){
Integer integer = Integer.valueOf(map.get("prescriptId").toString());
PrescriptEntity prescript = prescriptService.getById(integer);
return R.ok().put("prescript",prescript);
}
/**
* 获取方剂文章详情
* @param map
* @return
*/
@RequestMapping("/prescriptDetail")
public R prescriptDetail(@RequestBody Map<String,Object> map){
Integer integer = Integer.valueOf(map.get("prescriptId").toString());
PrescriptEntity prescript = prescriptService.getById(integer);
return R.ok().put("prescript",prescript);
}
/**
* 添加方剂文章
* @param p
* @return
*/
@RequestMapping("/addPrescript")
public R addPrescript(@RequestBody PrescriptEntity p){
if(p.getImageList()!=null&&p.getImageList().size()>0){
p.setImages(JSON.toJSONString(p.getImageList()));
}
prescriptService.save(p);
return R.ok();
}
/**
* 查找方药文章
* @param map
* @return
*/
@RequestMapping("/searchPrescript")
public R searchPrescript(@RequestBody Map<String,Object> map){
Integer type = Integer.valueOf(map.get("type").toString());
String keywords = map.get("keywords").toString();
List<PrescriptEntity> prescriptEntities = prescriptService.searchPrescripts(type, keywords);
return R.ok().put("list",prescriptEntities);
}
/**
* 修改方剂文章
* @param p
* @return
*/
@RequestMapping("/editPrescript")
public R editPrescript(@RequestBody PrescriptEntity p){
if(p.getImageList()!=null&&p.getImageList().size()>0){
p.setImages(JSON.toJSONString(p.getImageList()));
} else if (StringUtils.isNotBlank(p.getImages()) &&(p.getImageList()==null||p.getImageList().size()==0)) {
p.setImages("");
}
prescriptService.updateById(p);
return R.ok();
}
/**
* 删除方剂文章
* @param map
* @return
*/
@RequestMapping("/delPrescript")
public R delPrescript(@RequestBody Map<String,Object> map){
Integer integer = Integer.valueOf(map.get("prescriptId").toString());
prescriptService.removeById(integer);
return R.ok();
}
/**
* 获取方剂分类列表
* @param map
* @return
*/
@RequestMapping("/prescriptCategoryList")
public R prescriptCategoryList(@RequestBody Map<String,Object> map){
Integer id = Integer.valueOf(map.get("categoryId").toString());
List<PrescriptCategoryEntity> categoryByPid = prescriptCategoryService.getCategoryByPid(id);
return R.ok().put("list",categoryByPid);
}
/**
* 获取方剂文章列表
* @param map
* @return
*/
@RequestMapping("/prescriptList")
public R prescriptList(@RequestBody Map<String,Object> map){
return getR(map);
}
/**
* 获取方剂文章列表(经方)
* @param
* @return
*/
@RequestMapping("/prescriptListForJF")
public R prescriptListForJF(){
List<PrescriptEntity> prescriptListForJF = prescriptService.getPrescriptListForJF();
return R.ok().put("list",prescriptListForJF);
}
private R getR(@RequestBody Map<String, Object> map) {
Integer limit = Integer.valueOf(map.get("limit").toString());
Integer page = Integer.valueOf(map.get("page").toString());
Integer id = Integer.valueOf(map.get("prescriptCategoryId").toString());
Page<PrescriptEntity> prescriptList = prescriptService.getPrescriptList(id, limit, page);
return R.ok().put("page",prescriptList);
}
/**
* 获取方剂分类列表
* @return
@@ -67,7 +202,7 @@ public class PrescriptController {
if(b){
return R.ok();
}else{
return R.error();
return R.code(303,"删除失败");
}
}

View File

@@ -4,9 +4,9 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.City;
import com.peanut.modules.book.entity.County;
import com.peanut.modules.book.entity.Province;
import com.peanut.modules.common.entity.City;
import com.peanut.modules.common.entity.County;
import com.peanut.modules.common.entity.Province;
import com.peanut.modules.book.service.CityService;
import com.peanut.modules.book.service.CountyService;
import com.peanut.modules.book.service.ProvinceService;

View File

@@ -3,7 +3,7 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.Publisher;
import com.peanut.modules.common.entity.Publisher;
import com.peanut.modules.book.service.BookService;
import com.peanut.modules.book.service.PublisherService;
import lombok.extern.slf4j.Slf4j;

View File

@@ -3,7 +3,7 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.SeckillProdRelationEntity;
import com.peanut.modules.common.entity.SeckillProdRelationEntity;
import com.peanut.modules.book.service.SeckillProdRelationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -5,7 +5,6 @@ import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -13,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.ShopCategoryEntity;
import com.peanut.modules.common.entity.ShopCategoryEntity;
import com.peanut.modules.book.service.ShopCategoryService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.controller;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.ShopProductBookEntity;
import com.peanut.modules.common.entity.ShopProductBookEntity;
import com.peanut.modules.book.service.ShopProductBookService;
import com.peanut.modules.book.vo.ProductBookQueryVO;
import lombok.extern.slf4j.Slf4j;

View File

@@ -4,9 +4,9 @@ import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.modules.book.entity.*;
import com.peanut.modules.book.service.*;
import com.peanut.modules.book.vo.ShopProductVo;
import com.peanut.modules.common.entity.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
@@ -65,6 +65,7 @@ public class ShopProductController {
}
/**
* 新项目已重写
* 列表
*/
@RequestMapping("/list")

View File

@@ -5,11 +5,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.dao.ShopProductLabelDao;
import com.peanut.modules.book.dao.ShopProductToLabelDao;
import com.peanut.modules.book.entity.ShopProduct;
import com.peanut.modules.book.entity.ShopProductLabelEntity;
import com.peanut.modules.book.entity.ShopProductToLabelEntity;
import com.peanut.modules.common.dao.ShopProductLabelDao;
import com.peanut.modules.common.dao.ShopProductToLabelDao;
import com.peanut.modules.common.entity.MedicaldesBook;
import com.peanut.modules.common.entity.ShopProduct;
import com.peanut.modules.common.entity.ShopProductLabelEntity;
import com.peanut.modules.common.entity.ShopProductToLabelEntity;
import com.peanut.modules.book.service.ShopProductLabelService;
import com.peanut.modules.book.service.ShopProductToLabelService;
import lombok.extern.slf4j.Slf4j;
@@ -103,15 +104,27 @@ public class ShopProductLabelController {
* @return
*/
@RequestMapping("/getProductsByLabel")
public R getProductsByLabel(@RequestParam Integer splId,@RequestParam Integer limit,@RequestParam Integer page){
MPJLambdaWrapper<ShopProductToLabelEntity> shopProductEntityMPJLambdaWrapper = new MPJLambdaWrapper<ShopProductToLabelEntity>();
shopProductEntityMPJLambdaWrapper.selectAll(ShopProduct.class);
shopProductEntityMPJLambdaWrapper.leftJoin(ShopProduct.class, ShopProduct::getProductId,ShopProductToLabelEntity::getProductId);
shopProductEntityMPJLambdaWrapper.eq(ShopProductToLabelEntity::getSplId,splId);
shopProductEntityMPJLambdaWrapper.eq(ShopProductToLabelEntity::getDelFlag,0);
shopProductEntityMPJLambdaWrapper.eq(ShopProduct::getDelFlag,0);
Page<ShopProduct> shopProductEntityPage = shopProductToLabelDao.selectJoinPage(new Page<ShopProduct>(page, limit), ShopProduct.class, shopProductEntityMPJLambdaWrapper);
public R getProductsByLabel(Integer splId,Integer limit,Integer page,Integer type){
MPJLambdaWrapper<ShopProductToLabelEntity> wrapper = new MPJLambdaWrapper<ShopProductToLabelEntity>();
wrapper.selectAll(ShopProduct.class);
wrapper.leftJoin(ShopProduct.class, ShopProduct::getProductId,ShopProductToLabelEntity::getProductId);
wrapper.eq(ShopProductToLabelEntity::getSplId,splId);
wrapper.eq(ShopProductToLabelEntity::getDelFlag,0);
wrapper.eq(ShopProduct::getDelFlag,0);
wrapper.gt(ShopProduct::getProductStock,0);
if (type!=null){
wrapper.leftJoin(MedicaldesBook.class, MedicaldesBook::getBookId,ShopProduct::getBookId);
wrapper.inSql(ShopProduct::getProductId,"select product_id from shop_product where book_Ids not like \"%,%\"");
if(type==0){//0为医学图书全部
wrapper.in(MedicaldesBook::getTypeId,1,2,3,4);
}else if (type == -1) {//-1为文哲图书全部
wrapper.in(MedicaldesBook::getTypeId,5,6);
}else {
wrapper.eq(MedicaldesBook::getTypeId,type);
}
}
Page<ShopProduct> shopProductEntityPage = shopProductToLabelDao.selectJoinPage(new Page<ShopProduct>(page, limit),
ShopProduct.class, wrapper);
return R.ok().put("page",shopProductEntityPage);
}
}

View File

@@ -0,0 +1,54 @@
package com.peanut.modules.book.controller;
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.ShopStore;
import com.peanut.modules.book.service.ShopStoreService;
import lombok.extern.slf4j.Slf4j;
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.util.Map;
@Slf4j
@RestController
@RequestMapping("book/shopStore")
public class ShopStoreController {
@Autowired
private ShopStoreService shopStoreService;
/**
* 获取小店列表
*/
@RequestMapping("/getStoreList")
public R getStoreList(@RequestBody Map params){
MPJLambdaWrapper<ShopStore> wrapper = new MPJLambdaWrapper();
if (params.containsKey("name")&&!"".equals(params.get("name").toString())){
wrapper.like(ShopStore::getName,params.get("name").toString());
}
Page<ShopStore> page = shopStoreService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
return R.ok().put("result", page);
}
@RequestMapping(path = "/getStoreById")
public R getStoreById(String id) {
return R.ok().put("result",shopStoreService.getById(id));
}
@RequestMapping(path = "/saveOrUpdateStore")
public R saveOrUpdateStore(@RequestBody ShopStore store) {
shopStoreService.saveOrUpdate(store);
return R.ok();
}
@RequestMapping(path = "/delStore")
public R delStore(String id) {
shopStoreService.removeById(id);
return R.ok();
}
}

View File

@@ -3,8 +3,8 @@ package com.peanut.modules.book.controller;
import java.util.Arrays;
import java.util.Map;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.TransactionDetailsEntity;
import com.peanut.modules.common.entity.TransactionDetailsEntity;
import com.peanut.modules.book.service.TransactionDetailsService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
@@ -39,11 +39,25 @@ public class TransactionDetailsController {
@RequestMapping("/list")
// @RequiresPermissions("book:transactiondetails:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = transactionDetailsService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 获取充扣明细列表
* @param map
* @return
*/
@RequestMapping("/getTransactionList")
public R getTransactionList(@RequestBody Map<String,Object> map){
Page<TransactionDetailsEntity> transactionList = transactionDetailsService.getTransactionList(map);
return R.ok().put("page",transactionList);
}
/**
* 信息

View File

@@ -3,7 +3,7 @@ package com.peanut.modules.book.controller;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.UserAddress;
import com.peanut.modules.common.entity.UserAddress;
import com.peanut.modules.book.service.UserAddressService;
import com.peanut.modules.book.vo.UserAddressVo;
import lombok.extern.slf4j.Slf4j;
@@ -50,6 +50,10 @@ public class UserAddressController {
if(userAddress.getRegionCode()==null||userAddress.getRegionCode().equals("")){
return R.error("地址异常添加失败!");
}
String str = userAddress.getConsigneeName()+userAddress.getConsigneePhone()+userAddress.getDetailAddress();
if(str.contains("+")||str.contains("&")){
return R.error("信息中不能含有“+”、“&”符号!");
}
userAddressService.save(userAddress);
return R.ok();
}
@@ -59,6 +63,10 @@ public class UserAddressController {
if ((userAddressService.getUserDefaultAddressCount(userAddress.getUserId()) >= 1) && userAddress.getIsDefault() == 1) {
return R.error("已经存在默认地址");
}
String str = userAddress.getConsigneeName()+userAddress.getConsigneePhone()+userAddress.getDetailAddress();
if(str.contains("+")||str.contains("&")){
return R.error("信息中不能含有“+”、“&”符号!");
}
userAddressService.updateById(userAddress);
return R.ok();
}

View File

@@ -6,7 +6,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.UserBookClockEntity;
import com.peanut.modules.common.entity.UserBookClockEntity;
import com.peanut.modules.book.service.UserBookClockService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.ParseException;
import java.util.*;
/**
@@ -120,12 +121,21 @@ public class UserBookClockInController {
@RequestMapping(value = "/correctClockIn", method = RequestMethod.GET)
public R correctClockIn(@RequestParam("bookId") Integer bookId,
@RequestParam("userId") Integer userId,
@RequestParam("day") Integer day) {
@RequestParam("day") Integer day) throws ParseException {
QueryWrapper<UserBookClockEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("book_id", bookId);
queryWrapper.eq("user_id", userId);
UserBookClockEntity userBookClock = userBookClockService.getOne(queryWrapper);
String clocksStr = userBookClock.getClocks();
long time = userBookClock.getBeginDate().getTime();
Date date = new Date();
long time1 = date.getTime();
int c = (int)(time1-time);
int c_day = c/86400000;
if(day<(c_day-7)){
return R.error("不可补卡超过7天");
}
List<Integer> clockInDaysList = JSON.parseObject(clocksStr, new TypeReference<List<Integer>>() {
});
clockInDaysList.add(day);

View File

@@ -3,8 +3,8 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BookClockEntryEntity;
import com.peanut.modules.book.entity.BookEntity;
import com.peanut.modules.common.entity.BookClockEntryEntity;
import com.peanut.modules.common.entity.BookEntity;
import com.peanut.modules.book.service.BookClockEntryService;
import com.peanut.modules.book.service.BookService;
import com.peanut.modules.book.to.PageIdDto;

View File

@@ -5,9 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.dao.BookDao;
import com.peanut.modules.book.entity.BookEntity;
import com.peanut.modules.book.entity.UserEbookBuyEntity;
import com.peanut.modules.common.dao.BookDao;
import com.peanut.modules.common.entity.BookEntity;
import com.peanut.modules.common.entity.UserEbookBuyEntity;
import com.peanut.modules.book.service.BookService;
import com.peanut.modules.book.service.UserEbookBuyService;
import lombok.extern.slf4j.Slf4j;

View File

@@ -2,8 +2,8 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.MyUserEntity;
import com.peanut.modules.book.entity.UserFeedbackEntity;
import com.peanut.modules.common.entity.MyUserEntity;
import com.peanut.modules.common.entity.UserFeedbackEntity;
import com.peanut.modules.book.service.MyUserService;
import com.peanut.modules.book.service.UserFeedbackSerivce;
import lombok.extern.slf4j.Slf4j;

View File

@@ -3,10 +3,10 @@ package com.peanut.modules.book.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.BuyOrder;
import com.peanut.modules.book.entity.MyUserEntity;
import com.peanut.modules.book.entity.UserFollowUpEntity;
import com.peanut.modules.book.entity.UserRecord;
import com.peanut.modules.common.entity.BuyOrder;
import com.peanut.modules.common.entity.MyUserEntity;
import com.peanut.modules.common.entity.UserFollowUpEntity;
import com.peanut.modules.common.entity.UserRecord;
import com.peanut.modules.book.service.BuyOrderService;
import com.peanut.modules.book.service.MyUserService;
import com.peanut.modules.book.service.UserFollowUpService;

View File

@@ -4,8 +4,8 @@ import cn.com.marsoft.tool.ToolObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.*;
import com.peanut.modules.book.service.*;
import com.peanut.modules.common.entity.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.ActivityEntity;
import com.peanut.modules.common.entity.ActivityEntity;
import java.util.Map;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.AuthorEntity;
import com.peanut.modules.common.entity.AuthorEntity;
import java.util.Map;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.BaseAreaEntity;
import com.peanut.modules.common.entity.BaseAreaEntity;
public interface BaseAreaService extends IService<BaseAreaEntity> {

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookBrowseRecordsEntity;
import com.peanut.modules.common.entity.BookBrowseRecordsEntity;
import java.util.Map;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookBuyConfigEntity;
import com.peanut.modules.common.entity.BookBuyConfigEntity;
import java.util.Map;

View File

@@ -1,12 +1,10 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookCategoryEntity;
import com.peanut.modules.book.entity.ShopCategoryEntity;
import com.peanut.modules.common.entity.BookCategoryEntity;
import java.util.List;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookChapterContentEntity;
import com.peanut.modules.common.entity.BookChapterContentEntity;
import java.util.Map;

View File

@@ -2,10 +2,8 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookChapterEntity;
import org.springframework.web.multipart.MultipartFile;
import com.peanut.modules.common.entity.BookChapterEntity;
import java.io.IOException;
import java.util.List;
import java.util.Map;

View File

@@ -1,7 +1,7 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.BookClockEntryChat;
import com.peanut.modules.common.entity.BookClockEntryChat;
public interface BookClockEntryChatService extends IService<BookClockEntryChat> {
}

View File

@@ -1,7 +1,7 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.BookClockEntryEntity;
import com.peanut.modules.common.entity.BookClockEntryEntity;
public interface BookClockEntryService extends IService<BookClockEntryEntity> {
}

View File

@@ -2,9 +2,8 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookForumArticlesEntity;
import com.peanut.modules.common.entity.BookForumArticlesEntity;
import java.util.List;
import java.util.Map;
public interface BookForumArticlesService extends IService<BookForumArticlesEntity> {

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookForumCommentEntity;
import com.peanut.modules.common.entity.BookForumCommentEntity;
import java.util.List;
import java.util.Map;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookListeningEntity;
import com.peanut.modules.common.entity.BookListeningEntity;
import java.util.Map;

View File

@@ -3,7 +3,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookListeningShelfEntity;
import com.peanut.modules.common.entity.BookListeningShelfEntity;
import java.util.Map;

View File

@@ -1,9 +1,8 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookEntity;
import com.peanut.modules.book.entity.BookMedicalRecordsEntity;
import com.peanut.modules.common.entity.BookEntity;
import com.peanut.modules.common.entity.BookMedicalRecordsEntity;
import java.util.List;
import java.util.Map;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookReadRateEntity;
import com.peanut.modules.common.entity.BookReadRateEntity;
import java.util.Map;

View File

@@ -3,7 +3,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.modules.book.entity.BookEntity;
import com.peanut.modules.common.entity.BookEntity;
import java.util.List;
import java.util.Map;
@@ -43,7 +43,7 @@ public interface BookService extends IService<BookEntity> {
Page<BookEntity> getUserClockBooks(Integer userId, Integer limit, Integer page);
List<BookEntity> getAncientBooks();
Page<BookEntity> getUserClockBestBooks(Integer userId, Integer limit, Integer page);
}

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BookShelfEntity;
import com.peanut.modules.common.entity.BookShelfEntity;
import com.peanut.modules.book.vo.BookShelfVo;
import java.util.List;

View File

@@ -1,7 +1,7 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.BookTeachCommentEntity;
import com.peanut.modules.common.entity.BookTeachCommentEntity;
public interface BookTeachCommentService extends IService<BookTeachCommentEntity> {
}

View File

@@ -1,7 +1,7 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.BookTeachLikeEntity;
import com.peanut.modules.common.entity.BookTeachLikeEntity;
public interface BookTeachLikeService extends IService<BookTeachLikeEntity> {
}

View File

@@ -1,7 +1,7 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.BookTeachEntity;
import com.peanut.modules.common.entity.BookTeachEntity;
public interface BookTeachService extends IService<BookTeachEntity> {
}

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BuyOrderDetail;
import com.peanut.modules.common.entity.BuyOrderDetail;
import java.util.Map;

View File

@@ -1,7 +1,7 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.BuyOrderProduct;
import com.peanut.modules.common.entity.BuyOrderProduct;
import org.springframework.stereotype.Service;
@Service

View File

@@ -1,16 +1,14 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.BuyOrder;
import com.peanut.modules.common.entity.BuyOrder;
import com.peanut.modules.book.to.UserOrderDto;
import com.peanut.modules.book.vo.UserOrderVo;
import com.peanut.modules.book.vo.request.BuyOrderListRequestVo;
import com.peanut.modules.book.vo.response.BuyOrderResponseVo;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;
import java.util.Map;

View File

@@ -0,0 +1,7 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.ChineseMedicineResearch;
public interface ChineseMedicineResearchService extends IService<ChineseMedicineResearch> {
}

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.City;
import com.peanut.modules.common.entity.City;
import java.util.Map;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.County;
import com.peanut.modules.common.entity.County;
import java.util.Map;

View File

@@ -2,8 +2,8 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.CouponEntity;
import com.peanut.modules.book.entity.CouponHistoryEntity;
import com.peanut.modules.common.entity.CouponEntity;
import com.peanut.modules.common.entity.CouponHistoryEntity;
import com.peanut.modules.book.vo.UserCouponVo;
import java.util.List;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.CouponProductCategoryRelationEntity;
import com.peanut.modules.common.entity.CouponProductCategoryRelationEntity;
import java.util.Map;

View File

@@ -2,7 +2,7 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.CouponProductRelationEntity;
import com.peanut.modules.common.entity.CouponProductRelationEntity;
import java.util.Map;

View File

@@ -2,10 +2,8 @@ package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.common.utils.PageUtils;
import com.peanut.modules.book.entity.CouponEntity;
import com.peanut.modules.book.vo.UserCouponVo;
import com.peanut.modules.common.entity.CouponEntity;
import java.util.List;
import java.util.Map;
/**

View File

@@ -1,7 +1,7 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.ExpressCompany;
import com.peanut.modules.common.entity.ExpressCompany;
import com.peanut.modules.book.vo.ExpressCompanyVo;
import org.springframework.stereotype.Service;

View File

@@ -1,7 +1,7 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.ExpressFee;
import com.peanut.modules.common.entity.ExpressFee;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;

View File

@@ -1,9 +1,9 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.ExpressOrder;
import com.peanut.modules.common.entity.ExpressOrder;
import com.peanut.modules.book.vo.ExpressOrderResponseVo;
import com.peanut.modules.book.entity.ExpressQueryResponse;
import com.peanut.modules.common.entity.ExpressQueryResponse;
import org.springframework.stereotype.Service;
@Service

View File

@@ -0,0 +1,9 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.book.entity.GeneralArticle;
import org.springframework.stereotype.Service;
@Service
public interface GeneralArticleService extends IService<GeneralArticle> {
}

View File

@@ -0,0 +1,9 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.common.entity.MedicaldesBook;
import org.springframework.stereotype.Service;
@Service
public interface MedicaldesBookService extends IService<MedicaldesBook> {
}

View File

@@ -0,0 +1,9 @@
package com.peanut.modules.book.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.common.entity.MedicaldesInheritRelation;
import org.springframework.stereotype.Service;
@Service
public interface MedicaldesInheritRelationService extends IService<MedicaldesInheritRelation> {
}

Some files were not shown because too many files have changed in this diff Show More