添加app用户操作记录审计
This commit is contained in:
22
yshop-app/src/main/java/co/yixiang/common/aop/AppLog.java
Normal file
22
yshop-app/src/main/java/co/yixiang/common/aop/AppLog.java
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Copyright (C) 2018-2020
|
||||
* All rights reserved, Designed By www.yixiang.co
|
||||
|
||||
*/
|
||||
package co.yixiang.common.aop;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2018-11-24
|
||||
*/
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface AppLog {
|
||||
String value() default "";
|
||||
int type() default 0;
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
/**
|
||||
* Copyright (C) 2018-2020
|
||||
* All rights reserved, Designed By www.yixiang.co
|
||||
|
||||
*/
|
||||
package co.yixiang.common.aspect;
|
||||
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.logging.domain.Log;
|
||||
import co.yixiang.logging.service.LogService;
|
||||
import co.yixiang.utils.RequestHolder;
|
||||
import co.yixiang.utils.SecurityUtils;
|
||||
import co.yixiang.utils.StringUtils;
|
||||
import co.yixiang.utils.ThrowableUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.AfterThrowing;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2018-11-24
|
||||
*/
|
||||
@Component
|
||||
@Aspect
|
||||
@Slf4j
|
||||
public class AppLogAspect {
|
||||
|
||||
private final LogService logService;
|
||||
|
||||
ThreadLocal<Long> currentTime = new ThreadLocal<>();
|
||||
|
||||
public AppLogAspect(LogService logService) {
|
||||
this.logService = logService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置切入点
|
||||
*/
|
||||
@Pointcut("@annotation(co.yixiang.logging.aop.log.Log)")
|
||||
public void logPointcut() {
|
||||
// 该方法无方法体,主要为了让同类中其他方法使用此切入点
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置环绕通知,使用在方法logPointcut()上注册的切入点
|
||||
*
|
||||
* @param joinPoint join point for advice
|
||||
*/
|
||||
@Around("logPointcut()")
|
||||
public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||
Object result;
|
||||
currentTime.set(System.currentTimeMillis());
|
||||
result = joinPoint.proceed();
|
||||
Log log = new Log("INFO",System.currentTimeMillis() - currentTime.get());
|
||||
currentTime.remove();
|
||||
HttpServletRequest request = RequestHolder.getHttpServletRequest();
|
||||
logService.save(getUsername(),
|
||||
StringUtils.getIp(RequestHolder.getHttpServletRequest()),joinPoint,
|
||||
log,getUid());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置异常通知
|
||||
*
|
||||
* @param joinPoint join point for advice
|
||||
* @param e exception
|
||||
*/
|
||||
@AfterThrowing(pointcut = "logPointcut()", throwing = "e")
|
||||
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) {
|
||||
Log log = new Log("ERROR",System.currentTimeMillis() - currentTime.get());
|
||||
currentTime.remove();
|
||||
log.setExceptionDetail(ThrowableUtil.getStackTrace(e).getBytes());
|
||||
HttpServletRequest request = RequestHolder.getHttpServletRequest();
|
||||
logService.save(getUsername(),
|
||||
StringUtils.getIp(RequestHolder.getHttpServletRequest()),
|
||||
(ProceedingJoinPoint)joinPoint, log,getUid());
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
try {
|
||||
return LocalUser.getUser().getUsername();
|
||||
}catch (Exception e){
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public Long getUid(){
|
||||
try {
|
||||
return LocalUser.getUser().getUid();
|
||||
}catch (Exception e){
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
}
|
@ -6,10 +6,11 @@
|
||||
* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台)
|
||||
* 一经发现盗用、分享等行为,将追究法律责任,后果自负
|
||||
*/
|
||||
package co.yixiang.common.aop;
|
||||
package co.yixiang.common.aspect;
|
||||
|
||||
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.common.aop.NoRepeatSubmit;
|
||||
import co.yixiang.common.util.RedisLock;
|
||||
import co.yixiang.common.util.RequestUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
@ -13,10 +13,12 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.aop.NoRepeatSubmit;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
import co.yixiang.constant.SystemConfigConstants;
|
||||
import co.yixiang.logging.aop.log.Log;
|
||||
import co.yixiang.modules.activity.domain.YxStoreBargainUser;
|
||||
import co.yixiang.modules.activity.domain.YxStoreBargainUserHelp;
|
||||
import co.yixiang.modules.activity.param.BargainShareParam;
|
||||
@ -102,6 +104,7 @@ public class StoreBargainController {
|
||||
/**
|
||||
* 砍价详情
|
||||
*/
|
||||
@AppLog(value = "查看砍价产品", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/bargain/detail/{id}")
|
||||
@ApiOperation(value = "砍价详情",notes = "砍价详情",response = YxStoreBargainQueryVo.class)
|
||||
@ -116,6 +119,7 @@ public class StoreBargainController {
|
||||
/**
|
||||
* 砍价详情统计
|
||||
*/
|
||||
@AppLog(value = "砍价详情统计", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/bargain/help/count")
|
||||
@ApiOperation(value = "砍价详情统计",notes = "砍价详情统计")
|
||||
@ -142,6 +146,7 @@ public class StoreBargainController {
|
||||
/**
|
||||
* 参与砍价
|
||||
*/
|
||||
@AppLog(value = "参与砍价", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/bargain/start")
|
||||
@ -159,6 +164,7 @@ public class StoreBargainController {
|
||||
/**
|
||||
* 帮助好友砍价
|
||||
*/
|
||||
@AppLog(value = "帮助好友砍价", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/bargain/help")
|
||||
@ -281,6 +287,7 @@ public class StoreBargainController {
|
||||
/**
|
||||
* 砍价取消
|
||||
*/
|
||||
@AppLog(value = "取消砍价", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/bargain/user/cancel")
|
||||
@ApiOperation(value = "砍价取消",notes = "砍价取消")
|
||||
|
@ -12,6 +12,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
import co.yixiang.constant.SystemConfigConstants;
|
||||
@ -87,6 +88,7 @@ public class StoreCombinationController {
|
||||
/**
|
||||
* 拼团产品详情
|
||||
*/
|
||||
@AppLog(value = "查看拼团产品详情", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/combination/detail/{id}")
|
||||
@ApiOperation(value = "拼团产品详情",notes = "拼团产品详情")
|
||||
@ -104,6 +106,7 @@ public class StoreCombinationController {
|
||||
/**
|
||||
* 拼团明细
|
||||
*/
|
||||
@AppLog(value = "查看拼团明细", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/combination/pink/{id}")
|
||||
@ApiOperation(value = "拼团明细",notes = "拼团明细")
|
||||
@ -118,6 +121,7 @@ public class StoreCombinationController {
|
||||
/**
|
||||
* 拼团海报
|
||||
*/
|
||||
@AppLog(value = "生成拼团海报", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/combination/poster")
|
||||
@ApiOperation(value = "拼团海报",notes = "拼团海报")
|
||||
@ -141,6 +145,7 @@ public class StoreCombinationController {
|
||||
/**
|
||||
* 取消开团
|
||||
*/
|
||||
@AppLog(value = "取消开团", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/combination/remove")
|
||||
@ApiOperation(value = "取消开团",notes = "取消开团")
|
||||
|
@ -13,6 +13,7 @@ import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
import co.yixiang.constant.ShopConstants;
|
||||
@ -82,6 +83,7 @@ public class StoreSeckillController {
|
||||
/**
|
||||
* 根据id获取商品秒杀产品详情
|
||||
*/
|
||||
@AppLog(value = "根据id获取商品秒杀产品详情", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/seckill/detail/{id}")
|
||||
@ApiOperation(value = "秒杀产品详情", notes = "秒杀产品详情")
|
||||
|
@ -10,6 +10,7 @@ package co.yixiang.modules.cart.rest;
|
||||
|
||||
import co.yixiang.annotation.Limit;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.aop.NoRepeatSubmit;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
@ -63,6 +64,7 @@ public class StoreCartController {
|
||||
/**
|
||||
* 购物车 添加
|
||||
*/
|
||||
@AppLog(value = "购物车 添加", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/cart/add")
|
||||
@ -81,6 +83,7 @@ public class StoreCartController {
|
||||
/**
|
||||
* 购物车列表
|
||||
*/
|
||||
@AppLog(value = "查看购物车列表", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/cart/list")
|
||||
@ApiOperation(value = "购物车列表",notes = "购物车列表")
|
||||
@ -92,6 +95,7 @@ public class StoreCartController {
|
||||
/**
|
||||
* 修改产品数量
|
||||
*/
|
||||
@AppLog(value = "修改购物车产品数量", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/cart/num")
|
||||
@ApiOperation(value = "修改产品数量",notes = "修改产品数量")
|
||||
@ -104,6 +108,7 @@ public class StoreCartController {
|
||||
/**
|
||||
* 购物车删除产品
|
||||
*/
|
||||
@AppLog(value = "购物车删除产品", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/cart/del")
|
||||
|
@ -11,6 +11,7 @@ package co.yixiang.modules.coupon.rest;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.aop.NoRepeatSubmit;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
@ -77,6 +78,7 @@ public class CouponController {
|
||||
/**
|
||||
* 领取优惠券
|
||||
*/
|
||||
@AppLog(value = "领取优惠券", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/coupon/receive")
|
||||
@ -94,6 +96,7 @@ public class CouponController {
|
||||
/**
|
||||
* 用户已领取优惠券
|
||||
*/
|
||||
@AppLog(value = "查看已领取优惠券", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/coupons/user/{type}")
|
||||
@ApiOperation(value = "用户已领取优惠券",notes = "用户已领取优惠券")
|
||||
|
@ -12,6 +12,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
import co.yixiang.modules.manage.param.OrderPriceParam;
|
||||
import co.yixiang.modules.manage.param.ShoperQueryParam;
|
||||
@ -91,6 +92,7 @@ public class ShoperController {
|
||||
/**
|
||||
* 订单列表
|
||||
*/
|
||||
@AppLog(value = "查看订单列表", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/admin/order/list")
|
||||
@ApiOperation(value = "订单列表",notes = "订单列表")
|
||||
@ -102,6 +104,7 @@ public class ShoperController {
|
||||
/**
|
||||
* 订单详情
|
||||
*/
|
||||
@AppLog(value = "查看订单详情", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/admin/order/detail/{key}")
|
||||
@ApiOperation(value = "订单详情",notes = "订单详情")
|
||||
@ -119,6 +122,7 @@ public class ShoperController {
|
||||
/**
|
||||
* 订单改价
|
||||
*/
|
||||
@AppLog(value = "订单改价", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/admin/order/price")
|
||||
@ApiOperation(value = "订单改价",notes = "订单改价")
|
||||
@ -140,6 +144,7 @@ public class ShoperController {
|
||||
/**
|
||||
* 订单发货
|
||||
*/
|
||||
@AppLog(value = "订单发货", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/admin/order/delivery/keep")
|
||||
@ApiOperation(value = "订单发货",notes = "订单发货")
|
||||
@ -152,6 +157,7 @@ public class ShoperController {
|
||||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
@AppLog(value = "订单退款", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/admin/order/refund")
|
||||
@ApiOperation(value = "订单退款",notes = "订单退款")
|
||||
|
@ -13,6 +13,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.aop.NoRepeatSubmit;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
@ -93,6 +94,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单确认
|
||||
*/
|
||||
@AppLog(value = "订单确认", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/order/confirm")
|
||||
@ApiOperation(value = "订单确认",notes = "订单确认")
|
||||
@ -135,6 +137,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单创建
|
||||
*/
|
||||
@AppLog(value = "订单创建", type = 1)
|
||||
@AuthCheck
|
||||
@NoRepeatSubmit
|
||||
@PostMapping("/order/create/{key}")
|
||||
@ -184,6 +187,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单支付
|
||||
*/
|
||||
@AppLog(value = "订单支付", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/order/pay")
|
||||
@ApiOperation(value = "订单支付",notes = "订单支付")
|
||||
@ -226,6 +230,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单列表
|
||||
*/
|
||||
@AppLog(value = "查看订单列表", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/order/list")
|
||||
@ApiImplicitParams({
|
||||
@ -245,6 +250,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单详情
|
||||
*/
|
||||
@AppLog(value = "查看订单详情", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/order/detail/{key}")
|
||||
@ApiImplicitParams({
|
||||
@ -271,6 +277,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单收货
|
||||
*/
|
||||
@AppLog(value = "订单收货", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/order/take")
|
||||
@ApiOperation(value = "订单收货",notes = "订单收货")
|
||||
@ -292,6 +299,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单评价
|
||||
*/
|
||||
@AppLog(value = "订单评价", type = 1)
|
||||
@AuthCheck
|
||||
@NoRepeatSubmit
|
||||
@PostMapping("/order/comment")
|
||||
@ -308,6 +316,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单删除
|
||||
*/
|
||||
@AppLog(value = "订单删除", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/order/del")
|
||||
@ApiOperation(value = "订单删除",notes = "订单删除")
|
||||
@ -337,6 +346,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单退款审核
|
||||
*/
|
||||
@AppLog(value = "订单退款审核", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/order/refund/verify")
|
||||
@ -353,6 +363,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单取消 未支付的订单回退积分,回退优惠券,回退库存
|
||||
*/
|
||||
@AppLog(value = "订单取消", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/order/cancel")
|
||||
@ -382,6 +393,7 @@ public class StoreOrderController {
|
||||
/**
|
||||
* 订单核销
|
||||
*/
|
||||
@AppLog(value = "订单核销", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/order/order_verific")
|
||||
|
@ -16,6 +16,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.aop.NoRepeatSubmit;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
@ -130,6 +131,7 @@ public class StoreProductController {
|
||||
/**
|
||||
* 商品详情海报
|
||||
*/
|
||||
@AppLog(value = "商品详情海报", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/product/poster/{id}")
|
||||
@ApiImplicitParams({
|
||||
@ -198,6 +200,7 @@ public class StoreProductController {
|
||||
/**
|
||||
* 普通商品详情
|
||||
*/
|
||||
@AppLog(value = "普通商品详情", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/product/detail/{id}")
|
||||
@ApiImplicitParams({
|
||||
@ -219,6 +222,7 @@ public class StoreProductController {
|
||||
/**
|
||||
* 添加收藏
|
||||
*/
|
||||
@AppLog(value = "添加收藏", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/collect/add")
|
||||
@ -235,6 +239,7 @@ public class StoreProductController {
|
||||
/**
|
||||
* 取消收藏
|
||||
*/
|
||||
@AppLog(value = "取消收藏", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/collect/del")
|
||||
|
@ -12,6 +12,7 @@ import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
import co.yixiang.common.util.CityTreeUtil;
|
||||
@ -86,6 +87,7 @@ public class UserAddressController {
|
||||
/**
|
||||
* 添加或修改地址
|
||||
*/
|
||||
@AppLog(value = "添加或修改地址", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/address/edit")
|
||||
@ApiOperation(value = "添加或修改地址",notes = "添加或修改地址")
|
||||
@ -100,6 +102,7 @@ public class UserAddressController {
|
||||
/**
|
||||
* 设置默认地址
|
||||
*/
|
||||
@AppLog(value = "设置默认地址", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/address/default/set")
|
||||
@ApiOperation(value = "设置默认地址",notes = "设置默认地址")
|
||||
|
@ -12,6 +12,7 @@ import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
import co.yixiang.constant.SystemConfigConstants;
|
||||
@ -70,6 +71,7 @@ public class UserBillController {
|
||||
/**
|
||||
* 推广数据 昨天的佣金 累计提现金额 当前佣金
|
||||
*/
|
||||
@AppLog(value = "查看推广数据", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/commission")
|
||||
@ApiOperation(value = "推广数据",notes = "推广数据")
|
||||
@ -92,6 +94,7 @@ public class UserBillController {
|
||||
/**
|
||||
* 积分记录
|
||||
*/
|
||||
@AppLog(value = "查看积分记录", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/integral/list")
|
||||
@ApiImplicitParams({
|
||||
@ -110,6 +113,7 @@ public class UserBillController {
|
||||
/**
|
||||
* 分销二维码海报生成
|
||||
*/
|
||||
@AppLog(value = "分销二维码海报生成", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/spread/banner")
|
||||
@ApiImplicitParams({
|
||||
@ -144,6 +148,7 @@ public class UserBillController {
|
||||
/**
|
||||
* 推广人统计
|
||||
*/
|
||||
@AppLog(value = "查看推广人统计", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/spread/people")
|
||||
@ApiOperation(value = "推广人统计",notes = "推广人统计")
|
||||
@ -164,6 +169,7 @@ public class UserBillController {
|
||||
* type 0 全部 1 消费 2 充值 3 返佣 4 提现
|
||||
* @return mixed
|
||||
*/
|
||||
@AppLog(value = "查看推广佣金明细", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/spread/commission/{type}")
|
||||
@ApiImplicitParams({
|
||||
@ -187,6 +193,7 @@ public class UserBillController {
|
||||
/**
|
||||
* 推广订单
|
||||
*/
|
||||
@AppLog(value = "查看推广订单", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/spread/order")
|
||||
@ApiOperation(value = "推广订单",notes = "推广订单")
|
||||
|
@ -10,6 +10,7 @@ package co.yixiang.modules.user.rest;
|
||||
|
||||
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.aop.NoRepeatSubmit;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
@ -96,6 +97,7 @@ public class UserController {
|
||||
/**
|
||||
* 订单统计数据
|
||||
*/
|
||||
@AppLog(value = "查看订单统计数据", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/order/data")
|
||||
@ApiOperation(value = "订单统计数据",notes = "订单统计数据")
|
||||
@ -125,6 +127,7 @@ public class UserController {
|
||||
/**
|
||||
* 用户资金统计
|
||||
*/
|
||||
@AppLog(value = "查看用户资金统计", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/user/balance")
|
||||
@ApiOperation(value = "用户资金统计",notes = "用户资金统计")
|
||||
@ -142,6 +145,7 @@ public class UserController {
|
||||
/**
|
||||
* 签到用户信息
|
||||
*/
|
||||
@AppLog(value = "签到用户信息", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/sign/user")
|
||||
@ApiOperation(value = "签到用户信息",notes = "签到用户信息")
|
||||
@ -162,6 +166,7 @@ public class UserController {
|
||||
/**
|
||||
* 签到列表
|
||||
*/
|
||||
@AppLog(value = "查看签到列表", type = 1)
|
||||
@AuthCheck
|
||||
@GetMapping("/sign/list")
|
||||
@ApiImplicitParams({
|
||||
@ -178,6 +183,7 @@ public class UserController {
|
||||
/**
|
||||
* 签到列表(年月)
|
||||
*/
|
||||
|
||||
@AuthCheck
|
||||
@GetMapping("/sign/month")
|
||||
@ApiImplicitParams({
|
||||
@ -194,6 +200,7 @@ public class UserController {
|
||||
/**
|
||||
* 开始签到
|
||||
*/
|
||||
@AppLog(value = "开始签到", type = 1)
|
||||
@NoRepeatSubmit
|
||||
@AuthCheck
|
||||
@PostMapping("/sign/integral")
|
||||
@ -207,7 +214,7 @@ public class UserController {
|
||||
return ApiResult.ok(map,"签到获得" + integral + "积分");
|
||||
}
|
||||
|
||||
|
||||
@AppLog(value = "用户修改信息", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/user/edit")
|
||||
@ApiOperation(value = "用户修改信息",notes = "用修改信息")
|
||||
|
@ -10,6 +10,7 @@ package co.yixiang.modules.user.rest;
|
||||
|
||||
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
import co.yixiang.constant.SystemConfigConstants;
|
||||
@ -66,6 +67,7 @@ public class UserExtractController {
|
||||
/**
|
||||
* 用户提现
|
||||
*/
|
||||
@AppLog(value = "用户提现", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/extract/cash")
|
||||
@ApiOperation(value = "用户提现",notes = "用户提现")
|
||||
|
@ -11,6 +11,7 @@ package co.yixiang.modules.user.rest;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
import co.yixiang.constant.ShopConstants;
|
||||
@ -89,6 +90,7 @@ public class UserRechargeController {
|
||||
/**
|
||||
* 公众号充值/H5充值
|
||||
*/
|
||||
@AppLog(value = "公众号充值", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/recharge/wechat")
|
||||
@ApiOperation(value = "公众号充值/H5充值",notes = "公众号充值/H5充值",response = ApiResult.class)
|
||||
|
@ -15,6 +15,7 @@ import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.api.ApiResult;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.aop.AppLog;
|
||||
import co.yixiang.common.bean.LocalUser;
|
||||
import co.yixiang.common.interceptor.AuthCheck;
|
||||
import co.yixiang.modules.user.domain.YxUser;
|
||||
@ -51,7 +52,7 @@ public class WxMaUserController {
|
||||
private final YxUserService userService;
|
||||
private final RedisUtils redisUtils;
|
||||
|
||||
|
||||
@AppLog(value = "公众号绑定手机号", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/binding")
|
||||
@ApiOperation(value = "公众号绑定手机号", notes = "公众号绑定手机号")
|
||||
@ -77,7 +78,7 @@ public class WxMaUserController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@AppLog(value = "小程序绑定手机号", type = 1)
|
||||
@AuthCheck
|
||||
@PostMapping("/wxapp/binding")
|
||||
@ApiOperation(value = "小程序绑定手机号", notes = "小程序绑定手机号")
|
||||
|
Reference in New Issue
Block a user