package com.java110.front.components.activities;

import com.java110.core.context.IPageData;
import com.java110.front.smo.activities.IAddActivitiesSMO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

/**
 * 添加活动组件
 */
@Component("addActivitiesView")
public class AddActivitiesViewComponent {

    @Autowired
    private IAddActivitiesSMO addActivitiesSMOImpl;

    /**
     * 添加活动数据
     *
     * @param pd 页面数据封装
     * @return ResponseEntity 对象
     */
    public ResponseEntity<String> save(IPageData pd) {
        return addActivitiesSMOImpl.saveActivities(pd);
    }

    public IAddActivitiesSMO getAddActivitiesSMOImpl() {
        return addActivitiesSMOImpl;
    }

    public void setAddActivitiesSMOImpl(IAddActivitiesSMO addActivitiesSMOImpl) {
        this.addActivitiesSMOImpl = addActivitiesSMOImpl;
    }
}

@@ -46,32 +46,115 @@
 es;%0A%0Aimport com.
+alibaba.fastjson.JSONObject;%0Aimport com.java110.core.context.IPageData;%0Aimport com.
 java110.core.con
@@ -150,33 +150,32 @@
 10.core.context.
-I
 PageData;%0Aimport
@@ -227,16 +227,63 @@
 iesSMO;%0A
+import com.java110.front.smo.file.IAddFileSMO;%0A
 import o
@@ -433,16 +433,72 @@
 mponent;
+%0Aimport org.springframework.web.multipart.MultipartFile;
 %0A%0A/**%0A *
@@ -652,16 +652,72 @@
 OImpl;%0A%0A
+    @Autowired%0A    private IAddFileSMO addFileSMOImpl;%0A%0A
     /**%0A
@@ -853,24 +853,24 @@
 eData pd) %7B%0A
-
         retu
@@ -912,32 +912,606 @@
 ies(pd);%0A    %7D%0A%0A
+%0A    /**%0A     * %E4%B8%8A%E4%BC%A0%E5%9B%BE%E7%89%87%0A     *%0A     * @param pd %E9%A1%B5%E9%9D%A2%E6%95%B0%E6%8D%AE%E5%B0%81%E8%A3%85%0A     * @return ResponseEntity %E5%AF%B9%E8%B1%A1%0A     */%0A    public ResponseEntity%3CString%3E uploadImage(IPageData pd, MultipartFile uploadFile) throws Exception %7B%0A        JSONObject paramIn = JSONObject.parseObject(pd.getReqData());%0A        paramIn.put(%22suffix%22, %22jpeg%22);%0A        IPageData newPd = PageData.newInstance().builder(pd.getUserId(), pd.getUserName(),pd.getToken(), paramIn.toJSONString(), pd.getComponentCode(), pd.getComponentMethod(), %22%22, pd.getSessionId());%0A        return addFileSMOImpl.saveFile(newPd, uploadFile);%0A    %7D%0A%0A
     public IAddA

优化 小区文化图片上传功能