winter 2 лет назад
Родитель
Сommit
13fa246c59
3 измененных файлов: 19 добавлений и 20 удалений
  1. +13
    -20
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxShopController.java
  2. +2
    -0
      mallinkBApi/src/main/java/com/iformall/controller/WxRaffleActivityController.java
  3. +4
    -0
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

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

@@ -33,12 +33,20 @@ public class WxShopController extends BaseController {
@Autowired @Autowired
private WxShopService wxShopService; private WxShopService wxShopService;


private void setDataRule(WxShop wxShop) {
WxUserDataRule dataRule = this.getCurrentDataFloors();
if (null != dataRule) {
wxShop.setFloorForRule(dataRule.getFloorIds());
wxShop.setBusinessForRule(dataRule.getBussinessIds());
}
}
@ApiOperation("分页列表接口") @ApiOperation("分页列表接口")
@GetMapping("list") @GetMapping("list")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "店铺管理-列表")
public ResultData list(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) { public ResultData list(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxShopController::list"); logger.debug("[" + getIpAddr() + "] WxShopController::list");
if (null == wxShop){ if (null == wxShop){
@@ -46,7 +54,7 @@ public class WxShopController extends BaseController {
} }
wxShop.updateTenantInfo(getTenantInfo()); wxShop.updateTenantInfo(getTenantInfo());
wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC);
setDataRule(wxShop);
final PageInfo<Map<String, Object>> page = wxShopService.listMapAsPage(wxShop, pageNum, pageSize); final PageInfo<Map<String, Object>> page = wxShopService.listMapAsPage(wxShop, pageNum, pageSize);
return new ResultData(page); return new ResultData(page);
} }
@@ -94,18 +102,14 @@ public class WxShopController extends BaseController {
@ApiOperation("获取商铺数据") @ApiOperation("获取商铺数据")
@GetMapping("getShopListByShopNumber") @GetMapping("getShopListByShopNumber")
@ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true) @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true)
@SystemControllerLog(description = "店铺管理-获取商铺数据")
public ResultData getShoplist(String shopNumber) { public ResultData getShoplist(String shopNumber) {
logger.debug("[" + getIpAddr() + "] WxShopController::getbshoplist");
return wxShopService.getShopList(getTenantInfo(), shopNumber); return wxShopService.getShopList(getTenantInfo(), shopNumber);
} }


@ApiOperation("获取商户商铺数据") @ApiOperation("获取商户商铺数据")
@GetMapping("getMerchantShopByShopId") @GetMapping("getMerchantShopByShopId")
@ApiImplicitParam(name = "shopId", value = "shopId", dataType = "String", paramType = "query", required = true) @ApiImplicitParam(name = "shopId", value = "shopId", dataType = "String", paramType = "query", required = true)
@SystemControllerLog(description = "店铺管理-获取商户商铺数据")
public ResultData getMerchantShopByShopId(String shopId) { public ResultData getMerchantShopByShopId(String shopId) {
logger.debug("[" + getIpAddr() + "] WxShopController::getMerchantShopByShopId");
return wxShopService.getMerchantShopByShopId(getTenantInfo(), shopId); return wxShopService.getMerchantShopByShopId(getTenantInfo(), shopId);
} }


@@ -115,7 +119,6 @@ public class WxShopController extends BaseController {
@ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true),
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query"), @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query"),
@ApiImplicitParam(name = "type", value = "type", dataType = "Integer", paramType = "query", required = true)}) @ApiImplicitParam(name = "type", value = "type", dataType = "Integer", paramType = "query", required = true)})
@SystemControllerLog(description = "店铺管理-查询商铺号是否存在")
public ResultData hasShopNumber(String shopNumber, Long id, Integer type) { public ResultData hasShopNumber(String shopNumber, Long id, Integer type) {
logger.debug("[" + getIpAddr() + "] WxShopController::hasShopNumber"); logger.debug("[" + getIpAddr() + "] WxShopController::hasShopNumber");
WxShop wxShop = new WxShop(); WxShop wxShop = new WxShop();
@@ -133,7 +136,6 @@ public class WxShopController extends BaseController {
@ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true),
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query"), @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query"),
@ApiImplicitParam(name = "type", value = "type", dataType = "Integer", paramType = "query", required = true)}) @ApiImplicitParam(name = "type", value = "type", dataType = "Integer", paramType = "query", required = true)})
@SystemControllerLog(description = "店铺管理-查询商铺号是否存在")
public ResultData hasShopSid(String shopSid, Long id) { public ResultData hasShopSid(String shopSid, Long id) {
logger.debug("[" + getIpAddr() + "] WxShopController::hasShopSid"); logger.debug("[" + getIpAddr() + "] WxShopController::hasShopSid");
WxShop wxShop = new WxShop(); WxShop wxShop = new WxShop();
@@ -150,9 +152,7 @@ public class WxShopController extends BaseController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})
@SystemControllerLog(description = "店铺管理-合同访问")
public ResultData listShopFromContract(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) { public ResultData listShopFromContract(@ModelAttribute WxShop wxShop, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxShopController::listShopFromContract");
if (null == wxShop){ if (null == wxShop){
wxShop = new WxShop(); wxShop = new WxShop();
} }
@@ -172,6 +172,7 @@ public class WxShopController extends BaseController {
} }
wxShop.updateTenantInfo(getTenantInfo()); wxShop.updateTenantInfo(getTenantInfo());
wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC);
setDataRule(wxShop);
wxShopService.exportShop(wxShop, request, response); wxShopService.exportShop(wxShop, request, response);
} }


@@ -185,11 +186,7 @@ public class WxShopController extends BaseController {
} }
wxShop.updateTenantInfo(getTenantInfo()); wxShop.updateTenantInfo(getTenantInfo());
wxShop.setSortColumns(BaseEntity.SortField.SCreateDate_DESC,BaseEntity.SortField.SId_DESC); wxShop.setSortColumns(BaseEntity.SortField.SCreateDate_DESC,BaseEntity.SortField.SId_DESC);
WxUserDataRule dataRule = this.getCurrentDataFloors();
if (null != dataRule) {
wxShop.setFloorForRule(dataRule.getFloorIds());
wxShop.setBusinessForRule(dataRule.getBussinessIds());
}
setDataRule(wxShop);
wxShopService.exportNotRentShop(wxShop, request, response); wxShopService.exportNotRentShop(wxShop, request, response);
} }


@@ -206,11 +203,7 @@ public class WxShopController extends BaseController {
} }
wxShop.updateTenantInfo(getTenantInfo()); wxShop.updateTenantInfo(getTenantInfo());
wxShop.setSortColumns(BaseEntity.SortField.SCreateDate_DESC,BaseEntity.SortField.SId_DESC); wxShop.setSortColumns(BaseEntity.SortField.SCreateDate_DESC,BaseEntity.SortField.SId_DESC);
WxUserDataRule dataRule = this.getCurrentDataFloors();
if (null != dataRule) {
wxShop.setFloorForRule(dataRule.getFloorIds());
wxShop.setBusinessForRule(dataRule.getBussinessIds());
}
setDataRule(wxShop);
final PageInfo<Map<String, Object>> page = wxShopService.notRentListMapAsPage(wxShop, pageNum, pageSize); final PageInfo<Map<String, Object>> page = wxShopService.notRentListMapAsPage(wxShop, pageNum, pageSize);
return new ResultData(page); return new ResultData(page);
} }


+ 2
- 0
mallinkBApi/src/main/java/com/iformall/controller/WxRaffleActivityController.java Просмотреть файл

@@ -112,6 +112,7 @@ public class WxRaffleActivityController extends BaseController {
TenantEntity tenantInfo = getTenantInfo(); TenantEntity tenantInfo = getTenantInfo();
wxCashBackActivityRecord.updateTenantInfo(tenantInfo); wxCashBackActivityRecord.updateTenantInfo(tenantInfo);
wxCashBackActivityRecord.setSortColumns(SortField.CreateDate_DESC); wxCashBackActivityRecord.setSortColumns(SortField.CreateDate_DESC);
wxCashBackActivityRecord.setMerchantId(getLoginBUser().getMerchantId());
final PageInfo<WxRaffleActivityRecord> page = wxCashBackActivityService.listActivityRecordAsPage(wxCashBackActivityRecord, pageNum, pageSize); final PageInfo<WxRaffleActivityRecord> page = wxCashBackActivityService.listActivityRecordAsPage(wxCashBackActivityRecord, pageNum, pageSize);
return new ResultData(page); return new ResultData(page);
} }
@@ -159,6 +160,7 @@ public class WxRaffleActivityController extends BaseController {
WxRaffleActivityRecord r = new WxRaffleActivityRecord(); WxRaffleActivityRecord r = new WxRaffleActivityRecord();
r.setActivityId(a.getId()); r.setActivityId(a.getId());
r.updateTenantInfo(a); r.updateTenantInfo(a);
wxCashBackActivityRecord.setMerchantId(getLoginBUser().getMerchantId());
int allRecordCount = wxCashBackActivityService.getRecordCount(r); int allRecordCount = wxCashBackActivityService.getRecordCount(r);
r.setAuditStatus(EnumCashBackActivityRecordStatus.AUDI_SUCCESS.getCode()); r.setAuditStatus(EnumCashBackActivityRecordStatus.AUDI_SUCCESS.getCode());


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

@@ -425,6 +425,10 @@
<if test="null != businessId"> <if test="null != businessId">
and s.business_id = #{businessId} and s.business_id = #{businessId}
</if> </if>
<if test=" null != floorForRule and '' != floorForRule ">
and s.`floor` in (${floorForRule})
</if>
<if test=" null != ids "> <if test=" null != ids ">
and s.id in and s.id in


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