md
This commit is contained in:
parent
59bbe6c66d
commit
940035cad3
@ -137,6 +137,11 @@ public class EmisExchangeRateController extends BaseController
|
|||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody EmisExchangeRate emisExchangeRate)
|
public AjaxResult edit(@RequestBody EmisExchangeRate emisExchangeRate)
|
||||||
{
|
{
|
||||||
|
int cnt=emisExchangeRateService.checkUnique(emisExchangeRate);
|
||||||
|
if(cnt>0){
|
||||||
|
return AjaxResult.error("配置重复,请检查时间范围");
|
||||||
|
}
|
||||||
|
|
||||||
return toAjax(emisExchangeRateService.updateEmisExchangeRate(emisExchangeRate));
|
return toAjax(emisExchangeRateService.updateEmisExchangeRate(emisExchangeRate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<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'
|
||||||
|
<if test="id != null "> and id != #{id}</if>
|
||||||
and currency = #{currency}
|
and currency = #{currency}
|
||||||
and dest_currency = #{destCurrency}
|
and dest_currency = #{destCurrency}
|
||||||
and (
|
and (
|
||||||
@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
or
|
or
|
||||||
(start_date <![CDATA[ <= ]]> #{endDate} and #{endDate} <![CDATA[ <= ]]> end_date )
|
(start_date <![CDATA[ <= ]]> #{endDate} and #{endDate} <![CDATA[ <= ]]> end_date )
|
||||||
)
|
)
|
||||||
|
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user