一、进入服务管理界面
cmd命令窗口输入services.msc
进入服务管理界面
二、进入控制面板
cmd命令窗口输入control
四、进入控制面板
三、注解
@ApiModelProperty("ID")
@TableId(type = IdType.ASSIGN_ID)
private Long id;
@Length(max = 50, message = "标本号最多50个字符")
@NotBlank(message = "标本号不能为空")
@ApiModelProperty("标本号")
private String specimenCode;
四、ID获取对象
@Override
public Assay findById(Long assayId) {
return Optional.ofNullable(assayMapper.selectById(assayId)).orElseThrow(() -> new ServiceException("检验记录不存在"));
}
五、取对象字段、差集
List<String> hadDataBottleCodes = dbList.stream().map(NodeBloodCultureDTO::getBottleCode).collect(Collectors.toList());
//差集:allBottleCodes - hadDataBottleCodes
List<String> noDataBottleCodes = allBottleCodes.stream().filter(item -> !hadDataBottleCodes.contains(item)).collect(Collectors.toList());
六、异步
CompletableFuture.supplyAsync(() -> {
initOldDataService.initTrans();
return true;
}, GlobalThreadPool.getExecutor());
CompletableFuture.supplyAsync(() -> doUpdateLog(bottleCodeList), GlobalThreadPool.getExecutor());
七、修改
@Override
public int update(AssayUpdateVO updateVO) {
LambdaUpdateWrapper<Assay> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(Assay::getId, updateVO.getId());
updateWrapper.set(updateVO.getDoctorId() != null, Assay::getDoctorId, updateVO.getDoctorId());
updateWrapper.set(StringUtils.isNotEmpty(updateVO.getDoctorName()), Assay::getDoctorName, updateVO.getDoctorName());
return mapper.update(new Assay(), updateWrapper);
}
八、JSON与字符串互转
FlowModel flowModel = JSONObject.parseObject(flowModelStr, FlowModel.class);
String newFowModelStr = JSON.toJSONString(flowModel);
九、字符串与List互转
字符串转List
String strs = "a,b,c,d";
List<String> strList = Convert.toList(String.class,strs);
List转字符串
public static void main(String[] args) {
List<String> strList = new ArrayList<String>();
strList.add("a");
strList.add("b");
String strs = StringUtils.join(strList,",");
//a,b
System.out.println(strs);
}
十、in
@Select({"<script> SELECT * FROM ei_node_instance WHERE flow_instance_id=#{flowInstanceId} and status= 2 and node_key in <foreach collection='nodeKeyList' item='nodeKey' open='(' separator=',' close=')'> #{nodeKey} </foreach> ORDER BY node_key </script>"})
List<NodeInstancePO> listTodo(@Param("flowInstanceId") String flowInstanceId, @Param("nodeKeyList") List<String> nodeKeyList);
十一、JS解构
11.1 数组解构
let [a, b, c] = [1, 2, 3];
等同于:
let a = 1;
let b = 2;
let c = 3;
11.2 对象解构
let { foo, bar } = { foo: 'aaa', bar: 'bbb' };
foo // "aaa"
bar // "bbb"
11.3 对象解构改字段名
let obj = { first: 'hello', last: 'world' };
let { first: f, last: l } = obj;
f // 'hello'
l // 'world'
11.4 对象解构获取函数
// 例一
let { log, sin, cos } = Math;
// 例二
const { log } = console;
log('hello') // hello
十二、JS深拷贝
let rowValue = JSON.parse(JSON.stringify(row))
网友评论