Просмотр исходного кода

[车流][修改][更新改为根据id更新]

release_toaliyun_real
luozukai 6 лет назад
Родитель
Сommit
9c25b10457
2 измененных файлов: 5 добавлений и 7 удалений
  1. +4
    -6
      mallinkCallback/src/main/java/com/iformall/controller/callback/WxCarCallBackController.java
  2. +1
    -1
      mallinkService/src/main/resources/mapper/WxCarPayRecordMapper.xml

+ 4
- 6
mallinkCallback/src/main/java/com/iformall/controller/callback/WxCarCallBackController.java Просмотреть файл

@@ -180,10 +180,9 @@ public class WxCarCallBackController extends BaseController {
query.setSynId(synId); query.setSynId(synId);
PageInfo<WxCarPayRecord> page = wxCarPayRecordService.findCarPayListByPage(query,1,1); PageInfo<WxCarPayRecord> page = wxCarPayRecordService.findCarPayListByPage(query,1,1);
if(page != null && CollectionUtils.isNotEmpty(page.getList())){ if(page != null && CollectionUtils.isNotEmpty(page.getList())){
wxCarPayRecordService.updateBySynId(record);
}else{
wxCarPayRecordService.saveOrUpdate(record);
record.setId(page.getList().get(0).getId());
} }
wxCarPayRecordService.saveOrUpdate(record);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
logger.error("WxCarPayRecord: 入库错误 ",e); logger.error("WxCarPayRecord: 入库错误 ",e);
@@ -290,10 +289,9 @@ public class WxCarCallBackController extends BaseController {
query.setSynId(synId); query.setSynId(synId);
PageInfo<WxCarPayRecord> page = wxCarPayRecordService.findCarPayListByPage(query,1,1); PageInfo<WxCarPayRecord> page = wxCarPayRecordService.findCarPayListByPage(query,1,1);
if(page != null && CollectionUtils.isNotEmpty(page.getList())){ if(page != null && CollectionUtils.isNotEmpty(page.getList())){
wxCarPayRecordService.updateBySynId(record);
}else{
wxCarPayRecordService.saveOrUpdate(record);
record.setId(page.getList().get(0).getId());
} }
wxCarPayRecordService.saveOrUpdate(record);
} catch (Exception e) { } catch (Exception e) {
logger.error("WxCarPayRecord: 出场更新错误 " +e.getMessage()+", " +paramMap.toString()); logger.error("WxCarPayRecord: 出场更新错误 " +e.getMessage()+", " +paramMap.toString());
return true; return true;


+ 1
- 1
mallinkService/src/main/resources/mapper/WxCarPayRecordMapper.xml Просмотреть файл

@@ -64,7 +64,7 @@
</if> </if>


<if test=" null != sortColumns">order by ${sortColumns}</if> <if test=" null != sortColumns">order by ${sortColumns}</if>
<if test=" null == sortColumns">order by create_date desc</if>
<if test=" null == sortColumns">order by create_date</if>
</sql> </sql>


<select id="findCarPayListByPage" parameterType="com.iformall.domain.po.WxCarPayRecord" resultMap="BaseResultMap"> <select id="findCarPayListByPage" parameterType="com.iformall.domain.po.WxCarPayRecord" resultMap="BaseResultMap">


Загрузка…
Отмена
Сохранить