List获取某个字段的合集
list.stream().map("id").collect(Collectors.toList()).toString()
oracle 修改number小数点长度
alter table '表名' modify '字段名' number(11,3);
oracle 创建表空间、用户、授权
create tablespace DB_HOTLINE_DATA logging datafile 'D:\app\OracleTableSpace\DB_HOTLINE\DB_HOTLINE_DATA.dbf' size 50m autoextend on next 50m maxsize 20480m extent management local;
create user DB_HOTLINE identified by hotline#2022 default tablespace DB_HOTLINE_DATA temporary tablespace temp;
grant connect,resource,dba to DB_HOTLINE;
oracle 导入数据
imp 'DB_HOTLINE/"hotline#2022"@orcl' file='D:\工作\菏泽政务热线\expout\trecordinfo9.dmp' log='D:\工作\trecordinfo9.log' full=y;
oracle 判断表是否存在
select count(1) count from user_tables
where TABLE_NAME = #{ew.tableName};
oracle 判断分区是否存在
SELECT
count(1)
FROM
dba_tab_partitions where table_name = 'TAGENTOPRINFO' and partition_name = #{ew.partName}
oracle 按分区查询
SELECT * FROM "TAGENTOPRINFO" PARTITION (PART2023_09)
echarts根据不同的series(数据),展示不同的颜色
series: [
{
name: '数量',
type: 'bar',
barWidth: 40,
data: this.countData,
itemStyle: {
"color":function(params){
var colorarrays = ["#6edaf4","#abde87","#32a78e","#3ad94d","#9c65f4"];
return colorarrays[params.dataIndex];
}
},
},
]
局部展开收缩
searchIcon:true, // 局部展开收缩
feign调用传参时,如果检测到参数为实体,则自动将get请求转载post
/**
* 自定义用户列表
*/
@GetMapping("/page")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "列表", notes = "传入account和realName")
public R<IPage<CheckTaskVO>> page(CheckTask model, Query query) {
PageVO<CheckTaskVO> page = checkTaskManageClient.page(model, query.getCurrent(), query.getSize());
IPage<CheckTaskVO> pages = new Page<>();
pages.setRecords(page.getRecords());
pages.setCurrent(page.getCurrent());
pages.setSize(page.getSize());
pages.setTotal(page.getTotal());
return R.data(pages);
}
/**
* 获取列表
*
* @param model
* @return
*/
@PostMapping(GET_PAGE)
PageVO<CheckTaskVO> page(@RequestBody CheckTask model, @RequestParam("current") Integer current, @RequestParam("size") Integer size);
bladeX框架,调用feign时,实现类的返回值使用框架定义的返回值泛型R(T)
如果不使用框架定义的泛型类R作为返回值,则请求时会隔一次调用一次feign方法。
/**
* 获取列表
*
* @param taskCode
* @return
*/
@GetMapping(LISK_BY_TASK)
R<List<TaskItemVO>> getListByTaskIdWeiXin(@RequestParam("taskCode") String taskCode);
/**
* 获取列表
*
* @param taskCode
* @return
*/
@Override
public R<List<TaskItemVO>> getListByTaskIdWeiXin(String taskCode) {
TaskItem model = new TaskItem();
model.setTaskCode(taskCode);
List<TaskItemVO> list = taskItemService.getListByTaskId(model);
return R.data(list);
}
Java的数组定义支持两种格式:
int[] a和int a[]
前者是Java推荐的格式
后者是为了迎合C语言入门的编程人员的习惯
git下载代码命令
命令 版本好 地址 文件路径(项目名)
git clone -b r5.0.5 git@47.92.71.36:sunboxsoft/sunbox-store.git sunbox-store-r5.0.5
springcloud项目运行
Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/cglib/proxy/Callback 时edit Configurations… 勾选Include dependencies with “Provided” scope
20200820
启动服务注意事项:
redis:启动redis服务/在application-redis.properties中配置本地缓存:core.redis.username=local
字符流使用:
BufferedReader reader = request.getReader();
try {
String line = null;
StringBuilder builder = new StringBuilder();
while ((line = reader.readLine()) != null) {
builder.append(line);
}
return builder.toString();
} finally {
reader.close();
}