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

[停车][修复]:停车发券触发数量算法更改

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
c03995f217
2 измененных файлов: 10 добавлений и 2 удалений
  1. +4
    -0
      mallinkAdmin/src/main/resources/db/migration/V201905082030__ADD_COLUMN_PLATENUMBER.sql
  2. +6
    -2
      mallinkService/src/main/resources/mapper/WxCarCmdLogMapper.xml

+ 4
- 0
mallinkAdmin/src/main/resources/db/migration/V201905082030__ADD_COLUMN_PLATENUMBER.sql Просмотреть файл

@@ -0,0 +1,4 @@
ALTER TABLE `wx_car_cmd_log`
ADD COLUMN `plateNumber` VARCHAR(32) GENERATED ALWAYS AS (json_unquote(json_extract(`cmd_json`,'$.plateNumber'))) VIRTUAL AFTER `cmd_json`;
ALTER TABLE `wx_car_cmd_log`
ADD INDEX `idx_plateNumber` (`plateNumber` ASC, `tenant_id` ASC);

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

@@ -100,8 +100,12 @@
</select>

<select id="queryForSceneRepotyHistoryCar" resultType="com.iformall.domain.vo.MarkingSceneDataVo" parameterType="hashmap">
select DATE_FORMAT(create_date,'%Y-%m-%d') xTime, count(c.id) triggerCount
from wx_car_cmd_log c where tenant_id = #{tenantId} and cmd_type=#{cmdType}
select DATE_FORMAT(ccl.create_date,'%Y-%m-%d') xTime, count(ccl.id) triggerCount
from wx_c_user_car cuc, wx_car_cmd_log ccl
where cuc.tenant_id = #{tenantId}
and ccl.tenant_id = #{tenantId}
and ccl.plateNumber = cuc.car_number
and cmd_type=#{cmdType}
<if test=" null != startTime and null != endTime">
and create_date BETWEEN #{startTime} and #{endTime}
</if>


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