|
@@ -101,6 +101,14 @@ func (this *ActivityController) Add() {
|
|
|
startDateTime := req.StartDate + " " + req.StartTime
|
|
|
endDateTime := req.EndDate + " " + req.EndTime
|
|
|
|
|
|
+ startP, _ := time.ParseInLocation(utils.FormatDateTime, startDateTime, time.Local)
|
|
|
+ endP, _ := time.ParseInLocation(utils.FormatDateTime, endDateTime, time.Local)
|
|
|
+
|
|
|
+ if endP.Before(startP) {
|
|
|
+ br.Msg = "结束时间不得早于开始时间!"
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
sellerList, err := system.GetSysAdminByIds(req.SellerId)
|
|
|
if err != nil {
|
|
|
br.Msg = "保存失败!"
|
|
@@ -177,7 +185,7 @@ func (this *ActivityController) Add() {
|
|
|
}
|
|
|
openIdList = append(openIdList, openIdObj)
|
|
|
}
|
|
|
- go services.SendWxMsgWithRoadshowSellerActivity(req.CompanyName, "参会", "已添加", time.Now().Format(utils.FormatDateTime), openIdList, int(rsActivityId))
|
|
|
+ go services.SendWxMsgWithRoadshowSellerActivity(req.CompanyName, rsActivity.ActivityType, "已添加", time.Now().Format(utils.FormatDateTime), openIdList, int(rsActivityId))
|
|
|
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|