feat:合同配置

This commit is contained in:
苏竹红
2025-09-09 11:09:57 +08:00
parent 83ddafb842
commit 302d38af2b
10 changed files with 126 additions and 7 deletions

View File

@@ -18,6 +18,11 @@ public class ContractConfigDAO {
@Resource
private ContractConfigMapper contractConfigMapper;
public ContractConfigDO queryContractConfigById(Long id){
return contractConfigMapper.selectByPrimaryKey(id);
}
public int addContractConfig(ContractConfigDO contractConfigDO){
return contractConfigMapper.insertSelective(contractConfigDO);
}
@@ -37,7 +42,26 @@ public class ContractConfigDAO {
}
/**
* 合同配置列表
* @param brand
* @return
*/
public List<ContractConfigDO> queryContractConfigList(String brand) {
return contractConfigMapper.queryContractConfigList(brand);
}
/**
* 根据加盟品牌与加盟模式 查出所有的未删除状态的合并合同
* @param brand
* @param mode
* @return
*/
public List<ContractConfigDO> queryContractConfigListByBrandAndMode(String brand,String mode) {
return contractConfigMapper.queryContractConfigListByBrandAndMode(brand,mode);
}
public void deleteContractConfig(Long id) {
contractConfigMapper.deleteByPrimaryKey(id);
}
}

View File

@@ -13,4 +13,6 @@ public interface ContractConfigMapper extends Mapper<ContractConfigDO> {
List<ContractConfigDO> queryContractConfigList(String brand);
List<ContractConfigDO> queryContractConfigListByBrandAndMode(String brand, String mode);
}

View File

@@ -14,7 +14,7 @@
<result column="franchise_mode" jdbcType="VARCHAR" property="franchiseMode" />
<result column="fadada_template_id" jdbcType="VARCHAR" property="fadadaTemplateId" />
<result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
<result column="payee_name" javaType="VARCHAR" property="payeeName"/>
<result column="payee_name" jdbcType="VARCHAR" property="payeeName"/>
<result column="deleted" jdbcType="TINYINT" property="deleted" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
@@ -31,4 +31,15 @@
and brand = #{brand}
</if>
</select>
<select id="queryContractConfigListByBrandAndMode" resultMap="BaseResultMap">
select * from xfsg_contract_config
where deleted = 0
<if test="brand!=null and brand !=''">
and brand = #{brand}
</if>
<if test="mode!=null and mode !=''">
and franchise_mode like concat('%,',#{mode},',%')
</if>
</select>
</mapper>