站内信消息优化

This commit is contained in:
pikachu 2021-07-21 19:38:59 +08:00
commit 41835aaece
1062 changed files with 1952 additions and 1419 deletions

View File

@ -14,7 +14,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
* 买家API * 买家API
* *
* @author Chopper * @author Chopper
* @date 2020/11/16 10:03 下午 * @since 2020/11/16 10:03 下午
*/ */
@SpringBootApplication @SpringBootApplication
@EnableJpaAuditing @EnableJpaAuditing

View File

@ -21,7 +21,7 @@ import java.util.List;
* 买家端,商品分类接口 * 买家端,商品分类接口
* *
* @author Chopper * @author Chopper
* @date: 2020/11/16 10:05 下午 * @since: 2020/11/16 10:05 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,商品分类接口") @Api(tags = "买家端,商品分类接口")

View File

@ -5,7 +5,6 @@ import cn.lili.common.enums.ResultUtil;
import cn.lili.common.exception.ServiceException; import cn.lili.common.exception.ServiceException;
import cn.lili.common.vo.PageVO; import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage; import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.distribution.service.DistributionService;
import cn.lili.modules.goods.entity.dos.Goods; import cn.lili.modules.goods.entity.dos.Goods;
import cn.lili.modules.goods.entity.dto.GoodsSearchParams; import cn.lili.modules.goods.entity.dto.GoodsSearchParams;
import cn.lili.modules.goods.entity.vos.GoodsVO; import cn.lili.modules.goods.entity.vos.GoodsVO;
@ -38,7 +37,7 @@ import java.util.Map;
* 买家端,商品接口 * 买家端,商品接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/16 10:06 下午 * @since 2020/11/16 10:06 下午
*/ */
@Slf4j @Slf4j
@Api(tags = "买家端,商品接口") @Api(tags = "买家端,商品接口")
@ -61,12 +60,6 @@ public class GoodsBuyerController {
*/ */
@Autowired @Autowired
private EsGoodsSearchService goodsSearchService; private EsGoodsSearchService goodsSearchService;
/**
* 分销员
*/
@Autowired
private DistributionService distributionService;
@ApiOperation(value = "通过id获取商品信息") @ApiOperation(value = "通过id获取商品信息")
@ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "path", dataType = "Long") @ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "path", dataType = "Long")

View File

@ -27,7 +27,7 @@ import javax.validation.constraints.NotNull;
* 买家端,买家优惠券接口 * 买家端,买家优惠券接口
* *
* @author paulG * @author paulG
* @date 2020/11/17 3:35 下午 * @since 2020/11/17 3:35 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,买家优惠券接口") @Api(tags = "买家端,买家优惠券接口")

View File

@ -19,7 +19,7 @@ import java.util.List;
* 买家端,浏览历史接口 * 买家端,浏览历史接口
* *
* @author Chopper * @author Chopper
* @date: 2020/11/16 10:06 下午 * @since: 2020/11/16 10:06 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,浏览历史接口") @Api(tags = "买家端,浏览历史接口")

View File

@ -20,7 +20,7 @@ import javax.validation.Valid;
* 买家端,会员地址接口 * 买家端,会员地址接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2020/11/16 10:07 下午 * @since: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,会员地址接口") @Api(tags = "买家端,会员地址接口")

View File

@ -18,7 +18,7 @@ import javax.validation.constraints.NotNull;
* 买家端,会员收藏接口 * 买家端,会员收藏接口
* *
* @author Chopper * @author Chopper
* @date: 2020/11/17 2:32 下午 * @since: 2020/11/17 2:32 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,会员收藏接口") @Api(tags = "买家端,会员收藏接口")

View File

@ -24,7 +24,7 @@ import javax.validation.constraints.NotNull;
* 买家端,会员商品评价接口 * 买家端,会员商品评价接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2020/11/16 10:08 下午 * @since: 2020/11/16 10:08 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,会员商品评价接口") @Api(tags = "买家端,会员商品评价接口")

View File

@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
* 买家端,会员站内消息接口 * 买家端,会员站内消息接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2020/11/16 10:07 下午 * @since: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,会员站内消息接口") @Api(tags = "买家端,会员站内消息接口")

View File

@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
* 买家端,会员发票接口 * 买家端,会员发票接口
* *
* @author paulG * @author paulG
* @date: 2021-03-29 14:10:16 * @since: 2021-03-29 14:10:16
*/ */
@RestController @RestController
@Api(tags = "买家端,会员发票接口") @Api(tags = "买家端,会员发票接口")

View File

@ -18,7 +18,7 @@ import java.util.List;
* 会员签到控制器 * 会员签到控制器
* *
* @author pikachu * @author pikachu
* @date: 2020/11/16 10:07 下午 * @since: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "买家端会员签到API") @Api(tags = "买家端会员签到API")

View File

@ -30,7 +30,7 @@ import javax.validation.constraints.Pattern;
* 买家端,会员余额接口 * 买家端,会员余额接口
* *
* @author pikachu * @author pikachu
* @date: 2020/11/16 10:07 下午 * @since: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,会员余额接口") @Api(tags = "买家端,会员余额接口")

View File

@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,余额提现记录接口 * 买家端,余额提现记录接口
* *
* @author pikachu * @author pikachu
* @date: 2020/11/16 10:07 下午 * @since: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,余额提现记录接口") @Api(tags = "买家端,余额提现记录接口")

View File

@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,会员积分历史接口 * 买家端,会员积分历史接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date 2020-02-25 14:10:16 * @since 2020-02-25 14:10:16
*/ */
@RestController @RestController
@Api(tags = "买家端,会员积分历史接口") @Api(tags = "买家端,会员积分历史接口")

View File

@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,预存款充值记录接口 * 买家端,预存款充值记录接口
* *
* @author pikachu * @author pikachu
* @date: 2020/11/16 10:07 下午 * @since: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,预存款充值记录接口") @Api(tags = "买家端,预存款充值记录接口")

View File

@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,会员站服务消息接口 * 买家端,会员站服务消息接口
* *
* @author Chopper * @author Chopper
* @date: 2020/11/17 2:31 下午 * @since: 2020/11/17 2:31 下午
*/ */
@RestController @RestController
@RequestMapping("/service/notice") @RequestMapping("/service/notice")

View File

@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,APP版本 * 买家端,APP版本
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2021/5/21 11:15 上午 * @since: 2021/5/21 11:15 上午
*/ */
@RestController @RestController
@Api(tags = "买家端,APP版本") @Api(tags = "买家端,APP版本")

View File

@ -25,7 +25,7 @@ import java.util.List;
* 买家端,文章接口 * 买家端,文章接口
* *
* @author Chopper * @author Chopper
* @date: 2020/11/16 10:02 下午 * @since: 2020/11/16 10:02 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,文章接口") @Api(tags = "买家端,文章接口")

View File

@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,意见反馈接口 * 买家端,意见反馈接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date 2020-05-5 15:10:16 * @since 2020-05-5 15:10:16
*/ */
@RestController @RestController
@Api(tags = "买家端,意见反馈接口") @Api(tags = "买家端,意见反馈接口")

View File

@ -17,7 +17,7 @@ import java.util.List;
* 买家端,物流公司接口 * 买家端,物流公司接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date 2020-05-5 15:10:16 * @since 2020-05-5 15:10:16
*/ */
@RestController @RestController
@Api(tags = "买家端,物流公司接口") @Api(tags = "买家端,物流公司接口")

View File

@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,页面接口 * 买家端,页面接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/16 10:08 下午 * @since 2020/11/16 10:08 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,页面接口") @Api(tags = "买家端,页面接口")

View File

@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,直播间接口 * 买家端,直播间接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2021/5/20 12:03 下午 * @since: 2021/5/20 12:03 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,直播间接口") @Api(tags = "买家端,直播间接口")

View File

@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.*;
* 买家端,分销员接口 * 买家端,分销员接口
* *
* @author pikachu * @author pikachu
* @date: 2020/11/16 10:03 下午 * @since: 2020/11/16 10:03 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,分销员接口") @Api(tags = "买家端,分销员接口")

View File

@ -26,7 +26,7 @@ import javax.validation.constraints.NotNull;
* 买家端,分销商品佣金提现接口 * 买家端,分销商品佣金提现接口
* *
* @author pikachu * @author pikachu
* @date: 2020/11/16 10:03 下午 * @since: 2020/11/16 10:03 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,分销商品佣金提现接口") @Api(tags = "买家端,分销商品佣金提现接口")

View File

@ -25,7 +25,7 @@ import javax.validation.constraints.NotNull;
* 买家端,分销商品接口 * 买家端,分销商品接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2020/11/16 10:06 下午 * @since: 2020/11/16 10:06 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,分销商品接口") @Api(tags = "买家端,分销商品接口")

View File

@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,分销商品佣金提现接口 * 买家端,分销商品佣金提现接口
* *
* @author pikachu * @author pikachu
* @date: 2020/11/16 10:03 下午 * @since: 2020/11/16 10:03 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,分销订单接口") @Api(tags = "买家端,分销订单接口")

View File

@ -23,7 +23,7 @@ import javax.validation.constraints.NotNull;
* 买家端,会员接口 * 买家端,会员接口
* *
* @author Chopper * @author Chopper
* @date: 2020/11/16 10:07 下午 * @since: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,会员接口") @Api(tags = "买家端,会员接口")

View File

@ -17,7 +17,7 @@ import java.util.List;
* 买家端,app/小程序 联合登录 * 买家端,app/小程序 联合登录
* *
* @author Chopper * @author Chopper
* @date 2020-11-25 19:29 * @since 2020-11-25 19:29
*/ */
@RestController @RestController
@Api(tags = "买家端,app/小程序 联合登录") @Api(tags = "买家端,app/小程序 联合登录")

View File

@ -29,7 +29,6 @@ import java.io.IOException;
* 买家端,web联合登录 * 买家端,web联合登录
* *
* @author Chopper * @author Chopper
* @date 2020-11-25 19:29
*/ */
@Slf4j @Slf4j
@RestController @RestController

View File

@ -23,7 +23,7 @@ import java.util.List;
* 买家端,小程序登录接口 * 买家端,小程序登录接口
* *
* @author Chopper * @author Chopper
* @date 2021/2/19 09:28 * @since 2021/2/19 09:28
*/ */
@RestController @RestController
@RequestMapping("/buyer/mini-program") @RequestMapping("/buyer/mini-program")

View File

@ -25,7 +25,7 @@ import javax.servlet.http.HttpServletResponse;
* 买家端,收银台接口 * 买家端,收银台接口
* *
* @author Chopper * @author Chopper
* @date 2020-12-18 16:59 * @since 2020-12-18 16:59
*/ */
@Slf4j @Slf4j
@RestController @RestController

View File

@ -17,7 +17,7 @@ import javax.servlet.http.HttpServletRequest;
* 买家端,退款回调 * 买家端,退款回调
* *
* @author Chopper * @author Chopper
* @date 2020-12-18 16:59 * @since 2020-12-18 16:59
*/ */
@Api(tags = "买家端,退款回调") @Api(tags = "买家端,退款回调")
@RestController @RestController

View File

@ -27,7 +27,7 @@ import java.util.List;
* 买家端,拼团接口 * 买家端,拼团接口
* *
* @author paulG * @author paulG
* @date 2021/2/20 * @since 2021/2/20
**/ **/
@Api(tags = "买家端,拼团接口") @Api(tags = "买家端,拼团接口")
@RestController @RestController

View File

@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,积分商品接口 * 买家端,积分商品接口
* *
* @author paulG * @author paulG
* @date 2021/1/19 * @since 2021/1/19
**/ **/
@RestController @RestController
@Api(tags = "买家端,积分商品接口") @Api(tags = "买家端,积分商品接口")

View File

@ -20,7 +20,7 @@ import java.util.List;
* 买家端,秒杀活动接口 * 买家端,秒杀活动接口
* *
* @author paulG * @author paulG
* @date 2020/11/17 2:30 下午 * @since 2020/11/17 2:30 下午
*/ */
@Api(tags = "买家端,秒杀活动接口") @Api(tags = "买家端,秒杀活动接口")
@RestController @RestController

View File

@ -20,7 +20,7 @@ import javax.validation.constraints.NotNull;
* 买家端,采购接口 * 买家端,采购接口
* *
* @author Chopper * @author Chopper
* @date: 2020/11/16 10:06 下午 * @since: 2020/11/16 10:06 下午
*/ */
@Api(tags = "买家端,采购接口") @Api(tags = "买家端,采购接口")
@RestController @RestController

View File

@ -18,7 +18,7 @@ import java.util.List;
* 买家端,采购报价接口 * 买家端,采购报价接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2020/11/16 10:06 下午 * @since: 2020/11/16 10:06 下午
*/ */
@Api(tags = "买家端,采购报价接口") @Api(tags = "买家端,采购报价接口")
@RestController @RestController

View File

@ -29,7 +29,7 @@ import java.util.List;
* 买家端,店铺接口 * 买家端,店铺接口
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2020/11/17 2:32 下午 * @since: 2020/11/17 2:32 下午
*/ */
@RestController @RestController
@RequestMapping("/buyer/store") @RequestMapping("/buyer/store")

View File

@ -30,7 +30,7 @@ import java.util.List;
* 买家端,售后管理接口 * 买家端,售后管理接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/16 10:02 下午 * @since 2020/11/16 10:02 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,售后管理接口") @Api(tags = "买家端,售后管理接口")
@ -95,7 +95,7 @@ public class AfterSaleBuyerController {
public ResultMessage<AfterSale> delivery(@NotNull(message = "售后编号不能为空") @PathVariable("afterSaleSn") String afterSaleSn, public ResultMessage<AfterSale> delivery(@NotNull(message = "售后编号不能为空") @PathVariable("afterSaleSn") String afterSaleSn,
@NotNull(message = "发货单号不能为空") @RequestParam String logisticsNo, @NotNull(message = "发货单号不能为空") @RequestParam String logisticsNo,
@NotNull(message = "请选择物流公司") @RequestParam String logisticsId, @NotNull(message = "请选择物流公司") @RequestParam String logisticsId,
@NotNull(message = "请选择发货时间") @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date mDeliverTime) { @NotNull(message = "请选择发货时间") @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") Date mDeliverTime) {
return ResultUtil.data(afterSaleService.buyerDelivery(afterSaleSn, logisticsNo, logisticsId, mDeliverTime)); return ResultUtil.data(afterSaleService.buyerDelivery(afterSaleSn, logisticsNo, logisticsId, mDeliverTime));
} }

View File

@ -25,7 +25,7 @@ import javax.validation.constraints.NotNull;
* 买家端购物车接口 * 买家端购物车接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/16 10:04 下午 * @since 2020/11/16 10:04 下午
*/ */
@Slf4j @Slf4j
@RestController @RestController

View File

@ -28,7 +28,7 @@ import javax.validation.constraints.NotNull;
* 买家端,订单接口 * 买家端,订单接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/16 10:08 下午 * @since 2020/11/16 10:08 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,订单接口") @Api(tags = "买家端,订单接口")

View File

@ -21,7 +21,7 @@ import javax.validation.constraints.Min;
* 买家端,预存款充值记录接口 * 买家端,预存款充值记录接口
* *
* @author paulG * @author paulG
* @date: 2020/11/16 10:07 下午 * @since: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,预存款充值记录接口") @Api(tags = "买家端,预存款充值记录接口")

View File

@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
* 买家端,预存款变动日志记录接口 * 买家端,预存款变动日志记录接口
* *
* @author pikachu * @author pikachu
* @date: 2020/11/16 10:07 下午 * @since: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "买家端,预存款变动日志记录接口") @Api(tags = "买家端,预存款变动日志记录接口")

View File

@ -35,8 +35,7 @@ import java.util.List;
* *
* @author Chopper * @author Chopper
* @version v4.1 * @version v4.1
* @date 2020/11/17 3:37 下午 * @since 2020/11/17 3:37 下午
* @Description:
* @since * @since
*/ */
@Slf4j @Slf4j

View File

@ -19,7 +19,6 @@ import org.springframework.web.cors.CorsConfigurationSource;
* *
* @author Chopper * @author Chopper
* @version v4.0 * @version v4.0
* @Description:
* @since 2020/11/14 16:20 * @since 2020/11/14 16:20
*/ */

View File

@ -8,7 +8,7 @@ import org.springframework.cache.annotation.EnableCaching;
* 基础API * 基础API
* *
* @author Chopper * @author Chopper
* @date 2020/11/17 3:38 下午 * @since 2020/11/17 3:38 下午
*/ */
@EnableCaching @EnableCaching
@SpringBootApplication @SpringBootApplication

View File

@ -27,7 +27,7 @@ import java.util.List;
* 文件管理管理接口 * 文件管理管理接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/26 15:41 * @since 2020/11/26 15:41
*/ */
@RestController @RestController
@Api(tags = "文件管理管理接口") @Api(tags = "文件管理管理接口")

View File

@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
* 文件管理管理接口 * 文件管理管理接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/26 15:41 * @since 2020/11/26 15:41
*/ */
@RestController @RestController
@Api(tags = "文件管理管理接口") @Api(tags = "文件管理管理接口")

View File

@ -19,7 +19,6 @@ import java.util.List;
* 地址信息接口 * 地址信息接口
* *
* @author Chopper * @author Chopper
* @date: 2020/11/16 10:07 下午
*/ */
@RestController @RestController
@Api(tags = "地址信息接口") @Api(tags = "地址信息接口")

View File

@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
* 滑块验证码接口 * 滑块验证码接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/26 15:41 * @since 2020/11/26 15:41
*/ */
@Slf4j @Slf4j
@RestController @RestController

View File

@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
* 短信验证码接口 * 短信验证码接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/26 15:41 * @since 2020/11/26 15:41
*/ */
@RestController @RestController
@Api(tags = "短信验证码接口") @Api(tags = "短信验证码接口")

View File

@ -35,7 +35,7 @@ import java.io.InputStream;
* 文件上传接口 * 文件上传接口
* *
* @author Chopper * @author Chopper
* @date 2020/11/26 15:41 * @since 2020/11/26 15:41
*/ */
@Slf4j @Slf4j
@RestController @RestController

View File

@ -17,7 +17,6 @@ import org.springframework.web.cors.CorsConfigurationSource;
* *
* @author Chopper * @author Chopper
* @version v4.0 * @version v4.0
* @Description:
* @since 2020/11/14 16:20 * @since 2020/11/14 16:20
*/ */
@Slf4j @Slf4j

View File

@ -7,7 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 消费者 * 消费者
* *
* @author Chopper * @author Chopper
* @date 2020/11/16 10:03 下午 * @since 2020/11/16 10:03 下午
*/ */
@SpringBootApplication @SpringBootApplication
public class ConsumerApplication { public class ConsumerApplication {

View File

@ -7,7 +7,7 @@ import cn.lili.modules.order.order.entity.dos.AfterSale;
* 售后单改变状态 * 售后单改变状态
* *
* @author Chopper * @author Chopper
* @date 2020/11/17 7:13 下午 * @since 2020/11/17 7:13 下午
*/ */
public interface AfterSaleStatusChangeEvent { public interface AfterSaleStatusChangeEvent {

View File

@ -6,7 +6,7 @@ import cn.lili.modules.member.entity.dos.MemberEvaluation;
* 订单状态改变事件 * 订单状态改变事件
* *
* @author Chopper * @author Chopper
* @date 2020/11/17 7:13 下午 * @since 2020/11/17 7:13 下午
*/ */
public interface GoodsCommentCompleteEvent { public interface GoodsCommentCompleteEvent {

View File

@ -6,7 +6,7 @@ import cn.lili.modules.member.entity.dto.MemberPointMessage;
* 会员积分改变消息 * 会员积分改变消息
* *
* @author Chopper * @author Chopper
* @date 2020/11/17 7:13 下午 * @since 2020/11/17 7:13 下午
*/ */
public interface MemberPointChangeEvent { public interface MemberPointChangeEvent {

View File

@ -6,7 +6,7 @@ import cn.lili.modules.member.entity.dos.Member;
* 会员注册消息 * 会员注册消息
* *
* @author Chopper * @author Chopper
* @date 2020/11/17 7:13 下午 * @since 2020/11/17 7:13 下午
*/ */
public interface MemberRegisterEvent { public interface MemberRegisterEvent {

View File

@ -6,7 +6,7 @@ import cn.lili.modules.member.entity.dto.MemberWithdrawalMessage;
* 会员提现消息 * 会员提现消息
* *
* @author Chopper * @author Chopper
* @date 2020/11/17 7:13 下午 * @since 2020/11/17 7:13 下午
*/ */
public interface MemberWithdrawalEvent { public interface MemberWithdrawalEvent {

View File

@ -6,7 +6,7 @@ import cn.lili.modules.order.order.entity.dto.OrderMessage;
* 订单状态改变事件 * 订单状态改变事件
* *
* @author Chopper * @author Chopper
* @date 2020/11/17 7:13 下午 * @since 2020/11/17 7:13 下午
*/ */
public interface OrderStatusChangeEvent { public interface OrderStatusChangeEvent {

View File

@ -6,7 +6,7 @@ import cn.lili.modules.order.cart.entity.dto.TradeDTO;
* 订单创建消息 * 订单创建消息
* *
* @author Chopper * @author Chopper
* @date 2021/2/2 15:15 * @since 2021/2/2 15:15
*/ */
public interface TradeEvent { public interface TradeEvent {

View File

@ -22,7 +22,7 @@ import javax.annotation.Resource;
* 分销订单入库 * 分销订单入库
* *
* @author Chopper * @author Chopper
* @date 2020-07-03 11:20 * @since 2020-07-03 11:20
*/ */
@Slf4j @Slf4j
@Service @Service

View File

@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 商品SKU变化 * 商品SKU变化
* *
* @author Chopper * @author Chopper
* @date 2020-07-03 11:20 * @since 2020-07-03 11:20
*/ */
@Service @Service
public class GoodsSkuExecute implements GoodsCommentCompleteEvent { public class GoodsSkuExecute implements GoodsCommentCompleteEvent {

View File

@ -24,7 +24,7 @@ import org.springframework.stereotype.Service;
* 会员经验值 * 会员经验值
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2021/5/16 11:16 下午 * @since: 2021/5/16 11:16 下午
*/ */
@Service @Service
public class MemberExperienceExecute implements MemberRegisterEvent, GoodsCommentCompleteEvent, OrderStatusChangeEvent { public class MemberExperienceExecute implements MemberRegisterEvent, GoodsCommentCompleteEvent, OrderStatusChangeEvent {

View File

@ -28,7 +28,7 @@ import org.springframework.stereotype.Service;
* 会员积分 * 会员积分
* *
* @author Bulbasaur * @author Bulbasaur
* @date 2020-07-03 11:20 * @since 2020-07-03 11:20
*/ */
@Service @Service
public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentCompleteEvent, OrderStatusChangeEvent, AfterSaleStatusChangeEvent { public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentCompleteEvent, OrderStatusChangeEvent, AfterSaleStatusChangeEvent {

View File

@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
* 会员钱包创建 * 会员钱包创建
* *
* @author Chopper * @author Chopper
* @date 2020-07-03 11:20 * @since 2020-07-03 11:20
*/ */
@Service @Service
public class MemberWalletExecute implements MemberRegisterEvent { public class MemberWalletExecute implements MemberRegisterEvent {

View File

@ -28,7 +28,7 @@ import java.util.Map;
* 通知类消息实现 * 通知类消息实现
* *
* @author Chopper * @author Chopper
* @date 2020-07-03 11:20 * @since 2020-07-03 11:20
**/ **/
@Service @Service
public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent, AfterSaleStatusChangeEvent, MemberPointChangeEvent, MemberWithdrawalEvent { public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent, AfterSaleStatusChangeEvent, MemberPointChangeEvent, MemberWithdrawalEvent {

View File

@ -19,7 +19,7 @@ import java.util.List;
* 订单创建发票相关处理 * 订单创建发票相关处理
* *
* @author Chopper * @author Chopper
* @date 2020-07-03 11:20 * @since 2020-07-03 11:20
**/ **/
@Service @Service
public class OrderCreateReceiptExecute implements TradeEvent { public class OrderCreateReceiptExecute implements TradeEvent {

View File

@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 订单状态处理类 * 订单状态处理类
* *
* @author Chopper * @author Chopper
* @date 2020-07-03 11:20 * @since 2020-07-03 11:20
**/ **/
@Service @Service
public class OrderStatusHandlerExecute implements TradeEvent { public class OrderStatusHandlerExecute implements TradeEvent {

View File

@ -18,7 +18,7 @@ import org.springframework.stereotype.Service;
* 支付 * 支付
* *
* @author Chopper * @author Chopper
* @date 2021-03-13 16:58 * @since 2021-03-13 16:58
*/ */
@Slf4j @Slf4j
@Service @Service

View File

@ -16,7 +16,7 @@ import java.util.List;
* 注册赠券活动 * 注册赠券活动
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2021/5/24 10:48 上午 * @since: 2021/5/24 10:48 上午
*/ */
@Component @Component
public class RegisteredCouponActivityExecute implements MemberRegisterEvent { public class RegisteredCouponActivityExecute implements MemberRegisterEvent {

View File

@ -26,7 +26,7 @@ import java.util.List;
* 库存扣减他表示了订单状态是否出库成功 * 库存扣减他表示了订单状态是否出库成功
* *
* @author Chopper * @author Chopper
* @date 2020-07-03 11:20 * @since 2020-07-03 11:20
*/ */
@Slf4j @Slf4j
@Service @Service
@ -161,6 +161,11 @@ public class StockUpdateExecute implements OrderStatusChangeEvent {
/** /**
* 同步库存和促销库存 * 同步库存和促销库存
* *
* 需修改DB商品库存Sku商品库存活动商品库存
* 1.获取需要修改的Sku列表活动商品列表
* 2.写入sku商品库存批量修改
* 3.写入促销商品的卖出数量剩余数量,批量修改
* 4.调用方法修改商品库存
* @param order 订单 * @param order 订单
*/ */
private void synchroDB(OrderDetailVO order) { private void synchroDB(OrderDetailVO order) {

View File

@ -21,7 +21,7 @@ import org.springframework.stereotype.Component;
* 虚拟商品 * 虚拟商品
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2021/5/29 9:17 上午 * @since: 2021/5/29 9:17 上午
*/ */
@Component @Component
public class VerificationOrderExecute implements OrderStatusChangeEvent { public class VerificationOrderExecute implements OrderStatusChangeEvent {

View File

@ -5,7 +5,7 @@ package cn.lili.timetask.handler;
* 每日凌晨1点执行 * 每日凌晨1点执行
* *
* @author Chopper * @author Chopper
* @date 2020/12/24 11:52 * @since 2020/12/24 11:52
*/ */
public interface EveryDayExecute { public interface EveryDayExecute {

View File

@ -4,7 +4,7 @@ package cn.lili.timetask.handler;
* 每小时任务 * 每小时任务
* *
* @author Chopper * @author Chopper
* @date 2020/12/24 11:52 * @since 2020/12/24 11:52
*/ */
public interface EveryHourExecute { public interface EveryHourExecute {

View File

@ -4,7 +4,7 @@ package cn.lili.timetask.handler;
* 每分钟任务 * 每分钟任务
* *
* @author Chopper * @author Chopper
* @date 2020/12/24 11:52 * @since 2020/12/24 11:52
*/ */
public interface EveryMinuteExecute { public interface EveryMinuteExecute {

View File

@ -16,7 +16,7 @@ import java.util.List;
* 店铺结算执行 * 店铺结算执行
* *
* @author Bulbasaur * @author Bulbasaur
* @date 2021/2/18 3:45 下午 * @since 2021/2/18 3:45 下午
*/ */
@Component @Component
public class BillExecute implements EveryDayExecute { public class BillExecute implements EveryDayExecute {

View File

@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
* 小程序直播状态获取 * 小程序直播状态获取
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2021/5/20 2:52 下午 * @since: 2021/5/20 2:52 下午
*/ */
@Component @Component
public class BroadcastExecute implements EveryHourExecute { public class BroadcastExecute implements EveryHourExecute {

View File

@ -13,7 +13,7 @@ import org.springframework.stereotype.Component;
* 优惠券状态监测 * 优惠券状态监测
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2021/5/24 10:08 上午 * @since: 2021/5/24 10:08 上午
*/ */
@Component @Component
public class CouponExecute implements EveryDayExecute { public class CouponExecute implements EveryDayExecute {

View File

@ -18,7 +18,7 @@ import java.util.Map;
* 商品定时器 * 商品定时器
* *
* @author Chopper * @author Chopper
* @date 2021/3/18 3:23 下午 * @since 2021/3/18 3:23 下午
*/ */
@Component @Component
public class GoodsExecute implements EveryDayExecute { public class GoodsExecute implements EveryDayExecute {

View File

@ -23,7 +23,7 @@ import java.util.stream.Collectors;
* 订单自动取消每分钟执行 * 订单自动取消每分钟执行
* *
* @author paulG * @author paulG
* @date 2021/3/11 * @since 2021/3/11
**/ **/
@Slf4j @Slf4j
@Component @Component

View File

@ -33,7 +33,7 @@ import java.util.List;
* 促销活动每日定时器 * 促销活动每日定时器
* *
* @author Chopper * @author Chopper
* @date 2021/3/18 3:23 下午 * @since 2021/3/18 3:23 下午
*/ */
@Slf4j @Slf4j
@Component @Component

View File

@ -14,7 +14,7 @@ import java.util.Date;
* 会员数据统计 * 会员数据统计
* *
* @author Chopper * @author Chopper
* @date 2021-03-02 14:56 * @since 2021-03-02 14:56
*/ */
@Slf4j @Slf4j
@Component @Component

View File

@ -19,7 +19,7 @@ import java.util.stream.Collectors;
* 实时在线人数统计 * 实时在线人数统计
* *
* @author Chopper * @author Chopper
* @date 2021-02-21 09:47 * @since 2021-02-21 09:47
*/ */
@Component @Component
public class OnlineMemberStatistics implements EveryHourExecute { public class OnlineMemberStatistics implements EveryHourExecute {

View File

@ -21,7 +21,7 @@ import java.util.List;
* 店铺评分 * 店铺评分
* *
* @author Chopper * @author Chopper
* @date 2021/3/15 5:30 下午 * @since 2021/3/15 5:30 下午
*/ */
@Component @Component
public class StoreRatingExecute implements EveryDayExecute { public class StoreRatingExecute implements EveryDayExecute {

View File

@ -23,7 +23,7 @@ import java.util.List;
* 统计 入库 * 统计 入库
* *
* @author Chopper * @author Chopper
* @date 2021-01-15 18:20 * @since 2021-01-15 18:20
*/ */
@Slf4j @Slf4j
@Component @Component

View File

@ -15,7 +15,7 @@ import org.springframework.stereotype.Component;
* 事件触发消费者 * 事件触发消费者
* *
* @author paulG * @author paulG
* @date 2020/11/17 7:19 下午 * @since 2020/11/17 7:19 下午
*/ */
@Component @Component
@Slf4j @Slf4j

View File

@ -13,7 +13,7 @@ import org.springframework.stereotype.Component;
* 直播间事件触发 * 直播间事件触发
* *
* @author Bulbasaur * @author Bulbasaur
* @date: 2021/6/1 5:02 下午 * @since: 2021/6/1 5:02 下午
*/ */
@Slf4j @Slf4j
@Component(TimeExecuteConstant.BROADCAST_EXECUTOR) @Component(TimeExecuteConstant.BROADCAST_EXECUTOR)

View File

@ -20,7 +20,7 @@ import org.springframework.stereotype.Component;
* *
* @author Chopper * @author Chopper
* @version v4.1 * @version v4.1
* @date 2020/11/17 7:20 下午 * @since 2020/11/17 7:20 下午
*/ */
@Slf4j @Slf4j
@Component(TimeExecuteConstant.PROMOTION_EXECUTOR) @Component(TimeExecuteConstant.PROMOTION_EXECUTOR)

View File

@ -57,7 +57,7 @@ public abstract class BaseEntity implements Serializable {
@CreatedDate @CreatedDate
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间", hidden = true) @ApiModelProperty(value = "创建时间", hidden = true)
private Date createTime; private Date createTime;
@ -69,7 +69,7 @@ public abstract class BaseEntity implements Serializable {
@LastModifiedDate @LastModifiedDate
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.UPDATE) @TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "更新时间", hidden = true) @ApiModelProperty(value = "更新时间", hidden = true)
private Date updateTime; private Date updateTime;

View File

@ -19,7 +19,7 @@ public interface Cache<T> {
/** /**
* Get an item from the cache, nontransactionally * Get an item from the cache, nontransactionally
* *
* @param key * @param key 缓存key
* @return the cached object or <tt>null</tt> * @return the cached object or <tt>null</tt>
*/ */
T get(Object key); T get(Object key);
@ -27,7 +27,7 @@ public interface Cache<T> {
/** /**
* Get an item from the cache, nontransactionally * Get an item from the cache, nontransactionally
* *
* @param key * @param key 缓存key
* @return the cached object or <tt>null</tt> * @return the cached object or <tt>null</tt>
*/ */
String getString(Object key); String getString(Object key);
@ -37,14 +37,14 @@ public interface Cache<T> {
* multiGet * multiGet
* *
* @param keys 要查询的key集合 * @param keys 要查询的key集合
* @return * @return 集合
*/ */
List multiGet(Collection keys); List multiGet(Collection keys);
/** /**
* 批量set * 批量set
* *
* @param map * @param map 键值对
*/ */
void multiSet(Map map); void multiSet(Map map);
@ -60,16 +60,16 @@ public interface Cache<T> {
* Add an item to the cache, nontransactionally, with * Add an item to the cache, nontransactionally, with
* failfast semantics * failfast semantics
* *
* @param key * @param key 缓存key
* @param value * @param value 缓存value
*/ */
void put(Object key, T value); void put(Object key, T value);
/** /**
* 往缓存中写入内容 * 往缓存中写入内容
* *
* @param key * @param key 缓存key
* @param value * @param value 缓存value
* @param exp 超时时间单位为秒 * @param exp 超时时间单位为秒
*/ */
void put(Object key, T value, Long exp); void put(Object key, T value, Long exp);
@ -77,24 +77,24 @@ public interface Cache<T> {
/** /**
* 往缓存中写入内容 * 往缓存中写入内容
* *
* @param key * @param key 缓存key
* @param value * @param value 缓存value
* @param exp * @param exp 过期时间
* @param timeUnit 写入单位 * @param timeUnit 过期单位
*/ */
void put(Object key, T value, Long exp, TimeUnit timeUnit); void put(Object key, T value, Long exp, TimeUnit timeUnit);
/** /**
* 删除 * 删除
* *
* @param key * @param key 缓存key
*/ */
void remove(Object key); void remove(Object key);
/** /**
* 删除 * 删除
* *
* @param key * @param key 缓存key
*/ */
void vagueDel(Object key); void vagueDel(Object key);
@ -116,33 +116,34 @@ public interface Cache<T> {
/** /**
* 玩缓存中写入内容 * 玩缓存中写入内容
* *
* @param key * @param key 缓存key
* @param map * @param map map value
*/ */
void putAllHash(Object key, Map map); void putAllHash(Object key, Map map);
/** /**
* 读取缓存值 * 读取缓存值
* *
* @param key * @param key 缓存key
* @param hashKey * @param hashKey map value
* @return * @return 返回缓存中的数据
*/ */
T getHash(Object key, Object hashKey); T getHash(Object key, Object hashKey);
/** /**
* 读取缓存值 * 读取缓存值
* *
* @param key * @param key 缓存key
* @return * @return 缓存中的数据
*/ */
Map<Object, Object> getHash(Object key); Map<Object, Object> getHash(Object key);
/** /**
* 是否包含 * 是否包含
* *
* @param key * @param key 缓存key
* @return * @return 缓存中的数据
*
*/ */
boolean hasKey(Object key); boolean hasKey(Object key);
@ -150,8 +151,8 @@ public interface Cache<T> {
/** /**
* 模糊匹配key * 模糊匹配key
* *
* @param pattern * @param pattern 模糊key
* @return * @return 缓存中的数据
*/ */
List<String> keys(String pattern); List<String> keys(String pattern);
@ -163,9 +164,9 @@ public interface Cache<T> {
* 效率较高的 计数器 * 效率较高的 计数器
* 如需清零按照普通key 移除即可 * 如需清零按照普通key 移除即可
* *
* @param key * @param key key值
* @param value * @param value 去重统计值
* @return * @return 计数器结果
*/ */
Long cumulative(Object key, Object value); Long cumulative(Object key, Object value);
@ -175,8 +176,8 @@ public interface Cache<T> {
* 效率较高的 计数器 统计返回 * 效率较高的 计数器 统计返回
* 如需清零按照普通key 移除即可 * 如需清零按照普通key 移除即可
* *
* @param key * @param key 计数器key
* @return * @return 计数器结果
*/ */
Long counter(Object key); Long counter(Object key);
@ -184,7 +185,7 @@ public interface Cache<T> {
* 批量计数 * 批量计数
* *
* @param keys 要查询的key集合 * @param keys 要查询的key集合
* @return * @return 批量计数
*/ */
List multiCounter(Collection keys); List multiCounter(Collection keys);
@ -194,8 +195,8 @@ public interface Cache<T> {
* 效率较高的 计数器 统计返回 * 效率较高的 计数器 统计返回
* 如需清零按照普通key 移除即可 * 如需清零按照普通key 移除即可
* *
* @param key * @param key key值
* @return * @return 计数器结果
*/ */
Long mergeCounter(Object... key); Long mergeCounter(Object... key);
//---------------------------------------------------用于特殊场景redis去重统计----------------------------------------- //---------------------------------------------------用于特殊场景redis去重统计-----------------------------------------
@ -208,7 +209,7 @@ public interface Cache<T> {
* *
* @param key 为累计的key同一key每次调用则值 +1 * @param key 为累计的key同一key每次调用则值 +1
* @param liveTime 单位秒后失效 * @param liveTime 单位秒后失效
* @return * @return 计数器结果
*/ */
Long incr(String key, long liveTime); Long incr(String key, long liveTime);
//-----------------------------------------------redis计数--------------------------------------------- //-----------------------------------------------redis计数---------------------------------------------
@ -230,7 +231,7 @@ public interface Cache<T> {
* @param sortedSetName sortedSetName * @param sortedSetName sortedSetName
* @param start 查询范围开始位置 * @param start 查询范围开始位置
* @param end 查询范围结束位置 * @param end 查询范围结束位置
* @return * @return 获取满足条件的集合
*/ */
Set<ZSetOperations.TypedTuple<Object>> reverseRangeWithScores(String sortedSetName, Integer start, Integer end); Set<ZSetOperations.TypedTuple<Object>> reverseRangeWithScores(String sortedSetName, Integer start, Integer end);

View File

@ -86,7 +86,7 @@ public class RedisCache implements Cache {
/** /**
* 删除 * 删除
* *
* @param key * @param key 模糊删除key
*/ */
@Override @Override
public void vagueDel(Object key) { public void vagueDel(Object key) {
@ -130,7 +130,7 @@ public class RedisCache implements Cache {
* 获取符合条件的key * 获取符合条件的key
* *
* @param pattern 表达式 * @param pattern 表达式
* @return * @return 模糊匹配key
*/ */
@Override @Override
public List<String> keys(String pattern) { public List<String> keys(String pattern) {
@ -236,7 +236,7 @@ public class RedisCache implements Cache {
* @param sortedSetName sortedSetName * @param sortedSetName sortedSetName
* @param start 查询范围开始位置 * @param start 查询范围开始位置
* @param end 查询范围结束位置 * @param end 查询范围结束位置
* @return * @return 符合排序的集合
*/ */
@Override @Override
public Set<ZSetOperations.TypedTuple<Object>> reverseRangeWithScores(String sortedSetName, Integer start, Integer end) { public Set<ZSetOperations.TypedTuple<Object>> reverseRangeWithScores(String sortedSetName, Integer start, Integer end) {

View File

@ -335,7 +335,7 @@ public abstract class BaseElasticsearchService {
* @param index index名 * @param index index名
* @return boolean * @return boolean
* @author fanxb * @author fanxb
* @date 2019/7/24 14:57 * @since 2019/7/24 14:57
*/ */
public boolean indexExist(String index) { public boolean indexExist(String index) {
try { try {

View File

@ -5,7 +5,7 @@ package cn.lili.common.enums;
* 客户端类型 * 客户端类型
* *
* @author Chopper * @author Chopper
* @date 2020/12/8 9:46 * @since 2020/12/8 9:46
*/ */
public enum ClientTypeEnum { public enum ClientTypeEnum {

View File

@ -5,7 +5,7 @@ package cn.lili.common.enums;
* 第一位 1:商品2:用户3:交易,4:促销,5:店铺,6:页面,7:设置,8:其他 * 第一位 1:商品2:用户3:交易,4:促销,5:店铺,6:页面,7:设置,8:其他
* *
* @author Chopper * @author Chopper
* @date 2020/4/8 1:36 下午 * @since 2020/4/8 1:36 下午
*/ */
public enum ResultCode { public enum ResultCode {
@ -243,11 +243,12 @@ public enum ResultCode {
/** /**
* 优惠券 * 优惠券
*/ */
COUPON_LIMIT_ERROR(41000, "超出领取限制"),
COUPON_EDIT_STATUS_SUCCESS(41001, "修改状态成功!"), COUPON_EDIT_STATUS_SUCCESS(41001, "修改状态成功!"),
COUPON_CANCELLATION_SUCCESS(41002, "会员优惠券作废成功"), COUPON_CANCELLATION_SUCCESS(41002, "会员优惠券作废成功"),
COUPON_EXPIRED(41003, "优惠券已使用/已过期,不能使用"), COUPON_EXPIRED(41003, "优惠券已使用/已过期,不能使用"),
COUPON_EDIT_STATUS_ERROR(41004, "优惠券修改状态失败!"), COUPON_EDIT_STATUS_ERROR(41004, "优惠券修改状态失败!"),
COUPON_RECEIVE_ERROR(41005, "当前优惠券状态不可领取"), COUPON_RECEIVE_ERROR(41005, "当前优惠券已经被领取完了,下次要早点来哦"),
COUPON_NUM_INSUFFICIENT_ERROR(41006, "优惠券剩余领取数量不足"), COUPON_NUM_INSUFFICIENT_ERROR(41006, "优惠券剩余领取数量不足"),
COUPON_NOT_EXIST(41007, "当前优惠券不存在"), COUPON_NOT_EXIST(41007, "当前优惠券不存在"),
COUPON_LIMIT_NUM_LESS_THAN_0(41008, "领取限制数量不能为负数"), COUPON_LIMIT_NUM_LESS_THAN_0(41008, "领取限制数量不能为负数"),

View File

@ -33,8 +33,8 @@ public class ResultUtil<T> {
/** /**
* 返回数据 * 返回数据
* *
* @param t * @param t 范型
* @return * @return 消息
*/ */
public ResultMessage<T> setData(T t) { public ResultMessage<T> setData(T t) {
this.resultMessage.setResult(t); this.resultMessage.setResult(t);
@ -58,9 +58,9 @@ public class ResultUtil<T> {
/** /**
* 抽象静态方法返回结果集 * 抽象静态方法返回结果集
* @param t * @param t 范型
* @param <T> * @param <T> 范型
* @return * @return 消息
*/ */
public static <T> ResultMessage<T> data(T t) { public static <T> ResultMessage<T> data(T t) {
return new ResultUtil<T>().setData(t); return new ResultUtil<T>().setData(t);
@ -70,6 +70,7 @@ public class ResultUtil<T> {
* 返回成功 * 返回成功
* *
* @param resultCode 返回状态码 * @param resultCode 返回状态码
* @return 消息
*/ */
public static <T> ResultMessage<T> success(ResultCode resultCode) { public static <T> ResultMessage<T> success(ResultCode resultCode) {
return new ResultUtil<T>().setSuccessMsg(resultCode); return new ResultUtil<T>().setSuccessMsg(resultCode);
@ -77,6 +78,7 @@ public class ResultUtil<T> {
/** /**
* 返回成功 * 返回成功
* @return 消息
*/ */
public static <T> ResultMessage<T> success() { public static <T> ResultMessage<T> success() {
return new ResultUtil<T>().setSuccessMsg(ResultCode.SUCCESS); return new ResultUtil<T>().setSuccessMsg(ResultCode.SUCCESS);
@ -86,6 +88,7 @@ public class ResultUtil<T> {
* 返回失败 * 返回失败
* *
* @param resultCode 返回状态码 * @param resultCode 返回状态码
* @return 消息
*/ */
public static <T> ResultMessage<T> error(ResultCode resultCode) { public static <T> ResultMessage<T> error(ResultCode resultCode) {
return new ResultUtil<T>().setErrorMsg(resultCode); return new ResultUtil<T>().setErrorMsg(resultCode);
@ -96,6 +99,7 @@ public class ResultUtil<T> {
* *
* @param code 状态码 * @param code 状态码
* @param msg 返回消息 * @param msg 返回消息
* @return 消息
*/ */
public static <T> ResultMessage<T> error(Integer code, String msg) { public static <T> ResultMessage<T> error(Integer code, String msg) {
return new ResultUtil<T>().setErrorMsg(code, msg); return new ResultUtil<T>().setErrorMsg(code, msg);
@ -103,8 +107,8 @@ public class ResultUtil<T> {
/** /**
* 服务器异常 追加状态码 * 服务器异常 追加状态码
*
* @param resultCode 返回码 * @param resultCode 返回码
* @return 消息
*/ */
public ResultMessage<T> setErrorMsg(ResultCode resultCode) { public ResultMessage<T> setErrorMsg(ResultCode resultCode) {
this.resultMessage.setSuccess(false); this.resultMessage.setSuccess(false);
@ -118,6 +122,7 @@ public class ResultUtil<T> {
* *
* @param code 状态码 * @param code 状态码
* @param msg 返回消息 * @param msg 返回消息
* @return 消息
*/ */
public ResultMessage<T> setErrorMsg(Integer code, String msg) { public ResultMessage<T> setErrorMsg(Integer code, String msg) {
this.resultMessage.setSuccess(false); this.resultMessage.setSuccess(false);

View File

@ -24,7 +24,7 @@ public class ServiceException extends RuntimeException {
private ResultCode resultCode; private ResultCode resultCode;
public ServiceException(String msg) { public ServiceException(String msg) {
super(msg); this.resultCode = ResultCode.ERROR;
this.msg = msg; this.msg = msg;
} }

View File

@ -17,7 +17,6 @@ import java.util.Map;
* *
* @author Chopper * @author Chopper
* @version v4.0 * @version v4.0
* @Description:
* @since 2020/12/24 19:31 * @since 2020/12/24 19:31
*/ */

View File

@ -1,36 +0,0 @@
package cn.lili.common.security.context;
import cn.lili.common.security.AuthUser;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Component;
/**
* 获取用户信息 处理
*
* @author Chopper
* @version v4.0
* @Description:
* @since 2020/11/14 20:35
*/
@Component
public class AuthenticationHandler {
/**
* 获取当前用户信息
*
* @return
*/
public AuthUser getAuthUser() {
//获取spring security 权限信息如果token有权限在这里就会得到内容
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (authentication == null) {
return null;
}
Object object = authentication.getDetails();
if (object instanceof AuthUser) {
return (AuthUser) authentication.getDetails();
}
return null;
}
}

View File

@ -19,7 +19,6 @@ import javax.servlet.http.HttpServletRequest;
* *
* @author Chopper * @author Chopper
* @version v4.0 * @version v4.0
* @Description:
* @since 2020/11/14 20:27 * @since 2020/11/14 20:27
*/ */
public class UserContext { public class UserContext {
@ -27,7 +26,7 @@ public class UserContext {
/** /**
* 根据request获取用户信息 * 根据request获取用户信息
* *
* @return * @return 授权用户
*/ */
public static AuthUser getCurrentUser() { public static AuthUser getCurrentUser() {
if (RequestContextHolder.getRequestAttributes() != null) { if (RequestContextHolder.getRequestAttributes() != null) {
@ -44,7 +43,7 @@ public class UserContext {
* *
* @param cache 缓存 * @param cache 缓存
* @param accessToken token * @param accessToken token
* @return * @return 授权用户
*/ */
public static AuthUser getAuthUser(Cache cache, String accessToken) { public static AuthUser getAuthUser(Cache cache, String accessToken) {
try { try {
@ -61,7 +60,7 @@ public class UserContext {
* 根据jwt获取token重的用户信息 * 根据jwt获取token重的用户信息
* *
* @param accessToken token * @param accessToken token
* @return * @return 授权用户
*/ */
public static AuthUser getAuthUser(String accessToken) { public static AuthUser getAuthUser(String accessToken) {
try { try {

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