写法一:
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.ArchivesUserTypeEnum
public class test { public static void main(String[] args) { &...
(1).final 修饰符通常和 static 修饰符一起使用来创建类常量。(2).父类中的 final 方法可以被子类继承,但是不能被子类重写,声明 final 方法的主要目的是防止该方法的内容被修改。public class Member {  ...
Java5 引入了一种主要用于数组的增强型 for 循环,类似js中的for inpublic class Member { public static void main(String[]&...
(1).创建数组double[] myList = new double[size]; //推荐创建方式 double myList[] = new double[size];  ...
System.out.println("当前时间戳(秒): " + System.currentTimeMillis()/1000); System.out.println("当前时间戳(毫秒): " +&nb...
pattern表示正则表达式,接收正则表达式作为参数例子:String content = "my name is gaojiufeng"; String pattern = "....