| | |
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail.MsgTypeOrderTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.BindingAccount;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | |
| | | import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
|
| | | import com.yeshi.fanli.vo.msg.UserMsgVO;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | public class UserMsgVOFactory {
|
| | |
| | | List<CommonMsgItemVO> items = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | |
|
| | | contentList.add(new ClientTextStyleVO(msg.getType().getDesc() + "", COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO(msg.getTitle() + "", COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("事项", COLOR_TITLE), contentList));
|
| | |
|
| | | // 状态修改
|
| | |
| | | int fromIndex = 0;
|
| | | int toIndex = 0;
|
| | | String stateDesc = msg.getContent();
|
| | | if (msg.getType() == MsgTypeAccountTypeEnum.taoBaoAuthFail) {// 淘宝授权失败
|
| | | JSONArray array = JSONArray.fromObject(stateDesc);
|
| | | for (int i = 0; i < array.size(); i++) {
|
| | | String name = array.optJSONObject(i).optString("name");
|
| | | String content = array.optJSONObject(i).optString("content");
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(content, i > 0 ? COLOR_HIGHLIGHT_CONTENT : COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO(name, COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | } else {
|
| | | while (stateDesc.indexOf("<highlight>") > -1) {
|
| | | fromIndex = stateDesc.indexOf("<highlight>");
|
| | | toIndex = stateDesc.indexOf("</highlight>");
|
| | |
| | | contentList.add(new ClientTextStyleVO(stateDesc, COLOR_CONTENT));
|
| | | }
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("状态", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu() + "",
|
| | |
| | | new ClientTextStyleVO("¥" + filterMoney(dto.getMoney().setScale(2)), COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("面额", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getReason())) {
|
| | | contentList = new ArrayList<>();
|