写法一:
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字节(Byte)是计量单位,表示数据量多少,是计算机信息技术用于计量存储容量的一种计量单位,通常情况下一字节等于八位。字符(Character)计算机中使用的字母、数字、字和符号,比如'A'、'B'、'$'、'&'等。一般在英文...
Java5 引入了一种主要用于数组的增强型 for 循环,类似js中的for inpublic class Member { public static void main(String[]&...
java判断字符是否是一个字母System.out.println(Character.isLetter('a'));java判断字符是否是一个数字System.out.println(Character.isDigit('0'));java判断字符是否是一个空白Sy...
(1).创建数组double[] myList = new double[size]; //推荐创建方式 double myList[] = new double[size];  ...
System.out.println("当前时间戳(秒): " + System.currentTimeMillis()/1000); System.out.println("当前时间戳(毫秒): " +&nb...
(7).java方法重载一个类的两个方法拥有相同的名字,但是有不同的参数列表,叫做方法重载,例如public static int sum(int a, int b) { retur...