Commit 3461347d authored by 吴卿华's avatar 吴卿华

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	danger-manage-system/src/main/resources/mapper/system/TNfcSettingMapper.xml
#	danger-manage-web/src/api/system/setting.js
parents 194f0daf b3c50f3b
......@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TNfcSettingMapper;
import com.zehong.system.domain.TNfcSetting;
import com.zehong.system.service.ITNfcSettingService;
import org.springframework.transaction.annotation.Transactional;
/**
* settingService业务层处理
......@@ -76,9 +77,16 @@ public class TNfcSettingServiceImpl implements ITNfcSettingService
* @return 结果
*/
@Override
@Transactional
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;
}
/**
......
......@@ -12,12 +12,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="patrolFrequency" column="patrol_frequency" />
<result property="nfcNum" column="nfc_num" />
<result property="createTime" column="create_time" />
<result property="region" column="region" />
<result property="isDel" column="is_del" />
</resultMap>
<sql id="selectTNfcSettingVo">
select nfc_id, patrol_sort, patrol_address, patrol_coment, patrol_frequency, nfc_num, create_time,region, is_del from t_nfc_setting
select nfc_id, patrol_sort, patrol_address, patrol_coment, patrol_frequency, nfc_num, create_time, is_del from t_nfc_setting
</sql>
<select id="selectTNfcSettingList" parameterType="TNfcSetting" resultMap="TNfcSettingResult">
......@@ -41,7 +40,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where nfc_num = #{nfcNum}
</select>
<insert id="insertTNfcSetting" parameterType="TNfcSetting" useGeneratedKeys="true" keyProperty="nfcId">
insert into t_nfc_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -74,7 +72,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="patrolComent != null">patrol_coment = #{patrolComent},</if>
<if test="patrolFrequency != null">patrol_frequency = #{patrolFrequency},</if>
<if test="nfcNum != null">nfc_num = #{nfcNum},</if>
<if test="region != null">region = #{region},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim>
......
......@@ -60,5 +60,3 @@ export function refreshSystemSetting(query) {
params: query
})
}
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