写法一:
String erpId=TokenContextHolder.getContext().getCloudErpId();
int userType= TokenContextHolder.getContext().getUserType();
if (userType==1) {
depotId = UserUtil.getUserBranchId(erpId);
SelectArchivesDepotEntity selectArchivesDepotEntity = jmsService.queryDepotById(depotId);
CheckUtil.nullException(selectArchivesDepotEntity, "queryNeedExpressBills-02", "用户[" + erpId + "]未绑定仓店,请绑定后再操作!");
}写法二:
TokenEntity context = TokenContextHolder.getContext();
if (context.getUserType() != ArchivesUserTypeEnum.Depot.getValue()) {
BusinessException.of("BIJmsServiceImpl-setDepotId-01", "当前用户不是店铺用户");
}
String depotId = UserUtil.getUserBranchId(context.getCloudErpId());
if (StringUtils.isEmpty(depotId)) {
BusinessException.of("BIJmsServiceImpl-setDepotId-02", "当前用户没有所属店铺");
}
// com.x3.base.core.archives.ArchivesUserTypeEnumpublic class test { public static void main(String[] args) { &...
public class test { public static void main(String[] args) { &...
java限制1个方法同一时间只能被一个线程访问public synchronized void setOrderPay(){ }加上synchronized 修饰符即可...
(1).final 修饰符通常和 static 修饰符一起使用来创建类常量。(2).父类中的 final 方法可以被子类继承,但是不能被子类重写,声明 final 方法的主要目的是防止该方法的内容被修改。public class Member {  ...
System.out.println("当前时间戳(秒): " + System.currentTimeMillis()/1000); System.out.println("当前时间戳(毫秒): " +&nb...
java匹配一个字符串在另外一个字符串中出现的次数,java正则start,java正则end// 正则 String pattern = "\\bgao\\b"; // 字符串 String content ...