- 博客(11)
- 收藏
- 关注
原创 生成ABCD字母
for (int j = 0; j < size; j++) { originalPlatformOrderNo + ToolUtil.getLetterSuffix(j));}public static String getLetterSuffix(int num) { StringBuilder result = new StringBuilder(); int quotient, remainder; quotient = num; w.
2022-01-13 16:45:09 3548 1
原创 RestTemplate 调用
List<BankDto> list = new ArrayList<>(); BankDto b = new BankDto(); b.setOrderNo("12313"); BankDto b2 = new BankDto(); b2.setOrderNo("123134343"); list.add(b); list.add(b2); RestTemplate restTemplate = new RestTe...
2022-01-04 15:47:12 163
原创 java下载文件
final String filePath ="E:\\home\\file\\失败文件-20211230134403.xlsx";String fileName = null;try { fileName = URLEncoder.encode(filePath.substring(filePath.lastIndexOf("\\") + 1), "UTF-8");} catch (UnsupportedEncodingException e) { log.error("下载模板失.
2022-01-04 13:24:07 346
原创 mybatis注解的使用
@Update({"<script>", "<foreach collection='list' item= 'item' index ='index' separator=';'>", "UPDATE order_send set out_sid=#{item.logisticsNo},company_name=#{item.logisticsName} WHERE order_id =#{item.orderNo} AND prod_id=#{i.
2021-12-23 10:12:42 205
原创 对接系统设置白名单
shiroif("/zsSystem/order/updateLogistics".equals(((HttpServletRequest) request).getRequestURI())) { return true;}Spring Security@Configurationpublic class ResourceServerConfigurer extends ResourceServerConfigurerAdapter { @Override .
2021-12-16 12:00:06 489
原创 Java反射
Object object =null;Field field = object.getClass().getDeclaredField(fieldName); //根据属性名获取值field.setAccessible(true); //设置可以反问私有的属性return field.get(object); //获取值
2021-12-10 13:22:58 330
原创 Enum枚举的类用法
public enum testEnum{ORDER_COUPON("orderCoupon","电子券金额","OrderInfo"),PROD_PRICE("prodPrice","商品单价","Item");private String index;private String msg;public String getType() { return type;}public void setType(String type) { this.type =
2021-12-10 13:20:48 204
原创 fegin接口2个系统相互调用
@FeignClient(value = "service-treasure-111" ,url = "192.168.2.2:10010",configuration =FeignConfig.class)public interface MgbApiClient { @RequestMapping(value = "/bank/jhOrder", method = RequestMethod.POST) String getByCustomer(Map<String,Obje.
2021-12-01 17:57:19 433
原创 Easy操作Excel导入
Controllerpublic GbmResult batchReadFile(@RequestParam(required = false,name ="file") MultipartFile file) throws IOException { String fileName = file.getOriginalFilename(); String suffixName = fileName.substring(fileName.lastIndexOf(".")); i
2021-11-24 17:59:09 851
原创 JSON转换
JSON转ObjectString str="{\"val\": \"蓝色\",\"name\": \"颜色\"}";ProductDetailSpec jsonObject = JSONObject.parseObject(str,ProductDetailSpec.class);//json对象转字符串System.out.println(jsonObject.getVal());JSON转list集合//str 是重数据库查的一个集合,用String 接收的List<Pro
2021-11-24 17:34:49 314
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人