Commit 6549bf78 authored by zhangjianqian's avatar zhangjianqian

修改查询

parent 2f37381e
...@@ -7,6 +7,7 @@ import org.springframework.stereotype.Service; ...@@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TNfcSettingMapper; import com.zehong.system.mapper.TNfcSettingMapper;
import com.zehong.system.domain.TNfcSetting; import com.zehong.system.domain.TNfcSetting;
import com.zehong.system.service.ITNfcSettingService; import com.zehong.system.service.ITNfcSettingService;
import org.springframework.transaction.annotation.Transactional;
/** /**
* settingService业务层处理 * settingService业务层处理
...@@ -75,9 +76,16 @@ public class TNfcSettingServiceImpl implements ITNfcSettingService ...@@ -75,9 +76,16 @@ public class TNfcSettingServiceImpl implements ITNfcSettingService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional
public int updateTNfcSetting(TNfcSetting tNfcSetting) public int updateTNfcSetting(TNfcSetting tNfcSetting)
{ {
return tNfcSettingMapper.updateTNfcSetting(tNfcSetting); TNfcSetting ts = tNfcSettingMapper.getInfoByNfcNum(tNfcSetting.getNfcNum());
if(ts.getNfcId()!=tNfcSetting.getNfcId()){
ts.setNfcNum("");
tNfcSettingMapper.updateTNfcSetting(ts);
}
int a = tNfcSettingMapper.updateTNfcSetting(tNfcSetting);
return a;
} }
/** /**
......
...@@ -23,9 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -23,9 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTNfcSettingVo"/> <include refid="selectTNfcSettingVo"/>
<where> <where>
is_del='0' is_del='0'
and <if test="region != null"> and region = #{region}</if>
region = #{region} <if test="patrolAddress != null and patrolAddress != ''"> and patrol_address like concat('%',#{patrolAddress},'%') </if>
<if test="patrolAddress != null and patrolAddress != ''"> and patrol_address = #{patrolAddress}</if>
<if test="nfcNum != null and nfcNum != ''"> and nfc_num = #{nfcNum}</if> <if test="nfcNum != null and nfcNum != ''"> and nfc_num = #{nfcNum}</if>
</where> </where>
order by patrol_sort order by patrol_sort
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment