Forráskód Böngészése

修正目录结构

icole 4 éve
szülő
commit
4710635bba

+ 32 - 17
go.sum

@@ -1,15 +1,23 @@
 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 git.i2edu.net/i2/go-zero v1.0.1-0.20210616091154-7fac117e009f h1:zD6rIG7+PhJwYXuQbHyw1pn/z5oUXzrUg9bo9F9+b5k=
 git.i2edu.net/i2/go-zero v1.0.1-0.20210616091154-7fac117e009f/go.mod h1:a9idDtfMmMXrZIHyDg6XnYjWuCpKG0I6zv6Vo9Fpncc=
-git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623022310-19bfc0a41451 h1:uDtYmC19dlGyhyfHMSORWUfizSTpf1T/nqg/c5DW0XE=
-git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623022310-19bfc0a41451/go.mod h1:WymRAuTBomfIIWmSxOKOkF/0jPQw8KoQlw4C5W7D2rU=
-git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623100936-f771ca34055a h1:uyF8Q80LN3T0YjdB34cuTGlkfnp+0XjsDY06dEHcT+4=
-git.i2edu.net/i2/i2-bill-erp v0.0.0-20210623100936-f771ca34055a/go.mod h1:WymRAuTBomfIIWmSxOKOkF/0jPQw8KoQlw4C5W7D2rU=
+gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
+gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU=
 github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6 h1:Etfj2lhXyrYemgmWzEtEQQb1kezeEXc8jVjkQUyJnWI=
+github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6/go.mod h1:YzuYAe2hrrwKXkM9kqjbkTLlkbA+/xw2MA46f1+ENxc=
 github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
+github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c=
+github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno=
+github.com/CloudyKit/jet v2.1.2+incompatible h1:ybZoYzMBdoijK6I+Ke3vg9GZsmlKo/ZhKdNMWz0P26c=
+github.com/CloudyKit/jet v2.1.2+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w=
 github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1MRDJM=
 github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
+github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee h1:0RklYSvekYaIFI9JUx7TFPQvo++TdILmZiV17QI4nXk=
+github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee/go.mod h1:M9nmO4lBRWR/bBv7UCOmDJ1MB2DVoqz19B4JchDA+K0=
+github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4 h1:XBNSe5eibe5Fh131ah+xnO6s4A97U1T3tKZKLQQvqu0=
+github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4/go.mod h1:n7qJAqL9BKqGqiJyjPbWtxpdswTL5wX0IVP2Uw4vVhQ=
 github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
 github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
@@ -25,12 +33,16 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
 github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
 github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
 github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
+github.com/bndr/gotabulate v1.1.2 h1:yC9izuZEphojb9r+KYL4W9IJKO/ceIO8HDwxMA24U4c=
+github.com/bndr/gotabulate v1.1.2/go.mod h1:0+8yUgaPTtLRTjf49E8oju7ojpU11YmXyvq1LbPAb3U=
 github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
 github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
 github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
 github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
 github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
 github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
+github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
+github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
 github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
@@ -41,7 +53,6 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
 github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28=
 github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
 github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
 github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
 github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -51,7 +62,6 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumC
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs=
 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/emicklei/proto v1.9.0 h1:l0QiNT6Qs7Yj0Mb4X6dnWBQer4ebei2BFcgQLbGqUDc=
 github.com/emicklei/proto v1.9.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A=
 github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -59,14 +69,14 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
 github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
 github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
-github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
+github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
+github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
 github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
 github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
 github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
-github.com/go-errors/errors v1.4.0/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
@@ -106,6 +116,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
 github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
 github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
 github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
 github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -134,7 +146,6 @@ github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslC
 github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
 github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
 github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
-github.com/iancoleman/strcase v0.1.2 h1:gnomlvw9tnV3ITTAxzKSgTF+8kFWcU/f+TgttpXGz1U=
 github.com/iancoleman/strcase v0.1.2/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
 github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
 github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
@@ -162,7 +173,6 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
 github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
 github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
 github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
@@ -174,6 +184,7 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky
 github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
 github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
 github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
+github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4=
 github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
 github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
@@ -184,13 +195,13 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
 github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
-github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
 github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
 github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
 github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
 github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
 github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo=
 github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
@@ -221,7 +232,6 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So
 github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
 github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
 github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
 github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
@@ -243,23 +253,27 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/tal-tech/go-zero v1.1.7 h1:rs78kI5ZiBx1RIl562qDzkBV8P7CdnbCiljknyC4mXg=
+github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
+github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
 github.com/tal-tech/go-zero v1.1.7/go.mod h1:BEylLQnv5moldpMT1lH3kUoMEcdaIp+r9Lgp+41dXxg=
+github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
+github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM=
 github.com/thoas/go-funk v0.8.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q=
 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
 github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 h1:lYIiVDtZnyTWlNwiAxLj0bbpTcx1BWCFhXjfsvmPdNc=
 github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
 github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
-github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=
 github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
 github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
 github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
-github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 h1:zzrxE1FKn5ryBNl9eKOeqQ58Y/Qpo3Q9QNxKHX5uzzQ=
+github.com/xormplus/builder v0.0.0-20200331055651-240ff40009be h1:HTSana2sMSKVze3XXYrF89w2tw835Fh+7xX5KPvAkuo=
+github.com/xormplus/builder v0.0.0-20200331055651-240ff40009be/go.mod h1:PgBA7NoHtnttVkWModa/qpvIWkX6MpOKgyRCWsSKSB0=
+github.com/xormplus/xorm v0.0.0-20210512135344-8123d584d5f5 h1:cWR+WB50oxaGYLQP/GKODvUPgpAMikPeW5BQKSmvvU0=
+github.com/xormplus/xorm v0.0.0-20210512135344-8123d584d5f5/go.mod h1:+v6b10b4x5IcQmp1/Cbo9IqaknxVeuhQng+fhya6bdI=
 github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2/go.mod h1:hzfGeIUDq/j97IG+FhNqkowIyEcD88LrW6fyU3K3WqY=
 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb h1:ZkM6LRnq40pR1Ox0hTHlnpkcOTuFIDQpZ1IN8rKKhX0=
 github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
-github.com/zeromicro/antlr v0.0.1 h1:CQpIn/dc0pUjgGQ81y98s/NGOm2Hfru2NNio2I9mQgk=
 github.com/zeromicro/antlr v0.0.1/go.mod h1:nfpjEwFR6Q4xGDJMcZnCL9tEfQRgszMwu3rDz2Z+p5M=
 go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg=
 go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
@@ -293,7 +307,6 @@ golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7
 golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
 golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
 golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
 golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -398,6 +411,8 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8
 gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
 gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4 h1:eyQQg/uGuZ3ndaBhqteakHpVW+dSOPalilfC9RpM2TA=
+gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4/go.mod h1:bJkYqV5pg6+Z7MsSu/hSb1zsPT955hBW2QHLE1jm4wA=
 gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
 gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0=

+ 33 - 9
i2bill.api

@@ -119,6 +119,18 @@ type enrollRequest {
 	Location     string `json:"location"`
 }
 
+type enrollAddReq {
+	Name          string `json:"name"`
+	AgeGroup      int    `json:"age_group"`
+	StuLinkPerson string `json:"stu_link_person"`
+	StuPhone      string `json:"stu_phone"`
+	SchId         int    `json:"sch_id"`
+	Address       string `json:"address"`
+	UserId        int    `json:"user_id"`
+	NetworkId     int    `json:"network_id,optional"`
+	ActiveId      int    `json:"active_id,optional"`
+}
+
 type Response {
 	Code int         `json:"code"`
 	Msg  string      `json:"msg"`
@@ -151,7 +163,7 @@ service i2bill-api {
 	get /api/user/share/jzQrcode returns(jzQrcodeResponse)
 	
 	@handler BindMobile
-	post /api/user/bindMobile(bindMobileRequest) returns(bindMobileResponse)
+	post /api/user/bindMobile(bindMobileRequest) returns(Response)
 	
 	@handler GetUser
 	get /api/user/info returns(infoResponse)
@@ -175,9 +187,6 @@ service i2bill-api {
 	
 	@handler  MktPartTimeUserGet
 	get /api/v1/part_time_user/get  returns(Response)
-	
-	@handler  MktPartTimeUserTotal
-	get /api/v1/part_time_user/total  returns(Response)
 }
 
 // 收单模块
@@ -189,12 +198,27 @@ service i2bill-api {
 	@handler Enroll
 	post /api/acquirer/enroll(enrollRequest) returns(Response)
 	
-	@handler EnrollPage
-	post /api/acquirer/enroll/page() returns(Response)
-	
-	@handler EnrollTotal
-	get  /api/acquirer/enroll/total returns(Response)
+}
+
+@server(
+	jwt: JwtAuth
+	group: acquirer_student
+)
+
+service i2bill-api{
+	@handler AcquirerStudentPage
+	post /api/acquirer_student/enroll/page() returns(Response)
 	
+	@handler AcquirerStudentTotal
+	get  /api/acquirer/acquirer_student/total returns(Response)
+}
+
+@server(
+	group: acquirer_student
+)
+service i2bill-api {
+	@handler AcquirerStudentAdd
+	post  /api/v1/acquirer_student/add(enrollAddReq) returns(Response)
 }
 
 // 城市树

+ 0 - 22
internal/handler/acquirer/enroll_page_handler.go

@@ -1,22 +0,0 @@
-package acquirer
-
-import (
-	"net/http"
-
-	"git.i2edu.net/i2/go-zero/rest/httpx"
-	"git.i2edu.net/i2/i2-bill-api/internal/logic/acquirer"
-	"git.i2edu.net/i2/i2-bill-api/internal/svc"
-)
-
-func EnrollPageHandler(ctx *svc.ServiceContext) http.HandlerFunc {
-	return func(w http.ResponseWriter, r *http.Request) {
-
-		l := acquirer.NewEnrollPageLogic(r.Context(), ctx)
-		resp, err := l.EnrollPage(r)
-		if err != nil {
-			httpx.Error(w, err)
-		} else {
-			httpx.OkJson(w, resp)
-		}
-	}
-}

+ 0 - 22
internal/handler/acquirer/enroll_total_handler.go

@@ -1,22 +0,0 @@
-package acquirer
-
-import (
-	"net/http"
-
-	"git.i2edu.net/i2/go-zero/rest/httpx"
-	"git.i2edu.net/i2/i2-bill-api/internal/logic/acquirer"
-	"git.i2edu.net/i2/i2-bill-api/internal/svc"
-)
-
-func EnrollTotalHandler(ctx *svc.ServiceContext) http.HandlerFunc {
-	return func(w http.ResponseWriter, r *http.Request) {
-
-		l := acquirer.NewEnrollTotalLogic(r.Context(), ctx)
-		resp, err := l.EnrollTotal()
-		if err != nil {
-			httpx.Error(w, err)
-		} else {
-			httpx.OkJson(w, resp)
-		}
-	}
-}

+ 29 - 0
internal/handler/acquirer_student/acquirer_student_add_handler.go

@@ -0,0 +1,29 @@
+package handler
+
+import (
+	"git.i2edu.net/i2/i2-bill-api/internal/logic/acquirer_student"
+	"net/http"
+
+	"git.i2edu.net/i2/i2-bill-api/internal/svc"
+	"git.i2edu.net/i2/i2-bill-api/internal/types"
+
+	"git.i2edu.net/i2/go-zero/rest/httpx"
+)
+
+func AcquirerStudentAddHandler(ctx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.EnrollAddReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewAcquirerStudentAddLogic(r.Context(), ctx)
+		resp, err := l.AcquirerStudentAdd(req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 22 - 0
internal/handler/acquirer_student/acquirer_student_page_handler.go

@@ -0,0 +1,22 @@
+package handler
+
+import (
+	"git.i2edu.net/i2/i2-bill-api/internal/logic/acquirer_student"
+	"net/http"
+
+	"git.i2edu.net/i2/go-zero/rest/httpx"
+	"git.i2edu.net/i2/i2-bill-api/internal/svc"
+)
+
+func AcquirerStudentPageHandler(ctx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+
+		l := logic.NewAcquirerStudentPageLogic(r.Context(), ctx)
+		resp, err := l.AcquirerStudentPage(r)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 22 - 0
internal/handler/acquirer_student/acquirer_student_total_handler.go

@@ -0,0 +1,22 @@
+package handler
+
+import (
+	"git.i2edu.net/i2/i2-bill-api/internal/logic/acquirer_student"
+	"net/http"
+
+	"git.i2edu.net/i2/go-zero/rest/httpx"
+	"git.i2edu.net/i2/i2-bill-api/internal/svc"
+)
+
+func AcquirerStudentTotalHandler(ctx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+
+		l := logic.NewAcquirerStudentTotalLogic(r.Context(), ctx)
+		resp, err := l.AcquirerStudentTotal()
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

+ 21 - 9
internal/handler/routes.go

@@ -5,6 +5,7 @@ import (
 	"net/http"
 
 	acquirer "git.i2edu.net/i2/i2-bill-api/internal/handler/acquirer"
+	acquirer_student "git.i2edu.net/i2/i2-bill-api/internal/handler/acquirer_student"
 	auth "git.i2edu.net/i2/i2-bill-api/internal/handler/auth"
 	base_organ "git.i2edu.net/i2/i2-bill-api/internal/handler/base_organ"
 	mkt_network_detail "git.i2edu.net/i2/i2-bill-api/internal/handler/mkt_network_detail"
@@ -75,11 +76,6 @@ func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/api/v1/part_time_user/get",
 				Handler: mkt_part_time_user.MktPartTimeUserGetHandler(serverCtx),
 			},
-			{
-				Method:  http.MethodGet,
-				Path:    "/api/v1/part_time_user/total",
-				Handler: mkt_part_time_user.MktPartTimeUserTotalHandler(serverCtx),
-			},
 		},
 		rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
 	)
@@ -91,20 +87,36 @@ func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/api/acquirer/enroll",
 				Handler: acquirer.EnrollHandler(serverCtx),
 			},
+		},
+		rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
+	)
+
+	engine.AddRoutes(
+		[]rest.Route{
 			{
 				Method:  http.MethodPost,
-				Path:    "/api/acquirer/enroll/page",
-				Handler: acquirer.EnrollPageHandler(serverCtx),
+				Path:    "/api/acquirer_student/enroll/page",
+				Handler: acquirer_student.AcquirerStudentPageHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodGet,
-				Path:    "/api/acquirer/enroll/total",
-				Handler: acquirer.EnrollTotalHandler(serverCtx),
+				Path:    "/api/acquirer/acquirer_student/total",
+				Handler: acquirer_student.AcquirerStudentTotalHandler(serverCtx),
 			},
 		},
 		rest.WithJwt(serverCtx.Config.JwtAuth.AccessSecret),
 	)
 
+	engine.AddRoutes(
+		[]rest.Route{
+			{
+				Method:  http.MethodPost,
+				Path:    "/api/v1/acquirer_student/add",
+				Handler: acquirer_student.AcquirerStudentAddHandler(serverCtx),
+			},
+		},
+	)
+
 	engine.AddRoutes(
 		[]rest.Route{
 			{

+ 84 - 0
internal/logic/acquirer_student/acquirer_student_add_logic.go

@@ -0,0 +1,84 @@
+package logic
+
+import (
+	"context"
+	"fmt"
+	"git.i2edu.net/i2/i2-bill-api/internal/svc"
+	"git.i2edu.net/i2/i2-bill-api/internal/types"
+	"git.i2edu.net/i2/i2-bill-api/model"
+	"time"
+
+	"git.i2edu.net/i2/go-zero/core/logx"
+)
+
+type AcquirerStudentAddLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewAcquirerStudentAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) AcquirerStudentAddLogic {
+	return AcquirerStudentAddLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *AcquirerStudentAddLogic) AcquirerStudentAdd(req types.EnrollAddReq) (*types.Response, error) {
+	// todo: add your logic here and delete this line
+	//去重
+	stu, err := l.svcCtx.DB.SQL("select * from i2bill_acquirer_student where stu_phone = ?  and DATE_FORMAT(create_time,'%Y-%m-%d') = ? ", req.StuPhone, time.Now().Format("2006-01-02")).Query().List()
+	if err != nil {
+		return &types.Response{500, err.Error(), nil}, nil
+	}
+	if len(stu) > 0 {
+		return &types.Response{500, "你今天已提交过信息,感谢你的填写", nil}, nil
+	}
+	bean := new(model.I2billAcquirerStudent)
+	bean.AgeGroup = int64(req.AgeGroup)
+	bean.StuPhone.String = req.StuPhone
+	bean.Address.String = req.Address
+	bean.UserId.Int64 = int64(req.UserId)
+	partUserSql := fmt.Sprintf("select * from %s where user_id = ? and del_flag = 0 and check_state = ?", "i2bill_mkt_part_time_user")
+	res, err := l.svcCtx.DB.SQL(partUserSql, req.UserId, 57).Query().List()
+	if err != nil {
+		return &types.Response{500, err.Error(), nil}, nil
+	}
+	if len(res) < 1 {
+		return &types.Response{500, "无效二维码", nil}, nil
+	}
+	bean.MkId.String = res[0]["mk_id"].(string)
+	bean.NetworkDetailId.Int64 = int64(req.NetworkId)
+	bean.ActiveId.Int64 = int64(req.ActiveId)
+	bean.DelFlag = 0
+	bean.CheckState.Int64 = 54
+	bean.StuName.String = req.Name
+	bean.StuLinkPerson.String = req.StuLinkPerson
+	bean.SchId.Int64 = int64(req.SchId)
+	bean.CreateTime.Time = time.Now()
+	sql := `INSERT INTO i2bill_acquirer_student (stu_link_person,stu_phone,create_time,mk_id,user_id,address,
+	check_state,stu_name,age_group,sch_id,del_flag,network_detail_id,active_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)`
+	var args []interface{}
+	args = append(args, sql,
+		bean.StuLinkPerson.String, bean.StuPhone.String,
+		bean.CreateTime.Time, bean.MkId.String, bean.UserId.Int64,
+		bean.Address.String, bean.CheckState.Int64, bean.StuName.String,
+		bean.AgeGroup, bean.SchId.Int64, bean.DelFlag)
+	if req.NetworkId != 0 {
+		args = append(args, req.NetworkId)
+	} else {
+		args = append(args, 1058)
+	}
+	if req.ActiveId != 0 {
+		args = append(args, req.ActiveId)
+	} else {
+		args = append(args, nil)
+	}
+
+	_, err = l.svcCtx.DB.Exec(args...)
+	if err != nil {
+		return &types.Response{500, err.Error(), nil}, nil
+	}
+	return &types.Response{200, "", nil}, nil
+}

+ 5 - 5
internal/logic/acquirer/enroll_page_logic.go → internal/logic/acquirer_student/acquirer_student_page_logic.go

@@ -1,4 +1,4 @@
-package acquirer
+package logic
 
 import (
 	"context"
@@ -13,21 +13,21 @@ import (
 	"git.i2edu.net/i2/go-zero/core/logx"
 )
 
-type EnrollPageLogic struct {
+type AcquirerStudentPageLogic struct {
 	logx.Logger
 	ctx    context.Context
 	svcCtx *svc.ServiceContext
 }
 
-func NewEnrollPageLogic(ctx context.Context, svcCtx *svc.ServiceContext) EnrollPageLogic {
-	return EnrollPageLogic{
+func NewAcquirerStudentPageLogic(ctx context.Context, svcCtx *svc.ServiceContext) AcquirerStudentPageLogic {
+	return AcquirerStudentPageLogic{
 		Logger: logx.WithContext(ctx),
 		ctx:    ctx,
 		svcCtx: svcCtx,
 	}
 }
 
-func (l *EnrollPageLogic) EnrollPage(r *http.Request) (*types.Response, error) {
+func (l *AcquirerStudentPageLogic) AcquirerStudentPage(r *http.Request) (*types.Response, error) {
 	// todo: add your logic here and delete this line
 	r.ParseForm()
 	create_time_sta := r.Form.Get("create_time_sta")

+ 5 - 5
internal/logic/acquirer/enroll_total_logic.go → internal/logic/acquirer_student/acquirer_student_total_logic.go

@@ -1,4 +1,4 @@
-package acquirer
+package logic
 
 import (
 	"context"
@@ -10,21 +10,21 @@ import (
 	"git.i2edu.net/i2/go-zero/core/logx"
 )
 
-type EnrollTotalLogic struct {
+type AcquirerStudentTotalLogic struct {
 	logx.Logger
 	ctx    context.Context
 	svcCtx *svc.ServiceContext
 }
 
-func NewEnrollTotalLogic(ctx context.Context, svcCtx *svc.ServiceContext) EnrollTotalLogic {
-	return EnrollTotalLogic{
+func NewAcquirerStudentTotalLogic(ctx context.Context, svcCtx *svc.ServiceContext) AcquirerStudentTotalLogic {
+	return AcquirerStudentTotalLogic{
 		Logger: logx.WithContext(ctx),
 		ctx:    ctx,
 		svcCtx: svcCtx,
 	}
 }
 
-func (l *EnrollTotalLogic) EnrollTotal() (*types.Response, error) {
+func (l *AcquirerStudentTotalLogic) AcquirerStudentTotal() (*types.Response, error) {
 	// todo: add your logic here and delete this line
 	userId := l.svcCtx.GetUserIdByJwt(l.ctx)
 	sqlTotalByCheck := `

+ 2 - 2
internal/logic/auth/login_by_weixin_logic.go

@@ -50,10 +50,10 @@ func (l *LoginByWeixinLogic) LoginByWeixin(req types.LoginByWeixinRequest) (*typ
 			user.Avatar = userInfo.AvatarUrl
 			user.Gender = userInfo.Gender
 			user.Nickname = userInfo.NickName
-			_, err = session.Exec(`insert into i2bill_user (%s) values (
+			_, err = session.Exec(`insert into i2bill_user  (
 				mobile, avatar, weixin_openid, password, birthday, register_time, last_login_time, nickname, 
 				erp_id, username, gender, user_level_id, register_ip, last_login_ip
-			)`,
+			) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?) `,
 				user.Mobile, user.Avatar, user.WeixinOpenid, user.Password, user.Birthday, user.RegisterTime, user.LastLoginTime, user.Nickname, user.ErpId, user.Username, user.Gender, user.UserLevelId, user.RegisterIp, user.LastLoginIp)
 			if err != nil {
 				logx.Error(err)

+ 1 - 1
internal/logic/logic_test.go

@@ -12,7 +12,7 @@ import (
 func TestCreateJWT(t *testing.T) {
 	l := new(auth.LoginByWeixinLogic)
 	payloads := map[string]interface{}{
-		"userId":     3,
+		"userId":     5,
 		"sessionKey": "sessionKey",
 	}
 	fmt.Println(l.CreateJWT(1624415746, "6hy789iu87", payloads, 604800))

+ 1 - 0
internal/logic/mkt_part_time_user/mkt_part_time_user_add_logic.go

@@ -43,6 +43,7 @@ func (l *PartTimeUserAddLogic) PartTimeUserAdd(req types.PartTimeUserAddRequest)
 		if bean.CheckState == 57 {
 			return &types.Response{Code: 500, Msg: "你已经是兼职人员:", Data: nil}, nil
 		}
+		return &types.Response{Code: 500, Msg: "你已经是兼职人员:", Data: nil}, nil
 	}
 	bean = &model.I2billMktPartTimeUser{
 		CreateTime:     time.Now(),

+ 0 - 30
internal/logic/mkt_part_time_user/mkt_part_time_user_total_logic.go

@@ -1,30 +0,0 @@
-package mkt_part_time_user
-
-import (
-	"context"
-
-	"git.i2edu.net/i2/i2-bill-api/internal/svc"
-	"git.i2edu.net/i2/i2-bill-api/internal/types"
-
-	"git.i2edu.net/i2/go-zero/core/logx"
-)
-
-type MktPartTimeUserTotalLogic struct {
-	logx.Logger
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-}
-
-func NewMktPartTimeUserTotalLogic(ctx context.Context, svcCtx *svc.ServiceContext) MktPartTimeUserTotalLogic {
-	return MktPartTimeUserTotalLogic{
-		Logger: logx.WithContext(ctx),
-		ctx:    ctx,
-		svcCtx: svcCtx,
-	}
-}
-
-func (l *MktPartTimeUserTotalLogic) MktPartTimeUserTotal() (*types.Response, error) {
-	// todo: add your logic here and delete this line
-
-	return &types.Response{}, nil
-}

+ 6 - 3
internal/logic/user/bind_mobile_logic.go

@@ -25,7 +25,7 @@ func NewBindMobileLogic(ctx context.Context, svcCtx *svc.ServiceContext) BindMob
 	}
 }
 
-func (l *BindMobileLogic) BindMobile(req types.BindMobileRequest) (*types.BindMobileResponse, error) {
+func (l *BindMobileLogic) BindMobile(req types.BindMobileRequest) (*types.Response, error) {
 	mobile, err := l.svcCtx.Wechat.DecryptMobile(l.SessionKey, req.EncryptedData, req.Iv)
 	if err != nil {
 		logx.Error(err)
@@ -36,7 +36,10 @@ func (l *BindMobileLogic) BindMobile(req types.BindMobileRequest) (*types.BindMo
 		logx.Error(err)
 		return nil, err
 	}
-	return &types.BindMobileResponse{
-		Id: l.UserId,
+	resp := make(map[string]interface{})
+	resp["id"] = l.UserId
+	resp["mobile"] = mobile
+	return &types.Response{
+		200, "", resp,
 	}, nil
 }

+ 12 - 0
internal/types/types.go

@@ -112,6 +112,18 @@ type EnrollRequest struct {
 	Location     string `json:"location"`
 }
 
+type EnrollAddReq struct {
+	Name          string `json:"name"`
+	AgeGroup      int    `json:"age_group"`
+	StuLinkPerson string `json:"stu_link_person"`
+	StuPhone      string `json:"stu_phone"`
+	SchId         int    `json:"sch_id"`
+	Address       string `json:"address"`
+	UserId        int    `json:"user_id"`
+	NetworkId     int    `json:"network_id,optional"`
+	ActiveId      int    `json:"active_id,optional"`
+}
+
 type Response struct {
 	Code int         `json:"code"`
 	Msg  string      `json:"msg"`

+ 3 - 3
model/i2bill_acquirer_student.sql

@@ -6,16 +6,16 @@ CREATE TABLE `i2bill_acquirer_student`  (
   `part_time_user_id` int(11) NULL DEFAULT NULL,
   `user_id` int(11) NULL DEFAULT NULL COMMENT '收单宝用户id',
   `stu_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '学员名称',
-  `age_group` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '学员年龄',
+  `age_group` int   NULL COMMENT '学员年龄',
   `stu_link_person` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '联系人',
   `stu_phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '联系方式',
   `sch_id` int(11) NULL DEFAULT NULL COMMENT '意向校区',
   `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '当前位置',
   `create_time` datetime(0) NULL DEFAULT NULL,
-  `del_flag` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
+  `del_flag` int  NULL,
   `check_state` int(11) NULL DEFAULT NULL COMMENT '收单宝状态',
   `check_time` datetime(0) NULL DEFAULT NULL COMMENT '审核日期',
   `check_by` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '审核人',
-  `network_detail_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '渠道',
+  `network_detail_id` int  NULL DEFAULT NULL COMMENT '渠道',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE =InnoDB  CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;

+ 25 - 27
model/i2bill_acquirer_student_model.go

@@ -12,10 +12,11 @@ import (
 )
 
 var (
-	I2billAcquirerStudentFieldNames          = builderx.RawFieldNames(&I2billAcquirerStudent{})
-	I2billAcquirerStudentRows                = strings.Join(I2billAcquirerStudentFieldNames, ",")
-	I2billAcquirerStudentRowsExpectAutoSet   = strings.Join(stringx.Remove(I2billAcquirerStudentFieldNames, "`create_time`", "`update_time`"), ",")
-	I2billAcquirerStudentRowsWithPlaceHolder = strings.Join(stringx.Remove(I2billAcquirerStudentFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
+	i2billAcquirerStudentFieldNames          = builderx.RawFieldNames(&I2billAcquirerStudent{})
+	i2billAcquirerStudentRows                = strings.Join(i2billAcquirerStudentFieldNames, ",")
+	I2billAcquirerStudentRows                = strings.Join(i2billAcquirerStudentFieldNames, ",")
+	i2billAcquirerStudentRowsExpectAutoSet   = strings.Join(stringx.Remove(i2billAcquirerStudentFieldNames, "`create_time`", "`update_time`"), ",")
+	i2billAcquirerStudentRowsWithPlaceHolder = strings.Join(stringx.Remove(i2billAcquirerStudentFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
 )
 
 type (
@@ -32,29 +33,26 @@ type (
 	}
 
 	I2billAcquirerStudent struct {
-		AgeGroup        string         `db:"age_group" json:"age_group"`                 // 学员年龄
-		StuPhone        sql.NullString `db:"stu_phone" json:"stu_phone"`                 // 联系方式
-		Address         sql.NullString `db:"address" json:"address"`                     // 当前位置
-		NetworkDetailId sql.NullString `db:"network_detail_id" json:"network_detail_id"` // 渠道
-		Id              int64          `db:"id" json:"id"`                               // 主键
-		MkId            sql.NullString `db:"mk_id" json:"mk_id"`                         // 所属mk erp id
-		PartTimeUserId  sql.NullInt64  `db:"part_time_user_id" json:"part_time_user_id"`
-		DelFlag         sql.NullString `db:"del_flag" json:"del_flag"`
-		CheckBy         sql.NullString `db:"check_by" json:"check_by"`               // 审核人
-		CheckState      sql.NullInt64  `db:"check_state" json:"check_state"`         // 收单宝状态
-		CheckTime       sql.NullTime   `db:"check_time" json:"check_time"`           // 审核日期
-		UserId          sql.NullInt64  `db:"user_id" json:"user_id"`                 // 收单宝用户id
-		StuName         sql.NullString `db:"stu_name" json:"stu_name"`               // 学员名称
 		StuLinkPerson   sql.NullString `db:"stu_link_person" json:"stu_link_person"` // 联系人
-		SchId           sql.NullInt64  `db:"sch_id" json:"sch_id"`                   // 意向校区
+		StuPhone        sql.NullString `db:"stu_phone" json:"stu_phone"`             // 联系方式
 		CreateTime      sql.NullTime   `db:"create_time" json:"create_time"`
+		CheckTime       sql.NullTime   `db:"check_time" json:"check_time"`   // 审核日期
+		CheckBy         sql.NullString `db:"check_by" json:"check_by"`       // 审核人
+		MkId            sql.NullString `db:"mk_id" json:"mk_id"`             // 所属mk erp id
+		UserId          sql.NullInt64  `db:"user_id" json:"user_id"`         // 收单宝用户id
+		Address         sql.NullString `db:"address" json:"address"`         // 当前位置
+		CheckState      sql.NullInt64  `db:"check_state" json:"check_state"` // 收单宝状态
+		Id              int64          `db:"id" json:"id"`                   // 主键
+		PartTimeUserId  sql.NullInt64  `db:"part_time_user_id" json:"part_time_user_id"`
+		StuName         sql.NullString `db:"stu_name" json:"stu_name"`   // 学员名称
+		AgeGroup        int64          `db:"age_group" json:"age_group"` // 学员年龄
+		SchId           sql.NullInt64  `db:"sch_id" json:"sch_id"`       // 意向校区
+		DelFlag         int64          `db:"del_flag" json:"del_flag"`
+		NetworkDetailId sql.NullInt64  `db:"network_detail_id" json:"network_detail_id"` // 渠道
+		ActiveId        sql.NullInt64  `db:"active_id" json:"active_id"`                 //活动
 	}
 )
 
-func (t *I2billAcquirerStudent) TableName() string {
-	return "i2bill_acquirer_student"
-}
-
 func NewI2billAcquirerStudentModel(conn sqlx.SqlConn) I2billAcquirerStudentModel {
 	return &defaultI2billAcquirerStudentModel{
 		conn:  conn,
@@ -63,13 +61,13 @@ func NewI2billAcquirerStudentModel(conn sqlx.SqlConn) I2billAcquirerStudentModel
 }
 
 func (m *defaultI2billAcquirerStudentModel) Insert(data I2billAcquirerStudent) (sql.Result, error) {
-	query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", m.table, I2billAcquirerStudentRowsExpectAutoSet)
-	ret, err := m.conn.Exec(query, data.AgeGroup, data.StuPhone, data.Address, data.NetworkDetailId, data.Id, data.MkId, data.PartTimeUserId, data.DelFlag, data.CheckBy, data.CheckState, data.CheckTime, data.UserId, data.StuName, data.StuLinkPerson, data.SchId)
+	query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", m.table, i2billAcquirerStudentRowsExpectAutoSet)
+	ret, err := m.conn.Exec(query, data.StuLinkPerson, data.StuPhone, data.CheckTime, data.CheckBy, data.MkId, data.UserId, data.Address, data.CheckState, data.Id, data.PartTimeUserId, data.StuName, data.AgeGroup, data.SchId, data.DelFlag, data.NetworkDetailId)
 	return ret, err
 }
 
 func (m *defaultI2billAcquirerStudentModel) FindOne(id int64) (*I2billAcquirerStudent, error) {
-	query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", I2billAcquirerStudentRows, m.table)
+	query := fmt.Sprintf("select %s from %s where `id` = ? limit 1", i2billAcquirerStudentRows, m.table)
 	var resp I2billAcquirerStudent
 	err := m.conn.QueryRow(&resp, query, id)
 	switch err {
@@ -83,8 +81,8 @@ func (m *defaultI2billAcquirerStudentModel) FindOne(id int64) (*I2billAcquirerSt
 }
 
 func (m *defaultI2billAcquirerStudentModel) Update(data I2billAcquirerStudent) error {
-	query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, I2billAcquirerStudentRowsWithPlaceHolder)
-	_, err := m.conn.Exec(query, data.AgeGroup, data.StuPhone, data.Address, data.NetworkDetailId, data.MkId, data.PartTimeUserId, data.DelFlag, data.CheckBy, data.CheckState, data.CheckTime, data.UserId, data.StuName, data.StuLinkPerson, data.SchId, data.Id)
+	query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, i2billAcquirerStudentRowsWithPlaceHolder)
+	_, err := m.conn.Exec(query, data.StuLinkPerson, data.StuPhone, data.CheckTime, data.CheckBy, data.MkId, data.UserId, data.Address, data.CheckState, data.PartTimeUserId, data.StuName, data.AgeGroup, data.SchId, data.DelFlag, data.NetworkDetailId, data.Id)
 	return err
 }