feat:合同配置
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,6 @@ public interface ContractConfigMapper extends Mapper<ContractConfigDO> {
|
||||
|
||||
|
||||
List<ContractConfigDO> queryContractConfigList(String brand);
|
||||
|
||||
List<ContractConfigDO> queryContractConfigListByBrandAndMode(String brand, String mode);
|
||||
}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user