SendMsg2Somebod支持建议y
This commit is contained in:
@@ -28,6 +28,7 @@ import (
|
||||
|
||||
const (
|
||||
SendMsgTypeOpenStoreRequest = "openStoreRequest"
|
||||
SendMsgTypeSuggestRequest = "suggestRequest"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -44,6 +45,14 @@ var (
|
||||
// "徐建华",
|
||||
// "周扬",
|
||||
},
|
||||
SendMsgTypeSuggestRequest: []string{
|
||||
"石锋",
|
||||
// "徐建华",
|
||||
// "周扬",
|
||||
},
|
||||
}
|
||||
needConfirmRequestMap = map[string]int{
|
||||
SendMsgTypeOpenStoreRequest: 1,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -162,8 +171,10 @@ func GetCoordinateDistrictCode(ctx *jxcontext.Context, lng, lat float64) (code i
|
||||
}
|
||||
|
||||
func SendMsg2Somebody(ctx *jxcontext.Context, mobileNum, verifyCode, msgType, msgContent string) (err error) {
|
||||
if _, err = mobile.AutherObj.VerifySecret(mobileNum, verifyCode); err != nil {
|
||||
return err
|
||||
if needConfirmRequestMap[msgType] == 1 {
|
||||
if _, err = mobile.AutherObj.VerifySecret(mobileNum, verifyCode); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
db := dao.GetDB()
|
||||
for _, v := range receiveMsgUsersMap[msgType] {
|
||||
|
||||
@@ -223,7 +223,7 @@ func (c *CmsController) FakeNewOrder() {
|
||||
// @Title 发送消息给相关人员
|
||||
// @Description 发送消息给相关人员
|
||||
// @Param mobile formData string true "手机号"
|
||||
// @Param verifyCode formData string true "验证码"
|
||||
// @Param verifyCode formData string false "验证码"
|
||||
// @Param msgType formData string true "消息类型"
|
||||
// @Param msgContent formData string true "消息内容"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
|
||||
Reference in New Issue
Block a user