ソースを参照

分账--合作人

wjj 3 週間 前
コミット
1316320ebd

+ 103 - 0
fs-admin/src/main/java/com/fs/his/controller/FsSubMerchantController.java

@@ -0,0 +1,103 @@
+package com.fs.his.controller;
+
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.his.domain.FsSubMerchant;
+import com.fs.his.service.IFsSubMerchantService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 汇付-子商户信息Controller
+ * 
+ * @author fs
+ * @date 2026-05-11
+ */
+@RestController
+@RequestMapping("/his/merchant")
+public class FsSubMerchantController extends BaseController
+{
+    @Autowired
+    private IFsSubMerchantService fsSubMerchantService;
+
+    /**
+     * 查询汇付-子商户信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchant:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsSubMerchant fsSubMerchant)
+    {
+        startPage();
+        List<FsSubMerchant> list = fsSubMerchantService.selectFsSubMerchantList(fsSubMerchant);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出汇付-子商户信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchant:export')")
+    @Log(title = "汇付-子商户信息", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsSubMerchant fsSubMerchant)
+    {
+        List<FsSubMerchant> list = fsSubMerchantService.selectFsSubMerchantList(fsSubMerchant);
+        ExcelUtil<FsSubMerchant> util = new ExcelUtil<FsSubMerchant>(FsSubMerchant.class);
+        return util.exportExcel(list, "汇付-子商户信息数据");
+    }
+
+    /**
+     * 获取汇付-子商户信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchant:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsSubMerchantService.selectFsSubMerchantById(id));
+    }
+
+    /**
+     * 新增汇付-子商户信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchant:add')")
+    @Log(title = "汇付-子商户信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsSubMerchant fsSubMerchant)
+    {
+        return toAjax(fsSubMerchantService.insertFsSubMerchant(fsSubMerchant));
+    }
+
+    /**
+     * 修改汇付-子商户信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchant:edit')")
+    @Log(title = "汇付-子商户信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsSubMerchant fsSubMerchant)
+    {
+        return toAjax(fsSubMerchantService.updateFsSubMerchant(fsSubMerchant));
+    }
+
+    /**
+     * 删除汇付-子商户信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:merchant:remove')")
+    @Log(title = "汇付-子商户信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsSubMerchantService.deleteFsSubMerchantByIds(ids));
+    }
+}

+ 35 - 0
fs-service/src/main/java/com/fs/his/domain/FsSubMerchant.java

@@ -0,0 +1,35 @@
+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_sub_merchant
+ *
+ * @author fs
+ * @date 2026-05-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsSubMerchant extends BaseEntity{
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 商户名称 */
+    @Excel(name = "商户名称")
+    private String merchantName;
+
+    /** 商户号 */
+    @Excel(name = "商户号")
+    private String merchantNo;
+
+    /** 主商户号 */
+    @Excel(name = "主商户号")
+    private String masterMerchantNo;
+
+
+}

+ 61 - 0
fs-service/src/main/java/com/fs/his/mapper/FsSubMerchantMapper.java

@@ -0,0 +1,61 @@
+package com.fs.his.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.his.domain.FsSubMerchant;
+
+/**
+ * 汇付-子商户信息Mapper接口
+ * 
+ * @author fs
+ * @date 2026-05-11
+ */
+public interface FsSubMerchantMapper extends BaseMapper<FsSubMerchant>{
+    /**
+     * 查询汇付-子商户信息
+     * 
+     * @param id 汇付-子商户信息主键
+     * @return 汇付-子商户信息
+     */
+    FsSubMerchant selectFsSubMerchantById(Long id);
+
+    /**
+     * 查询汇付-子商户信息列表
+     * 
+     * @param fsSubMerchant 汇付-子商户信息
+     * @return 汇付-子商户信息集合
+     */
+    List<FsSubMerchant> selectFsSubMerchantList(FsSubMerchant fsSubMerchant);
+
+    /**
+     * 新增汇付-子商户信息
+     * 
+     * @param fsSubMerchant 汇付-子商户信息
+     * @return 结果
+     */
+    int insertFsSubMerchant(FsSubMerchant fsSubMerchant);
+
+    /**
+     * 修改汇付-子商户信息
+     * 
+     * @param fsSubMerchant 汇付-子商户信息
+     * @return 结果
+     */
+    int updateFsSubMerchant(FsSubMerchant fsSubMerchant);
+
+    /**
+     * 删除汇付-子商户信息
+     * 
+     * @param id 汇付-子商户信息主键
+     * @return 结果
+     */
+    int deleteFsSubMerchantById(Long id);
+
+    /**
+     * 批量删除汇付-子商户信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsSubMerchantByIds(Long[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/his/service/IFsSubMerchantService.java

@@ -0,0 +1,61 @@
+package com.fs.his.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.his.domain.FsSubMerchant;
+
+/**
+ * 汇付-子商户信息Service接口
+ * 
+ * @author fs
+ * @date 2026-05-11
+ */
+public interface IFsSubMerchantService extends IService<FsSubMerchant>{
+    /**
+     * 查询汇付-子商户信息
+     * 
+     * @param id 汇付-子商户信息主键
+     * @return 汇付-子商户信息
+     */
+    FsSubMerchant selectFsSubMerchantById(Long id);
+
+    /**
+     * 查询汇付-子商户信息列表
+     * 
+     * @param fsSubMerchant 汇付-子商户信息
+     * @return 汇付-子商户信息集合
+     */
+    List<FsSubMerchant> selectFsSubMerchantList(FsSubMerchant fsSubMerchant);
+
+    /**
+     * 新增汇付-子商户信息
+     * 
+     * @param fsSubMerchant 汇付-子商户信息
+     * @return 结果
+     */
+    int insertFsSubMerchant(FsSubMerchant fsSubMerchant);
+
+    /**
+     * 修改汇付-子商户信息
+     * 
+     * @param fsSubMerchant 汇付-子商户信息
+     * @return 结果
+     */
+    int updateFsSubMerchant(FsSubMerchant fsSubMerchant);
+
+    /**
+     * 批量删除汇付-子商户信息
+     * 
+     * @param ids 需要删除的汇付-子商户信息主键集合
+     * @return 结果
+     */
+    int deleteFsSubMerchantByIds(Long[] ids);
+
+    /**
+     * 删除汇付-子商户信息信息
+     * 
+     * @param id 汇付-子商户信息主键
+     * @return 结果
+     */
+    int deleteFsSubMerchantById(Long id);
+}

+ 94 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsSubMerchantServiceImpl.java

@@ -0,0 +1,94 @@
+package com.fs.his.service.impl;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.his.mapper.FsSubMerchantMapper;
+import com.fs.his.domain.FsSubMerchant;
+import com.fs.his.service.IFsSubMerchantService;
+
+/**
+ * 汇付-子商户信息Service业务层处理
+ * 
+ * @author fs
+ * @date 2026-05-11
+ */
+@Service
+public class FsSubMerchantServiceImpl extends ServiceImpl<FsSubMerchantMapper, FsSubMerchant> implements IFsSubMerchantService {
+
+    /**
+     * 查询汇付-子商户信息
+     * 
+     * @param id 汇付-子商户信息主键
+     * @return 汇付-子商户信息
+     */
+    @Override
+    public FsSubMerchant selectFsSubMerchantById(Long id)
+    {
+        return baseMapper.selectFsSubMerchantById(id);
+    }
+
+    /**
+     * 查询汇付-子商户信息列表
+     * 
+     * @param fsSubMerchant 汇付-子商户信息
+     * @return 汇付-子商户信息
+     */
+    @Override
+    public List<FsSubMerchant> selectFsSubMerchantList(FsSubMerchant fsSubMerchant)
+    {
+        return baseMapper.selectFsSubMerchantList(fsSubMerchant);
+    }
+
+    /**
+     * 新增汇付-子商户信息
+     * 
+     * @param fsSubMerchant 汇付-子商户信息
+     * @return 结果
+     */
+    @Override
+    public int insertFsSubMerchant(FsSubMerchant fsSubMerchant)
+    {
+        fsSubMerchant.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsSubMerchant(fsSubMerchant);
+    }
+
+    /**
+     * 修改汇付-子商户信息
+     * 
+     * @param fsSubMerchant 汇付-子商户信息
+     * @return 结果
+     */
+    @Override
+    public int updateFsSubMerchant(FsSubMerchant fsSubMerchant)
+    {
+        fsSubMerchant.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsSubMerchant(fsSubMerchant);
+    }
+
+    /**
+     * 批量删除汇付-子商户信息
+     * 
+     * @param ids 需要删除的汇付-子商户信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsSubMerchantByIds(Long[] ids)
+    {
+        return baseMapper.deleteFsSubMerchantByIds(ids);
+    }
+
+    /**
+     * 删除汇付-子商户信息信息
+     * 
+     * @param id 汇付-子商户信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsSubMerchantById(Long id)
+    {
+        return baseMapper.deleteFsSubMerchantById(id);
+    }
+}

+ 76 - 0
fs-service/src/main/resources/mapper/his/FsSubMerchantMapper.xml

@@ -0,0 +1,76 @@
+<?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.FsSubMerchantMapper">
+    
+    <resultMap type="FsSubMerchant" id="FsSubMerchantResult">
+        <result property="id"    column="id"    />
+        <result property="merchantName"    column="merchant_name"    />
+        <result property="merchantNo"    column="merchant_no"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="masterMerchantNo"    column="master_merchant_no"    />
+    </resultMap>
+
+    <sql id="selectFsSubMerchantVo">
+        select id, merchant_name, merchant_no, create_time, update_time, master_merchant_no from fs_sub_merchant
+    </sql>
+
+    <select id="selectFsSubMerchantList" parameterType="FsSubMerchant" resultMap="FsSubMerchantResult">
+        <include refid="selectFsSubMerchantVo"/>
+        <where>  
+            <if test="merchantName != null  and merchantName != ''"> and merchant_name like concat('%', #{merchantName}, '%')</if>
+            <if test="merchantNo != null  and merchantNo != ''"> and merchant_no = #{merchantNo}</if>
+            <if test="masterMerchantNo != null  and masterMerchantNo != ''"> and master_merchant_no = #{masterMerchantNo}</if>
+        </where>
+    </select>
+    
+    <select id="selectFsSubMerchantById" parameterType="Long" resultMap="FsSubMerchantResult">
+        <include refid="selectFsSubMerchantVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertFsSubMerchant" parameterType="FsSubMerchant">
+        insert into fs_sub_merchant
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="merchantName != null">merchant_name,</if>
+            <if test="merchantNo != null">merchant_no,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="masterMerchantNo != null">master_merchant_no,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="merchantName != null">#{merchantName},</if>
+            <if test="merchantNo != null">#{merchantNo},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="masterMerchantNo != null">#{masterMerchantNo},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsSubMerchant" parameterType="FsSubMerchant">
+        update fs_sub_merchant
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="merchantName != null">merchant_name = #{merchantName},</if>
+            <if test="merchantNo != null">merchant_no = #{merchantNo},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="masterMerchantNo != null">master_merchant_no = #{masterMerchantNo},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFsSubMerchantById" parameterType="Long">
+        delete from fs_sub_merchant where id = #{id}
+    </delete>
+
+    <delete id="deleteFsSubMerchantByIds" parameterType="String">
+        delete from fs_sub_merchant where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>