Commit 8bca3fdf by mushishixian
parents ba09e550 3a5ea20e
set MICRO_REGISTRY=etcd
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
go run ../cmd/course_server.go --server_address :9092
\ No newline at end of file
set MICRO_REGISTRY=etcd
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
go run ../cmd/course_http_server.go -config=../conf/config.ini
\ No newline at end of file
set MICRO_REGISTRY=etcd
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
micro api
set MICRO_REGISTRY=etcd
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
micro api
protoc --proto_path=protos --micro_out=protopb/mouser --go_out=protopb/mouser mouser.proto
\ No newline at end of file
set MICRO_REGISTRY=etcd
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
go run cmd/user_server.go --server_address :9090
\ No newline at end of file
set MICRO_REGISTRY=etcd
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
micro web
protoc --proto_path=../protos -I="C:\Program Files (x86)\protoc\include" --micro_out=../protopb/course --go_out=../protopb/course course.proto
protoc-go-inject-tag -input=../protopb/course/course.pb.go
protoc --proto_path=../protos -I="C:\Program Files (x86)\protoc\include" --micro_out=../protopb/common --go_out=../protopb/common common.proto
protoc --proto_path=../protos -I="C:\Program Files (x86)\protoc\include" --micro_out=../protopb/course --go_out=../protopb/course course_topic.proto
protoc-go-inject-tag -input=../protopb/course/course_topic.pb.go
protoc --proto_path=../protos -I="C:\Program Files (x86)\protoc\include" --micro_out=../protopb/users --go_out=../protopb/users users.proto
protoc --proto_path=../protos -I="C:\Program Files (x86)\protoc\include" --micro_out=../protopb/bom --go_out=../protopb/bom bom.proto
protoc-go-inject-tag -input=../protopb/bom/bom.pb.go
protoc --proto_path=../protos -I="C:\Program Files (x86)\protoc\include" --micro_out=../protopb/goods --go_out=../protopb/goods goods.proto
protoc-go-inject-tag -input=../protopb/goods/goods.pb.go
\ No newline at end of file
package dao
import (
"goods_machining/model"
"goods_machining/pkg/mysql"
)
//获取所有内部编码
func GetAllIntraCode() (intracode []model.Intracode, err error) {
err = mysql.Conn("cms").Table("lie_intracode").Select("code_id,admin_id").Find(&intracode)
return
}
//获取所有的用户基础信息
func GetAllUserBaseInfo() (userBaseInfo []model.CmsUserInfo, err error) {
err = mysql.Conn("cms").Table("user_info").Select("name,email,userId").Find(&userBaseInfo)
return
}
package dao
import (
"goods_machining/model"
"goods_machining/pkg/mysql"
)
//获取供应商编码和渠道开发员id
func GetAllSupplierCodeAndUid() (supplierChannels []model.SupplierChannel, err error) {
err = mysql.Conn("supp").Table("lie_supplier_channel").Select("supplier_code,channel_uid").
Where("status = ?", 2).Find(&supplierChannels)
return
}
package dao
import (
"encoding/json"
"github.com/ichunt2019/logger"
"goods_machining/model"
"goods_machining/pkg/mysql"
)
//根据id获取供应商信息
func GetSupplierExtraBySupplierId(supplierId int) (supplierExtra model.SupplierExtra, err error) {
_, err = mysql.Conn("spu").Table("lie_supplier_extra").Select("hk_delivery,cn_delivery,price_json as price_json_str,ad_text,supplier_logo,ad_url,sort").
Where("supplier_id = ?", supplierId).Get(&supplierExtra)
if supplierExtra.PriceJsonStr != "" {
err = json.Unmarshal([]byte(supplierExtra.PriceJsonStr), &supplierExtra.PriceJson)
if err != nil {
logger.Error("%s", err)
}
}
return
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment