Giter VIP home page Giter VIP logo

Comments (3)

ccjaread avatar ccjaread commented on June 19, 2024 5

兑换码功能目前我自己使用步骤如下:

  1. 建立一个csv文件,可以用excel或wps,字段类型为cardno.string(),amount.int32(),redeemed.int32(),redeem为0代表未兑换,>=1代表兑换次数(有需要可以用于风控泄漏啥的),比如/home/ubuntu/giftcards/chatgpt-web-giftcards-20240213.csv,ps个人觉得规模使用密钥用excel生成或是在线的密码生成器也挺方便的。
image
  1. 使用mongodb倒入工具导入数据库,样例如下:具体的用户名、密码、collection名称、导入文件的路径需要修改,然后csv的表头需要去掉(因为下面的语句已经定义表头了),像这样(mongodb我也仅入门,大佬们可以提供更好的方式)
image
mongoimport --host=127.0.0.1 --port=27017 --username=xxxxx --password=xxxxx --authenticationDatabase=chatgpt --db=chatgpt --collection=giftcards --file=/home/ubuntu/giftcards/chatgpt-web-giftcards-20240213.csv --type=csv --columnsHaveTypes --fields="cardno.string(),amount.int32(),redeemed.int32()" --headerline  --ignoreBlanks 
  1. 完成导入后 cardno 就可以发给小团队的用户了
  2. 之前没做前端是觉得首先是个低频操作,然后如果量大不大适合前端来插入数据库,第三是即使用系统集成后端生成兑换码,这个兑换码还得导出来通过邮件或其他IM发给团队人员,还不如先生成再一次性导入数据库。另外,如果是互相比较熟悉的团队内部,由管理员在用户管理里面直接改使用限制比兑换码更方便。

以上是使用说明和个人场景下的思路,可能场景需求不同,抱歉给大家带来一些困惑

from chatgpt-web.

BobDu avatar BobDu commented on June 19, 2024

@ccjaread
是否可以在README中进一步补充一下兑换码功能的使用方式?

from chatgpt-web.

BobWangRobot avatar BobWangRobot commented on June 19, 2024

感谢您的耐心解答,我自己尝试一下!

from chatgpt-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.