| | |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.common.IChargeMonthCardV1InnerServiceSMO; |
| | | import com.java110.po.chargeMonthCard.ChargeMonthCardPo; |
| | | import com.java110.po.charge.ChargeMonthCardPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "cardName", "请求报文中未包含cardName"); |
| | | Assert.hasKeyAndValue(reqJson, "cardMonth", "请求报文中未包含cardMonth"); |
| | | Assert.hasKeyAndValue(reqJson, "cardPrice", "请求报文中未包含cardPrice"); |
| | | Assert.hasKeyAndValue(reqJson, "dayHours", "请求报文中未包含dayHours"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "cardMonth", "请求报文中未包含cardMonth"); |
| | | Assert.hasKeyAndValue(reqJson, "cardPrice", "请求报文中未包含cardPrice"); |
| | | Assert.hasKeyAndValue(reqJson, "dayHours", "请求报文中未包含dayHours"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | |
| | | } |
| | | |
| | |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | |
| | | ChargeMonthCardPo chargeMonthCardPo = BeanConvertUtil.covertBean(reqJson, ChargeMonthCardPo.class); |
| | | ChargeMonthCardPo chargeMonthCardPo = BeanConvertUtil.covertBean(reqJson, ChargeMonthCardPo.class); |
| | | chargeMonthCardPo.setCardId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID)); |
| | | int flag = chargeMonthCardV1InnerServiceSMOImpl.saveChargeMonthCard(chargeMonthCardPo); |
| | | |