This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `hospital_statistics_data` ( | |
`pk_id` bigint unsigned NOT NULL AUTO_INCREMENT, | |
`id` varchar(36) COLLATE utf8mb4_general_ci NOT NULL, | |
`hospital_code` varchar(36) COLLATE utf8mb4_general_ci NOT NULL, | |
`biz_type` tinyint NOT NULL, | |
`item_code` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, | |
`item_name` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL, | |
`item_value` varchar(36) COLLATE utf8mb4_general_ci DEFAULT NULL, | |
`is_deleted` tinyint DEFAULT NULL, | |
PRIMARY KEY (`pk_id`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Response test(Session session){ | |
UserInfo user = UserDao.queryByUserId(session.getUserId()); | |
if(user==null){ | |
reutrn new Response(); | |
} | |
return do(session.getUserId()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Response test(Session session){ | |
UserInfo user = UserDao.queryByUserId(session.getUserId()); | |
if(user==null){ | |
reutrn new Response(); | |
} | |
return do(session.getUserId()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void transfer(TransferDTO transferDTO){ | |
log.info("invoke tranfer begin"); | |
log.info("invoke tranfer,paramters:{}",transferDTO); | |
try { | |
res= transferService.transfer(transferDTO); | |
}catch(Exception e){ | |
log.error("transfer fail,account:{}", | |
transferDTO.getAccount()) | |
log.error("transfer fail,exception:{}",e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Factory.php | |
class Factory extends Model | |
{ | |
public function workers() | |
{ | |
return $this->hasMany(Worker::class); | |
} | |
} | |
// Worker.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IcompressSvga { | |
(path: string, source: Buffer): () => Promise<Idetail> | |
} | |
let compressSvga: IcompressSvga | |
compressSvga = (path, source) => { | |
return async () => { | |
const result = { | |
input: 0, | |
output: 0, | |
ratio: 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IcompressImg { | |
(payload: imageType): () => Promise<Idetail> | |
} | |
let compressImg: IcompressImg | |
compressImg = ({ path, file }: imageType) => { | |
return async () => { | |
const result = { | |
input: 0, | |
output: 0, | |
ratio: 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process.on('message', (tasks: imageType[]) => { | |
;(async () => { | |
const data = tasks | |
.filter(({ path }: { path: string }) => /\.(jpe?g|png)$/.test(path)) | |
.map(ele => { | |
return compressImg({ ...ele, file: Buffer.from(ele.file) }) | |
}) | |
const svgaData = tasks | |
.filter(({ path }: { path: string }) => /\.(svga)$/.test(path)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Idownload { | |
(path: string): Promise<string> | |
} | |
export let download: Idownload | |
download = (path: string) => { | |
const header = new Url.URL(path) | |
return new Promise((resolve, reject) => { | |
const req = Https.request(header, res => { | |
let content = '' | |
res.setEncoding('binary') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Iupload { | |
(file: Buffer): Promise<DataUploadType> | |
} | |
export let upload: Iupload | |
upload = (file: Buffer) => { | |
const header = randomHeader() | |
return new Promise((resolve, reject) => { | |
const req = Https.request(header, res => { | |
res.on('data', data => { | |
try { |
NewerOlder