| | |
| | | package com.product.mobile.core.service; |
| | | |
| | | import com.product.admin.config.CmnConst; |
| | | import com.product.admin.service.UserService; |
| | | import com.product.core.dao.BaseDao; |
| | | import com.product.core.entity.DataTableEntity; |
| | | import com.product.core.entity.FieldSetEntity; |
| | | import com.product.core.service.support.AbstractBaseService; |
| | | import com.product.core.spring.context.SpringMVCContextHolder; |
| | | import com.product.module.sys.service.UserService; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | */ |
| | | public DataTableEntity listReadMessage(FieldSetEntity fse) { |
| | | StringBuilder sql = new StringBuilder(); |
| | | sql.append("\nselect m.uuid,m.title,m.content,m.send_user_id,mu.user_name send_user_name,m.send_time,m.message_type,m.mobile_url url "); |
| | | sql.append("\nselect m.uuid,m.title,m.content,m.send_user_id,mu.user_name send_user_name,m.send_time,m.message_type,ifnull(m.mobile_url,'') url "); |
| | | sql.append("\nfrom product_sys_message m"); |
| | | sql.append("\nleft join product_sys_users mu on mu.user_id=m.send_user_id "); |
| | | sql.append("\ninner join product_sys_message_user u on u.message_uuid=m.uuid and u.read_type=1 and u.user_id=?"); |
| | |
| | | FieldSetEntity tempFse; |
| | | for (int i = 0;i < dte.getRows();i++) { |
| | | tempFse = dte.getFieldSetEntity(i); |
| | | tempFse.setValue("sender_avatar", userService.getUserAvatar(tempFse.getString("send_user_id"))); |
| | | tempFse.setValue(com.product.core.websocket.config.CmnConst.SEND_THUMBNAIL_IMG, userService.getUserAvatar(tempFse.getString("send_user_id_save_value"))); |
| | | } |
| | | |
| | | return dte; |