md
This commit is contained in:
parent
93b61e18da
commit
59bbe6c66d
@ -121,6 +121,11 @@ public class EmisExchangeRateController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody EmisExchangeRate emisExchangeRate)
|
public AjaxResult add(@RequestBody EmisExchangeRate emisExchangeRate)
|
||||||
{
|
{
|
||||||
|
int cnt=emisExchangeRateService.checkUnique(emisExchangeRate);
|
||||||
|
if(cnt>0){
|
||||||
|
return AjaxResult.error("配置重复,请检查时间范围");
|
||||||
|
}
|
||||||
|
|
||||||
return toAjax(emisExchangeRateService.insertEmisExchangeRate(emisExchangeRate));
|
return toAjax(emisExchangeRateService.insertEmisExchangeRate(emisExchangeRate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -42,23 +42,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkUnique" parameterType="EmisExchangeRate" resultType="int">
|
<select id="checkUnique" parameterType="EmisExchangeRate" resultType="int">
|
||||||
select count(1) from emis_exchange_rate
|
select count(1) from emis_exchange_rate
|
||||||
where del_flag='0'
|
where del_flag='0'
|
||||||
and id = #{id}
|
and currency = #{currency}
|
||||||
and currency = #{currency}
|
and dest_currency = #{destCurrency}
|
||||||
and dest_currency = #{destCurrency}
|
and (
|
||||||
and rate = #{rate}
|
(start_date <![CDATA[ <= ]]> #{startDate} and #{startDate} <![CDATA[ <= ]]> end_date )
|
||||||
and start_date = #{startDate}
|
or
|
||||||
and end_date = #{endDate}
|
(start_date <![CDATA[ <= ]]> #{endDate} and #{endDate} <![CDATA[ <= ]]> end_date )
|
||||||
and bl_valid = #{blValid}
|
)
|
||||||
and del_flag = #{delFlag}
|
|
||||||
and create_by = #{createBy}
|
|
||||||
and create_time = #{createTime}
|
|
||||||
and update_by = #{updateBy}
|
|
||||||
and update_time = #{updateTime}
|
|
||||||
and remark = #{remark}
|
|
||||||
and create_site = #{createSite}
|
|
||||||
and update_site = #{updateSite}
|
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user