广告和协议功能
This commit is contained in:
parent
7b96b7f30e
commit
de117d0d65
|
@ -33,6 +33,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bag.update_time,
|
bag.update_time,
|
||||||
su.user_name,
|
su.user_name,
|
||||||
ba.name as area_name
|
ba.name as area_name
|
||||||
|
<include refid="searchTables"></include>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="searchTables">
|
||||||
from bst_agreement bag
|
from bst_agreement bag
|
||||||
left join sys_user su on bag.store_id = su.user_id
|
left join sys_user su on bag.store_id = su.user_id
|
||||||
left join bst_area ba on bag.area_id = ba.id
|
left join bst_area ba on bag.area_id = ba.id
|
||||||
|
@ -69,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
<select id="selectDistinct" resultType="com.ruoyi.bst.agreement.domain.AgreementVO">
|
<select id="selectDistinct" resultType="com.ruoyi.bst.agreement.domain.AgreementVO">
|
||||||
<include refid="selectAgreementVo"/>
|
<include refid="selectAgreementVo"/>
|
||||||
where bag.store_id = #{storeId} and bag.agreement_type = #{agreementType} and (bag.id != #{id} or #{id} is null)
|
where bag.area_id = #{areaId} and bag.agreement_type = #{agreementType} and (bag.id != #{id} or #{id} is null)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--查询最新的协议信息-->
|
<!--查询最新的协议信息-->
|
||||||
|
|
|
@ -95,10 +95,9 @@ public class AgreementServiceImpl implements AgreementService
|
||||||
private void distinct(Agreement agreement) {
|
private void distinct(Agreement agreement) {
|
||||||
if (agreement.getAreaId() != null){
|
if (agreement.getAreaId() != null){
|
||||||
AreaVO area = areaService.selectAreaById(agreement.getAreaId());
|
AreaVO area = areaService.selectAreaById(agreement.getAreaId());
|
||||||
if (area !=null){
|
ServiceUtil.assertion(area == null,"当前区域不存在");
|
||||||
agreement.setStoreId(area.getUserId());
|
agreement.setStoreId(area.getUserId());
|
||||||
ServiceUtil.assertion(agreementMapper.selectDistinct(agreement)!= null,"当前分类已存在协议");
|
ServiceUtil.assertion(agreementMapper.selectDistinct(agreement)!= null,"当前运营区已存在同类协议");
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user