|
@@ -72,7 +72,15 @@ func (des *DataExportPack) ScreenList() {
|
|
|
func (des *DataExportPack) ScreenDelete() {
|
|
|
err := func() error {
|
|
|
userid := des.GetSession("userId")
|
|
|
- ids := des.GetString("ids")
|
|
|
+ if len(des.Body()) == 0 {
|
|
|
+ return errors.New("body数据异常")
|
|
|
+ }
|
|
|
+ data := make(map[string]interface{})
|
|
|
+ err := json.Unmarshal(des.Body(), &data)
|
|
|
+ if err != nil {
|
|
|
+ return errors.New("获取ids失败")
|
|
|
+ }
|
|
|
+ ids := qutil.InterfaceToStr(data["ids"])
|
|
|
var idArr []primitive.ObjectID
|
|
|
for _, v := range strings.Split(ids, ",") {
|
|
|
if id := encrypt.SE.DecodeString(v); id != "" {
|
|
@@ -83,7 +91,7 @@ func (des *DataExportPack) ScreenDelete() {
|
|
|
//log.Println("userid", userid, idArr)
|
|
|
util.MQFW.Delete("export_condition", map[string]interface{}{
|
|
|
"user_id": userid,
|
|
|
- "id": map[string]interface{}{
|
|
|
+ "_id": map[string]interface{}{
|
|
|
"$in": idArr,
|
|
|
},
|
|
|
})
|