| @@ -22,6 +22,8 @@ import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import org.springframework.transaction.annotation.Propagation; | |||||
| import org.springframework.transaction.annotation.Transactional; | |||||
| import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
| import java.util.*; | import java.util.*; | ||||
| @@ -54,6 +56,7 @@ public class TtCouponServiceImpl implements TtCouponService { | |||||
| @Override | @Override | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | |||||
| public ResultData saveOrUpdate(TtCoupon record) { | public ResultData saveOrUpdate(TtCoupon record) { | ||||
| if (StringUtils.isNotEmpty(record.getSalePriceStr())) { | if (StringUtils.isNotEmpty(record.getSalePriceStr())) { | ||||
| @@ -57,7 +57,7 @@ | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where c.`is_del` = 0 | |||||
| where c.`is_del` = 0 and c.`type` != 3 | |||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and c.`id` = #{id} | and c.`id` = #{id} | ||||
| @@ -69,6 +69,11 @@ public class TtCouponController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] TtCouponController::list"); | logger.debug("[" + getIpAddr() + "] TtCouponController::list"); | ||||
| if (record == null) record = new TtCoupon(); | if (record == null) record = new TtCoupon(); | ||||
| record.updateTenantInfo(getTenantInfo()); | record.updateTenantInfo(getTenantInfo()); | ||||
| // if(record.getType() == null || record.getType().equals(EnumTtCouponType.COUPON_SINGLE.getCode())){ | |||||
| // record.setType(EnumTtCouponType.COUPON_SINGLE.getCode()); | |||||
| // }else{ | |||||
| // record.setType(EnumTtCouponType.COUPON_COLUMN.getCode()); | |||||
| // } | |||||
| return new ResultData(ttCouponService.listAsPage(record, pageNum, pageSize)); | return new ResultData(ttCouponService.listAsPage(record, pageNum, pageSize)); | ||||
| } | } | ||||