注解
@RequestParam
@RequestBody
@RestController
@Controller
将同一个id,后面的字段拼接group_concat,,concat
SELECT s.ORGAN_NAME,group_concat(concat(f.CHILD_ORID,’-’,f.CHILD_ORNAME) separator ‘|’)
FROM sillclaim_unit s
right join fir_orconfig f on s.ORGAN_ID = f.ONE_ORID group by s.ORGAN_NAME
form表单每次都会刷新页面,当页面有刷新事件时,会触发
此句可让提交form表单不触发事件
window.onbeforeunload = null;
redis中需要设置序列化,要不然会有乱码出现。
sql中使用if
SELECT a.ORGAN_ID,a.BELONGTO,a.BELONGTO_NAME,
a.ORGAN_NAME,a.CONTACT,a.GRADE as g,b.CODE_NAME as GRADE
,if( a.GRADE=1 , concat(a.ORGAN_ID ,'_',a.BELONGTO) , concat( a.BELONGTO,'_1_',a.ORGAN_ID)) as od
from sillclaim_unit a
LEFT JOIN code_info b on a.GRADE=b.CODE
where
b.CODE_TYPE='sillClaimunit' AND a.STATUE='1'
ORDER BY od
SpringBoot+Mybatis手动提交事务
将方法上面的@Transactional去掉
@Autowired
DataSourceTransactionManager dataSourceTransactionManager;
@Autowired
TransactionDefinition transactionDefinition;
TransactionStatus transactionStatus =
dataSourceTransactionManager.getTransaction(transactionDefinition);
dataSourceTransactionManager.commit(transactionStatus);
js中模拟a标签的点击事件
$('<a style="display: none" download href="'+ctx + rr.data["path"]+'"></a>').appendTo('body')[0].click();