初级工作经验

注解

@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();
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值