| | |
| | | import com.doumee.dao.business.join.MemberJoinMapper; |
| | | import com.doumee.dao.business.join.NoticeJoinMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.MemberCoupon; |
| | | import com.doumee.dao.business.model.Notice; |
| | | import com.doumee.dao.business.model.Shop; |
| | | import com.doumee.dao.web.dto.NoticeCardDTO; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.web.request.CouponNoticeRequest; |
| | | import com.doumee.service.business.NoticeService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | return pageData; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @param type 0消费者;1=经销商积分;2=经销商结算金额 |
| | | * @param objType 0商城订单 1积分流水 2互动评价 3优惠券 |
| | | * |
| | | */ |
| | | |
| | | public void saveNoticeInfo(Integer type,Integer objType,Integer memberId |
| | | ,String title,String content,Integer objId){ |
| | | Notice notice = new Notice(); |
| | | notice.setCreateDate(new Date()); |
| | | notice.setIsdeleted(Constants.ZERO); |
| | | notice.setTitle(title); |
| | | notice.setContent(content); |
| | | notice.setType(type); |
| | | notice.setObjType(objType); |
| | | notice.setObjId(objId); |
| | | notice.setMemberId(memberId); |
| | | noticeMapper.insert(notice); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 积分变动消息类型 |
| | | * @param integralObjType 积分变动类型 |
| | | * @param memberId 用户主键/商户主键 |
| | | * @param integral 变动积分/现金值 |
| | | * @param objId 关联对象主键 - 积分流水变动记录主键 |
| | | * @param param1 param2 |
| | | */ |
| | | public void saveMemberIntegralNotice(Constants.IntegralObjType integralObjType,Integer type, Integer memberId, Integer integral, Integer objId,String param1){ |
| | | String title = integralObjType.getName(); |
| | | String info = integralObjType.getNoteinfo(); |
| | | info = info.replace("${param}",integral.toString()).replace("${param1}",param1); |
| | | this.saveNoticeInfo( |
| | | type, |
| | | Constants.ONE, |
| | | memberId, |
| | | title, |
| | | info, |
| | | objId |
| | | ); |
| | | } |
| | | |
| | | public void couponNotice(Integer memberId,List<CouponNoticeRequest> couponList){ |
| | | String info = "恭喜您获得【优惠规则】【优惠券类型】"; |
| | | //恭喜您获得 满50减10抵扣券 |
| | | for (CouponNoticeRequest c:couponList) { |
| | | MemberCoupon mc = c.getMemberCoupon(); |
| | | Constants.equalsInteger(mc.getCouponType(),Constants.ZERO)? |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | // this.saveNoticeInfo( |
| | | // type, |
| | | // Constants.ONE, |
| | | // memberId, |
| | | // "获得系统发放的优惠券", |
| | | // info, |
| | | // objId |
| | | // ); |
| | | // |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |