Explorar o código

多店铺代码店铺、商品日志

chenguo hai 2 semanas
pai
achega
0554d10071
Modificáronse 21 ficheiros con 848 adicións e 36 borrados
  1. 7 4
      fs-admin/src/main/java/com/fs/hisStore/FsStoreProductScrmController.java
  2. 134 0
      fs-admin/src/main/java/com/fs/hisStore/FsStoreScrmController.java
  3. 50 0
      fs-admin/src/main/java/com/fs/hisStore/SysOperlogScrmController.java
  4. 17 2
      fs-common/src/main/java/com/fs/common/annotation/Log.java
  5. 69 9
      fs-framework/src/main/java/com/fs/framework/aspectj/LogAspect.java
  6. 26 3
      fs-framework/src/main/java/com/fs/framework/manager/factory/AsyncFactory.java
  7. 96 0
      fs-service/src/main/java/com/fs/hisStore/domain/SysOperLogScrm.java
  8. 21 0
      fs-service/src/main/java/com/fs/hisStore/dto/DateComparisonConfigDTO.java
  9. 2 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java
  10. 49 0
      fs-service/src/main/java/com/fs/hisStore/mapper/SysOperLogScrmMapper.java
  11. 3 0
      fs-service/src/main/java/com/fs/hisStore/service/IFsStoreScrmService.java
  12. 49 0
      fs-service/src/main/java/com/fs/hisStore/service/ISysOperLogScrmService.java
  13. 3 1
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java
  14. 13 0
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java
  15. 77 0
      fs-service/src/main/java/com/fs/hisStore/service/impl/SysOperLogScrmServiceImpl.java
  16. 85 2
      fs-service/src/main/java/com/fs/task/MallStoreTask.java
  17. 79 0
      fs-service/src/main/resources/mapper/hisStore/SysOperLogScrmMapper.xml
  18. 7 6
      fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreProductScrmController.java
  19. 7 8
      fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreScrmController.java
  20. 54 0
      fs-store/src/main/java/com/fs/hisStore/controller/store/SysOperlogScrmController.java
  21. 0 1
      fs-store/src/main/java/com/fs/store/controller/store/FsStoreController.java

+ 7 - 4
fs-admin/src/main/java/com/fs/hisStore/FsStoreProductScrmController.java

@@ -60,6 +60,7 @@ public class FsStoreProductScrmController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('store:storeProduct:list')")
     @PostMapping("/batchModify")
+    @Log(title = "商品管理", businessType = BusinessType.UPDATE,isStoreLog = true,logParam = {"商品","批量修改商品信息"})
     public R batchModify(@RequestBody ModifyMoreDTO modifyMoreDTO){
         fsStoreProductService.batchModify(modifyMoreDTO);
         return R.ok();
@@ -86,7 +87,7 @@ public class FsStoreProductScrmController extends BaseController
      * 导出商品列表
      */
     @PreAuthorize("@ss.hasPermi('store:storeProduct:export')")
-    @Log(title = "商品", businessType = BusinessType.EXPORT)
+    @Log(title = "商品管理", businessType = BusinessType.EXPORT, isStoreLog = true,logParam = {"商品","导出商品信息"})
     @GetMapping("/export")
     public AjaxResult export(FsStoreProductScrm fsStoreProduct)
     {
@@ -96,7 +97,7 @@ public class FsStoreProductScrmController extends BaseController
     }
 
 
-    @Log(title = "商品导入", businessType = BusinessType.IMPORT)
+    @Log(title = "商品管理", businessType = BusinessType.IMPORT,isStoreLog = true,logParam = {"商品","商品导入"})
     @PreAuthorize("@ss.hasPermi('store:storeProduct:import')")
     @PostMapping("/importData")
     public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
@@ -128,7 +129,8 @@ public class FsStoreProductScrmController extends BaseController
     }
 
     @PreAuthorize("@ss.hasPermi('store:storeProduct:add')")
-    @Log(title = "商品", businessType = BusinessType.INSERT)
+    @Log(title = "商品管理", businessType = BusinessType.INSERT, businessTypeExpression = "#p0.getProductId()>0? T(com.fs.common.enums.BusinessType).UPDATE: T(com.fs.common.enums.BusinessType).INSERT"
+            , isStoreLog = true, logParamExpression = "#p0.getProductId()>0? new String[]{'商品','修改商品'}: new String[]{'商品','新增商品'}")
     @PostMapping(value = "/addOrEdit")
     public R addOrEdit(@RequestBody FsStoreProductAddEditParam fsStoreProduct)
     {
@@ -149,7 +151,8 @@ public class FsStoreProductScrmController extends BaseController
      * 删除商品
      */
     @PreAuthorize("@ss.hasPermi('store:storeProduct:remove')")
-    @Log(title = "商品", businessType = BusinessType.DELETE)
+    @Log(title = "商品管理", businessType = BusinessType.DELETE,isStoreLog = true,
+            logParamExpression ="#p0.length>1?new String[]{'商品','批量删除商品信息'}: new String[]{'商品','删除商品信息'}" )
 	@DeleteMapping("/{productIds}")
     public AjaxResult remove(@PathVariable Long[] productIds)
     {

+ 134 - 0
fs-admin/src/main/java/com/fs/hisStore/FsStoreScrmController.java

@@ -0,0 +1,134 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ParseUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreScrm;
+import com.fs.his.param.FsStoreAuditParam;
+import com.fs.hisStore.service.IFsStoreScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 店铺管理Controller
+ *
+ * @author fs
+ * @date 2023-06-15
+ */
+@RestController
+@RequestMapping("/store/his/store")
+public class FsStoreScrmController extends BaseController
+{
+    @Autowired
+    private IFsStoreScrmService fsStoreService;
+
+    /**
+     * 查询店铺管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:store:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsStoreScrm fsStore)
+    {
+        startPage();
+        List<FsStoreScrm> list = fsStoreService.selectFsStoreList(fsStore);
+        for (FsStoreScrm store : list) {
+            store.setPhone(ParseUtils.parsePhone(store.getPhone()));
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出店铺管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:store:export')")
+    @Log(title = "店铺管理", businessType = BusinessType.EXPORT,logParam = {"店铺","导出店铺信息"},isStoreLog = true)
+    @GetMapping("/export")
+    public AjaxResult export(FsStoreScrm fsStore)
+    {
+        List<FsStoreScrm> list = fsStoreService.selectFsStoreList(fsStore);
+        for (FsStoreScrm store : list) {
+            store.setPhone(ParseUtils.parsePhone(store.getPhone()));
+        }
+        ExcelUtil<FsStoreScrm> util = new ExcelUtil<FsStoreScrm>(FsStoreScrm.class);
+        return util.exportExcel(list, "店铺管理数据");
+    }
+
+    /**
+     * 获取店铺管理详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:store:query')")
+    @GetMapping(value = "/{storeId}")
+    public AjaxResult getInfo(@PathVariable("storeId") Long storeId)
+    {
+        FsStoreScrm fsStore = fsStoreService.selectFsStoreByStoreId(storeId);
+        fsStore.setPhone(ParseUtils.parsePhone(fsStore.getPhone()));
+        return AjaxResult.success(fsStore);
+    }
+
+    /**
+     * 新增店铺管理
+     */
+    @PreAuthorize("@ss.hasPermi('his:store:add')")
+    @Log(title = "店铺管理", businessType = BusinessType.INSERT,logParam = {"店铺","新增店铺信息"},isStoreLog = true)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsStoreScrm fsStore)
+    {
+        return toAjax(fsStoreService.insertFsStore(fsStore));
+    }
+
+    /**
+     * 修改店铺管理
+     */
+    @PreAuthorize("@ss.hasPermi('his:store:edit')")
+    @Log(title = "店铺管理", businessType = BusinessType.UPDATE,logParam = {"店铺","修改店铺信息"},isStoreLog = true)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsStoreScrm fsStore)
+    {
+
+        if (fsStore.getPhone()!=null&&fsStore.getPhone().contains("*")){
+            fsStore.setPhone(null);
+        }
+        return toAjax(fsStoreService.updateFsStore(fsStore));
+    }
+
+    /**
+     * 删除店铺管理
+     */
+    @PreAuthorize("@ss.hasPermi('his:store:remove')")
+    @Log(title = "店铺管理", businessType = BusinessType.DELETE,logParam = {"店铺","删除店铺信息"},isStoreLog = true)
+	@DeleteMapping("/{storeIds}")
+    public AjaxResult remove(@PathVariable Long[] storeIds)
+    {
+        return toAjax(fsStoreService.deleteFsStoreByStoreIds(storeIds));
+    }
+
+    /**
+     * 店铺审核
+     */
+    @PreAuthorize("@ss.hasPermi('his:store:audit')")
+    @Log(title = "店铺审核", businessType = BusinessType.UPDATE,logParam = {"店铺","店铺审核"},isStoreLog = true)
+    @PutMapping("/audit")
+    public AjaxResult audit(@RequestBody FsStoreAuditParam fsStore)
+    {
+        return toAjax(fsStoreService.updateFsStoreAudit(fsStore));
+    }
+
+    /**
+     * 重置店铺密码
+     * */
+    @PreAuthorize("@ss.hasPermi('his:store:refresh')")
+    @Log(title = "店铺管理", businessType = BusinessType.UPDATE,logParam = {"店铺","重置店铺密码"},isStoreLog = true)
+    @PutMapping("/refresh/{storeId}")
+    public AjaxResult refresh(Long storeId)
+    {
+        return toAjax(fsStoreService.refreshFsStore(storeId));
+    }
+
+}

+ 50 - 0
fs-admin/src/main/java/com/fs/hisStore/SysOperlogScrmController.java

@@ -0,0 +1,50 @@
+package com.fs.hisStore;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.service.ISysOperLogScrmService;
+import com.fs.hisStore.domain.SysOperLogScrm;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 操作日志记录
+ *
+
+ */
+@RestController
+@RequestMapping("/store/operlogScrm")
+public class SysOperlogScrmController extends BaseController
+{
+    private final ISysOperLogScrmService operLogService;
+
+    public SysOperlogScrmController(ISysOperLogScrmService operLogService) {
+        this.operLogService = operLogService;
+    }
+
+    @PreAuthorize("@ss.hasPermi('his:storeLog:export')")
+    @GetMapping("/list")
+    public TableDataInfo list(SysOperLogScrm operLog)
+    {
+        startPage();
+        List<SysOperLogScrm> list = operLogService.selectOperLogList(operLog);
+        return getDataTable(list);
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.EXPORT)
+    @PreAuthorize("@ss.hasPermi('his:storeLog:export')")
+    @GetMapping("/export")
+    public AjaxResult export(SysOperLogScrm operLog)
+    {
+        List<SysOperLogScrm> list = operLogService.selectOperLogList(operLog);
+        ExcelUtil<SysOperLogScrm> util = new ExcelUtil<>(SysOperLogScrm.class);
+        return util.exportExcel(list, "操作日志");
+    }
+
+}

+ 17 - 2
fs-common/src/main/java/com/fs/common/annotation/Log.java

@@ -7,10 +7,11 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 import com.fs.common.enums.BusinessType;
 import com.fs.common.enums.OperatorType;
+import com.fs.common.utils.StringUtils;
 
 /**
  * 自定义操作日志记录注解
- * 
+ *
 
  *
  */
@@ -20,7 +21,7 @@ import com.fs.common.enums.OperatorType;
 public @interface Log
 {
     /**
-     * 模块 
+     * 模块
      */
     public String title() default "";
 
@@ -38,4 +39,18 @@ public @interface Log
      * 是否保存请求的参数
      */
     public boolean isSaveRequestData() default true;
+
+    /**
+     * 是否商城日志
+     */
+    public boolean isStoreLog() default false;
+
+    /**
+     * 商城日志传参
+     * */
+    public String[] logParam() default {};
+
+    String businessTypeExpression() default "";
+
+    String logParamExpression() default "";
 }

+ 69 - 9
fs-framework/src/main/java/com/fs/framework/aspectj/LogAspect.java

@@ -6,15 +6,22 @@ import java.util.Iterator;
 import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.bean.BeanUtils;
+import com.fs.framework.web.domain.server.Sys;
+import com.fs.hisStore.domain.SysOperLogScrm;
 import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
 import org.aspectj.lang.Signature;
-import org.aspectj.lang.annotation.AfterReturning;
-import org.aspectj.lang.annotation.AfterThrowing;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.annotation.*;
 import org.aspectj.lang.reflect.MethodSignature;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.expression.EvaluationContext;
+import org.springframework.expression.ExpressionParser;
+import org.springframework.expression.spel.standard.SpelExpressionParser;
+import org.springframework.expression.spel.support.StandardEvaluationContext;
 import org.springframework.stereotype.Component;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.multipart.MultipartFile;
@@ -34,7 +41,7 @@ import com.fs.system.domain.SysOperLog;
 
 /**
  * 操作日志记录处理
- * 
+ *
 
  */
 @Aspect
@@ -62,7 +69,7 @@ public class LogAspect
 
     /**
      * 拦截异常操作
-     * 
+     *
      * @param joinPoint 切点
      * @param e 异常
      */
@@ -116,6 +123,12 @@ public class LogAspect
             getControllerMethodDescription(joinPoint, controllerLog, operLog);
             // 保存数据库
             AsyncManager.me().execute(AsyncFactory.recordOper(operLog));
+            if(controllerLog.isStoreLog()){
+                SysOperLogScrm operLogScrm = new SysOperLogScrm();
+                BeanUtils.copyProperties(operLog, operLogScrm);
+                resolveParam((ProceedingJoinPoint)joinPoint,operLogScrm);
+                AsyncManager.me().execute(AsyncFactory.recordOperScrm(operLogScrm));
+            }
         }
         catch (Exception exp)
         {
@@ -123,12 +136,14 @@ public class LogAspect
             log.error("==前置通知异常==");
             log.error("异常信息:{}", exp.getMessage());
             exp.printStackTrace();
+        } catch (Throwable ex) {
+            throw new RuntimeException(ex);
         }
     }
 
     /**
      * 获取注解中对方法的描述信息 用于Controller层注解
-     * 
+     *
      * @param log 日志
      * @param operLog 操作日志
      * @throws Exception
@@ -151,7 +166,7 @@ public class LogAspect
 
     /**
      * 获取请求的参数,放到log中
-     * 
+     *
      * @param operLog 操作日志
      * @throws Exception 异常
      */
@@ -208,7 +223,7 @@ public class LogAspect
 
     /**
      * 判断是否需要过滤的对象。
-     * 
+     *
      * @param o 对象信息。
      * @return 如果是需要过滤的对象,则返回true;否则返回false。
      */
@@ -240,4 +255,49 @@ public class LogAspect
         return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse
                 || o instanceof BindingResult;
     }
+
+    private final ExpressionParser parser = new SpelExpressionParser();
+
+    public void resolveParam(ProceedingJoinPoint joinPoint, SysOperLogScrm operLog) throws Throwable {
+        // 1. 获取注解实例
+        Method method = ((MethodSignature) joinPoint.getSignature()).getMethod();
+        Log annotation = method.getAnnotation(Log.class);
+
+        // 2. 准备简单上下文
+        StandardEvaluationContext context = new StandardEvaluationContext();
+        Object[] args = joinPoint.getArgs();
+        String[] paramNames = ((MethodSignature) joinPoint.getSignature()).getParameterNames();
+
+        // 设置参数名称和值到上下文
+        for (int i = 0; i < args.length; i++) {
+            context.setVariable("p" + i, args[i]); // 支持 #p0,#p1...
+            if (paramNames != null && i < paramNames.length) {
+                context.setVariable(paramNames[i], args[i]); // 支持参数名引用
+            }
+        }
+
+        // 3. 处理动态 businessType
+        BusinessType businessType = annotation.businessType();
+        if (!annotation.businessTypeExpression().isEmpty()) {
+            try {
+                businessType = parser.parseExpression(annotation.businessTypeExpression())
+                        .getValue(context, BusinessType.class);
+            } catch (Exception e) {
+                log.warn("解析 businessType 表达式失败,使用默认值: {}", e.getMessage());
+            }
+        }
+        // 4. 处理动态 logParam
+        String[] logParam = annotation.logParam();
+        if (!annotation.logParamExpression().isEmpty()) {
+            try {
+                logParam = parser.parseExpression(annotation.logParamExpression())
+                        .getValue(context, String[].class);
+            }catch (Exception e){
+                log.warn("解析 logParam 表达式失败,使用默认值: {}", e.getMessage());
+            }
+        }
+        operLog.setBusinessType(businessType.ordinal());
+        operLog.setMainType(logParam[0]);
+        operLog.setDes(logParam[1]);
+    }
 }

+ 26 - 3
fs-framework/src/main/java/com/fs/framework/manager/factory/AsyncFactory.java

@@ -1,6 +1,9 @@
 package com.fs.framework.manager.factory;
 
 import java.util.TimerTask;
+
+import com.fs.hisStore.domain.SysOperLogScrm;
+import com.fs.hisStore.service.ISysOperLogScrmService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import com.fs.common.constant.Constants;
@@ -18,7 +21,7 @@ import eu.bitwalker.useragentutils.UserAgent;
 
 /**
  * 异步工厂(产生任务用)
- * 
+ *
 
  */
 public class AsyncFactory
@@ -27,7 +30,7 @@ public class AsyncFactory
 
     /**
      * 记录登录信息
-     * 
+     *
      * @param username 用户名
      * @param status 状态
      * @param message 消息
@@ -82,7 +85,7 @@ public class AsyncFactory
 
     /**
      * 操作日志记录
-     * 
+     *
      * @param operLog 操作日志信息
      * @return 任务task
      */
@@ -99,4 +102,24 @@ public class AsyncFactory
             }
         };
     }
+
+    /**
+     * 操作日志记录
+     *
+     * @param operLog 操作日志信息
+     * @return 任务task
+     */
+    public static TimerTask recordOperScrm(final SysOperLogScrm operLog)
+    {
+        return new TimerTask()
+        {
+            @Override
+            public void run()
+            {
+                // 远程查询操作地点
+                operLog.setOperLocation(AddressUtils.getRealAddressByIP(operLog.getOperIp()));
+                SpringUtils.getBean(ISysOperLogScrmService.class).insertOperlog(operLog);
+            }
+        };
+    }
 }

+ 96 - 0
fs-service/src/main/java/com/fs/hisStore/domain/SysOperLogScrm.java

@@ -0,0 +1,96 @@
+package com.fs.hisStore.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import com.fs.common.annotation.Excel.ColumnType;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 操作日志记录表 oper_log
+ *
+
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class SysOperLogScrm extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 日志主键 */
+    @Excel(name = "操作序号", cellType = ColumnType.NUMERIC)
+    private Long operId;
+
+    /** 操作模块 */
+    @Excel(name = "操作模块")
+    private String title;
+
+    /** 业务类型(0其它 1新增 2修改 3删除) */
+    @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=导出,5=导入")
+    private Integer businessType;
+
+    /** 业务类型数组 */
+    private Integer[] businessTypes;
+
+    /** 请求方法 */
+    @Excel(name = "请求方法")
+    private String method;
+
+    /** 请求方式 */
+    @Excel(name = "请求方式")
+    private String requestMethod;
+
+    /** 操作类别(0其它 1后台用户 2手机端用户) */
+    @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
+    private Integer operatorType;
+
+    /** 操作人员 */
+    @Excel(name = "操作人员")
+    private String operName;
+
+    /** 部门名称 */
+    @Excel(name = "部门名称")
+    private String deptName;
+
+    /** 请求url */
+    @Excel(name = "请求地址")
+    private String operUrl;
+
+    /** 操作地址 */
+    @Excel(name = "操作地址")
+    private String operIp;
+
+    /** 操作地点 */
+    @Excel(name = "操作地点")
+    private String operLocation;
+
+    /** 请求参数 */
+    @Excel(name = "请求参数")
+    private String operParam;
+
+    /** 返回参数 */
+    @Excel(name = "返回参数")
+    private String jsonResult;
+
+    /** 操作状态(0正常 1异常) */
+    @Excel(name = "状态", readConverterExp = "0=正常,1=异常")
+    private Integer status;
+
+    /** 错误消息 */
+    @Excel(name = "错误消息")
+    private String errorMsg;
+
+    /** 操作时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date operTime;
+
+    @Excel(name = "主要类型", readConverterExp = "0=店铺,1=商品")
+    private String mainType;
+
+    @Excel(name = "描述")
+    private String des;
+}

+ 21 - 0
fs-service/src/main/java/com/fs/hisStore/dto/DateComparisonConfigDTO.java

@@ -0,0 +1,21 @@
+package com.fs.hisStore.dto;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Data
+@Builder
+public class DateComparisonConfigDTO {
+    //table_name, date_column,user_column,phone_column,inAdvance,remindWords,platform,cert_type,is_do_invalid,invalid_expression,status_column
+    private String tableName;
+    private String dateColumn;
+    private String userColumn;
+    private Integer inAdvance;
+    private String phoneColumn;
+    private String remindWords;
+    private String platform;
+    private String certType;
+    private String isDoInvalid;
+    private String invalidExpression;
+    private String statusColumn;
+}

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -2,6 +2,8 @@ package com.fs.hisStore.mapper;
 
 import java.util.List;
 
+import com.fs.common.annotation.Log;
+import com.fs.common.enums.BusinessType;
 import com.fs.his.param.FsStoreProductListSParam;
 import com.fs.his.vo.FsStoreProductListSVO;
 import com.fs.his.vo.OptionsVO;

+ 49 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/SysOperLogScrmMapper.java

@@ -0,0 +1,49 @@
+package com.fs.hisStore.mapper;
+
+import com.fs.hisStore.domain.SysOperLogScrm;
+
+import java.util.List;
+
+/**
+ * 操作日志 数据层
+ *
+
+ */
+public interface SysOperLogScrmMapper
+{
+    /**
+     * 新增操作日志
+     *
+     * @param operLog 操作日志对象
+     */
+    public void insertOperlog(SysOperLogScrm operLog);
+
+    /**
+     * 查询系统操作日志集合
+     *
+     * @param operLog 操作日志对象
+     * @return 操作日志集合
+     */
+    public List<SysOperLogScrm> selectOperLogList(SysOperLogScrm operLog);
+
+    /**
+     * 批量删除系统操作日志
+     *
+     * @param operIds 需要删除的操作日志ID
+     * @return 结果
+     */
+    public int deleteOperLogByIds(Long[] operIds);
+
+    /**
+     * 查询操作日志详细
+     *
+     * @param operId 操作ID
+     * @return 操作日志对象
+     */
+    public SysOperLogScrm selectOperLogById(Long operId);
+
+    /**
+     * 清空操作日志
+     */
+    public void cleanOperLog();
+}

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/service/IFsStoreScrmService.java

@@ -70,4 +70,7 @@ public interface IFsStoreScrmService
 
 
     List<FsStoreScrm> selectFsStoreListByDoctorId(Long doctorId);
+
+    int refreshFsStore(Long storeId);
+
 }

+ 49 - 0
fs-service/src/main/java/com/fs/hisStore/service/ISysOperLogScrmService.java

@@ -0,0 +1,49 @@
+package com.fs.hisStore.service;
+
+import com.fs.hisStore.domain.SysOperLogScrm;
+
+import java.util.List;
+
+/**
+ * 操作日志 服务层
+ *
+
+ */
+public interface ISysOperLogScrmService
+{
+    /**
+     * 新增操作日志
+     *
+     * @param operLog 操作日志对象
+     */
+    public void insertOperlog(SysOperLogScrm operLog);
+
+    /**
+     * 查询系统操作日志集合
+     *
+     * @param operLog 操作日志对象
+     * @return 操作日志集合
+     */
+    public List<SysOperLogScrm> selectOperLogList(SysOperLogScrm operLog);
+
+    /**
+     * 批量删除系统操作日志
+     *
+     * @param operIds 需要删除的操作日志ID
+     * @return 结果
+     */
+    public int deleteOperLogByIds(Long[] operIds);
+
+    /**
+     * 查询操作日志详细
+     *
+     * @param operId 操作ID
+     * @return 操作日志对象
+     */
+    public SysOperLogScrm selectOperLogById(Long operId);
+
+    /**
+     * 清空操作日志
+     */
+    public void cleanOperLog();
+}

+ 3 - 1
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java

@@ -11,7 +11,9 @@ import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.fs.common.BeanCopyUtils;
+import com.fs.common.annotation.Log;
 import com.fs.common.core.domain.R;
+import com.fs.common.enums.BusinessType;
 import com.fs.common.exception.CustomException;
 import com.fs.common.exception.ServiceException;
 import com.fs.common.utils.DateUtils;
@@ -297,7 +299,7 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
     public R addOrEdit(FsStoreProductAddEditParam param) {
         ProductAttrCountDto countDto=computedProductCount(param.getValues());
 
-        if(param.getProductId()>0){
+        if(param.getProductId() != null){
             FsStoreProductScrm product=new FsStoreProductScrm();
             BeanUtils.copyProperties(param,product);
             product.setPrice(countDto.getMinPrice());

+ 13 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java

@@ -1,5 +1,7 @@
 package com.fs.hisStore.service.impl;
 
+import com.fs.common.annotation.Log;
+import com.fs.common.enums.BusinessType;
 import com.fs.common.exception.CustomException;
 import com.fs.common.utils.DateUtils;
 import com.fs.his.param.FsStoreAuditParam;
@@ -10,6 +12,7 @@ import com.fs.hisStore.service.IFsStoreScrmService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Collections;
 import java.util.List;
 
 
@@ -132,5 +135,15 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
         return fsStoreMapper.selectFsStoreListByDoctorId(doctorId);
     }
 
+    @Override
+    public int refreshFsStore(Long storeId) {
+        FsStoreScrm fsStoreScrm = new FsStoreScrm();
+        fsStoreScrm.setStoreId(storeId);
+        StoreMD5PasswordEncoder storeMD5PasswordEncoder = new StoreMD5PasswordEncoder();
+        fsStoreScrm.setPassword(storeMD5PasswordEncoder.encode("123456"));
+        fsStoreScrm.setUpdateTime(DateUtils.getNowDate());
+        return fsStoreMapper.updateFsStore(fsStoreScrm);
+    }
+
 
 }

+ 77 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/SysOperLogScrmServiceImpl.java

@@ -0,0 +1,77 @@
+package com.fs.hisStore.service.impl;
+
+import com.fs.hisStore.mapper.SysOperLogScrmMapper;
+import com.fs.hisStore.service.ISysOperLogScrmService;
+import com.fs.hisStore.domain.SysOperLogScrm;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 操作日志 服务层处理
+ *
+
+ */
+@Service
+public class SysOperLogScrmServiceImpl implements ISysOperLogScrmService
+{
+    @Autowired
+    private SysOperLogScrmMapper operLogMapper;
+
+    /**
+     * 新增操作日志
+     *
+     * @param operLog 操作日志对象
+     */
+    @Override
+    public void insertOperlog(SysOperLogScrm operLog)
+    {
+        operLogMapper.insertOperlog(operLog);
+    }
+
+    /**
+     * 查询系统操作日志集合
+     *
+     * @param operLog 操作日志对象
+     * @return 操作日志集合
+     */
+    @Override
+    public List<SysOperLogScrm> selectOperLogList(SysOperLogScrm operLog)
+    {
+        return operLogMapper.selectOperLogList(operLog);
+    }
+
+    /**
+     * 批量删除系统操作日志
+     *
+     * @param operIds 需要删除的操作日志ID
+     * @return 结果
+     */
+    @Override
+    public int deleteOperLogByIds(Long[] operIds)
+    {
+        return operLogMapper.deleteOperLogByIds(operIds);
+    }
+
+    /**
+     * 查询操作日志详细
+     *
+     * @param operId 操作ID
+     * @return 操作日志对象
+     */
+    @Override
+    public SysOperLogScrm selectOperLogById(Long operId)
+    {
+        return operLogMapper.selectOperLogById(operId);
+    }
+
+    /**
+     * 清空操作日志
+     */
+    @Override
+    public void cleanOperLog()
+    {
+        operLogMapper.cleanOperLog();
+    }
+}

+ 85 - 2
fs-service/src/main/java/com/fs/task/StoreTask.java → fs-service/src/main/java/com/fs/task/MallStoreTask.java

@@ -21,8 +21,8 @@ import com.fs.his.dto.ExpressInfoDTO;
 import com.fs.his.service.IFsExpressService;
 import com.fs.his.service.IFsUserService;
 import com.fs.his.utils.ConfigUtil;
-import com.fs.hisStore.config.FsErpConfig;
 import com.fs.hisStore.domain.*;
+import com.fs.hisStore.dto.DateComparisonConfigDTO;
 import com.fs.hisStore.enums.ShipperCodeEnum;
 import com.fs.hisStore.mapper.FsStoreOrderItemScrmMapper;
 import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
@@ -35,16 +35,20 @@ import com.fs.pay.service.IPayService;
 import com.fs.store.config.StoreConfig;
 import com.fs.system.service.ISysConfigService;
 import com.fs.ybPay.domain.OrderResult;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.stereotype.Component;
 
 import java.math.BigDecimal;
 import java.text.ParseException;
+import java.time.LocalTime;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 import static com.fs.hisStore.constants.StoreConstants.DELIVERY;
 
@@ -53,8 +57,9 @@ import static com.fs.hisStore.constants.StoreConstants.DELIVERY;
  *
  * @author fs
  */
+@Slf4j
 @Component("mallStoreTask")
-public class StoreTask
+public class MallStoreTask
 {
     @Autowired
     private RedisTemplate redisTemplate;
@@ -504,4 +509,82 @@ public class StoreTask
         fsUserOnlineStateService.insertUserNotOnline();
     }*/
 
+    /**
+     * 提醒证件到期任务
+     * */
+    @Autowired
+    private JdbcTemplate jdbcTemplate;
+    public void remindCertValidation() {
+        log.info("提醒店铺证件到期任务执行... 当前时间: {}", LocalTime.now());
+
+        // 从配置表获取需要比较的表和字段
+        List<DateComparisonConfigDTO> tablesToCheck = jdbcTemplate.query(
+                "SELECT table_name, date_column,in_advance,user_column,phone_column,remind_words,platform,cert_type" +
+                        " FROM date_comparison_config",(rs, rowNum)->{
+                    return DateComparisonConfigDTO.builder()
+                            .tableName(rs.getString("table_name"))//表名
+                            .certType(rs.getString("cert_type"))//证件类型
+                            .dateColumn(rs.getString("date_column"))//日期字段
+                            .userColumn(rs.getString("user_column"))//用户字段
+                            .remindWords(rs.getString("remindWords"))//提醒内容
+                            .phoneColumn(rs.getString("phone_column"))//提醒手机
+                            .inAdvance(rs.getInt("inAdvance"))//提前天数
+                            .platform(rs.getString("platform")).build();//平台
+                });
+
+        tablesToCheck.forEach(dto -> {
+            //获取证件失效日期字段小于当前时间加提前天数的用户和电话号码
+            String sql = String.format("SELECT %s , %s " +
+                            "FROM %s " +
+                            "WHERE %s >= DATE_SUB(CURDATE(), INTERVAL %d DAY)",
+                            dto.getUserColumn(),
+                            dto.getPhoneColumn(),
+                            dto.getTableName(),
+                            dto.getDateColumn(),
+                            dto.getInAdvance()
+                            );
+            List<Map<String, Object>> users = jdbcTemplate.queryForList(sql);
+            users.forEach(user -> {
+                String userName = (String) user.get(dto.getUserColumn());
+                String phone = (String) user.get(dto.getPhoneColumn());
+                String remindWords = String.format("【%s平台提示】尊敬的%s用户,店铺%s证件即将到期,请及时处理!",
+                        dto.getPlatform(),
+                        userName,
+                        dto.getCertType());
+                // 使用phone发送remindWords短信
+                // TODO 发送通知
+            });
+        });
+
+    }
+
+    /**
+     * 禁用店铺
+     * */
+    public void disable() {
+        log.info("禁用店铺任务执行... 当前时间: {}", LocalTime.now());
+        // 从配置表获取需要禁用的表和字段
+        List<DateComparisonConfigDTO> toDisable = jdbcTemplate.query(
+                "SELECT table_name, date_column,invalid_expression,status_column" +
+                        " FROM date_comparison_config " +
+                        " WHERE is_do_invalid = '1'",(rs, rowNum)-> DateComparisonConfigDTO.builder()
+                                .tableName(rs.getString("table_name"))//表名
+                                .dateColumn(rs.getString("date_column"))//日期字段
+                                .invalidExpression(rs.getString("invalid_expression"))//失效表达式
+                                .statusColumn(rs.getString("status_column"))//状态字段
+                                .build());
+
+        toDisable.forEach(dto -> {
+            //更新证件失效日期字段小于当前时间的数据
+            String sql = String.format("UPDATE %s " +
+                    "SET %s = %s " +
+                    "WHERE %s < CURDATE()",
+                    dto.getTableName(),
+                    dto.getStatusColumn(),
+                    dto.getInvalidExpression(),
+                    dto.getDateColumn());
+            jdbcTemplate.update(sql);
+        });
+    }
+
 }

+ 79 - 0
fs-service/src/main/resources/mapper/hisStore/SysOperLogScrmMapper.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fs.hisStore.mapper.SysOperLogScrmMapper">
+
+	<resultMap type="SysOperLogScrm" id="SysOperLogResult">
+		<id     property="operId"         column="oper_id"        />
+		<result property="title"          column="title"          />
+		<result property="businessType"   column="business_type"  />
+		<result property="method"         column="method"         />
+		<result property="requestMethod"  column="request_method" />
+		<result property="operatorType"   column="operator_type"  />
+		<result property="operName"       column="oper_name"      />
+		<result property="deptName"       column="dept_name"      />
+		<result property="operUrl"        column="oper_url"       />
+		<result property="operIp"         column="oper_ip"        />
+		<result property="operLocation"   column="oper_location"  />
+		<result property="operParam"      column="oper_param"     />
+		<result property="jsonResult"     column="json_result"    />
+		<result property="status"         column="status"         />
+		<result property="errorMsg"       column="error_msg"      />
+		<result property="operTime"       column="oper_time"      />
+		<result property="mainType"       column="main_type"       />
+		<result property="des"         column="des"    />
+	</resultMap>
+
+	<sql id="selectOperLogVo">
+        select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, main_type, des
+        from sys_oper_log_scrm
+    </sql>
+
+	<insert id="insertOperlog" parameterType="SysOperLogScrm">
+		insert into sys_oper_log_scrm(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, main_type, des)
+        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate(), #{mainType}, #{des})
+	</insert>
+
+	<select id="selectOperLogList" parameterType="SysOperLogScrm" resultMap="SysOperLogResult">
+		<include refid="selectOperLogVo"/>
+		<where>
+			<if test="mainType != null and mainType != ''">
+				AND main_type = #{main_type},
+			</if>
+			<if test="title != null and title != ''">
+				AND title like concat('%', #{title}, '%')
+			</if>
+			<if test="businessType != null and businessType != ''">
+				AND business_type = #{businessType}
+			</if>
+			<if test="businessTypes != null and businessTypes.length > 0">
+			    AND business_type in
+			    <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
+		 			#{businessType}
+		        </foreach>
+			</if>
+			<if test="status != null">
+				AND status = #{status}
+			</if>
+			<if test="operName != null and operName != ''">
+				AND oper_name like concat('%', #{operName}, '%')
+			</if>
+			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+				and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+			</if>
+			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+				and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+			</if>
+		</where>
+		order by oper_id desc
+	</select>
+
+
+ 	<select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult">
+		<include refid="selectOperLogVo"/>
+		where oper_id = #{operId}
+	</select>
+
+
+</mapper>

+ 7 - 6
fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreProductScrmController.java

@@ -62,7 +62,7 @@ public TableDataInfo list(FsStoreProductListSParam fsStoreProduct)
      * 导出商品列表
      */
 
-    @Log(title = "商品", businessType = BusinessType.EXPORT)
+    @Log(title = "商品", businessType = BusinessType.EXPORT,isStoreLog = true,logParam = {"商品","导出商品信息"})
     @GetMapping("/export")
     public AjaxResult export(FsStoreProductScrm fsStoreProduct)
     {
@@ -72,7 +72,7 @@ public TableDataInfo list(FsStoreProductListSParam fsStoreProduct)
         return util.exportExcel(list, "商品数据");
     }
 
-    @Log(title = "商品导入", businessType = BusinessType.IMPORT)
+    @Log(title = "商品导入", businessType = BusinessType.IMPORT,isStoreLog = true,logParam = {"商品","导入商品信息"})
     @PostMapping("/importData")
     public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
     {
@@ -102,7 +102,7 @@ public TableDataInfo list(FsStoreProductListSParam fsStoreProduct)
      * 新增商品
      */
 
-    @Log(title = "商品", businessType = BusinessType.INSERT)
+    @Log(title = "商品", businessType = BusinessType.INSERT,isStoreLog = true,logParam = {"商品","新增商品信息"})
     @PostMapping
     public AjaxResult add(@RequestBody FsStoreProductScrm fsStoreProduct)
     {
@@ -114,7 +114,7 @@ public TableDataInfo list(FsStoreProductListSParam fsStoreProduct)
      * 修改商品
      */
 
-    @Log(title = "商品", businessType = BusinessType.UPDATE)
+    @Log(title = "商品", businessType = BusinessType.UPDATE,isStoreLog = true,logParam = {"商品","修改商品信息"})
     @PutMapping
     public AjaxResult edit(@RequestBody FsStoreProductScrm fsStoreProduct)
     {
@@ -126,7 +126,7 @@ public TableDataInfo list(FsStoreProductListSParam fsStoreProduct)
      * 删除商品
      */
 
-    @Log(title = "商品", businessType = BusinessType.DELETE)
+    @Log(title = "商品", businessType = BusinessType.DELETE,isStoreLog = true,logParam = {"商品","批量删除商品信息"})
 	@DeleteMapping("/{productIds}")
     public AjaxResult remove(@PathVariable Long[] productIds)
     {
@@ -175,7 +175,8 @@ public TableDataInfo list(FsStoreProductListSParam fsStoreProduct)
 
 
 
-    @Log(title = "商品", businessType = BusinessType.INSERT)
+    @Log(title = "商品", businessType = BusinessType.INSERT, businessTypeExpression = "#param.getProductId()>0? T(com.fs.common.enums.BusinessType).UPDATE: T(com.fs.common.enums.BusinessType).INSERT"
+            , isStoreLog = true, logParamExpression = "#param.getProductId()>0? new String[]{'商品','修改商品'}: new String[]{'商品','新增商品'}")
     @PostMapping(value = "/addOrEdit")
     public R addOrEdit(@RequestBody FsStoreProductAddEditParam fsStoreProduct)
     {

+ 7 - 8
fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreScrmController.java

@@ -48,7 +48,7 @@ public class FsStoreScrmController extends BaseController
      * 导出店铺管理列表
      */
 
-    @Log(title = "店铺管理", businessType = BusinessType.EXPORT)
+    @Log(title = "店铺管理", businessType = BusinessType.EXPORT,logParam = {"店铺","导出店铺信息"},isStoreLog = true)
     @GetMapping("/export")
     public AjaxResult export(FsStoreScrm fsStore)
     {
@@ -60,7 +60,6 @@ public class FsStoreScrmController extends BaseController
     /**
      * 获取店铺管理详细信息
      */
-    @PreAuthorize("@ss.hasPermi('his:store:query')")
     @GetMapping(value = "/{storeId}")
     public AjaxResult getInfo(@PathVariable("storeId") Long storeId)
     {
@@ -71,7 +70,7 @@ public class FsStoreScrmController extends BaseController
      * 新增店铺管理
      */
 
-    @Log(title = "店铺管理", businessType = BusinessType.INSERT)
+    @Log(title = "店铺管理", businessType = BusinessType.INSERT,logParam = {"店铺","新增店铺信息"},isStoreLog = true)
     @PostMapping
     public AjaxResult add(@RequestBody FsStoreScrm fsStore)
     {
@@ -82,7 +81,7 @@ public class FsStoreScrmController extends BaseController
      * 修改店铺管理
      */
 
-    @Log(title = "店铺管理", businessType = BusinessType.UPDATE)
+    @Log(title = "店铺管理", businessType = BusinessType.UPDATE,logParam = {"店铺","修改店铺信息"},isStoreLog = true)
     @PutMapping
     public AjaxResult edit(@RequestBody FsStoreScrm fsStore)
     {
@@ -91,7 +90,7 @@ public class FsStoreScrmController extends BaseController
     /**
      * 修改店铺logo
      */
-    @Log(title = "店铺管理", businessType = BusinessType.UPDATE)
+    @Log(title = "店铺管理", businessType = BusinessType.UPDATE,logParam = {"店铺","修改店铺LOGO信息"},isStoreLog = true)
     @PutMapping("/editLogo")
     public AjaxResult editLogo(@RequestBody FsStoreScrm fsStore)
     {
@@ -114,7 +113,7 @@ public class FsStoreScrmController extends BaseController
     /**
      * 修改店铺基础信息
      */
-    @Log(title = "修改店铺基础信息", businessType = BusinessType.UPDATE)
+    @Log(title = "修改店铺基础信息", businessType = BusinessType.UPDATE,logParam = {"店铺","修改店铺基础信息"},isStoreLog = true)
     @PutMapping("/editData")
     public AjaxResult editData(@RequestBody FsStoreScrm fsStore)
     {
@@ -141,7 +140,7 @@ public class FsStoreScrmController extends BaseController
      * 删除店铺管理
      */
 
-    @Log(title = "店铺管理", businessType = BusinessType.DELETE)
+    @Log(title = "店铺管理", businessType = BusinessType.DELETE,logParam = {"店铺","删除店铺信息"},isStoreLog = true)
 	@DeleteMapping("/{storeIds}")
     public AjaxResult remove(@PathVariable Long[] storeIds)
     {
@@ -152,7 +151,7 @@ public class FsStoreScrmController extends BaseController
      * 修改店铺管理
      */
 
-    @Log(title = "店铺管理", businessType = BusinessType.UPDATE)
+    @Log(title = "店铺管理", businessType = BusinessType.UPDATE,logParam = {"店铺","店铺审核"},isStoreLog = true)
     @PutMapping("/audit")
     public AjaxResult audit(@RequestBody FsStoreAuditParam fsStore)
     {

+ 54 - 0
fs-store/src/main/java/com/fs/hisStore/controller/store/SysOperlogScrmController.java

@@ -0,0 +1,54 @@
+package com.fs.hisStore.controller.store;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsStoreScrm;
+import com.fs.hisStore.domain.StoreLoginUserScrm;
+import com.fs.hisStore.domain.SysOperLogScrm;
+import com.fs.hisStore.service.ISysOperLogScrmService;
+import com.fs.hisStore.utils.UserUtil;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 操作日志记录
+ *
+
+ */
+@RestController
+@RequestMapping("/store/operlogScrm")
+public class SysOperlogScrmController extends BaseController
+{
+    private final ISysOperLogScrmService operLogService;
+
+    public SysOperlogScrmController(ISysOperLogScrmService operLogService) {
+        this.operLogService = operLogService;
+    }
+
+    @GetMapping("/list")
+    public TableDataInfo list(SysOperLogScrm operLog)
+    {
+        startPage();
+        List<SysOperLogScrm> list = operLogService.selectOperLogList(operLog);
+        return getDataTable(list);
+    }
+
+    @Log(title = "操作日志", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(SysOperLogScrm operLog)
+    {
+        //FsStoreScrm store = UserUtil.getLoginUser().getFsStore();
+        List<SysOperLogScrm> list = operLogService.selectOperLogList(operLog);
+        ExcelUtil<SysOperLogScrm> util = new ExcelUtil<>(SysOperLogScrm.class);
+        return util.exportExcel(list, "操作日志");
+    }
+
+}

+ 0 - 1
fs-store/src/main/java/com/fs/store/controller/store/FsStoreController.java

@@ -60,7 +60,6 @@ public class FsStoreController extends BaseController
     /**
      * 获取店铺管理详细信息
      */
-    @PreAuthorize("@ss.hasPermi('his:store:query')")
     @GetMapping(value = "/{storeId}")
     public AjaxResult getInfo(@PathVariable("storeId") Long storeId)
     {