| | |
| | | import com.ks.daylucky.pojo.DTO.UserMsgSettings; |
| | | import com.ks.daylucky.pojo.VO.AcceptData; |
| | | import com.ks.daylucky.pojo.VO.UserConfigVO; |
| | | import com.ks.daylucky.pojo.VO.UserMsgVO; |
| | | import com.ks.daylucky.service.UserInfoExtraService; |
| | | import com.ks.daylucky.service.UserInfoService; |
| | | import com.ks.daylucky.service.UserMsgService; |
| | | import com.ks.daylucky.util.Constant; |
| | | import com.ks.daylucky.util.RSAUtil; |
| | | import com.ks.daylucky.util.UserInfoUtil; |
| | | import com.ks.daylucky.util.factory.vo.UserMsgVOFactory; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Controller |
| | |
| | | @RequestMapping("getUserMsgList") |
| | | public String getUserMsgList(AcceptData acceptData, int page) { |
| | | List<UserMsg> msgList = userMsgService.getUserMsgList(acceptData.getUid(), page, Constant.PAGE_SIZE); |
| | | List<UserMsgVO> voList = new ArrayList<>(); |
| | | if (msgList != null) { |
| | | for (UserMsg userMsg : msgList) { |
| | | voList.add(UserMsgVOFactory.create(userMsg)); |
| | | } |
| | | } |
| | | |
| | | |
| | | long count = userMsgService.countUserMsg(acceptData.getUid()); |
| | | Gson gson = JsonUtil.getConvertDateToShortNameBuilder(new GsonBuilder().excludeFieldsWithoutExposeAnnotation()).create(); |
| | | Gson gson = JsonUtil.getConvertDateToShortNameBuilder(new GsonBuilder()).create(); |
| | | |
| | | JSONObject data = new JSONObject(); |
| | | data.put("data", gson.toJson(msgList)); |
| | | data.put("data", gson.toJson(voList)); |
| | | data.put("count", count); |
| | | return JsonUtil.loadTrueResult(data); |
| | | } |