|
|
|
@ -3,6 +3,7 @@ package com.xmomen.module.base.service;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import lombok.val;
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
|
|
import org.apache.shiro.util.CollectionUtils;
|
|
|
|
@ -28,7 +29,7 @@ import com.xmomen.module.base.model.CouponQuery;
|
|
|
|
|
import com.xmomen.module.base.model.CouponReportModel;
|
|
|
|
|
import com.xmomen.module.base.model.ReadCardVo;
|
|
|
|
|
import com.xmomen.module.order.entity.TbTradeRecord;
|
|
|
|
|
import com.xmomen.module.pick.entity.TbExchangeCardLog;
|
|
|
|
|
|
|
|
|
|
import com.xmomen.module.pick.entity.TbRechargeLog;
|
|
|
|
|
import com.xmomen.module.system.entity.SysUserOrganization;
|
|
|
|
|
import com.xmomen.module.wx.module.coupon.model.CouponQueryModel;
|
|
|
|
@ -39,7 +40,7 @@ import com.xmomen.module.wx.util.DateUtils;
|
|
|
|
|
* Created by Jeng on 2016/3/30.
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
public class CouponService {
|
|
|
|
|
public class CouponService<TbExchangeCardLog> {
|
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(CouponService.class);
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@ -199,7 +200,7 @@ public class CouponService {
|
|
|
|
|
tradeRecord.setRemark("卡充值记录");
|
|
|
|
|
mybatisDao.save(tradeRecord);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 卡充值
|
|
|
|
|
*
|
|
|
|
@ -216,7 +217,7 @@ public class CouponService {
|
|
|
|
|
coupon.setUserPrice(userPrice.add(rechargePrice));
|
|
|
|
|
mybatisDao.update(coupon);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*SysUserOrganization userOrganization = new SysUserOrganization();
|
|
|
|
|
userOrganization.setUserId(userId);
|
|
|
|
|
userOrganization = mybatisDao.selectOneByModel(userOrganization);*/
|
|
|
|
@ -296,14 +297,16 @@ public class CouponService {
|
|
|
|
|
SysUserOrganization userOrganization = new SysUserOrganization();
|
|
|
|
|
userOrganization.setUserId(userId);
|
|
|
|
|
userOrganization = mybatisDao.selectOneByModel(userOrganization);
|
|
|
|
|
TbExchangeCardLog exchangeCardLog = new TbExchangeCardLog();
|
|
|
|
|
exchangeCardLog.setNewCouponId(newCoupon.getId());
|
|
|
|
|
exchangeCardLog.setNewCouponNo(newCouponNo);
|
|
|
|
|
exchangeCardLog.setOldCouponId(oldCoupon.getId());
|
|
|
|
|
exchangeCardLog.setOldCouponNo(oldCouponNo);
|
|
|
|
|
exchangeCardLog.setRechargePlace(userOrganization.getOrganizationId());
|
|
|
|
|
exchangeCardLog.setRechargeUser(userId);
|
|
|
|
|
mybatisDao.save(exchangeCardLog);
|
|
|
|
|
TbExchangeCardLog exchangeCardLog;
|
|
|
|
|
exchangeCardLog = new exchangeCardLog();
|
|
|
|
|
Object clone = exchangeCardLog.getClass();
|
|
|
|
|
exchangeCardLog.getClass();
|
|
|
|
|
exchangeCardLog.getClass();
|
|
|
|
|
exchangeCardLog.getClass();
|
|
|
|
|
exchangeCardLog.getClass();
|
|
|
|
|
exchangeCardLog.getClass();
|
|
|
|
|
int save;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|