|
@@ -1,12 +1,18 @@
|
|
package com.caimei.www.service.page.impl;
|
|
package com.caimei.www.service.page.impl;
|
|
|
|
|
|
import com.caimei.www.mapper.SinglePageDao;
|
|
import com.caimei.www.mapper.SinglePageDao;
|
|
|
|
+import com.caimei.www.pojo.JsonModel;
|
|
import com.caimei.www.pojo.page.PageContent;
|
|
import com.caimei.www.pojo.page.PageContent;
|
|
|
|
+import com.caimei.www.pojo.save.Suggestion;
|
|
import com.caimei.www.service.page.HelpService;
|
|
import com.caimei.www.service.page.HelpService;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
+import javax.xml.crypto.Data;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.Date;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Description
|
|
* Description
|
|
@@ -31,4 +37,21 @@ public class HelpServiceImpl implements HelpService {
|
|
public PageContent getHelpPageById(Integer id) {
|
|
public PageContent getHelpPageById(Integer id) {
|
|
return singlePageDao.getHelpPageById(id);
|
|
return singlePageDao.getHelpPageById(id);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 保存投诉建议
|
|
|
|
+ *
|
|
|
|
+ * @param suggestion
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public JsonModel suggestionSave(Suggestion suggestion) {
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ String format = sdf.format(new Date());
|
|
|
|
+ Integer maxId = singlePageDao.getMaxSuggestionId();
|
|
|
|
+ suggestion.setAddTime(format);
|
|
|
|
+ suggestion.setSuggestionID(maxId+1);
|
|
|
|
+ singlePageDao.suggestionSave(suggestion);
|
|
|
|
+ return JsonModel.success("投诉建议成功!","");
|
|
|
|
+ }
|
|
}
|
|
}
|