淘宝数据库怎样下载?怎样用淘宝助理导入?

淘宝数据库怎样下载?怎样用淘宝助理导入?,第1张

宝贝数据的下载和导入都需要用到助理 用到CSV格式的文件

下载就是下载店里或者仓库里的宝贝数据 在助理里面 *** 作就可以 如果你要导入 你首先要有助理和想导入宝贝的CSV数据才可以

有三种模板。我装修店铺会选择简约时尚官方模板。因为他是最基础的。

淘宝系统默认有三套免费的淘宝默认基础模板,这三套模板分别是简约时尚官方模板、动感红官方模板、收费店铺官方模板。目前网上几乎所有的模板,都是基于简约时尚官方模板这套模板进行制作的。绝大部分的各种淘宝装修特效模板代码,比如什么全屏海报代码、轮播代码、卡盘代码等等,都是基于简约时尚官方模板制作。

#include"stdio.h"

#include"string.h"

struct book /*定义结构体*/

{ char number[20]

char name[20]

char press[20]

char writer[20]

int n /*现有量*/

int m /*总量*/

}a[10]

int b/*输入书的数量*/

void input() /*输入图书信息函数*/

{

FILE *fp

char str2[10]=

int i

if((fp=fopen("d:\\wen","w"))==NULL)

{ printf("Open failed\n")

return}

printf("\nHow many books do you want to input?\n")

scanf("%d",&b)

for(i=0i<bi++)

{

printf("Enter the %d book's number name press writer now all\n",i+1)

scanf("%s%s%s%s%d%d",&a[i].number,&a[i].name,&a[i].press,&a[i].writer,&a[i].n,&a[i].m)

fwrite(&a[i],sizeof(struct book),1,fp)

}

fclose(fp)

}

void Search() /*查询书籍*/

{

FILE *fp

int w,i /*w查询方式使用的数据*/

char str[20]/*查询书籍的编码书名出版社作者*/

if((fp=fopen("d:\\wen","r"))==NULL)

{ printf("Open failed\n")

return}

for(i=0i<bi++)

if(fread(&a[i],sizeof(struct book),1,fp)!=1)

printf("file read error\n")

printf("search by number--6\n")

printf("search by name--7\n")

printf("search by writer--8\n")

printf("search by press--9\n")

scanf("%d",&w)

printf("Enter the word you want to search:\n")

scanf("%s",str)

switch(w)

{

case 6:

{for(i=0i<bi++)

if(strcmp(a[i].number,str)==0)

{printf("number: %s name: %s press: %s writer: %s now: %d all:%d\n",a[i].number,a[i].name,a[i].press,a[i].writer,a[i].n,a[i].m)

break

}

}

break

case 7:

{for(i=0i<bi++)

if(strcmp(a[i].name,str)==0)

{printf("number: %s name: %s press: %s writer: %s now: %d all:%d\n",a[i].number,a[i].name,a[i].press,a[i].writer,a[i].n,a[i].m)

break}

}

break

case 8:

{for(i=0i<bi++)

if(strcmp(a[i].press,str)==0)

{printf("number: %s name: %s press: %s writer: %s now: %d all:%d\n",a[i].number,a[i].name,a[i].press,a[i].writer,a[i].n,a[i].m)

break}

}

break

case 9:

{for(i=0i<bi++)

if(strcmp(a[i].writer,str)==0)

{ printf("number: %s name: %s press: %s writer: %s now: %d all:%d\n",a[i].number,a[i].name,a[i].press,a[i].writer,a[i].n,a[i].m)

break}

}

}

fclose(fp)

}

void borrow() /*借阅图书函数*/

{ FILE *fp

int i

char xuehao[20],number2[20]

char jieyue[20]=

if((fp=fopen("d:\\wen00.txt","w"))==NULL)

{ printf("Open failed\n")

return}

printf("Enter your number:\n")

scanf("%s",xuehao)

printf("Enter the book's number which you want to borrow\n")

scanf("%s",number2)

for(i=0i<10i++)

if(strcmp(a[i].number,number2)==0)

if(a[i].n>0)

{a[i].n--

printf("borrow sucess!\n")

if(fwrite(&xuehao[20],sizeof(xuehao[20]),1,fp)!=1)

printf("file write error\n")

if(fwrite(&jieyue[20],sizeof(jieyue),1,fp)!=1)

printf("file write error\n")

if(fwrite(&a[i],sizeof(struct book),1,fp)!=1)

printf("file write error\n")

break

}

else

printf("borrow failed!")

fclose(fp)

}

void giveback() /*归还图书函数*/

{FILE *fp

int i

char xuehao[20],number2[20]

char guihuan2[20]=

if((fp=fopen("d:\\wen00.txt","w"))==NULL)

{printf("cannot open file\n")

return

}

printf("Enter your number:\n")

scanf("%s",xuehao)

printf("Enter the book's number which you want to give back\n")

scanf("%s",number2)

for(i=0i<1000i++)

if(strcmp(a[i].number,number2)==0)

{ if(fwrite(&xuehao[20],sizeof(xuehao),1,fp)!=1)

printf("file write error\n")

if(fwrite(&guihuan2[20],sizeof(guihuan2),1,fp)!=1)

printf("file write error\n")

if(fwrite(&a[i],sizeof(a[i]),1,fp)!=1)

printf("file write error\n")

break

}

printf("give back sucess!\n")

fclose(fp)

}

void adddelet()/*增加删除功能*/

{ FILE *fp

char number3[20]

int s,i,j,t/*t为增加或删除 s增加书的数量*/

if((fp=fopen("d:\\wen00.txt","w"))==NULL)

{printf("cannot open file\n")

return

}

printf("Chose what you want to do:")

printf("add books--11\n")

printf("delet books--12\n")

scanf("%d",&t)

switch(t)

{

case 11:

{printf("Enter the book'number which you want to add:")

scanf("%s",number3)

printf("How many books do you want to add?:")

scanf("%d",&s)

for(i=0i<10i++)

if(strcmp(a[i].number,number3)==0)

a[i].m=a[i].m+s

} break

default :

{printf("Enter the book'number which you want to delet:")

scanf("%s",number3)

for(i=0i<10i++)

if(strcmp(a[i].number,number3)==0)

for(i<10i++)

{ for(j=0j<20j++)

a[i].number[j]=a[i+1].number[j]

for(j=0j<20j++)

a[i].name[j]=a[i+1].name[j]

for(j=0j<20j++)

a[i].press[j]=a[i+1].press[j]

for(j=0j<20j++)

a[i].writer[j]=a[i+1].writer[j]

a[i].n=a[i+1].n

a[i].m=a[i+1].m

}

}

}

fclose(fp)

}

void main()/*主函数*/

{

printf("Welcome to labrary!\nChose what you want to do:\n")

printf("Input book's information--1\n")

printf("serach books--2\n")

printf("borrow books--3\n")

printf("add or delet books--4\n")

printf("give back books--5\n")

printf("quit--6\n")

printf("Please chose zhe number:")

while(1)

{

switch(getchar())

{

case '1': input()break

case '2': Search()break

case '3': borrow() break

case '4': adddelet()break

case '5': giveback()break

}

}

}


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/6752482.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-27
下一篇 2023-03-27

发表评论

登录后才能评论

评论列表(0条)

保存