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

[数据权限][修改][商户导出及解单导出]

release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
16feb1f35b
5 измененных файлов: 27 добавлений и 15 удалений
  1. +1
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java
  2. +1
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/datatower/WxMerchantTradeDailyController.java
  3. +0
    -0
      mallinkAdmin/src/main/resources/db/migration/V201908301520__G_ALTER_MENU.sql
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  5. +24
    -14
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 1
- 0
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java Просмотреть файл

@@ -212,6 +212,7 @@ public class WxMerchantController extends BaseController {
return new ResultData(wxMerchant);
}

@UserDataRuleAnnotation("merchant_list")
@ApiOperation("商户数据导出")
@GetMapping("/exportData")
@SystemControllerLog(description = "商户-商户数据导出")


+ 1
- 0
mallinkAdmin/src/main/java/com/iformall/controller/datatower/WxMerchantTradeDailyController.java Просмотреть файл

@@ -94,6 +94,7 @@ public class WxMerchantTradeDailyController extends BaseController {
return wxMerchantTradeDailyService.queryTradeDaily(wxMerchantTradeDaily);
}

@UserDataRuleAnnotation("merchant_trade")
@GetMapping("exportData")
@SystemControllerLog(description = "商户解单数据-导出数据")
public void exportData(@ModelAttribute WxMerchantTradeDaily wxMerchantTradeDaily, HttpServletRequest request, HttpServletResponse response) {


mallinkAdmin/src/main/resources/db/migration/V201908301450_L_ALTER_MENU.sql → mallinkAdmin/src/main/resources/db/migration/V201908301520__G_ALTER_MENU.sql Просмотреть файл


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Просмотреть файл

@@ -622,7 +622,7 @@ public class WxMerchantServiceImpl implements WxMerchantService {
return wxMerchantMapper.selectOne(wxMerchant);
}

@Override
public void exportData(WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) {
List<WxMerchant> list = wxMerchantMapper.findList(wxMerchant);



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

@@ -124,12 +124,17 @@
not null and status in(1,2,3,4)
)
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<include refid="dataRule"/>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>

@@ -150,6 +155,23 @@
</select>
<sql id="dataRule">
<if test="(null != floorForRule and '' != floorForRule) or (null != businessForRule and '' != businessForRule)">
and m.id in(
select ms.merchant_id from (select merchant_id,shop_id from wx_merchant_shop where is_del=0) ms
inner join wx_merchant m on ms.merchant_id = m.id
inner join wx_shop s on s.id=ms.shop_id
where m.tenant_id=#{tenantId} and s.is_del=0
<if test=" null != businessForRule and '' != businessForRule ">
and m.business_id in (${businessForRule})
</if>
<if test=" null != floorForRule and '' != floorForRule ">
and s.`floor` in (${floorForRule})
</if>
)
</if>
</sql>
<sql id="dynamicWhereConditionsVo">
where m.is_del = 0
@@ -232,20 +254,7 @@
#{idItem}
</foreach>
</if>
<if test="(null != floorForRule and '' != floorForRule) or (null != businessForRule and '' != businessForRule)">
and m.id in(
select ms.merchant_id from (select merchant_id,shop_id from wx_merchant_shop where is_del=0) ms
inner join wx_merchant m on ms.merchant_id = m.id
inner join wx_shop s on s.id=ms.shop_id
where m.tenant_id=#{tenantId} and s.is_del=0
<if test=" null != businessForRule and '' != businessForRule ">
and m.business_id in (${businessForRule})
</if>
<if test=" null != floorForRule and '' != floorForRule ">
and s.`floor` in (${floorForRule})
</if>
)
</if>
<include refid="dataRule"/>
<if test=" null != sortColumns">order by ${sortColumns}</if>
</sql>
@@ -340,6 +349,7 @@
<if test=" null != id">
and m.`id` = #{id}
</if>
order by m.top_time desc
</select>


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