Forráskód Böngészése

Merge remote-tracking branch 'origin/bly_store' into bly_store

xgb 1 hete
szülő
commit
f570d34a16

+ 99 - 0
fs-admin/src/main/java/com/fs/his/controller/FsHomeArticleCategoryController.java

@@ -0,0 +1,99 @@
+package com.fs.his.controller;
+
+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.domain.R;
+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.FsHomeArticleCategoryScrm;
+import com.fs.hisStore.service.IFsHomeArticleCategoryScrmService;
+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 2025-05-21
+ */
+@RestController
+@RequestMapping("/his/homeCategory")
+public class FsHomeArticleCategoryController extends BaseController {
+    @Autowired
+    private IFsHomeArticleCategoryScrmService fsHomeArticleCategoryService;
+
+    /**
+     * 查询期刊分类列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        startPage();
+        List<FsHomeArticleCategoryScrm> list = fsHomeArticleCategoryService.selectFsHomeArticleCategoryList(fsHomeArticleCategory);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出期刊分类列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:export')")
+    @Log(title = "期刊分类", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        List<FsHomeArticleCategoryScrm> list = fsHomeArticleCategoryService.selectFsHomeArticleCategoryList(fsHomeArticleCategory);
+        ExcelUtil<FsHomeArticleCategoryScrm> util = new ExcelUtil<FsHomeArticleCategoryScrm>(FsHomeArticleCategoryScrm.class);
+        return util.exportExcel(list, "homeCategory");
+    }
+
+    /**
+     * 获取期刊分类详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:query')")
+    @GetMapping(value = "/{categoryId}")
+    public AjaxResult getInfo(@PathVariable("categoryId") Long categoryId) {
+        return AjaxResult.success(fsHomeArticleCategoryService.selectFsHomeArticleCategoryById(categoryId));
+    }
+
+    /**
+     * 新增期刊分类
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:add')")
+    @Log(title = "期刊分类", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        return toAjax(fsHomeArticleCategoryService.insertFsHomeArticleCategory(fsHomeArticleCategory));
+    }
+
+    /**
+     * 修改期刊分类
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:edit')")
+    @Log(title = "期刊分类", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        return toAjax(fsHomeArticleCategoryService.updateFsHomeArticleCategory(fsHomeArticleCategory));
+    }
+
+    /**
+     * 删除期刊分类
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeCategory:remove')")
+    @Log(title = "期刊分类", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{categoryIds}")
+    public AjaxResult remove(@PathVariable Long[] categoryIds) {
+        return toAjax(fsHomeArticleCategoryService.deleteFsHomeArticleCategoryByIds(categoryIds));
+    }
+
+    @GetMapping("/allList")
+    public R getAllList(FsHomeArticleCategoryScrm fsHomeArticleCategory) {
+        fsHomeArticleCategory.setStatus(1);
+        List<FsHomeArticleCategoryScrm> list = fsHomeArticleCategoryService.selectFsHomeArticleCategoryList(fsHomeArticleCategory);
+        return R.ok().put("rows", list);
+    }
+
+}

+ 94 - 0
fs-admin/src/main/java/com/fs/his/controller/FsHomeArticleController.java

@@ -0,0 +1,94 @@
+package com.fs.his.controller;
+
+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.domain.R;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsHomeArticleScrm;
+import com.fs.hisStore.service.IFsHomeArticleScrmService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+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 2025-05-21
+ */
+@RestController
+@RequestMapping("/his/homeArticle")
+public class FsHomeArticleController extends BaseController {
+    @Autowired
+    private IFsHomeArticleScrmService fsHomeArticleService;
+
+    /**
+     * 查询期刊列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:list')")
+    @GetMapping("/list")
+    public R list(FsHomeArticleScrm fsHomeArticle)
+    {
+        PageHelper.startPage(fsHomeArticle.getPageNum(), fsHomeArticle.getPageSize());
+        List<FsHomeArticleScrm> list = fsHomeArticleService.selectFsHomeArticleList(fsHomeArticle);
+        PageInfo<FsHomeArticleScrm> listPageInfo = new PageInfo<>(list);
+        return R.ok().put("rows", listPageInfo);
+    }
+
+    /**
+     * 导出期刊列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:export')")
+    @Log(title = "期刊", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsHomeArticleScrm fsHomeArticle) {
+        List<FsHomeArticleScrm> list = fsHomeArticleService.selectFsHomeArticleList(fsHomeArticle);
+        ExcelUtil<FsHomeArticleScrm> util = new ExcelUtil<FsHomeArticleScrm>(FsHomeArticleScrm.class);
+        return util.exportExcel(list, "homArticle");
+    }
+
+    /**
+     * 获取期刊详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:query')")
+    @GetMapping(value = "/{articleId}")
+    public AjaxResult getInfo(@PathVariable("articleId") Long articleId) {
+        return AjaxResult.success(fsHomeArticleService.selectFsHomeArticleById(articleId));
+    }
+
+    /**
+     * 新增期刊
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:add')")
+    @Log(title = "期刊", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsHomeArticleScrm fsHomeArticle) {
+        return toAjax(fsHomeArticleService.insertFsHomeArticle(fsHomeArticle));
+    }
+
+    /**
+     * 修改期刊
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:edit')")
+    @Log(title = "期刊", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsHomeArticleScrm fsHomeArticle) {
+        return toAjax(fsHomeArticleService.updateFsHomeArticle(fsHomeArticle));
+    }
+
+    /**
+     * 删除期刊
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeArticle:remove')")
+    @Log(title = "期刊", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{articleIds}")
+    public AjaxResult remove(@PathVariable Long[] articleIds) {
+        return toAjax(fsHomeArticleService.deleteFsHomeArticleByIds(articleIds));
+    }
+}

+ 93 - 0
fs-admin/src/main/java/com/fs/his/controller/FsHomeArticleViewController.java

@@ -0,0 +1,93 @@
+package com.fs.his.controller;
+
+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.domain.R;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.hisStore.domain.FsHomeArticleViewScrm;
+import com.fs.hisStore.service.IFsHomeArticleViewScrmService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+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 2025-05-21
+ */
+@RestController
+@RequestMapping("/his/homeView")
+public class FsHomeArticleViewController extends BaseController {
+    @Autowired
+    private IFsHomeArticleViewScrmService fsHomeArticleViewService;
+
+    /**
+     * 查询期刊阅读列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:list')")
+    @GetMapping("/list")
+    public R list(FsHomeArticleViewScrm fsHomeArticleView) {
+        PageHelper.startPage(fsHomeArticleView.getPageNum(), fsHomeArticleView.getPageSize());
+        List<FsHomeArticleViewScrm> list = fsHomeArticleViewService.selectFsHomeArticleViewList(fsHomeArticleView);
+        PageInfo<FsHomeArticleViewScrm> listPageInfo = new PageInfo<>(list);
+        return R.ok().put("rows", listPageInfo);
+    }
+
+    /**
+     * 导出期刊阅读列表
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:export')")
+    @Log(title = "期刊阅读", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsHomeArticleViewScrm fsHomeArticleView) {
+        List<FsHomeArticleViewScrm> list = fsHomeArticleViewService.selectFsHomeArticleViewList(fsHomeArticleView);
+        ExcelUtil<FsHomeArticleViewScrm> util = new ExcelUtil<FsHomeArticleViewScrm>(FsHomeArticleViewScrm.class);
+        return util.exportExcel(list, "homeView");
+    }
+
+    /**
+     * 获取期刊阅读详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:query')")
+    @GetMapping(value = "/{viewId}")
+    public AjaxResult getInfo(@PathVariable("viewId") Long viewId) {
+        return AjaxResult.success(fsHomeArticleViewService.selectFsHomeArticleViewById(viewId));
+    }
+
+    /**
+     * 新增期刊阅读
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:add')")
+    @Log(title = "期刊阅读", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsHomeArticleViewScrm fsHomeArticleView) {
+        return toAjax(fsHomeArticleViewService.insertFsHomeArticleView(fsHomeArticleView));
+    }
+
+    /**
+     * 修改期刊阅读
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:edit')")
+    @Log(title = "期刊阅读", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsHomeArticleViewScrm fsHomeArticleView) {
+        return toAjax(fsHomeArticleViewService.updateFsHomeArticleView(fsHomeArticleView));
+    }
+
+    /**
+     * 删除期刊阅读
+     */
+    @PreAuthorize("@ss.hasPermi('store:homeView:remove')")
+    @Log(title = "期刊阅读", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{viewIds}")
+    public AjaxResult remove(@PathVariable Long[] viewIds) {
+        return toAjax(fsHomeArticleViewService.deleteFsHomeArticleViewByIds(viewIds));
+    }
+}

+ 5 - 5
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -508,11 +508,11 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
         request.setAppid(config.getAppId());
         request.setOpenid(param.getOpenId());
 
-        String code =  OrderCodeUtils.getOrderSn();
-        if(StringUtils.isEmpty(code)){
-            return R.error("订单生成失败,请重试");
-        }
-//        String code = String.valueOf(IdUtil.getSnowflake(0, 0).nextId());
+//        String code =  OrderCodeUtils.getOrderSn();
+//        if(StringUtils.isEmpty(code)){
+//            return R.error("订单生成失败,请重试");
+//        }
+        String code = String.valueOf(IdUtil.getSnowflake(0, 0).nextId());
         request.setOutBillNo("fsCourse" + code);
 
         Integer amount = WxPayUnifiedOrderRequest.yuanToFen(param.getAmount() != null ? param.getAmount().toString() : "0.1");

+ 36 - 0
fs-service/src/main/resources/mapper/his/FsStoreOrderMapper.xml

@@ -1599,4 +1599,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 
     </select>
+
+
+    <select id="selectOrderByCustomerIds" resultType="com.fs.crm.domain.Report">
+        SELECT
+        order_code AS orderSn,
+        real_name AS userName,
+        pay_price AS money,
+        pay_time AS payTime,
+        status AS orderStatus,
+        customer_id AS customerId
+        FROM
+        fs_store_order
+        WHERE
+        <choose>
+            <when test="map.orderStatus != null and map.orderStatus != ''">
+                status = #{map.orderStatus}
+            </when>
+            <otherwise>
+                status &gt;= 2
+            </otherwise>
+        </choose>
+        <if test="map.companyId != null and map.companyId!=''">
+            AND company_id = #{map.companyId}
+        </if>
+        <if test="map.customerIds!=null and map.customerIds.size() > 0">
+            AND customer_id IN
+            <foreach collection="map.customerIds" item="id" open="(" separator="," close=")">
+                #{id}
+            </foreach>
+        </if>
+        <if test="map.payTime!=null">
+            AND pay_time &gt;= STR_TO_DATE(#{map.payTime}, '%Y-%m-%d')
+            AND pay_time &lt; DATE_ADD(STR_TO_DATE(#{map.payTime}, '%Y-%m-%d'), INTERVAL 1 DAY)
+        </if>
+    </select>
+
 </mapper>