Jelajahi Sumber

userapp 我的附件

ct 2 bulan lalu
induk
melakukan
443f800efc

+ 47 - 0
fs-service/src/main/java/com/fs/his/domain/FsAttachment.java

@@ -0,0 +1,47 @@
+package com.fs.his.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 附件管理对象 fs_attachment
+ *
+ * @author fs
+ * @date 2025-08-23
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsAttachment extends BaseEntity{
+
+    @TableId
+    private Long attachmentId;
+
+    /** 父id */
+    @Excel(name = "父id")
+    private Long parentId;
+
+    /** 用户id */
+    @Excel(name = "用户id")
+    private Long userId;
+
+    /** 文件类型 0:文件夹 1图片 */
+    @Excel(name = "文件类型 0:文件夹 1图片")
+    private Integer type;
+
+    /** 文件大小(kb) */
+    @Excel(name = "文件大小(kb)")
+    private Long size;
+
+    /** 文件名 */
+    @Excel(name = "文件名")
+    private String fileName;
+
+    /** oss路径 */
+    @Excel(name = "oss路径")
+    private String url;
+
+
+}

+ 64 - 0
fs-service/src/main/java/com/fs/his/mapper/FsAttachmentMapper.java

@@ -0,0 +1,64 @@
+package com.fs.his.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.his.domain.FsAttachment;
+import com.fs.his.param.FsAttachmentPageParam;
+
+/**
+ * 附件管理Mapper接口
+ *
+ * @author fs
+ * @date 2025-08-23
+ */
+public interface FsAttachmentMapper extends BaseMapper<FsAttachment>{
+    /**
+     * 查询附件管理
+     *
+     * @param attachmentId 附件管理主键
+     * @return 附件管理
+     */
+    FsAttachment selectFsAttachmentByAttachmentId(Long attachmentId);
+
+    /**
+     * 查询附件管理列表
+     *
+     * @param fsAttachment 附件管理
+     * @return 附件管理集合
+     */
+    List<FsAttachment> selectFsAttachmentList(FsAttachment fsAttachment);
+
+    /**
+     * 新增附件管理
+     *
+     * @param fsAttachment 附件管理
+     * @return 结果
+     */
+    int insertFsAttachment(FsAttachment fsAttachment);
+
+    /**
+     * 修改附件管理
+     *
+     * @param fsAttachment 附件管理
+     * @return 结果
+     */
+    int updateFsAttachment(FsAttachment fsAttachment);
+
+    /**
+     * 删除附件管理
+     *
+     * @param attachmentId 附件管理主键
+     * @return 结果
+     */
+    int deleteFsAttachmentByAttachmentId(Long attachmentId);
+
+    /**
+     * 批量删除附件管理
+     *
+     * @param attachmentIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsAttachmentByAttachmentIds(Long[] attachmentIds);
+
+    List<FsAttachment> selectFsAttachmentListPage(FsAttachmentPageParam fsAttachment);
+}

+ 38 - 0
fs-service/src/main/java/com/fs/his/param/FsAttachmentPageParam.java

@@ -0,0 +1,38 @@
+package com.fs.his.param;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import com.fs.common.core.domain.BaseEntity;
+import com.fs.common.param.BaseQueryParam;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 附件管理对象 fs_attachment
+ *
+ * @author fs
+ * @date 2025-08-23
+ */
+@Data
+public class FsAttachmentPageParam extends BaseQueryParam {
+    /** 父id */
+    private Long parentId;
+
+    /** 用户id */
+    private Long userId;
+
+    /** 文件类型 0:文件夹 1图片 */
+    @Excel(name = "文件类型 0:文件夹 1图片")
+    private Integer type;
+
+    /** 文件大小(kb) */
+    private Long size;
+
+    /** 文件名 */
+    private String fileName;
+
+    /** oss路径 */
+    private String url;
+
+
+}

+ 66 - 0
fs-service/src/main/java/com/fs/his/service/IFsAttachmentService.java

@@ -0,0 +1,66 @@
+package com.fs.his.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.common.core.domain.R;
+import com.fs.his.domain.FsAttachment;
+import com.fs.his.param.FsAttachmentPageParam;
+
+/**
+ * 附件管理Service接口
+ *
+ * @author fs
+ * @date 2025-08-23
+ */
+public interface IFsAttachmentService extends IService<FsAttachment>{
+    /**
+     * 查询附件管理
+     *
+     * @param attachmentId 附件管理主键
+     * @return 附件管理
+     */
+    FsAttachment selectFsAttachmentByAttachmentId(Long attachmentId);
+
+    /**
+     * 查询附件管理列表
+     *
+     * @param fsAttachment 附件管理
+     * @return 附件管理集合
+     */
+    List<FsAttachment> selectFsAttachmentList(FsAttachment fsAttachment);
+
+
+    List<FsAttachment> selectFsAttachmentList(FsAttachmentPageParam fsAttachment);
+
+    /**
+     * 新增附件管理
+     *
+     * @param fsAttachment 附件管理
+     * @return 结果
+     */
+    R insertFsAttachment(FsAttachment fsAttachment);
+
+    /**
+     * 修改附件管理
+     *
+     * @param fsAttachment 附件管理
+     * @return 结果
+     */
+    int updateFsAttachment(FsAttachment fsAttachment);
+
+    /**
+     * 批量删除附件管理
+     *
+     * @param attachmentIds 需要删除的附件管理主键集合
+     * @return 结果
+     */
+    int deleteFsAttachmentByAttachmentIds(Long[] attachmentIds);
+
+    /**
+     * 删除附件管理信息
+     *
+     * @param attachmentId 附件管理主键
+     * @return 结果
+     */
+    int deleteFsAttachmentByAttachmentId(Long attachmentId);
+}

+ 161 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsAttachmentServiceImpl.java

@@ -0,0 +1,161 @@
+package com.fs.his.service.impl;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+
+import com.fs.common.core.domain.R;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.common.utils.FileNameExtractor;
+import com.fs.common.utils.StringUtils;
+import com.fs.common.utils.file.FileUtils;
+import com.fs.common.utils.file.ImageUtils;
+import com.fs.his.param.FsAttachmentPageParam;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.his.mapper.FsAttachmentMapper;
+import com.fs.his.domain.FsAttachment;
+import com.fs.his.service.IFsAttachmentService;
+
+/**
+ * 附件管理Service业务层处理
+ *
+ * @author fs
+ * @date 2025-08-23
+ */
+@Service
+public class FsAttachmentServiceImpl extends ServiceImpl<FsAttachmentMapper, FsAttachment> implements IFsAttachmentService {
+
+    /**
+     * 查询附件管理
+     *
+     * @param attachmentId 附件管理主键
+     * @return 附件管理
+     */
+    @Override
+    public FsAttachment selectFsAttachmentByAttachmentId(Long attachmentId)
+    {
+        return baseMapper.selectFsAttachmentByAttachmentId(attachmentId);
+    }
+
+    /**
+     * 查询附件管理列表
+     *
+     * @param fsAttachment 附件管理
+     * @return 附件管理
+     */
+    @Override
+    public List<FsAttachment> selectFsAttachmentList(FsAttachment fsAttachment)
+    {
+        return baseMapper.selectFsAttachmentList(fsAttachment);
+    }
+
+    @Override
+    public List<FsAttachment> selectFsAttachmentList(FsAttachmentPageParam fsAttachment) {
+        return baseMapper.selectFsAttachmentListPage(fsAttachment);
+    }
+
+    /**
+     * 新增附件管理
+     *
+     * @param fsAttachment 附件管理
+     * @return 结果
+     */
+    @Override
+    public R insertFsAttachment(FsAttachment fsAttachment)
+    {
+        if (fsAttachment.getUserId() == null){
+            return R.error("未获取到创建人!");
+        }
+        Integer type = fsAttachment.getType();
+        if (type == null){
+            return R.error("请选择创建文件还是文件夹!");
+        } else if (type == 1){
+            //文件
+            if (StringUtils.isBlank(fsAttachment.getUrl())){
+                return R.error("文件不存在");
+            }
+        }
+        if (fsAttachment.getParentId() == null){
+            fsAttachment.setParentId(0L);
+        } else {
+            //查询父文件是否是文件夹
+            FsAttachment parentItem = selectFsAttachmentByAttachmentId(fsAttachment.getParentId());
+            if (parentItem == null){
+                return R.error("上级文件夹不存在");
+            }else {
+                if (parentItem.getType() != 0){
+                    return R.error("上级文件夹不存在!");
+                }
+            }
+        }
+
+
+        //获取文件名
+        String fileName = fsAttachment.getFileName();
+        //上传类型为文件时可获取为文件名称
+        if (StringUtils.isBlank(fileName) && type == 1){
+            fileName = FileNameExtractor.getFileNameFromUrl(fsAttachment.getUrl());
+        }
+        //查询文件名是否存在
+        FsAttachment queryParam = new FsAttachment();
+        queryParam.setUserId(fsAttachment.getUserId());
+        queryParam.setParentId(fsAttachment.getParentId());
+        queryParam.setType(fsAttachment.getType());
+        queryParam.setFileName(fsAttachment.getFileName());
+        List<FsAttachment> list = selectFsAttachmentList(queryParam);
+        if (list != null && !list.isEmpty()){
+            if (fileName.contains(".")){
+                int index = fileName.lastIndexOf(".");
+                String name = fileName.substring(0, index);
+                fileName = name + "(" + (list.size() + 1)+ ")" + fileName.substring(index+1);
+            }
+
+        }
+        fsAttachment.setFileName(fileName);
+        //文件大小
+        long size = Objects.requireNonNull(ImageUtils.getImage(fsAttachment.getUrl())).length / 1024; // 单位为 KB
+        fsAttachment.setSize(size);
+        fsAttachment.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsAttachment(fsAttachment)>0?R.ok():R.error();
+    }
+
+    /**
+     * 修改附件管理
+     *
+     * @param fsAttachment 附件管理
+     * @return 结果
+     */
+    @Override
+    public int updateFsAttachment(FsAttachment fsAttachment)
+    {
+        fsAttachment.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsAttachment(fsAttachment);
+    }
+
+    /**
+     * 批量删除附件管理
+     *
+     * @param attachmentIds 需要删除的附件管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsAttachmentByAttachmentIds(Long[] attachmentIds)
+    {
+        return baseMapper.deleteFsAttachmentByAttachmentIds(attachmentIds);
+    }
+
+    /**
+     * 删除附件管理信息
+     *
+     * @param attachmentId 附件管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsAttachmentByAttachmentId(Long attachmentId)
+    {
+        return baseMapper.deleteFsAttachmentByAttachmentId(attachmentId);
+    }
+}

+ 108 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreScrm.java

@@ -0,0 +1,108 @@
+package com.fs.hisStore.domain;
+
+import com.fs.common.annotation.Excel;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 店铺管理对象 fs_store
+ *
+ * @author fs
+ * @date 2023-06-15
+ */
+@Data
+public class FsStoreScrm extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** ID */
+    private Long storeId;
+
+    /** 所属城市ids */
+    private String cityIds;
+
+    /** 店铺名称 */
+    @Excel(name = "店铺名称")
+    private String storeName;
+
+    /** 店铺介绍 */
+    @Excel(name = "店铺介绍")
+    private String descs;
+
+    /** 店铺LOGO */
+    @Excel(name = "店铺LOGO")
+    private String logoUrl;
+
+    /** 地址 */
+    @Excel(name = "地址")
+    private String address;
+
+    /** 经度 */
+    private String lng;
+
+    /** 维度 */
+    private String lat;
+
+    /** 店铺电话 */
+    @Excel(name = "店铺电话")
+    private String phone;
+
+    /** 资质证书 */
+    @Excel(name = "资质证书")
+    private String licenseImages;
+
+    /** 商品总数 */
+    @Excel(name = "商品总数")
+    private Long productCount;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private Integer status;
+
+    /** 销量 */
+    @Excel(name = "销量")
+    private Long salesCount;
+
+    /** 余额 */
+    @Excel(name = "余额")
+    private BigDecimal balance;
+
+    /** 累计金额 */
+    @Excel(name = "累计金额")
+    private BigDecimal totalMoney;
+
+    /** 审核状态 */
+    @Excel(name = "审核状态")
+    private Integer isAudit;
+
+    /** 登录帐号 */
+    @Excel(name = "登录帐号")
+    private String account;
+
+    /** 登录密码 */
+    @Excel(name = "登录密码")
+    private String password;
+
+    /** 配送方式 1=配送 ,2=到店自提 */
+    private String shippingType;
+
+
+    private Integer brokerageType;
+
+    private Integer brokerageRate;
+
+
+    private String fullName;
+
+
+    private String refundPhone;
+    private String refundAddress;
+    private String refundConsignee;
+
+    private Integer deliveryType;
+
+    private String sendPhone;
+
+}

+ 74 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreScrmMapper.java

@@ -0,0 +1,74 @@
+package com.fs.hisStore.mapper;
+
+import com.fs.his.domain.FsStore;
+import com.fs.hisStore.domain.FsStoreScrm;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+
+import java.util.List;
+
+/**
+ * 店铺管理Mapper接口
+ *
+ * @author fs
+ * @date 2023-06-15
+ */
+public interface FsStoreScrmMapper
+{
+    /**
+     * 查询店铺管理
+     *
+     * @param storeId 店铺管理主键
+     * @return 店铺管理
+     */
+    public FsStoreScrm selectFsStoreByStoreId(Long storeId);
+
+    /**
+     * 查询店铺管理列表
+     *
+     * @param fsStore 店铺管理
+     * @return 店铺管理集合
+     */
+    public List<FsStoreScrm> selectFsStoreList(FsStoreScrm fsStore);
+
+    /**
+     * 新增店铺管理
+     *
+     * @param fsStore 店铺管理
+     * @return 结果
+     */
+    public int insertFsStore(FsStoreScrm fsStore);
+
+    /**
+     * 修改店铺管理
+     *
+     * @param fsStore 店铺管理
+     * @return 结果
+     */
+    public int updateFsStore(FsStoreScrm fsStore);
+
+    /**
+     * 删除店铺管理
+     *
+     * @param storeId 店铺管理主键
+     * @return 结果
+     */
+    public int deleteFsStoreByStoreId(Long storeId);
+
+    /**
+     * 批量删除店铺管理
+     *
+     * @param storeIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteFsStoreByStoreIds(Long[] storeIds);
+    @Update("UPDATE fs_store_scrm SET is_audit=#{isAudit} WHERE store_id=#{storeId}")
+    int updateFsStoreAudit(@Param("storeId") Long storeId, @Param("isAudit") Integer isAudit);
+
+    @Select("select * from fs_store_scrm where account=#{username}")
+    FsStoreScrm selectFsStoreByAccount(String username);
+
+    @Select("SELECT * from fs_store_scrm WHERE   FIND_IN_SET(store_id, (SELECT store_ids FROM fs_doctor where doctor_id=#{doctorId}))")
+    List<FsStoreScrm> selectFsStoreListByDoctorId(Long doctorId);
+}

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

@@ -0,0 +1,74 @@
+package com.fs.hisStore.service;
+
+import com.fs.his.domain.FsStore;
+import com.fs.his.param.FsStoreAuditParam;
+import com.fs.hisStore.domain.FsStoreScrm;
+
+import java.util.List;
+
+
+/**
+ * 店铺管理Service接口
+ *
+ * @author fs
+ * @date 2023-06-15
+ */
+public interface IFsStoreScrmService
+{
+    /**
+     * 查询店铺管理
+     *
+     * @param storeId 店铺管理主键
+     * @return 店铺管理
+     */
+    public FsStoreScrm selectFsStoreByStoreId(Long storeId);
+
+    /**
+     * 查询店铺管理列表
+     *
+     * @param fsStore 店铺管理
+     * @return 店铺管理集合
+     */
+    public List<FsStoreScrm> selectFsStoreList(FsStoreScrm fsStore);
+
+    /**
+     * 新增店铺管理
+     *
+     * @param fsStore 店铺管理
+     * @return 结果
+     */
+    public int insertFsStore(FsStoreScrm fsStore);
+
+    /**
+     * 修改店铺管理
+     *
+     * @param fsStore 店铺管理
+     * @return 结果
+     */
+    public int updateFsStore(FsStoreScrm fsStore);
+
+    /**
+     * 批量删除店铺管理
+     *
+     * @param storeIds 需要删除的店铺管理主键集合
+     * @return 结果
+     */
+    public int deleteFsStoreByStoreIds(Long[] storeIds);
+
+    /**
+     * 删除店铺管理信息
+     *
+     * @param storeId 店铺管理主键
+     * @return 结果
+     */
+    public int deleteFsStoreByStoreId(Long storeId);
+
+    int updateFsStoreAudit(FsStoreAuditParam fsStore);
+
+    int updateFsStoreLogo(FsStoreScrm fsStore);
+
+    int updateEditData(FsStoreScrm fsStore);
+
+
+    List<FsStoreScrm> selectFsStoreListByDoctorId(Long doctorId);
+}

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

@@ -0,0 +1,137 @@
+package com.fs.hisStore.service.impl;
+
+import com.fs.common.exception.CustomException;
+import com.fs.common.utils.DateUtils;
+import com.fs.his.domain.FsStore;
+import com.fs.his.param.FsStoreAuditParam;
+import com.fs.his.utils.StoreMD5PasswordEncoder;
+import com.fs.hisStore.domain.FsStoreScrm;
+import com.fs.hisStore.mapper.FsStoreScrmMapper;
+import com.fs.hisStore.service.IFsStoreScrmService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+
+/**
+ * 店铺管理Service业务层处理
+ *
+ * @author fs
+ * @date 2023-06-15
+ */
+@Service
+public class FsStoreScrmServiceImpl implements IFsStoreScrmService
+{
+    @Autowired
+    private FsStoreScrmMapper fsStoreMapper;
+
+
+    /**
+     * 查询店铺管理
+     *
+     * @param storeId 店铺管理主键
+     * @return 店铺管理
+     */
+    @Override
+    public FsStoreScrm selectFsStoreByStoreId(Long storeId)
+    {
+        return fsStoreMapper.selectFsStoreByStoreId(storeId);
+    }
+
+    /**
+     * 查询店铺管理列表
+     *
+     * @param fsStore 店铺管理
+     * @return 店铺管理
+     */
+    @Override
+    public List<FsStoreScrm> selectFsStoreList(FsStoreScrm fsStore)
+    {
+        return fsStoreMapper.selectFsStoreList(fsStore);
+    }
+
+    /**
+     * 新增店铺管理
+     *
+     * @param fsStore 店铺管理
+     * @return 结果
+     */
+    @Override
+    public int insertFsStore(FsStoreScrm fsStore)
+    {
+        if (fsStore.getAccount()!=null){
+            FsStoreScrm fs = fsStoreMapper.selectFsStoreByAccount(fsStore.getAccount());
+            if (fs!=null){
+                throw new CustomException("店铺账号重复");
+            }
+        }
+        StoreMD5PasswordEncoder storeMD5PasswordEncoder = new StoreMD5PasswordEncoder();
+        fsStore.setPassword(storeMD5PasswordEncoder.encode("123456"));
+        fsStore.setCreateTime(DateUtils.getNowDate());
+        return fsStoreMapper.insertFsStore(fsStore);
+    }
+
+    /**
+     * 修改店铺管理
+     *
+     * @param fsStore 店铺管理
+     * @return 结果
+     */
+    @Override
+    public int updateFsStore(FsStoreScrm fsStore)
+    {
+        fsStore.setUpdateTime(DateUtils.getNowDate());
+        return fsStoreMapper.updateFsStore(fsStore);
+    }
+
+    /**
+     * 批量删除店铺管理
+     *
+     * @param storeIds 需要删除的店铺管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsStoreByStoreIds(Long[] storeIds)
+    {
+        return fsStoreMapper.deleteFsStoreByStoreIds(storeIds);
+    }
+
+    /**
+     * 删除店铺管理信息
+     *
+     * @param storeId 店铺管理主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsStoreByStoreId(Long storeId)
+    {
+        return fsStoreMapper.deleteFsStoreByStoreId(storeId);
+    }
+
+    @Override
+    public int updateFsStoreAudit(FsStoreAuditParam fsStore) {
+
+
+        return fsStoreMapper.updateFsStoreAudit(fsStore.getStoreId(),fsStore.getIsAudit());
+    }
+
+    @Override
+    public int updateFsStoreLogo(FsStoreScrm fsStore) {
+
+
+        return   fsStoreMapper.updateFsStore(fsStore);
+    }
+
+    @Override
+    public int updateEditData(FsStoreScrm fsStore) {
+        return fsStoreMapper.updateFsStore(fsStore);
+    }
+
+    @Override
+    public List<FsStoreScrm> selectFsStoreListByDoctorId(Long doctorId) {
+        return fsStoreMapper.selectFsStoreListByDoctorId(doctorId);
+    }
+
+
+}

+ 100 - 0
fs-service/src/main/resources/mapper/his/FsAttachmentMapper.xml

@@ -0,0 +1,100 @@
+<?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.his.mapper.FsAttachmentMapper">
+
+    <resultMap type="FsAttachment" id="FsAttachmentResult">
+        <result property="attachmentId"    column="attachment_id"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="type"    column="type"    />
+        <result property="size"    column="size"    />
+        <result property="fileName"    column="file_name"    />
+        <result property="url"    column="url"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectFsAttachmentVo">
+        select attachment_id, parent_id, user_id, type, `size`, file_name, url,create_time, update_time from fs_attachment
+    </sql>
+
+    <select id="selectFsAttachmentList" parameterType="FsAttachment" resultMap="FsAttachmentResult">
+        <include refid="selectFsAttachmentVo"/>
+        <where>
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="size != null "> and size = #{size}</if>
+            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
+            <if test="url != null  and url != ''"> and url like concat('%', #{url}, '%')</if>
+        </where>
+    </select>
+
+    <select id="selectFsAttachmentByAttachmentId" parameterType="Long" resultMap="FsAttachmentResult">
+        <include refid="selectFsAttachmentVo"/>
+        where attachment_id = #{attachmentId}
+    </select>
+    <select id="selectFsAttachmentListPage" resultType="com.fs.his.domain.FsAttachment">
+        <include refid="selectFsAttachmentVo"/>
+        <where>
+            <if test="parentId != null "> and parent_id = #{parentId}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="size != null "> and size = #{size}</if>
+            <if test="fileName != null  and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
+            <if test="url != null  and url != ''"> and url like concat('%', #{url}, '%')</if>
+        </where>
+    </select>
+
+    <insert id="insertFsAttachment" parameterType="FsAttachment" useGeneratedKeys="true" keyProperty="attachmentId">
+        insert into fs_attachment
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="parentId != null">parent_id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="type != null">type,</if>
+            <if test="size != null">size,</if>
+            <if test="fileName != null and fileName != ''">file_name,</if>
+            <if test="url != null and url != ''">url,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="parentId != null">#{parentId},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="type != null">#{type},</if>
+            <if test="size != null">#{size},</if>
+            <if test="fileName != null and fileName != ''">#{fileName},</if>
+            <if test="url != null and url != ''">#{url},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsAttachment" parameterType="FsAttachment">
+        update fs_attachment
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="parentId != null">parent_id = #{parentId},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="size != null">size = #{size},</if>
+            <if test="fileName != null and fileName != ''">file_name = #{fileName},</if>
+            <if test="url != null and url != ''">url = #{url},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where attachment_id = #{attachmentId}
+    </update>
+
+    <delete id="deleteFsAttachmentByAttachmentId" parameterType="Long">
+        delete from fs_attachment where attachment_id = #{attachmentId}
+    </delete>
+
+    <delete id="deleteFsAttachmentByAttachmentIds" parameterType="String">
+        delete from fs_attachment where attachment_id in
+        <foreach item="attachmentId" collection="array" open="(" separator="," close=")">
+            #{attachmentId}
+        </foreach>
+    </delete>
+</mapper>

+ 170 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml

@@ -0,0 +1,170 @@
+<?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.FsStoreScrmMapper">
+
+    <resultMap type="FsStoreScrm" id="FsStoreScrmResult">
+        <result property="storeId"    column="store_id"    />
+        <result property="cityIds"    column="city_ids"    />
+        <result property="storeName"    column="store_name"    />
+        <result property="descs"    column="descs"    />
+        <result property="logoUrl"    column="logo_url"    />
+        <result property="address"    column="address"    />
+        <result property="lng"    column="lng"    />
+        <result property="lat"    column="lat"    />
+        <result property="phone"    column="phone"    />
+        <result property="licenseImages"    column="license_images"    />
+        <result property="productCount"    column="product_count"    />
+        <result property="status"    column="status"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="salesCount"    column="sales_count"    />
+        <result property="balance"    column="balance"    />
+        <result property="totalMoney"    column="total_money"    />
+        <result property="isAudit"    column="is_audit"    />
+        <result property="account"    column="account"    />
+        <result property="password"    column="password"    />
+        <result property="shippingType"    column="shipping_type"    />
+        <result property="brokerageType"    column="brokerage_type"    />
+        <result property="brokerageRate"    column="brokerage_rate"    />
+        <result property="fullName"    column="full_name"    />
+        <result property="refundPhone"    column="refund_phone"    />
+        <result property="refundAddress"    column="refund_address"    />
+        <result property="refundConsignee"    column="refund_consignee"    />
+        <result property="deliveryType"    column="delivery_type"    />
+        <result property="sendPhone"    column="send_phone"    />
+    </resultMap>
+
+    <sql id="selectFsStoreVo">
+        select store_id,full_name,delivery_type,send_phone, brokerage_rate,refund_phone,refund_address,refund_consignee,city_ids, store_name, descs, brokerage_type,logo_url, address, lng, lat, phone, license_images, product_count, status, create_time, update_time, sales_count, balance, total_money, is_audit, account, password, shipping_type from fs_store_scrm
+    </sql>
+
+    <select id="selectFsStoreList" parameterType="FsStoreScrm" resultMap="FsStoreScrmResult">
+        <include refid="selectFsStoreVo"/>
+        <where>
+            <if test="storeName != null  and storeName != ''"> and store_name like concat('%', #{storeName}, '%')</if>
+            <if test="address != null  and address != ''"> and address like concat('%', #{address}, '%')</if>
+            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="isAudit != null "> and is_audit = #{isAudit}</if>
+            <if test="account != null  and account != ''"> and account like concat('%', #{account}, '%')</if>
+        </where>
+        order by store_id desc
+    </select>
+
+    <select id="selectFsStoreByStoreId" parameterType="Long" resultMap="FsStoreScrmResult">
+        <include refid="selectFsStoreVo"/>
+        where store_id = #{storeId}
+    </select>
+
+    <insert id="insertFsStore" parameterType="FsStoreScrm" useGeneratedKeys="true" keyProperty="storeId">
+        insert into fs_store_scrm
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="cityIds != null">city_ids,</if>
+            <if test="storeName != null">store_name,</if>
+            <if test="descs != null">descs,</if>
+            <if test="logoUrl != null">logo_url,</if>
+            <if test="address != null">address,</if>
+            <if test="lng != null">lng,</if>
+            <if test="lat != null">lat,</if>
+            <if test="phone != null">phone,</if>
+            <if test="licenseImages != null">license_images,</if>
+            <if test="productCount != null">product_count,</if>
+            <if test="status != null">status,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="salesCount != null">sales_count,</if>
+            <if test="balance != null">balance,</if>
+            <if test="totalMoney != null">total_money,</if>
+            <if test="isAudit != null">is_audit,</if>
+            <if test="account != null">account,</if>
+            <if test="password != null">password,</if>
+            <if test="shippingType != null">shipping_type,</if>
+            <if test="brokerageType != null">brokerage_type,</if>
+            <if test="brokerageRate != null">brokerage_rate,</if>
+            <if test="fullName != null">full_name,</if>
+            <if test="refundPhone != null">refund_phone,</if>
+            <if test="refundAddress != null">refund_address,</if>
+            <if test="refundConsignee != null">refund_consignee,</if>
+            <if test="deliveryType != null">delivery_type,</if>
+            <if test="sendPhone != null">send_phone,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="cityIds != null">#{cityIds},</if>
+            <if test="storeName != null">#{storeName},</if>
+            <if test="descs != null">#{descs},</if>
+            <if test="logoUrl != null">#{logoUrl},</if>
+            <if test="address != null">#{address},</if>
+            <if test="lng != null">#{lng},</if>
+            <if test="lat != null">#{lat},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="licenseImages != null">#{licenseImages},</if>
+            <if test="productCount != null">#{productCount},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="salesCount != null">#{salesCount},</if>
+            <if test="balance != null">#{balance},</if>
+            <if test="totalMoney != null">#{totalMoney},</if>
+            <if test="isAudit != null">#{isAudit},</if>
+            <if test="account != null">#{account},</if>
+            <if test="password != null">#{password},</if>
+            <if test="shippingType != null">#{shippingType},</if>
+            <if test="brokerageType != null">#{brokerageType},</if>
+            <if test="brokerageRate != null">#{brokerageRate},</if>
+            <if test="fullName != null">#{fullName},</if>
+            <if test="refundPhone != null">#{refundPhone},</if>
+            <if test="refundAddress != null">#{refundAddress},</if>
+            <if test="refundConsignee != null">#{refundConsignee},</if>
+            <if test="deliveryType != null">#{deliveryType},</if>
+            <if test="sendPhone != null">#{sendPhone},</if>
+        </trim>
+    </insert>
+
+    <update id="updateFsStore" parameterType="FsStoreScrm">
+        update fs_store_scrm
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="cityIds != null">city_ids = #{cityIds},</if>
+            <if test="storeName != null">store_name = #{storeName},</if>
+            <if test="descs != null">descs = #{descs},</if>
+            <if test="logoUrl != null">logo_url = #{logoUrl},</if>
+            <if test="address != null">address = #{address},</if>
+            <if test="lng != null">lng = #{lng},</if>
+            <if test="lat != null">lat = #{lat},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="licenseImages != null">license_images = #{licenseImages},</if>
+            <if test="productCount != null">product_count = #{productCount},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="salesCount != null">sales_count = #{salesCount},</if>
+            <if test="balance != null">balance = #{balance},</if>
+            <if test="totalMoney != null">total_money = #{totalMoney},</if>
+            <if test="isAudit != null">is_audit = #{isAudit},</if>
+            <if test="account != null">account = #{account},</if>
+            <if test="password != null">password = #{password},</if>
+            <if test="shippingType != null">shipping_type = #{shippingType},</if>
+            <if test="brokerageType != null">brokerage_type = #{brokerageType},</if>
+            <if test="brokerageRate != null">brokerage_rate = #{brokerageRate},</if>
+            <if test="fullName != null">full_name = #{fullName},</if>
+            <if test="refundPhone != null">refund_phone = #{refundPhone},</if>
+            <if test="refundAddress != null">refund_address = #{refundAddress},</if>
+            <if test="refundConsignee != null">refund_consignee = #{refundConsignee},</if>
+            <if test="deliveryType != null">delivery_type = #{deliveryType},</if>
+            <if test="sendPhone != null">send_phone = #{sendPhone},</if>
+        </trim>
+        where store_id = #{storeId}
+    </update>
+
+    <delete id="deleteFsStoreByStoreId" parameterType="Long">
+        delete from fs_store_scrm where store_id = #{storeId}
+    </delete>
+
+    <delete id="deleteFsStoreByStoreIds" parameterType="String">
+        delete from fs_store_scrm where store_id in
+        <foreach item="storeId" collection="array" open="(" separator="," close=")">
+            #{storeId}
+        </foreach>
+    </delete>
+</mapper>

+ 89 - 0
fs-user-app/src/main/java/com/fs/app/controller/AttachmentController.java

@@ -0,0 +1,89 @@
+package com.fs.app.controller;
+
+import java.util.List;
+
+import com.fs.app.annotation.Login;
+import com.fs.common.core.domain.R;
+import com.fs.his.param.FsAttachmentPageParam;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.his.domain.FsAttachment;
+import com.fs.his.service.IFsAttachmentService;
+
+/**
+ * 附件管理Controller
+ *
+ * @author fs
+ * @date 2025-08-23
+ */
+@RestController
+@RequestMapping("/app/attachment")
+public class AttachmentController extends AppBaseController
+{
+    @Autowired
+    private IFsAttachmentService fsAttachmentService;
+
+    /**
+     * 查询附件管理列表
+     */
+    @Login
+    @GetMapping("/list")
+    public R list(FsAttachmentPageParam param)
+    {
+        PageHelper.startPage(param.getPageNum(), param.getPageSize());
+        if (param.getUserId() == null){
+            param.setUserId(Long.valueOf(getUserId()));
+        }
+        List<FsAttachment> list = fsAttachmentService.selectFsAttachmentList(param);
+        PageInfo<FsAttachment> listPageInfo = new PageInfo<>(list);
+        return R.ok().put("data", listPageInfo);
+    }
+
+
+
+    /**
+     * 获取附件管理详细信息
+     */
+    @Login
+    @GetMapping(value = "/{attachmentId}")
+    public AjaxResult getInfo(@PathVariable("attachmentId") Long attachmentId)
+    {
+        return AjaxResult.success(fsAttachmentService.selectFsAttachmentByAttachmentId(attachmentId));
+    }
+
+    /**
+     * 新增附件管理
+     */
+    @PostMapping
+    @Login
+    public R add(@RequestBody FsAttachment fsAttachment)
+    {
+        if (fsAttachment.getUserId() == null){
+            String userId = getUserId();
+            fsAttachment.setUserId(Long.parseLong(userId));
+        }
+        return fsAttachmentService.insertFsAttachment(fsAttachment);
+    }
+
+    /**
+     * 修改附件管理
+     */
+    @PutMapping
+    @Login
+    public AjaxResult edit(@RequestBody FsAttachment fsAttachment)
+    {
+        return toAjax(fsAttachmentService.updateFsAttachment(fsAttachment));
+    }
+
+    /**
+     * 删除附件管理
+     */
+	@DeleteMapping("/{attachmentIds}")
+    public AjaxResult remove(@PathVariable Long[] attachmentIds)
+    {
+        return toAjax(fsAttachmentService.deleteFsAttachmentByAttachmentIds(attachmentIds));
+    }
+}

+ 9 - 9
fs-user-app/src/main/java/com/fs/app/controller/store/StoreScrmController.java

@@ -3,8 +3,8 @@ package com.fs.app.controller.store;
 import com.fs.app.controller.AppBaseController;
 import com.fs.common.core.domain.R;
 import com.fs.common.utils.ParseUtils;
-import com.fs.his.domain.FsStore;
-import com.fs.his.service.IFsStoreService;
+import com.fs.hisStore.domain.FsStoreScrm;
+import com.fs.hisStore.service.IFsStoreScrmService;
 import com.github.pagehelper.PageInfo;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,27 +22,27 @@ import java.util.List;
  * @date 2023-06-15
  */
 @RestController
-@RequestMapping("/app/store")
+@RequestMapping("/store/app/store")
 public class StoreScrmController extends AppBaseController
 {
     @Autowired
-    private IFsStoreService fsStoreService;
+    private IFsStoreScrmService fsStoreService;
 
     /**
      * 查询店铺列表
      */
     @GetMapping("/list")
     @ApiOperation(value = "查询店铺列表", notes = "查询店铺列表")
-    public R list(FsStore param)
+    public R list(FsStoreScrm param)
     {
         startPage();
-        List<FsStore> list = fsStoreService.selectFsStoreList(param);
+        List<FsStoreScrm> list = fsStoreService.selectFsStoreList(param);
         if (list != null && !list.isEmpty()){
-            for (FsStore store : list) {
+            for (FsStoreScrm store : list) {
                 store.setPhone(ParseUtils.parsePhone(store.getPhone()));
             }
         }
-        PageInfo<FsStore> listPageInfo=new PageInfo<>(list);
+        PageInfo<FsStoreScrm> listPageInfo=new PageInfo<>(list);
         return R.ok().put("data",listPageInfo);
     }
 
@@ -53,7 +53,7 @@ public class StoreScrmController extends AppBaseController
     @GetMapping(value = "/{storeId}")
     public R getInfo(@PathVariable("storeId") Long storeId)
     {
-        FsStore fsStore = fsStoreService.selectFsStoreByStoreId(storeId);
+        FsStoreScrm fsStore = fsStoreService.selectFsStoreByStoreId(storeId);
         if(fsStore!=null){
             fsStore.setPhone(ParseUtils.parsePhone(fsStore.getPhone()));
         }