Search in sources :

Example 6 with MemberCard

use of com.ikoori.vip.common.persistence.model.MemberCard in project vip by guangdada.

the class MemberServiceImpl method deleteMember.

@Override
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
public void deleteMember(Long memberId) {
    Member member = this.selectById(memberId);
    MemberCard mc = new MemberCard();
    mc.setMemberId(member.getId());
    mc = memberCardMapper.selectOne(mc);
    memberCardMapper.deleteById(mc.getId());
    this.deleteById(memberId);
}
Also used : MemberCard(com.ikoori.vip.common.persistence.model.MemberCard) Member(com.ikoori.vip.common.persistence.model.Member) Transactional(org.springframework.transaction.annotation.Transactional)

Example 7 with MemberCard

use of com.ikoori.vip.common.persistence.model.MemberCard in project vip by guangdada.

the class MemberCardController method list.

/**
 * 获取领取记录列表
 */
@Permission
@RequestMapping(value = "/list")
@ResponseBody
public Object list(String cardNumber, String cardName, Long cardId, String mobile, String nickname, Integer state, Integer grantType) {
    Long userId = Long.valueOf(ShiroKit.getUser().getId());
    Merchant merchant = merchantService.getMerchantUserId(userId);
    Page<MemberCard> page = new PageFactory<MemberCard>().defaultPage();
    List<Map<String, Object>> result = memberCardService.getMemberCardList(cardId, grantType, state, mobile, page, nickname, page.getOrderByField(), page.isAsc(), merchant.getId(), cardNumber);
    page.setRecords((List<MemberCard>) new MemberCardWarpper(result).warp());
    return super.packForBT(page);
}
Also used : MemberCard(com.ikoori.vip.common.persistence.model.MemberCard) Merchant(com.ikoori.vip.common.persistence.model.Merchant) MemberCardWarpper(com.ikoori.vip.server.modular.biz.warpper.MemberCardWarpper) HashMap(java.util.HashMap) Map(java.util.Map) Permission(com.ikoori.vip.common.annotion.Permission) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

MemberCard (com.ikoori.vip.common.persistence.model.MemberCard)7 Merchant (com.ikoori.vip.common.persistence.model.Merchant)4 Permission (com.ikoori.vip.common.annotion.Permission)3 Card (com.ikoori.vip.common.persistence.model.Card)3 Member (com.ikoori.vip.common.persistence.model.Member)3 Transactional (org.springframework.transaction.annotation.Transactional)3 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3 HashMap (java.util.HashMap)2 JSONObject (com.alibaba.fastjson.JSONObject)1 CardRight (com.ikoori.vip.common.persistence.model.CardRight)1 Coupon (com.ikoori.vip.common.persistence.model.Coupon)1 Point (com.ikoori.vip.common.persistence.model.Point)1 MemberCardWarpper (com.ikoori.vip.server.modular.biz.warpper.MemberCardWarpper)1 Map (java.util.Map)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1