Commit 7cef4c6e authored by 胡建龙's avatar 胡建龙

[fix]修改近期详情查询接口存表逻辑

parent 46f96d11
......@@ -10,5 +10,5 @@ import com.hand.hap.mybatis.common.Mapper;
* Time: 9:08
*/
public interface HlsEbankCcbTransactionMapper extends Mapper<HlsEbankCcbTransaction> {
Integer queryByCmbOrderId(String CmbOrderId);
Integer queryByCmbOrderId(HlsEbankCcbTransaction hlsEbankCcbTransaction);
}
......@@ -4,6 +4,6 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chinapay.mapper.HlsEbankCcbTransactionMapper">
<select id="queryByCmbOrderId" resultType="java.lang.Integer">
select count(*) from hls_ebank_ccb_transaction hect where hect.cmb_order_id = #{CmbOrderId} limit 1
select count(*) from hls_ebank_ccb_transaction hect where hect.cmb_order_id = #{cmbOrderId} and hect.tran_type = #{tranType}
</select>
</mapper>
\ No newline at end of file
......@@ -245,13 +245,13 @@ public class PingAnServiceImpl implements PingAnService {
for (int i = 0; i < arr.size(); i++) {
HlsEbankCcbTransaction ccbTransaction = new HlsEbankCcbTransaction();
JSONObject data = arr.getJSONObject(i);
int exist = hlsEbankCcbTransactionMapper.queryByCmbOrderId(data.getString("JournalNo"));
ccbTransaction.setCmbOrderId(data.getString("JournalNo"));
ccbTransaction.setTranType(data.getString("DCFlag"));
int exist = hlsEbankCcbTransactionMapper.queryByCmbOrderId(ccbTransaction);
if (exist == 0){
ccbTransaction.setMerId(ApiUtils.AcctNo);
ccbTransaction.setSttVchCardNo(data.getString("SubAccount"));
ccbTransaction.setSttAcDate(data.getString("AccountDate"));
ccbTransaction.setCmbOrderId(data.getString("JournalNo"));
ccbTransaction.setTranType(data.getString("DCFlag"));
ccbTransaction.setAmount(data.getDouble("TranAmount"));
ccbTransaction.setSttVchRcvAcNo(data.getString("OppAccountNo"));
ccbTransaction.setSttVchRcvAcName(data.getString("OppAccountName"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment