package com.changhong.epc.parsing.service.ruleCheckMsg.impl; import com.changhong.epc.bean.tenant.bill.RuleCheckMsg; import com.changhong.epc.parsing.mapper.tenant.BillInfoMapper; import com.changhong.epc.parsing.mapper.tenant.RuleCheckMsgMapper; import com.changhong.epc.parsing.service.ruleCheckMsg.RuleCheckMsgService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; @Slf4j @Service public class RuleCheckMsgServiceImpl implements RuleCheckMsgService{ @Resource RuleCheckMsgMapper ruleCheckMsgMapper; @Resource BillInfoMapper billInfoMapper; @Override public int insertRuleCheckMsg(RuleCheckMsg ruleCheckMsg) { ruleCheckMsg.setDataStart(99); ruleCheckMsgMapper.updateByPrimaryKey(ruleCheckMsg); ruleCheckMsg.setDataStart(0); int i = ruleCheckMsgMapper.insert(ruleCheckMsg); if(i>0){ log.debug("********规则检查成功!!!"); log.debug("********修改票据状态!!!"); int b = billInfoMapper.updateBillState(ruleCheckMsg.getOrderCode()); if(b>0){ log.debug("********修改票据状态成功!!!"); }else{ log.debug("********票据为不可分配状态!!!"); } } return i; } }