| @@ -391,7 +391,6 @@ public class WxCarCallBackController extends BaseController { | |||||
| } | } | ||||
| String paidServiceFee = paramMap.get(ETCPUtil.ETCP_PAID_SERVICE_FEE); | String paidServiceFee = paramMap.get(ETCPUtil.ETCP_PAID_SERVICE_FEE); | ||||
| String feetime = paramMap.get("time"); | |||||
| String synId = paramMap.get(ETCPUtil.ETCP_SYN_ID); | String synId = paramMap.get(ETCPUtil.ETCP_SYN_ID); | ||||
| String exitTime = paramMap.get(ETCPUtil.ETCP_EXIT_TIME); | String exitTime = paramMap.get(ETCPUtil.ETCP_EXIT_TIME); | ||||
| String stayedTime = paramMap.get(ETCPUtil.ETCP_STAYED_TIME); | String stayedTime = paramMap.get(ETCPUtil.ETCP_STAYED_TIME); | ||||
| @@ -434,9 +433,9 @@ public class WxCarCallBackController extends BaseController { | |||||
| WxCarPayRecord query = new WxCarPayRecord(); | WxCarPayRecord query = new WxCarPayRecord(); | ||||
| query.setSynId(orderId); | query.setSynId(orderId); | ||||
| PageInfo<WxCarPayRecord> page = wxCarPayRecordService.findCarPayListByPage(query,1,10); | |||||
| if(page != null && CollectionUtils.isNotEmpty(page.getList())){ | |||||
| if(page.getList().size()>=2) { | |||||
| Integer findCarPayCount = wxCarPayRecordService.findCarPayCount(query); | |||||
| if(findCarPayCount != null && findCarPayCount.intValue() > 0){ | |||||
| if(findCarPayCount.intValue() >= 2){ | |||||
| wxCarPayRecordService.saveOrUpdate(record); | wxCarPayRecordService.saveOrUpdate(record); | ||||
| }else{ | }else{ | ||||
| wxCarPayRecordService.updateBySynId(record); | wxCarPayRecordService.updateBySynId(record); | ||||
| @@ -10,6 +10,8 @@ import java.util.List; | |||||
| public interface WxCarPayRecordMapper extends CommonMapper<WxCarPayRecord, Long> { | public interface WxCarPayRecordMapper extends CommonMapper<WxCarPayRecord, Long> { | ||||
| List<WxCarPayRecord> findCarPayListByPage(WxCarPayRecord record); | List<WxCarPayRecord> findCarPayListByPage(WxCarPayRecord record); | ||||
| Integer findCarPayCount(WxCarPayRecord record); | |||||
| List<WxCarPayRecord> findCarPayList(WxCarPayRecord record); | List<WxCarPayRecord> findCarPayList(WxCarPayRecord record); | ||||
| void updateBySynId(WxCarPayRecord record); | void updateBySynId(WxCarPayRecord record); | ||||
| @@ -17,4 +17,6 @@ public interface WxCarPayRecordService { | |||||
| void saveOrUpdate(WxCarPayRecord record); | void saveOrUpdate(WxCarPayRecord record); | ||||
| void updateBySynId(WxCarPayRecord record); | void updateBySynId(WxCarPayRecord record); | ||||
| Integer findCarPayCount(WxCarPayRecord record); | |||||
| } | } | ||||
| @@ -34,9 +34,13 @@ public class WxCarPayRecordServiceImpl implements WxCarPayRecordService{ | |||||
| } | } | ||||
| } | } | ||||
| @Override | @Override | ||||
| public void updateBySynId(WxCarPayRecord record) { | public void updateBySynId(WxCarPayRecord record) { | ||||
| wxCarPayRecordMapper.updateBySynId(record); | wxCarPayRecordMapper.updateBySynId(record); | ||||
| } | } | ||||
| @Override | |||||
| public Integer findCarPayCount(WxCarPayRecord record) { | |||||
| return wxCarPayRecordMapper.findCarPayCount(record); | |||||
| } | |||||
| } | } | ||||
| @@ -102,4 +102,12 @@ | |||||
| where syn_id = #{synId} | where syn_id = #{synId} | ||||
| </update> | </update> | ||||
| <select id="findCarPayCount" parameterType="com.iformall.domain.po.WxCarPayRecord" resultType="Integer"> | |||||
| select | |||||
| count(*) | |||||
| from wx_car_pay_record | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||