Skip to content

Commit

Permalink
Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop i…
Browse files Browse the repository at this point in the history
…nto feature/pg
  • Loading branch information
LeiGaoRobot committed Oct 24, 2022
2 parents a272e53 + 31c76c0 commit 47734cf
Show file tree
Hide file tree
Showing 159 changed files with 198,535 additions and 1,002 deletions.
1 change: 1 addition & 0 deletions DB/li_notice_message.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Source Host : 192.168.0.116:3306
Source Schema : lilishop
Target Server Type : MySQL
Target Server Version : 80023
File Encoding : 65001
Expand Down
189,783 changes: 189,783 additions & 0 deletions DB/lilishop.sql

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions DB/update.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/** 店铺--默认页面是否开启**/
ALTER TABLE li_store ADD page_show bit(1) DEFAULT NULL COMMENT '默认页面是否开启';
6 changes: 3 additions & 3 deletions DB/version4.1to4.2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ALTER TABLE li_distribution ADD settlement_bank_branch_name varchar ( 200 );
/** 文章分类添加默认值**/
ALTER TABLE li_article_category alter column sort set default 0;
/** 添加分销提现菜单**/
INSERT INTO `lilishop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1410862675914764290, 'admin', '2021-07-02 15:27:29', b'0', 'admin', '2021-07-02 15:27:45', 'null', 'distribution/distributionCash', '', 2, 'distributionCash', '1374173575405109248', 'distributionCash', 5.00, '分销提现', 'null');
INSERT INTO `rxshop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1410862675914764290, 'admin', '2021-07-02 15:27:29', b'0', 'admin', '2021-07-02 15:27:45', 'null', 'distribution/distributionCash', '', 2, 'distributionCash', '1374173575405109248', 'distributionCash', 5.00, '分销提现', 'null');

/** 促销商品添加商品类型**/
ALTER TABLE li_promotion_goods ADD goods_type varchar (200);
Expand All @@ -16,7 +16,7 @@ update li_member_points_history set point_type = 'INCREASE' where point_type=1;
update li_member_points_history set point_type = 'REDUCE' where point_type=0;

/** 添加分词管理菜单*/
INSERT INTO `lilishop`.`li_menu` (`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1349247640584085511, 'admin', '2021-01-13 14:51:20', b'0', 'admin', '2021-02-25 09:02:59', 'null', 'customWords/index', 'ios-american-football', 2, 'customWords', '1349237129847005184', 'customWords', 8.00, '分词管理', 'null');
INSERT INTO `rxshop`.`li_menu` (`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1349247640584085511, 'admin', '2021-01-13 14:51:20', b'0', 'admin', '2021-02-25 09:02:59', 'null', 'customWords/index', 'ios-american-football', 2, 'customWords', '1349237129847005184', 'customWords', 8.00, '分词管理', 'null');

/** 修改会员评价店铺图片字段类型 **/
alter table li_member_evaluation modify column reply_image text;
Expand All @@ -25,4 +25,4 @@ alter table li_member_evaluation modify column reply_image text;
alter table li_after_sale modify column after_sale_image text;

/** 提现申请审核sql **/
INSERT INTO `lilishop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1367042804944994305, 'admin', '2021-03-03 09:22:58', b'0', NULL, NULL, NULL, 'member/advance/withdrawApply', 'ios-alert', 2, 'withdrawApply', '1367042490443497472', 'withdrawApply', 1.00, '提现申请', NULL);
INSERT INTO `rxshop`.`li_menu`(`id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `description`, `front_route`, `icon`, `level`, `name`, `parent_id`, `path`, `sort_order`, `title`, `front_component`) VALUES (1367042804944994305, 'admin', '2021-03-03 09:22:58', b'0', NULL, NULL, NULL, 'member/advance/withdrawApply', 'ios-alert', 2, 'withdrawApply', '1367042490443497472', 'withdrawApply', 1.00, '提现申请', NULL);
521 changes: 521 additions & 0 deletions DB/version4.2.4to4.2.5.sql

Large diffs are not rendered by default.

2,025 changes: 1,351 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash-logback-encoder}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-mail</artifactId>-->
<!-- </dependency> -->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-mail</artifactId>-->
<!-- </dependency> -->
</dependencies>

<build>
Expand Down
1 change: 1 addition & 0 deletions admin/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ [email protected]
spring.mail.password=abcdefg123456!@#$%^
# 日志文件路径
logging.file.path=lili-logs/admin
lili.data.logstash.server=106.124.130.167:4560
# 文件格式
logging.pattern.file=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID}){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wEx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.page.entity.dos.PageData;
import cn.lili.modules.page.entity.dto.PageDataDTO;
import cn.lili.modules.page.entity.enums.PageEnum;
import cn.lili.modules.page.entity.vos.PageDataVO;
import cn.lili.modules.page.service.PageDataService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;

/**
* 买家端,页面接口
Expand All @@ -36,12 +36,53 @@ public class PageBuyerController {
public ResultMessage<PageDataVO> getIndex(@RequestParam String clientType) {
PageDataDTO pageDataDTO = new PageDataDTO(PageEnum.INDEX.name());
pageDataDTO.setPageClientType(clientType);
return ResultUtil.data(pageService.getPageData(pageDataDTO));
PageDataVO pageDataVO=pageService.getPageData(pageDataDTO);
return ResultUtil.data(pageDataVO);
}

@ApiOperation(value = "获取页面数据")
@GetMapping
public ResultMessage<PageDataVO> get(PageDataDTO pageDataDTO) {
return ResultUtil.data(pageService.getPageData(pageDataDTO));
PageDataVO pageDataVO=pageService.getPageData(pageDataDTO);
return ResultUtil.data(pageDataVO);
}

@ApiOperation(value = "获取页面数据")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path")
@GetMapping("/get/{id}")
public ResultMessage<PageData> getPage(@PathVariable("id") String id) {
return ResultUtil.data(pageService.getSpecial(id));
}

@ApiOperation(value = "获取专题页面数据(根据消息内容得知)")
@GetMapping("/getSpecial")
public ResultMessage<PageData> getSpecial(@RequestParam String body) {
String name = "";
if (body.indexOf("』") >= 0 && body.indexOf("『") >= 0) {
name = body.substring(body.indexOf("『") + 1, body.lastIndexOf("』"));
} else if (body.indexOf("〉") >= 0 && body.indexOf("〈") >= 0) {
name = body.substring(body.indexOf("〈") + 1, body.lastIndexOf("〉"));
} else if (body.indexOf("」") >= 0 && body.indexOf("「") >= 0) {
name = body.substring(body.indexOf("「") + 1, body.lastIndexOf("」"));
} else if (body.indexOf("》") >= 0 && body.indexOf("《") >= 0) {
name = body.substring(body.indexOf("《") + 1, body.lastIndexOf("》"));
} else if (body.indexOf(")") >= 0 && body.indexOf("(") >= 0) {
name = body.substring(body.indexOf("(") + 1, body.lastIndexOf(")"));
} else if (body.indexOf("】") >= 0 && body.indexOf("【") >= 0) {
name = body.substring(body.indexOf("【") + 1, body.lastIndexOf("】"));
} else if (body.indexOf("}") >= 0 && body.indexOf("{") >= 0) {
name = body.substring(body.indexOf("{") + 1, body.lastIndexOf("}"));
} else if (body.indexOf("!") >= 0) {
name = body.substring(body.indexOf("!") + 1, body.lastIndexOf("!"));
} else if (body.indexOf("|") >= 0) {
name = body.substring(body.indexOf("|") + 1, body.lastIndexOf("|"));
}

PageData pageData = pageService.getOne(
new LambdaQueryWrapper<PageData>()
.eq(PageData::getPageType, PageEnum.SPECIAL.name())
.eq(PageData::getName, name));
return ResultUtil.data(pageData);

}
}
Empty file.
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
package cn.lili.controller.common;

import cn.lili.cache.limit.annotation.LimitPoint;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.verification.entity.enums.VerificationEnums;
import cn.lili.modules.verification.service.VerificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* 滑块验证码接口
*
* @author Chopper
* @since 2020/11/26 15:41
*/
@Slf4j
@RestController
@RequestMapping("/common/common/slider")
@Api(tags = "滑块验证码接口")
public class SliderImageController {

@Autowired
private VerificationService verificationService;

@LimitPoint(name = "slider_image", key = "verification")
@GetMapping("/{verificationEnums}")
@ApiOperation(value = "获取校验接口,一分钟同一个ip请求10次")
public ResultMessage getSliderImage(@RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) {
return ResultUtil.data(verificationService.createVerification(verificationEnums, uuid));

}

@LimitPoint(name = "slider_image", key = "verification_pre_check", limit = 600)
@PostMapping("/{verificationEnums}")
@ApiOperation(value = "验证码预校验")
public ResultMessage verificationImage(Integer xPos, @RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) {
return ResultUtil.data(verificationService.preCheck(xPos, uuid, verificationEnums));
}
}
package cn.lili.controller.common;

import cn.lili.cache.limit.annotation.LimitPoint;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.verification.entity.enums.VerificationEnums;
import cn.lili.modules.verification.service.VerificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* 滑块验证码接口
*
* @author Chopper
* @since 2020/11/26 15:41
*/
@Slf4j
@RestController
@RequestMapping("/common/common/slider")
@Api(tags = "滑块验证码接口")
public class SliderImageController {

@Autowired
private VerificationService verificationService;

@LimitPoint(name = "slider_image", key = "verification")
@GetMapping("/{verificationEnums}")
@ApiOperation(value = "获取校验接口,一分钟同一个ip请求10次")
public ResultMessage getSliderImage(@RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) {
return ResultUtil.data(verificationService.createVerification(verificationEnums, uuid));

}

@LimitPoint(name = "slider_image", key = "verification_pre_check", limit = 600)
@PostMapping("/{verificationEnums}")
@ApiOperation(value = "验证码预校验")
public ResultMessage verificationImage(Integer xPos, @RequestHeader String uuid, @PathVariable VerificationEnums verificationEnums) {
return ResultUtil.data(verificationService.preCheck(xPos, uuid, verificationEnums));
}
}
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
package cn.lili.controller.common;

import cn.lili.cache.limit.annotation.LimitPoint;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.sms.SmsUtil;
import cn.lili.modules.verification.entity.enums.VerificationEnums;
import cn.lili.modules.verification.service.VerificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* 短信验证码接口
*
* @author Chopper
* @since 2020/11/26 15:41
*/
@RestController
@Api(tags = "短信验证码接口")
@RequestMapping("/common/common/sms")
public class SmsController {

@Autowired
private SmsUtil smsUtil;
@Autowired
private VerificationService verificationService;

@LimitPoint(name = "sms_send", key = "sms")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", dataType = "String", name = "mobile", value = "手机号"),
@ApiImplicitParam(paramType = "header", dataType = "String", name = "uuid", value = "uuid"),
})
@GetMapping("/{verificationEnums}/{mobile}")
@ApiOperation(value = "发送短信验证码,一分钟同一个ip请求1次")
public ResultMessage getSmsCode(
@RequestHeader String uuid,
@PathVariable String mobile,
@PathVariable VerificationEnums verificationEnums) {
verificationService.check(uuid, verificationEnums);
smsUtil.sendSmsCode(mobile, verificationEnums, uuid);
return ResultUtil.success(ResultCode.VERIFICATION_SEND_SUCCESS);
}
}
package cn.lili.controller.common;

import cn.lili.cache.limit.annotation.LimitPoint;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.sms.SmsUtil;
import cn.lili.modules.verification.entity.enums.VerificationEnums;
import cn.lili.modules.verification.service.VerificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* 短信验证码接口
*
* @author Chopper
* @since 2020/11/26 15:41
*/
@RestController
@Api(tags = "短信验证码接口")
@RequestMapping("/common/common/sms")
public class SmsController {

@Autowired
private SmsUtil smsUtil;
@Autowired
private VerificationService verificationService;

@LimitPoint(name = "sms_send", key = "sms")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "path", dataType = "String", name = "mobile", value = "手机号"),
@ApiImplicitParam(paramType = "header", dataType = "String", name = "uuid", value = "uuid"),
})
@GetMapping("/{verificationEnums}/{mobile}")
@ApiOperation(value = "发送短信验证码,一分钟同一个ip请求1次")
public ResultMessage getSmsCode(
@RequestHeader String uuid,
@PathVariable String mobile,
@PathVariable VerificationEnums verificationEnums) {
verificationService.check(uuid, verificationEnums);
smsUtil.sendSmsCode(mobile, verificationEnums, uuid);
return ResultUtil.success(ResultCode.VERIFICATION_SEND_SUCCESS);
}
}
9 changes: 9 additions & 0 deletions framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
</dependency>
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
<version>7.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
Expand Down
12 changes: 12 additions & 0 deletions framework/src/main/java/cn/lili/cache/CachePrefix.java
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,25 @@ public enum CachePrefix {
* 店铺分类
*/
STORE_CATEGORY,
/**
* 用户菜单
*/
MENU_USER_ID,
/**
* 用户菜单
* <p>
* 这个缓存并非永久缓存,而是300秒缓存,也就是说修改用户关联的部门,关联的角色,
* 部门关联的角色,角色关联的菜单等等,最多需要5分钟才能生效
*/
STORE_MENU_USER_ID,
/**
* 用户菜单
*/
USER_MENU,
/**
* 用户菜单
*/
STORE_USER_MENU,
/**
* 订单暂时缓存
*/
Expand Down
15 changes: 13 additions & 2 deletions framework/src/main/java/cn/lili/common/enums/ResultCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,14 @@ public enum ResultCode {
USER_CONNECT_BANDING_ERROR(20023, "当前联合登陆方式,已绑定其他账号,需进行解绑操作"),
USER_CONNECT_NOT_EXIST_ERROR(20024, "暂无联合登陆信息,无法实现一键注册功能,请点击第三方登录进行授权"),
USER_POINTS_ERROR(20024, "用户积分不足"),

CLERK_SUPPER(20025, "店主无法操作"),
CLERK_SAVE_ERROR(20026, "店员保存失败"),
CLERK_NOT_FOUND_ERROR(20027, "店员不存在"),
USER_STATUS_ERROR(20028, "用户已禁用"),
CLERK_USER_ERROR(20029, "此账户已经绑定其他店铺"),
CLERK_ALREADY_EXIT_ERROR(20030, "店员已经存在"),
CLERK_DISABLED_ERROR(20031, "店员已禁用"),
CLERK_CURRENT_SUPPER(20032, "无法删除当前登录店员"),
/**
* 权限
*/
Expand All @@ -147,6 +154,10 @@ public enum ResultCode {
PERMISSION_MENU_ROLE_ERROR(21003, "菜单已绑定角色,请先删除或编辑角色"),
PERMISSION_DEPARTMENT_DELETE_ERROR(21004, "部门已经绑定管理员,请先删除或编辑管理员"),
PERMISSION_BEYOND_TEN(21005, "最多可以设置10个角色"),
PERMISSION_NOT_FOUND_ERROR(21006, "部门不存在"),
PERMISSION_ROLE_NOT_FOUND_ERROR(21007, "角色不存在"),
PERMISSION_CLERK_BAND_ERROR(21008, "此手机号码已绑定其他店铺 "),


/**
* 分销
Expand Down Expand Up @@ -390,7 +401,7 @@ public enum ResultCode {

STORE_NOT_EXIST(50001, "此店铺不存在"),
STORE_NAME_EXIST_ERROR(50002, "店铺名称已存在!"),
STORE_APPLY_DOUBLE_ERROR(50003, "已有店铺,无需重复申请!"),
STORE_APPLY_DOUBLE_ERROR(50003, "已经拥有店铺!"),
STORE_NOT_OPEN(50004, "该会员未开通店铺"),
STORE_NOT_LOGIN_ERROR(50005, "未登录店铺"),
STORE_CLOSE_ERROR(50006, "店铺关闭,请联系管理员"),
Expand Down
Loading

0 comments on commit 47734cf

Please sign in to comment.