| | |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.acct.ICouponRuleV1InnerServiceSMO; |
| | | import com.java110.po.couponRule.CouponRulePo; |
| | | import com.java110.po.coupon.CouponRulePo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | /** |
| | | * 类表述:保存 |
| | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "ruleName", "请求报文中未包含ruleName"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | |
| | | } |
| | | |
| | |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | CouponRulePo couponRulePo = BeanConvertUtil.covertBean(reqJson, CouponRulePo.class); |
| | | CouponRulePo couponRulePo = BeanConvertUtil.covertBean(reqJson, CouponRulePo.class); |
| | | couponRulePo.setRuleId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); |
| | | int flag = couponRuleV1InnerServiceSMOImpl.saveCouponRule(couponRulePo); |
| | | |