Commit 9cb60f60 by zhoujunpeng

增加lock和unlock方法transName强制大写

parent 5407d0de
package com.brilliance.isc.common.lock.impl;
import com.brilliance.isc.common.util.StringUtils;
import com.brilliance.isc.bo.Lck;
import com.brilliance.isc.bo.Stb;
import com.brilliance.isc.mda.dao.StbMapper;
import com.brilliance.isc.vo.manager.StbVo;
import org.redisson.api.RBucket;
import org.apache.commons.lang3.StringUtils;import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
......@@ -209,7 +209,7 @@ public class DBLckBizLocker extends AbstractBizLocker {
@Override
public boolean unlockAllOfTrans(String transName, String userId) {
Lck lck = new Lck();
lck.setLcktrn(transName);
lck.setLcktrn(StringUtils.upperCase(transName));
lck.setLckusr(userId);
int cnt = lckComponent.deleteLckByUserAndTrn(lck);
logger.info("解除{}用户在{}交易的所有锁定,影响行数{}",userId,transName,cnt);
......
package com.brilliance.isc.common.lock.impl;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import com.brilliance.isc.bo.Lck;
......@@ -36,7 +37,7 @@ public class LckComponent {
public Lck lockInfo2Lck(LockInfo lockInfo){
Lck dataLck = new Lck();
dataLck.setLckdattim(new Date());
dataLck.setLcktrn(lockInfo.getTrnName());
dataLck.setLcktrn(StringUtils.upperCase(lockInfo.getTrnName()));
dataLck.setLckusr(lockInfo.getUsrId());
dataLck.setLckstr(lockInfo.genLockKey());
if(lockInfo.isReentrant()){
......
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