如题,以下是具体代码片
<update id="editupthat" parameterType="java.util.Map">
update t_sys_pos_policy_info
set module1_end_date=#{map.isdate}
where policy_id=#{map.isid}
and module1_pickup_date < #{map.isdate}
and id in (#{map.issn})
</update>
前端传值
每次执行都会报错
### Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '18948,18949'
### The error may involve com.ruoyi.project.deveagent.syspospolicy.mapper.SysPosPolicyMapper.editupthat-Inline
### The error occurred while setting parameters
### SQL: update t_sys_pos_policy_info set module1_end_date=? where policy_id=? and module1_pickup_date < ? and id in (?)
### Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '18948,18949'
; Data truncation: Truncated incorrect DOUBLE value: '18948,18949'
/**
* @param params
* @return
*/
@Transactional
public R editupthat(Map<String,Object> params) {
try {
int k = 0;
k = sysPosPolicyMapper.editupthat(params);
if(k == 0){
return R.error("修改失败!");
}
}catch (Exception e){
return R.error("修改异常!");
}
return R.ok("修改成功!");
}