Accept Merge Request #48: (yonghui -> mark)
Merge Request: 门店订单归属补漏 Created By: @苏尹岚 Accepted By: @徐建华 URL: https://rosydev.coding.net/p/jx-callback/d/jx-callback/git/merge/48
This commit is contained in:
@@ -737,3 +737,30 @@ func (c *OrderManager) RefreshHistoryOrdersEarningPrice(ctx *jxcontext.Context,
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
func RefreshOrdersWithoutJxStoreID(ctx *jxcontext.Context, fromDate, toDate string, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
var (
|
||||
fromDateParam time.Time
|
||||
toDateParam time.Time
|
||||
)
|
||||
if fromDate != "" {
|
||||
fromDateParam = utils.Str2Time(fromDate)
|
||||
}
|
||||
if toDate != "" {
|
||||
toDateParam = utils.Str2Time(toDate)
|
||||
}
|
||||
db := dao.GetDB()
|
||||
task := tasksch.NewParallelTask("订单门店归属补漏", tasksch.NewParallelConfig().SetParallelCount(1), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
_, err = dao.UpdateOrdersWithoutJxStoreID(db, fromDateParam, toDateParam)
|
||||
return retVal, err
|
||||
}, []int{0})
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
if !isAsync {
|
||||
_, err = task.GetResult(0)
|
||||
hint = "1"
|
||||
} else {
|
||||
hint = task.GetID()
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
package cms
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
"mime/multipart"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize"
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/jx-callback/business/authz/autils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||
|
||||
@@ -2182,3 +2188,84 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDi
|
||||
}
|
||||
return storeList, err
|
||||
}
|
||||
|
||||
func JdStoreInfoCoordinateRecover(ctx *jxcontext.Context, files []*multipart.FileHeader) (err error) {
|
||||
if len(files) == 0 {
|
||||
return errors.New("没有文件上传!")
|
||||
}
|
||||
fileHeader := files[0]
|
||||
file1, err := fileHeader.Open()
|
||||
defer file1.Close()
|
||||
|
||||
db := dao.GetDB()
|
||||
storeList, err := dao.GetStoresMapList(db, []int{model.VendorIDJD}, nil, model.StoreStatusAll, model.StoreIsSyncYes, "")
|
||||
if err == nil {
|
||||
var validStoreList []*dao.StoreDetail
|
||||
for _, v := range storeList {
|
||||
if v.Status != model.StoreStatusDisabled && v.CreatedAt.Sub(utils.Str2Time("2019-10-01")) > 0 {
|
||||
storeInfo, err := api.JdAPI.GetStoreInfoByStationNo2(v.VendorStoreID)
|
||||
if err == nil && storeInfo.CreateTime.GoTime().Sub(utils.Str2Time("2019-10-25")) > 0 {
|
||||
if storeDetail, err := dao.GetStoreDetail(db, v.StoreID, v.VendorID); err == nil {
|
||||
validStoreList = append(validStoreList, storeDetail)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
getStoreList := func(lng, lat, lng2, lat2 int) (vendorStoreIDs []string) {
|
||||
for _, v := range validStoreList {
|
||||
if v.Lng >= lng && v.Lng <= lng2 && v.Lat >= lat && v.Lat <= lat2 {
|
||||
vendorStoreIDs = append(vendorStoreIDs, v.VendorStoreID)
|
||||
}
|
||||
}
|
||||
return vendorStoreIDs
|
||||
}
|
||||
sheetName := "老格明细"
|
||||
file, err2 := excelize.OpenReader(file1)
|
||||
if err = err2; err == nil {
|
||||
rows, err2 := file.GetRows(sheetName)
|
||||
if err = err2; err == nil {
|
||||
str2Coords := func(str string) (lng, lat int) {
|
||||
list := strings.Split(str, ",")
|
||||
if len(list) >= 2 {
|
||||
lng, lat = jxutils.StandardCoordinate2Int(utils.Str2Float64WithDefault(list[1], 0)), jxutils.StandardCoordinate2Int(utils.Str2Float64WithDefault(list[0], 0))
|
||||
}
|
||||
return lng, lat
|
||||
}
|
||||
for i := 1; i < len(rows); i++ {
|
||||
lng, lat := str2Coords(rows[i][8])
|
||||
lng2, lat2 := str2Coords(rows[i][7])
|
||||
vendorStoreIDs := getStoreList(lng, lat, lng2, lat2)
|
||||
countInfo := fmt.Sprintf("京西已拓%d", len(vendorStoreIDs))
|
||||
axis, _ := excelize.CoordinatesToCellName(5, i+1)
|
||||
file.SetCellStr(sheetName, axis, countInfo)
|
||||
axis2, _ := excelize.CoordinatesToCellName(6, i+1)
|
||||
file.SetCellStr(sheetName, axis2, strings.Join(vendorStoreIDs, ","))
|
||||
}
|
||||
filename := ExecuteFileName(fileHeader.Filename)
|
||||
buf := bytes.NewBuffer(nil)
|
||||
if _, err = io.Copy(buf, file1); err != nil {
|
||||
return err
|
||||
}
|
||||
baseapi.SugarLogger.Debugf("WriteToExcel:save %s success", filename)
|
||||
downloadURL, err := jxutils.UploadExportContent(buf.Bytes(), filename)
|
||||
if err != nil {
|
||||
baseapi.SugarLogger.Errorf("WriteToExcel:upload %s, failed error:%v", filename, err)
|
||||
} else {
|
||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
|
||||
noticeMsg := fmt.Sprintf("path=%s\n", downloadURL)
|
||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "导出老格恢复拓店进度成功", noticeMsg)
|
||||
}
|
||||
baseapi.SugarLogger.Debugf("WriteToExcel:upload %s success, downloadURL:%s", filename, downloadURL)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func ExecuteFileName(filename string) (name string) {
|
||||
filePrefix := filename[strings.LastIndex(filename, "."):len(filename)]
|
||||
fileRealName := filename[0:strings.LastIndex(filename, ".")]
|
||||
name = fileRealName + utils.Int64ToStr(time.Now().Unix()) + filePrefix
|
||||
return name
|
||||
}
|
||||
|
||||
@@ -3,8 +3,16 @@ package cms
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/excel"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils/errlist"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||
@@ -36,8 +44,27 @@ var (
|
||||
auth2.UserIDMobile: "mobile",
|
||||
auth2.UserIDEmail: "email",
|
||||
}
|
||||
jdUsersStruct GetJdUsersStruct
|
||||
titleListJdUser = []string{
|
||||
"用户名",
|
||||
"关联门店",
|
||||
"所属角色",
|
||||
"状态",
|
||||
}
|
||||
)
|
||||
|
||||
type GetJdUsersStruct struct {
|
||||
locker sync.RWMutex
|
||||
userMap []JdUserStruct
|
||||
}
|
||||
|
||||
type JdUserStruct struct {
|
||||
UserName string `json:"用户名"`
|
||||
StoreIDs string `json:"关联门店"`
|
||||
RoleName string `json:"所属角色"`
|
||||
Status string `json:"状态"`
|
||||
}
|
||||
|
||||
type UserProvider struct {
|
||||
}
|
||||
|
||||
@@ -777,3 +804,122 @@ func HandleUserWXRemark(db *dao.DaoDB, mobile string, mobileIsUerID bool) (err e
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func GetJdUsers(ctx *jxcontext.Context, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
var (
|
||||
jxVendorIDsMap = make(map[string]string)
|
||||
pageNoList []int
|
||||
storeUserList []interface{}
|
||||
disabledIdList []interface{}
|
||||
)
|
||||
db := dao.GetDB()
|
||||
//获取京东商城所有用户
|
||||
_, _, toatlPage, _ := api.JdAPI.PrivilegeSearchUser(1)
|
||||
for i := 1; i <= toatlPage; i++ {
|
||||
pageNoList = append(pageNoList, i)
|
||||
}
|
||||
storeMapList, err := dao.GetStoreMapsListWithoutDisabled(db, []int{model.VendorIDJD}, model.StoreStatusDisabled)
|
||||
for _, v := range storeMapList {
|
||||
jxVendorIDsMap[v.VendorStoreID] = utils.Int64ToStr(int64(v.StoreID))
|
||||
}
|
||||
taskSeqFunc := func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
|
||||
switch step {
|
||||
case 0:
|
||||
taskFunc1 := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
pageNo := batchItemList[0].(int)
|
||||
storeUserLists, _, _, err := api.JdAPI.PrivilegeSearchUser(pageNo)
|
||||
retVal = storeUserLists
|
||||
return retVal, err
|
||||
}
|
||||
taskParallel1 := tasksch.NewParallelTask("获取京东商城所有用户列表", tasksch.NewParallelConfig(), ctx, taskFunc1, pageNoList)
|
||||
tasksch.HandleTask(taskParallel1, task, true).Run()
|
||||
storeUserList, err = taskParallel1.GetResult(0)
|
||||
case 1:
|
||||
taskFunc := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
vv := batchItemList[0].(*jdapi.StoreUserInfo)
|
||||
vendorStoreIDs, err := api.JdAPI.GetJdUserBindStoreIDs(vv.ID)
|
||||
var vendorStoreIDsMap = make(map[string]string, len(vendorStoreIDs))
|
||||
var vendorStoreIDsResult []string
|
||||
for _, v := range vendorStoreIDs {
|
||||
if jxVendorIDsMap[v] == "" {
|
||||
continue
|
||||
}
|
||||
vendorStoreIDsMap[v] = jxVendorIDsMap[v]
|
||||
}
|
||||
if len(vendorStoreIDsMap) == 0 {
|
||||
if vv.LoginName == "jd_jxcs1223" || vv.LoginName == "jd_jxgy" {
|
||||
jdStruct := JdUserStruct{vv.LoginName, "管理员", vv.RoleNameStr, vv.LockStatus}
|
||||
jdUsersStruct.AppendData(jdStruct)
|
||||
} else {
|
||||
// jdStruct := JdUserStruct{vv.LoginName, "", vv.RoleNameStr, vv.LockStatus}
|
||||
// jdUsersStruct.AppendData(jdStruct)
|
||||
retVal = []int64{int64(vv.ID)}
|
||||
}
|
||||
} else {
|
||||
for _, m := range vendorStoreIDsMap {
|
||||
vendorStoreIDsResult = append(vendorStoreIDsResult, m)
|
||||
}
|
||||
sort.Strings(vendorStoreIDsResult[:])
|
||||
jdStruct := JdUserStruct{vv.LoginName, strings.Join(vendorStoreIDsResult, ","), vv.RoleNameStr, vv.LockStatus}
|
||||
jdUsersStruct.AppendData(jdStruct)
|
||||
}
|
||||
return retVal, err
|
||||
}
|
||||
taskParallel := tasksch.NewParallelTask("获取京东商城用户关联门店列表", tasksch.NewParallelConfig(), ctx, taskFunc, storeUserList)
|
||||
tasksch.HandleTask(taskParallel, task, true).Run()
|
||||
disabledIdList, err = taskParallel.GetResult(0)
|
||||
case 2:
|
||||
taskFunc2 := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
id := batchItemList[0].(int64)
|
||||
err = api.JdAPI.PrivilegeUpdateJdUserStatus(id, jdapi.JdUserStatusDisable)
|
||||
return retVal, err
|
||||
}
|
||||
taskParallel2 := tasksch.NewParallelTask("禁用未关联活跃门店用户", tasksch.NewParallelConfig(), ctx, taskFunc2, disabledIdList)
|
||||
tasksch.HandleTask(taskParallel2, task, true).Run()
|
||||
_, err = taskParallel2.GetResult(0)
|
||||
case 3:
|
||||
//写excel
|
||||
WriteToExcelJd(task, jdUsersStruct.userMap)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
taskSeq := tasksch.NewSeqTask2("获取京东商城用户关联门店列表-序列任务", ctx, isContinueWhenError, taskSeqFunc, 4)
|
||||
tasksch.HandleTask(taskSeq, nil, true).Run()
|
||||
if !isAsync {
|
||||
_, err = taskSeq.GetResult(0)
|
||||
hint = "1"
|
||||
} else {
|
||||
hint = taskSeq.GetID()
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
func (d *GetJdUsersStruct) AppendData(jd JdUserStruct) {
|
||||
d.locker.RLock()
|
||||
defer d.locker.RUnlock()
|
||||
d.userMap = append(d.userMap, jd)
|
||||
}
|
||||
|
||||
func WriteToExcelJd(task *tasksch.SeqTask, jd []JdUserStruct) (err error) {
|
||||
var sheetList []*excel.Obj2ExcelSheetConfig
|
||||
var downloadURL, fileName string
|
||||
excelConf := &excel.Obj2ExcelSheetConfig{
|
||||
Title: "京东用户列表",
|
||||
Data: jd,
|
||||
CaptionList: titleListJdUser,
|
||||
}
|
||||
sheetList = append(sheetList, excelConf)
|
||||
if excelConf != nil {
|
||||
downloadURL, fileName, err = jxutils.UploadExeclAndPushMsg(sheetList, "京东用户列表")
|
||||
} else {
|
||||
baseapi.SugarLogger.Debug("WriteToExcel: JdUserStruct is nil!")
|
||||
}
|
||||
if err != nil {
|
||||
baseapi.SugarLogger.Errorf("WriteToExcel:upload %s,failed error:%v", fileName, err)
|
||||
} else {
|
||||
noticeMsg := fmt.Sprintf("[详情点我]path=%s, \n", downloadURL)
|
||||
task.SetNoticeMsg(noticeMsg)
|
||||
baseapi.SugarLogger.Debugf("WriteToExcel:upload %s, success, downloadURL:%s", fileName, downloadURL)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -160,6 +160,10 @@ func doDailyWork() {
|
||||
// 每天补全前一天与当天的订单
|
||||
curDate := utils.Time2Date(time.Now())
|
||||
orderman.FixedOrderManager.AmendMissingOrders(jxcontext.AdminCtx, nil, 0, curDate.Add(-24*time.Hour), curDate, true, true)
|
||||
//订单门店归属补漏
|
||||
//fromDate, toDate都不传默认刷新当前天5天以前的订单,只传fromDate默认刷新fromDate到当天的订单
|
||||
//只传toDate默认刷新toDate到5天以前的订单
|
||||
orderman.RefreshOrdersWithoutJxStoreID(jxcontext.AdminCtx, "", "", true, true)
|
||||
}
|
||||
|
||||
func RefreshRealMobile(ctx *jxcontext.Context, vendorID int, fromTime, toTime time.Time, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
|
||||
@@ -2,36 +2,26 @@ package tempop
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/excel"
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||
"github.com/360EntSecGroup-Skylar/excelize"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/baseapi/utils/errlist"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/yonghui"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
@@ -44,26 +34,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
var (
|
||||
innerDataPat *regexp.Regexp
|
||||
jdUsersStruct GetJdUsersStruct
|
||||
titleList = []string{
|
||||
"用户名",
|
||||
"关联门店",
|
||||
"状态",
|
||||
}
|
||||
)
|
||||
|
||||
type GetJdUsersStruct struct {
|
||||
locker sync.RWMutex
|
||||
userMap []JdUserStruct
|
||||
}
|
||||
|
||||
type JdUserStruct struct {
|
||||
UserName string `json:"用户名"`
|
||||
StoreIDs string `json:"关联门店"`
|
||||
Status string `json:"状态"`
|
||||
}
|
||||
var innerDataPat *regexp.Regexp
|
||||
|
||||
func init() {
|
||||
innerDataPat = regexp.MustCompile(`"result":(.*),"code":200`)
|
||||
@@ -1388,191 +1359,3 @@ func JdStoreInfo1125() (hint string, err error) {
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
func JdStoreInfoCoordinateRecover(ctx *jxcontext.Context, files []*multipart.FileHeader) (err error) {
|
||||
if len(files) == 0 {
|
||||
return errors.New("没有文件上传!")
|
||||
}
|
||||
fileHeader := files[0]
|
||||
file1, err := fileHeader.Open()
|
||||
defer file1.Close()
|
||||
|
||||
db := dao.GetDB()
|
||||
storeList, err := dao.GetStoresMapList(db, []int{model.VendorIDJD}, nil, model.StoreStatusAll, model.StoreIsSyncYes, "")
|
||||
if err == nil {
|
||||
var validStoreList []*dao.StoreDetail
|
||||
for _, v := range storeList {
|
||||
if v.Status != model.StoreStatusDisabled && v.CreatedAt.Sub(utils.Str2Time("2019-10-01")) > 0 {
|
||||
storeInfo, err := api.JdAPI.GetStoreInfoByStationNo2(v.VendorStoreID)
|
||||
if err == nil && storeInfo.CreateTime.GoTime().Sub(utils.Str2Time("2019-10-25")) > 0 {
|
||||
if storeDetail, err := dao.GetStoreDetail(db, v.StoreID, v.VendorID); err == nil {
|
||||
validStoreList = append(validStoreList, storeDetail)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
getStoreList := func(lng, lat, lng2, lat2 int) (vendorStoreIDs []string) {
|
||||
for _, v := range validStoreList {
|
||||
if v.Lng >= lng && v.Lng <= lng2 && v.Lat >= lat && v.Lat <= lat2 {
|
||||
vendorStoreIDs = append(vendorStoreIDs, v.VendorStoreID)
|
||||
}
|
||||
}
|
||||
return vendorStoreIDs
|
||||
}
|
||||
sheetName := "老格明细"
|
||||
file, err2 := excelize.OpenReader(file1)
|
||||
if err = err2; err == nil {
|
||||
rows, err2 := file.GetRows(sheetName)
|
||||
if err = err2; err == nil {
|
||||
str2Coords := func(str string) (lng, lat int) {
|
||||
list := strings.Split(str, ",")
|
||||
if len(list) >= 2 {
|
||||
lng, lat = jxutils.StandardCoordinate2Int(utils.Str2Float64WithDefault(list[1], 0)), jxutils.StandardCoordinate2Int(utils.Str2Float64WithDefault(list[0], 0))
|
||||
}
|
||||
return lng, lat
|
||||
}
|
||||
for i := 1; i < len(rows); i++ {
|
||||
lng, lat := str2Coords(rows[i][8])
|
||||
lng2, lat2 := str2Coords(rows[i][7])
|
||||
vendorStoreIDs := getStoreList(lng, lat, lng2, lat2)
|
||||
countInfo := fmt.Sprintf("京西已拓%d", len(vendorStoreIDs))
|
||||
axis, _ := excelize.CoordinatesToCellName(5, i+1)
|
||||
file.SetCellStr(sheetName, axis, countInfo)
|
||||
axis2, _ := excelize.CoordinatesToCellName(6, i+1)
|
||||
file.SetCellStr(sheetName, axis2, strings.Join(vendorStoreIDs, ","))
|
||||
}
|
||||
filename := ExecuteFileName(fileHeader.Filename)
|
||||
buf := bytes.NewBuffer(nil)
|
||||
if _, err = io.Copy(buf, file1); err != nil {
|
||||
return err
|
||||
}
|
||||
baseapi.SugarLogger.Debugf("WriteToExcel:save %s success", filename)
|
||||
downloadURL, err := jxutils.UploadExportContent(buf.Bytes(), filename)
|
||||
if err != nil {
|
||||
baseapi.SugarLogger.Errorf("WriteToExcel:upload %s, failed error:%v", filename, err)
|
||||
} else {
|
||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
|
||||
noticeMsg := fmt.Sprintf("path=%s\n", downloadURL)
|
||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "导出老格恢复拓店进度成功", noticeMsg)
|
||||
}
|
||||
baseapi.SugarLogger.Debugf("WriteToExcel:upload %s success, downloadURL:%s", filename, downloadURL)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func ExecuteFileName(filename string) (name string) {
|
||||
filePrefix := filename[strings.LastIndex(filename, "."):len(filename)]
|
||||
fileRealName := filename[0:strings.LastIndex(filename, ".")]
|
||||
name = fileRealName + utils.Int64ToStr(time.Now().Unix()) + filePrefix
|
||||
return name
|
||||
}
|
||||
|
||||
func GetJdUsers(ctx *jxcontext.Context, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
var (
|
||||
jxVendorIDsMap = make(map[string]string)
|
||||
pageNoList []int
|
||||
storeUserList []interface{}
|
||||
)
|
||||
db := dao.GetDB()
|
||||
//获取京东商城所有用户
|
||||
_, _, toatlPage, _ := api.JdAPI.PrivilegeSearchUser(1)
|
||||
for i := 1; i <= toatlPage; i++ {
|
||||
pageNoList = append(pageNoList, i)
|
||||
}
|
||||
storeMapList, err := dao.GetStoreMapsListWithoutDisabled(db, []int{model.VendorIDJD}, model.StoreStatusDisabled)
|
||||
for _, v := range storeMapList {
|
||||
jxVendorIDsMap[v.VendorStoreID] = utils.Int64ToStr(int64(v.StoreID))
|
||||
}
|
||||
taskSeqFunc := func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
|
||||
switch step {
|
||||
case 0:
|
||||
taskFunc1 := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
pageNo := batchItemList[0].(int)
|
||||
storeUserLists, _, _, err := api.JdAPI.PrivilegeSearchUser(pageNo)
|
||||
retVal = storeUserLists
|
||||
return retVal, err
|
||||
}
|
||||
taskParallel1 := tasksch.NewParallelTask("获取京东商城所有用户列表", tasksch.NewParallelConfig(), ctx, taskFunc1, pageNoList)
|
||||
tasksch.HandleTask(taskParallel1, task, true).Run()
|
||||
storeUserList, err = taskParallel1.GetResult(0)
|
||||
case 1:
|
||||
taskFunc := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
vv := batchItemList[0].(*jdapi.StoreUserInfo)
|
||||
vendorStoreIDs, err := api.JdAPI.GetJdUserBindStoreIDs(vv.ID)
|
||||
var vendorStoreIDsMap = make(map[string]string, len(vendorStoreIDs))
|
||||
var vendorStoreIDsResult []string
|
||||
for _, v := range vendorStoreIDs {
|
||||
if jxVendorIDsMap[v] == "" {
|
||||
continue
|
||||
}
|
||||
vendorStoreIDsMap[v] = jxVendorIDsMap[v]
|
||||
}
|
||||
if len(vendorStoreIDsMap) == 0 {
|
||||
if vv.LoginName == "jd_jxcs1223" || vv.LoginName == "jd_jxgy" {
|
||||
jdStruct := JdUserStruct{vv.LoginName, "管理员", vv.LockStatus}
|
||||
jdUsersStruct.AppendData(jdStruct)
|
||||
}
|
||||
jdStruct := JdUserStruct{vv.LoginName, "", vv.LockStatus}
|
||||
jdUsersStruct.AppendData(jdStruct)
|
||||
} else {
|
||||
for _, m := range vendorStoreIDsMap {
|
||||
vendorStoreIDsResult = append(vendorStoreIDsResult, m)
|
||||
}
|
||||
sort.Strings(vendorStoreIDsResult[:])
|
||||
jdStruct := JdUserStruct{vv.LoginName, strings.Join(vendorStoreIDsResult, ","), vv.LockStatus}
|
||||
jdUsersStruct.AppendData(jdStruct)
|
||||
}
|
||||
return retVal, err
|
||||
}
|
||||
taskParallel := tasksch.NewParallelTask("获取京东商城用户关联门店列表", tasksch.NewParallelConfig(), ctx, taskFunc, storeUserList)
|
||||
tasksch.HandleTask(taskParallel, task, true).Run()
|
||||
_, err = taskParallel.GetResult(0)
|
||||
case 2:
|
||||
//写excel
|
||||
WriteToExcel(task, jdUsersStruct.userMap)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
taskSeq := tasksch.NewSeqTask2("获取京东商城用户关联门店列表-序列任务", ctx, isContinueWhenError, taskSeqFunc, 3)
|
||||
tasksch.HandleTask(taskSeq, nil, true).Run()
|
||||
if !isAsync {
|
||||
_, err = taskSeq.GetResult(0)
|
||||
hint = "1"
|
||||
} else {
|
||||
hint = taskSeq.GetID()
|
||||
}
|
||||
return hint, err
|
||||
}
|
||||
|
||||
func (d *GetJdUsersStruct) AppendData(jd JdUserStruct) {
|
||||
d.locker.RLock()
|
||||
defer d.locker.RUnlock()
|
||||
d.userMap = append(d.userMap, jd)
|
||||
}
|
||||
|
||||
func WriteToExcel(task *tasksch.SeqTask, jd []JdUserStruct) (err error) {
|
||||
var sheetList []*excel.Obj2ExcelSheetConfig
|
||||
var downloadURL, fileName string
|
||||
excelConf := &excel.Obj2ExcelSheetConfig{
|
||||
Title: "京东用户列表",
|
||||
Data: jd,
|
||||
CaptionList: titleList,
|
||||
}
|
||||
sheetList = append(sheetList, excelConf)
|
||||
if excelConf != nil {
|
||||
downloadURL, fileName, err = yonghui.UploadExeclAndPushMsg(sheetList, "京东用户列表")
|
||||
} else {
|
||||
baseapi.SugarLogger.Debug("WriteToExcel: JdUserStruct is nil!")
|
||||
}
|
||||
if err != nil {
|
||||
baseapi.SugarLogger.Errorf("WriteToExcel:upload %s,failed error:%v", fileName, err)
|
||||
} else {
|
||||
noticeMsg := fmt.Sprintf("[详情点我]path=%s, \n", downloadURL)
|
||||
task.SetNoticeMsg(noticeMsg)
|
||||
baseapi.SugarLogger.Debugf("WriteToExcel:upload %s, success, downloadURL:%s", fileName, downloadURL)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -200,7 +200,6 @@ var (
|
||||
const (
|
||||
parallelCount = 5
|
||||
UpdateGoodsShelfStatusCount = 50 //微盟下架商品api限制一次50个
|
||||
fileExt = ".xlsx"
|
||||
)
|
||||
|
||||
func (d *DataSuccessLock) AppendData(dataSuccess DataSuccess) {
|
||||
@@ -751,12 +750,12 @@ func WriteToExcel(task *tasksch.SeqTask, dataSuccess []DataSuccess, dataFailed [
|
||||
}
|
||||
sheetList2 = append(sheetList2, excelConf2)
|
||||
if excelConf1 != nil {
|
||||
downloadURL1, fileName1, err = UploadExeclAndPushMsg(sheetList1, "微盟已更新商品")
|
||||
downloadURL1, fileName1, err = jxutils.UploadExeclAndPushMsg(sheetList1, "微盟已更新商品")
|
||||
} else {
|
||||
baseapi.SugarLogger.Debug("WriteToExcel: dataSuccess is nil!")
|
||||
}
|
||||
if excelConf2 != nil {
|
||||
downloadURL2, fileName2, err = UploadExeclAndPushMsg(sheetList2, "缺少商品_微盟")
|
||||
downloadURL2, fileName2, err = jxutils.UploadExeclAndPushMsg(sheetList2, "缺少商品_微盟")
|
||||
} else {
|
||||
baseapi.SugarLogger.Debug("WriteToExcel: dataFailed is nil!")
|
||||
}
|
||||
@@ -770,15 +769,6 @@ func WriteToExcel(task *tasksch.SeqTask, dataSuccess []DataSuccess, dataFailed [
|
||||
return err
|
||||
}
|
||||
|
||||
func UploadExeclAndPushMsg(sheetList []*excel.Obj2ExcelSheetConfig, name string) (downloadURL, fileName string, err error) {
|
||||
excelBin := excel.Obj2Excel(sheetList)
|
||||
timeStr := utils.Int64ToStr(time.Now().Unix())
|
||||
fileName = name + timeStr + fileExt
|
||||
baseapi.SugarLogger.Debugf("WriteToExcel:save %s success", fileName)
|
||||
downloadURL, err = jxutils.UploadExportContent(excelBin, fileName)
|
||||
return downloadURL, fileName, err
|
||||
}
|
||||
|
||||
func UpdateJxPriceByWeimob(ctx *jxcontext.Context, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
var (
|
||||
storeSkuBindInfoList []interface{}
|
||||
@@ -907,12 +897,12 @@ func WriteToExcel3(task *tasksch.SeqTask, dataSuccess []DataStoreSkusSuccess, da
|
||||
}
|
||||
sheetList2 = append(sheetList2, excelConf2)
|
||||
if excelConf1 != nil {
|
||||
downloadURL1, fileName1, err = UploadExeclAndPushMsg(sheetList1, "京西已更新商品")
|
||||
downloadURL1, fileName1, err = jxutils.UploadExeclAndPushMsg(sheetList1, "京西已更新商品")
|
||||
} else {
|
||||
baseapi.SugarLogger.Debug("WriteToExcel: dataSuccess is nil!")
|
||||
}
|
||||
if excelConf2 != nil {
|
||||
downloadURL2, fileName2, err = UploadExeclAndPushMsg(sheetList2, "缺少商品_京西")
|
||||
downloadURL2, fileName2, err = jxutils.UploadExeclAndPushMsg(sheetList2, "缺少商品_京西")
|
||||
} else {
|
||||
baseapi.SugarLogger.Debug("WriteToExcel: dataFailed is nil!")
|
||||
}
|
||||
@@ -1103,13 +1093,13 @@ func WriteToExcel2(ctx *jxcontext.Context, DataFineList, DataHairyList []*Data)
|
||||
sheetList2 = append(sheetList2, excelConf2)
|
||||
noticeMsg += "[详情点我]"
|
||||
if len(DataFineList) > 0 {
|
||||
downloadURL1, fileName1, err = UploadExeclAndPushMsg(sheetList1, "京西采购_精品")
|
||||
downloadURL1, fileName1, err = jxutils.UploadExeclAndPushMsg(sheetList1, "京西采购_精品")
|
||||
noticeMsg += "path1=" + downloadURL1 + " "
|
||||
} else {
|
||||
baseapi.SugarLogger.Debug("WriteToExcel: DataFineList is nil!")
|
||||
}
|
||||
if len(DataHairyList) > 0 {
|
||||
downloadURL2, fileName2, err = UploadExeclAndPushMsg(sheetList2, "京西采购_毛菜")
|
||||
downloadURL2, fileName2, err = jxutils.UploadExeclAndPushMsg(sheetList2, "京西采购_毛菜")
|
||||
noticeMsg += "path2=" + downloadURL2
|
||||
} else {
|
||||
baseapi.SugarLogger.Debug("WriteToExcel: DataHairyList is nil!")
|
||||
|
||||
@@ -12,9 +12,11 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/autonavi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/baseapi/utils/routinepool"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/excel"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
@@ -39,6 +41,8 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
const fileExt = ".xlsx"
|
||||
|
||||
type OrderSkuList []*model.OrderSku
|
||||
|
||||
func (l OrderSkuList) Len() int {
|
||||
@@ -564,6 +568,15 @@ func UploadExportContent(content []byte, key string) (downloadURL string, err er
|
||||
return downloadURL, err
|
||||
}
|
||||
|
||||
func UploadExeclAndPushMsg(sheetList []*excel.Obj2ExcelSheetConfig, name string) (downloadURL, fileName string, err error) {
|
||||
excelBin := excel.Obj2Excel(sheetList)
|
||||
timeStr := utils.Int64ToStr(time.Now().Unix())
|
||||
fileName = name + timeStr + fileExt
|
||||
baseapi.SugarLogger.Debugf("WriteToExcel:save %s success", fileName)
|
||||
downloadURL, err = UploadExportContent(excelBin, fileName)
|
||||
return downloadURL, fileName, err
|
||||
}
|
||||
|
||||
func TaskResult2Hint(resultList []interface{}) (hint string) {
|
||||
strList := make([]string, len(resultList))
|
||||
for k, v := range resultList {
|
||||
|
||||
@@ -919,6 +919,37 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
|
||||
return orders, totalCount, err
|
||||
}
|
||||
|
||||
func UpdateOrdersWithoutJxStoreID(db *DaoDB, fromDate, toDate time.Time) (count int64, err error) {
|
||||
sql := `
|
||||
UPDATE goods_order t1
|
||||
JOIN store_map a ON a.vendor_store_id = t1.vendor_store_id AND a.vendor_id = t1.vendor_id
|
||||
SET t1.jx_store_id = a.store_id
|
||||
WHERE t1.jx_store_id = 0
|
||||
AND a.deleted_at = ?
|
||||
AND t1.order_created_at >= ? AND t1.order_created_at <= ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if !utils.IsTimeZero(fromDate) {
|
||||
sqlParams = append(sqlParams, fromDate)
|
||||
if !utils.IsTimeZero(toDate) {
|
||||
sqlParams = append(sqlParams, toDate)
|
||||
} else {
|
||||
sqlParams = append(sqlParams, time.Now())
|
||||
}
|
||||
} else {
|
||||
if !utils.IsTimeZero(toDate) {
|
||||
sqlParams = append(sqlParams, toDate.AddDate(0, 0, -5))
|
||||
sqlParams = append(sqlParams, toDate)
|
||||
} else {
|
||||
sqlParams = append(sqlParams, time.Now().AddDate(0, 0, -5))
|
||||
sqlParams = append(sqlParams, time.Now())
|
||||
}
|
||||
}
|
||||
return ExecuteSQL(db, sql, sqlParams)
|
||||
}
|
||||
|
||||
func GetMyOrderCountInfo(db *DaoDB, userID string, fromDate, toDate time.Time, statuss []int) (countInfo []*model.GoodsOrderCountInfo, err error) {
|
||||
if utils.IsTimeZero(fromDate) {
|
||||
return nil, fmt.Errorf("必须指定开始日期")
|
||||
|
||||
@@ -547,3 +547,18 @@ func (c *StoreController) GetStoreListByLocation() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 老格恢复拓店进度
|
||||
// @Description 老格恢复拓店进度
|
||||
// @Param token header string true "认证token"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /JdStoreInfoCoordinateRecover [post]
|
||||
func (c *StoreController) JdStoreInfoCoordinateRecover() {
|
||||
c.callJdStoreInfoCoordinateRecover(func(params *tStoreJdStoreInfoCoordinateRecoverParams) (retVal interface{}, errCode string, err error) {
|
||||
r := c.Ctx.Request
|
||||
files := r.MultipartForm.File["userfiles"]
|
||||
err = cms.JdStoreInfoCoordinateRecover(params.Ctx, files)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -411,3 +411,18 @@ func (c *Auth2Controller) UpdateUserByMiniInfo() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 查找京东用户
|
||||
// @Description 查找京东用户
|
||||
// @Param token header string true "认证token"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetJdUsers [post]
|
||||
func (c *User2Controller) GetJdUsers() {
|
||||
c.callGetJdUsers(func(params *tUser2GetJdUsersParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = cms.GetJdUsers(params.Ctx, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -858,3 +858,20 @@ func afsSkus2OrderSkus(afsSkuList []*model.OrderFinancialSkuExt) (skuList []*mod
|
||||
}
|
||||
return skuList
|
||||
}
|
||||
|
||||
// @Title 订单门店归属补漏
|
||||
// @Description 订单门店归属补漏
|
||||
// @Param token header string true "认证token"
|
||||
// @Param fromDate formData string false "开始日期"
|
||||
// @Param toDate formData string false "结束日期(缺省不限制)"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /RefreshOrdersWithoutJxStoreID [post]
|
||||
func (c *OrderController) RefreshOrdersWithoutJxStoreID() {
|
||||
c.callRefreshOrdersWithoutJxStoreID(func(params *tOrderRefreshOrdersWithoutJxStoreIDParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = orderman.RefreshOrdersWithoutJxStoreID(params.Ctx, params.FromDate, params.ToDate, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -352,33 +352,3 @@ func (c *TempOpController) FixMtwmCategory() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 老格恢复拓店进度
|
||||
// @Description 老格恢复拓店进度
|
||||
// @Param token header string true "认证token"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /JdStoreInfoCoordinateRecover [post]
|
||||
func (c *TempOpController) JdStoreInfoCoordinateRecover() {
|
||||
c.callJdStoreInfoCoordinateRecover(func(params *tTempopJdStoreInfoCoordinateRecoverParams) (retVal interface{}, errCode string, err error) {
|
||||
r := c.Ctx.Request
|
||||
files := r.MultipartForm.File["userfiles"]
|
||||
err = tempop.JdStoreInfoCoordinateRecover(params.Ctx, files)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 查找京东用户
|
||||
// @Description 查找京东用户
|
||||
// @Param token header string true "认证token"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetJdUsers [post]
|
||||
func (c *TempOpController) GetJdUsers() {
|
||||
c.callGetJdUsers(func(params *tTempopGetJdUsersParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = tempop.GetJdUsers(params.Ctx, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1017,6 +1017,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "RefreshOrdersWithoutJxStoreID",
|
||||
Router: `/RefreshOrdersWithoutJxStoreID`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "RefundOrder",
|
||||
@@ -1422,6 +1431,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"],
|
||||
beego.ControllerComments{
|
||||
Method: "JdStoreInfoCoordinateRecover",
|
||||
Router: `/JdStoreInfoCoordinateRecover`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"],
|
||||
beego.ControllerComments{
|
||||
Method: "ScoreStore",
|
||||
@@ -1827,24 +1845,6 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"],
|
||||
beego.ControllerComments{
|
||||
Method: "GetJdUsers",
|
||||
Router: `/GetJdUsers`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"],
|
||||
beego.ControllerComments{
|
||||
Method: "JdStoreInfoCoordinateRecover",
|
||||
Router: `/JdStoreInfoCoordinateRecover`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:TempOpController"],
|
||||
beego.ControllerComments{
|
||||
Method: "PrintMsg",
|
||||
@@ -1962,6 +1962,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"],
|
||||
beego.ControllerComments{
|
||||
Method: "GetJdUsers",
|
||||
Router: `/GetJdUsers`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:User2Controller"],
|
||||
beego.ControllerComments{
|
||||
Method: "GetMyStoreList",
|
||||
|
||||
Reference in New Issue
Block a user