develop # Conflicts: # mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java # mallinkCApi/src/main/java/com/iformall/controller/WxUserGrantController.java # mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java # mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java # mallinkService/src/main/resources/mapper/WxCouponMapper.xmlrelease_toaliyun_real
| @@ -217,4 +217,14 @@ public class WxMerchantController extends BaseController { | |||||
| return wxMerchantService.useAccount(wxProfitSharingReceiver); | return wxMerchantService.useAccount(wxProfitSharingReceiver); | ||||
| } | } | ||||
| @ApiOperation("查看是否存在商户名称相同记录") | |||||
| @GetMapping("/hasMerchant") | |||||
| @SystemControllerLog(description = "商户-查看是否存在商户名称相同记录") | |||||
| public ResultData hasMerchant(@ModelAttribute WxMerchant wxMerchant) { | |||||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::hasMerchant"); | |||||
| wxMerchant.setTenantId(getTenantId()); | |||||
| boolean has = wxMerchantService.hasMerchant(wxMerchant); | |||||
| return new ResultData(has); | |||||
| } | |||||
| } | } | ||||
| @@ -42,7 +42,7 @@ public class WxShopController extends BaseController { | |||||
| wxShop = new WxShop(); | wxShop = new WxShop(); | ||||
| } | } | ||||
| wxShop.setTenantId(getTenantId()); | wxShop.setTenantId(getTenantId()); | ||||
| wxShop.setSortColumns(WxShop.Field.Id_DESC); | |||||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||||
| 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); | ||||
| @@ -127,7 +127,7 @@ public class WxShopController extends BaseController { | |||||
| wxShop = new WxShop(); | wxShop = new WxShop(); | ||||
| } | } | ||||
| wxShop.setTenantId(getTenantId()); | wxShop.setTenantId(getTenantId()); | ||||
| wxShop.setSortColumns(WxShop.Field.Id_DESC); | |||||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||||
| final PageInfo<Map<String, Object>> page = wxShopService.listShopFromContract(wxShop, pageNum, pageSize); | final PageInfo<Map<String, Object>> page = wxShopService.listShopFromContract(wxShop, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -141,7 +141,7 @@ public class WxShopController extends BaseController { | |||||
| wxShop = new WxShop(); | wxShop = new WxShop(); | ||||
| } | } | ||||
| wxShop.setTenantId(getTenantId()); | wxShop.setTenantId(getTenantId()); | ||||
| wxShop.setSortColumns(WxShop.Field.Id_DESC); | |||||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||||
| wxShopService.exportShop(wxShop, request, response); | wxShopService.exportShop(wxShop, request, response); | ||||
| } | } | ||||
| @@ -154,7 +154,7 @@ public class WxShopController extends BaseController { | |||||
| wxShop = new WxShop(); | wxShop = new WxShop(); | ||||
| } | } | ||||
| wxShop.setTenantId(getTenantId()); | wxShop.setTenantId(getTenantId()); | ||||
| wxShop.setSortColumns(WxShop.Field.Id_DESC); | |||||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||||
| wxShopService.exportNotRentShop(wxShop, request, response); | wxShopService.exportNotRentShop(wxShop, request, response); | ||||
| } | } | ||||
| @@ -170,7 +170,7 @@ public class WxShopController extends BaseController { | |||||
| wxShop = new WxShop(); | wxShop = new WxShop(); | ||||
| } | } | ||||
| wxShop.setTenantId(getTenantId()); | wxShop.setTenantId(getTenantId()); | ||||
| wxShop.setSortColumns(WxShop.Field.Id_DESC); | |||||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||||
| 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); | ||||
| @@ -56,16 +56,6 @@ public class WxParkController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("根据id删除接口") | |||||
| @GetMapping("/del") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| @SystemControllerLog(description = "停车-停车场删除") | |||||
| public ResultData delete(Long id) { | |||||
| logger.debug("[" + getIpAddr() + "] WxParkController::delete"); | |||||
| wxParkService.deleteById(id); | |||||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||||
| } | |||||
| @ApiOperation("根据id查询接口") | @ApiOperation("根据id查询接口") | ||||
| @GetMapping("/findById") | @GetMapping("/findById") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | ||||
| @@ -5,17 +5,14 @@ import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.Result; | import com.iformall.common.Result; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.MallUserInfo; | |||||
| import com.iformall.domain.po.WxBillRent; | |||||
| import com.iformall.domain.po.WxPayAccountBill; | |||||
| import com.iformall.domain.po.WxRentContract; | |||||
| import com.iformall.domain.po.*; | |||||
| import com.iformall.enums.EnumFromType; | import com.iformall.enums.EnumFromType; | ||||
| import com.iformall.enums.EnumRentStartType; | import com.iformall.enums.EnumRentStartType; | ||||
| import com.iformall.mapper.WxRentContractMapper; | import com.iformall.mapper.WxRentContractMapper; | ||||
| import com.iformall.service.WxBillRentService; | import com.iformall.service.WxBillRentService; | ||||
| import com.iformall.service.WxMerchantService; | |||||
| import com.iformall.service.WxPayAccountBillService; | import com.iformall.service.WxPayAccountBillService; | ||||
| import com.iformall.service.WxRentContractService; | import com.iformall.service.WxRentContractService; | ||||
| import com.iformall.service.WxShopService; | |||||
| import com.iformall.utils.DateUtils; | import com.iformall.utils.DateUtils; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| @@ -47,7 +44,7 @@ public class WxRentContractController extends BaseController { | |||||
| @Autowired | @Autowired | ||||
| private WxPayAccountBillService payAccountBillService; | private WxPayAccountBillService payAccountBillService; | ||||
| @Autowired | @Autowired | ||||
| private WxShopService wxShopService; | |||||
| private WxMerchantService wxMerchantService; | |||||
| @Autowired | @Autowired | ||||
| private WxRentContractMapper wxRentContractMapper; | private WxRentContractMapper wxRentContractMapper; | ||||
| @@ -85,6 +82,13 @@ public class WxRentContractController extends BaseController { | |||||
| public ResultData add(@RequestBody WxRentContract wxRentContract) { | public ResultData add(@RequestBody WxRentContract wxRentContract) { | ||||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::add"); | logger.debug("[" + getIpAddr() + "] WxRentContractController::add"); | ||||
| WxMerchant wxMerchant = new WxMerchant(); | |||||
| wxMerchant.setName(wxRentContract.getMerchantName()); | |||||
| wxMerchant.setId(wxRentContract.getMerchantId()); | |||||
| if (wxMerchantService.hasMerchant(wxMerchant)) { | |||||
| return new ResultData(ErrorCode.MERCHANT_NAME_IS_FOUND); | |||||
| } | |||||
| MallUserInfo user = getUser(); | MallUserInfo user = getUser(); | ||||
| wxRentContract.setTenantId(user.getTenantId()); | wxRentContract.setTenantId(user.getTenantId()); | ||||
| wxRentContract.setAdjustPeriodHandle(); | wxRentContract.setAdjustPeriodHandle(); | ||||
| @@ -7,6 +7,8 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.KwMerchantMeter; | import com.iformall.domain.po.KwMerchantMeter; | ||||
| import com.iformall.enums.EnumMerchantMeterStatus; | |||||
| import com.iformall.enums.EnumMerchantStatus; | |||||
| import com.iformall.service.kw.KwMerchantMeterService; | import com.iformall.service.kw.KwMerchantMeterService; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| @@ -17,6 +19,8 @@ import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.List; | |||||
| @RestController | @RestController | ||||
| @RequestMapping("kwMerchantMeter") | @RequestMapping("kwMerchantMeter") | ||||
| @@ -36,8 +40,7 @@ public class KwMerchantMeterController extends BaseController { | |||||
| @SystemControllerLog(description = "电表设备-设备列表") | @SystemControllerLog(description = "电表设备-设备列表") | ||||
| public Result list(@ModelAttribute KwMerchantMeter kwMerchantMeter, Integer pageNum, Integer pageSize) { | public Result list(@ModelAttribute KwMerchantMeter kwMerchantMeter, Integer pageNum, Integer pageSize) { | ||||
| if (kwMerchantMeter == null) kwMerchantMeter = new KwMerchantMeter(); | if (kwMerchantMeter == null) kwMerchantMeter = new KwMerchantMeter(); | ||||
| return new ResultData(); | |||||
| return new ResultData(kwMerchantMeterService.listAsPage(kwMerchantMeter, pageNum, pageSize)); | |||||
| } | } | ||||
| @ApiOperation("绑定设备") | @ApiOperation("绑定设备") | ||||
| @@ -47,6 +50,20 @@ public class KwMerchantMeterController extends BaseController { | |||||
| if (kwMerchantMeter == null) | if (kwMerchantMeter == null) | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | ||||
| if (kwMerchantMeter.getMerchantId() == null) | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||||
| if (kwMerchantMeter.getMeterId() == null) | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||||
| KwMerchantMeter record = new KwMerchantMeter(); | |||||
| record.setMeterId(kwMerchantMeter.getMeterId()); | |||||
| record.setStatus(EnumMerchantMeterStatus.VALID.getCode()); | |||||
| if (kwMerchantMeterService.selectCount(record) > 0) | |||||
| return new ResultData(ErrorCode.DEVICE_HAS_BEEN_BOUND); | |||||
| kwMerchantMeter.setTenantId(getTenantId()); | |||||
| kwMerchantMeter.setStatus(EnumMerchantMeterStatus.VALID.getCode()); | |||||
| kwMerchantMeterService.saveOrUpdate(kwMerchantMeter); | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -58,6 +75,17 @@ public class KwMerchantMeterController extends BaseController { | |||||
| if (kwMerchantMeter == null) | if (kwMerchantMeter == null) | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | ||||
| if (kwMerchantMeter.getMerchantId() == null | |||||
| && kwMerchantMeter.getId() == null | |||||
| && kwMerchantMeter.getMeterId() == null) | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||||
| if (kwMerchantMeter.getId() != null) { | |||||
| kwMerchantMeter.setStatus(EnumMerchantMeterStatus.INVALID.getCode()); | |||||
| kwMerchantMeterService.saveOrUpdate(kwMerchantMeter); | |||||
| } else { | |||||
| kwMerchantMeterService.unbindBatch(kwMerchantMeter); | |||||
| } | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -42,7 +42,7 @@ public class WxActivityController extends BaseController { | |||||
| wxActivity.setStatus(null); | wxActivity.setStatus(null); | ||||
| } | } | ||||
| wxActivity.setTenantId(getTenantId()); | wxActivity.setTenantId(getTenantId()); | ||||
| wxActivity.setSortColumns(WxActivity.Field.Id_DESC); | |||||
| wxActivity.setSortColumns(WxActivity.Field.CreateTime_DESC,WxActivity.Field.Id_DESC); | |||||
| final PageInfo<WxActivity> page = wxActivityService.listAsPage(wxActivity, pageNum, pageSize); | final PageInfo<WxActivity> page = wxActivityService.listAsPage(wxActivity, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -44,7 +44,7 @@ public class WxActivityJoinController extends BaseController { | |||||
| wxActivityJoin = new WxActivityJoin(); | wxActivityJoin = new WxActivityJoin(); | ||||
| } | } | ||||
| wxActivityJoin.setTenantId(getTenantId()); | wxActivityJoin.setTenantId(getTenantId()); | ||||
| wxActivityJoin.setSortColumns(WxActivityJoin.Field.Id_DESC); | |||||
| wxActivityJoin.setSortColumns(WxActivityJoin.Field.CreateTime_DESC,WxActivityJoin.Field.Id_DESC); | |||||
| final PageInfo<WxActivityJoin> page = wxActivityJoinService.listAsPage(wxActivityJoin, pageNum, pageSize); | final PageInfo<WxActivityJoin> page = wxActivityJoinService.listAsPage(wxActivityJoin, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -60,7 +60,7 @@ public class WxCampaignController extends BaseController { | |||||
| wxCampaign.setStatus(null); | wxCampaign.setStatus(null); | ||||
| } | } | ||||
| wxCampaign.setTenantId(getTenantId()); | wxCampaign.setTenantId(getTenantId()); | ||||
| wxCampaign.setSortColumns(WxCampaign.Field.Id_DESC); | |||||
| wxCampaign.setSortColumns(WxCampaign.Field.CreateTime_DESC,WxCampaign.Field.Id_DESC); | |||||
| final PageInfo<WxCampaign> page = wxCampaignService.listAsPage(wxCampaign, pageNum, pageSize); | final PageInfo<WxCampaign> page = wxCampaignService.listAsPage(wxCampaign, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -175,4 +175,55 @@ public class WxCardPayController extends BaseController { | |||||
| int remainShareAmount = wxCardSpendService.finishCard(tenantId, wxCardInfo.getId()); | int remainShareAmount = wxCardSpendService.finishCard(tenantId, wxCardInfo.getId()); | ||||
| return new ResultData(remainShareAmount); | return new ResultData(remainShareAmount); | ||||
| } | } | ||||
| @ApiOperation("卡订单-导出数据") | |||||
| @GetMapping("/exportCardOrder") | |||||
| @SystemControllerLog(description = "卡订单-导出数据") | |||||
| public void exportCardOrder(@ModelAttribute WxCardVo wxCardVo, HttpServletRequest request, HttpServletResponse response) { | |||||
| logger.info("[" + getIpAddr() + "] cardPay/exportCardOrder"); | |||||
| if (wxCardVo == null) { | |||||
| wxCardVo = new WxCardVo(); | |||||
| } else { | |||||
| if (StringUtils.isBlank(wxCardVo.getOuPhone())) { | |||||
| wxCardVo.setOuPhone(null); | |||||
| } | |||||
| } | |||||
| wxCardVo.setTenantId(getTenantId()); | |||||
| if (StringUtils.isNotBlank(wxCardVo.getStatusStr())) { | |||||
| String[] statusAttr = wxCardVo.getStatusStr().split(","); | |||||
| List<Integer> tmpList = new ArrayList<Integer>(); | |||||
| for (String status : statusAttr) { | |||||
| tmpList.add(Integer.valueOf(status)); | |||||
| } | |||||
| if (!tmpList.isEmpty()) { | |||||
| wxCardVo.setStatusS(tmpList); | |||||
| } | |||||
| } | |||||
| wxCardInfoService.exportData(wxCardVo, request, response); | |||||
| } | |||||
| @ApiOperation("卡消费订单-导出数据") | |||||
| @GetMapping("exportCardSpend") | |||||
| @SystemControllerLog(description = "卡消费订单-导出数据") | |||||
| public void exportCardSpend(@ModelAttribute WxCardSpendVo wxCardSpendVo, HttpServletRequest request, HttpServletResponse response) { | |||||
| String ipStr = getIpAddr(); | |||||
| logger.info("cardPay/exportCardSpend: " + ipStr); | |||||
| if (wxCardSpendVo == null) { | |||||
| wxCardSpendVo = new WxCardSpendVo(); | |||||
| } | |||||
| wxCardSpendVo.setTenantId(getTenantId()); | |||||
| if (StringUtils.isNotBlank(wxCardSpendVo.getPayStatusStr())) { | |||||
| String[] statusAttr = wxCardSpendVo.getPayStatusStr().split(","); | |||||
| List<Integer> tmpList = new ArrayList<Integer>(); | |||||
| for (String status : statusAttr) { | |||||
| tmpList.add(Integer.valueOf(status)); | |||||
| } | |||||
| if (!tmpList.isEmpty()) { | |||||
| wxCardSpendVo.setPayStatusS(tmpList); | |||||
| } | |||||
| } | |||||
| wxCardSpendService.exportData(wxCardSpendVo, request, response); | |||||
| } | |||||
| } | } | ||||
| @@ -58,16 +58,6 @@ public class WxCouponCarController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("根据id删除接口") | |||||
| @GetMapping("/del") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| @SystemControllerLog(description = "停车券-删除") | |||||
| public ResultData delete(Long id) { | |||||
| logger.debug("[" + getIpAddr() + "] WxCouponCarController::delete"); | |||||
| wxCouponCarService.deleteById(id); | |||||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||||
| } | |||||
| @ApiOperation("根据id查询接口") | @ApiOperation("根据id查询接口") | ||||
| @GetMapping("/findById") | @GetMapping("/findById") | ||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | ||||
| @@ -116,28 +116,8 @@ public class WxCouponChannelController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxCouponChannelController::addbatch"); | logger.debug("[" + getIpAddr() + "] WxCouponChannelController::addbatch"); | ||||
| String[] ids = wxCouponChannelDto.getCouponIds().split(","); | String[] ids = wxCouponChannelDto.getCouponIds().split(","); | ||||
| String[] channelId = wxCouponChannelDto.getChannelId().split(","); | String[] channelId = wxCouponChannelDto.getChannelId().split(","); | ||||
| if (org.springframework.util.CollectionUtils.isEmpty(wxCouponChannelDto.getFlowParams())) { | |||||
| ResultData resultData = wxCouponChannelService.addBatch(ids, channelId, getTenantId(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime()); | |||||
| return resultData; | |||||
| }else{ | |||||
| //走审批 | |||||
| wxCouponChannelDto.getFlowParams().put("ids",wxCouponChannelDto.getCouponIds()); | |||||
| wxCouponChannelDto.getFlowParams().put("channelId",wxCouponChannelDto.getChannelId()); | |||||
| wxCouponChannelDto.getFlowParams().put("tenantId",getTenantId()); | |||||
| wxCouponChannelDto.getFlowParams().put("beginTime",wxCouponChannelDto.getBeginTime()); | |||||
| wxCouponChannelDto.getFlowParams().put("endTime",wxCouponChannelDto.getEndTime()); | |||||
| wxFlowService.start(wxCouponChannelDto.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | |||||
| //修改coupon applyStatus状态为审核中 | |||||
| for (String id:ids) { | |||||
| WxCoupon wxCoupon = new WxCoupon(); | |||||
| wxCoupon.setId(Long.parseLong(id)); | |||||
| wxCoupon.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | |||||
| wxCouponService.update(wxCoupon); | |||||
| } | |||||
| } | |||||
| return new ResultData(); | |||||
| ResultData resultData = wxCouponChannelService.addBatch(ids, channelId, getTenantId(), wxCouponChannelDto.getBeginTime(), wxCouponChannelDto.getEndTime()); | |||||
| return resultData; | |||||
| } | } | ||||
| @ApiOperation("根据id查询接口") | @ApiOperation("根据id查询接口") | ||||
| @@ -79,7 +79,20 @@ public class WxCouponController extends BaseController { | |||||
| @SystemControllerLog(description = "券投放-新增") | @SystemControllerLog(description = "券投放-新增") | ||||
| public ResultData add(@RequestBody WxCoupon wxCoupon) { | public ResultData add(@RequestBody WxCoupon wxCoupon) { | ||||
| logger.debug("[" + getIpAddr() + "] WxCouponController::add"); | logger.debug("[" + getIpAddr() + "] WxCouponController::add"); | ||||
| return wxCouponService.saveOrUpdate(wxCoupon); | |||||
| ResultData resultData = wxCouponService.saveOrUpdate(wxCoupon); | |||||
| if(resultData.code != 200){ | |||||
| return resultData; | |||||
| } | |||||
| //启动投放审批 | |||||
| if(wxCoupon.getFlowParams() !=null && wxCoupon.getFlowParams().size()>0) { | |||||
| wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); | |||||
| wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | |||||
| //修改coupon applyStatus状态为审核中 | |||||
| wxCoupon.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | |||||
| } | |||||
| return resultData; | |||||
| } | } | ||||
| @ApiOperation("根据id更新接口") | @ApiOperation("根据id更新接口") | ||||
| @@ -101,18 +114,25 @@ public class WxCouponController extends BaseController { | |||||
| } | } | ||||
| wxCoupon.setTenantId(getTenantId()); | wxCoupon.setTenantId(getTenantId()); | ||||
| //作废走审批 | |||||
| if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())) { | |||||
| if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) { | |||||
| wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | |||||
| return new ResultData(); | |||||
| //启动审批流 | |||||
| if (wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() > 0) { | |||||
| logger.info("------coupon.update().businessType:"+wxCoupon.getFlowParams().get("businessType")); | |||||
| wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); | |||||
| wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | |||||
| //作废审批 | |||||
| if (EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode().equals(wxCoupon.getStatus())) { | |||||
| wxCoupon.setCancleApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | |||||
| return new ResultData(wxCoupon); | |||||
| }else{ | |||||
| //投放审批 | |||||
| wxCoupon.setPutApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | |||||
| } | } | ||||
| } | } | ||||
| return wxCouponService.saveOrUpdate(wxCoupon); | return wxCouponService.saveOrUpdate(wxCoupon); | ||||
| } | } | ||||
| @ApiOperation("根据id更新库存及有效期接口") | @ApiOperation("根据id更新库存及有效期接口") | ||||
| @PostMapping("updateStokeAndValidDate") | |||||
| @PostMapping("updateStokeAndValidDate") | |||||
| @SystemControllerLog(description = "券投放-库存/有效期更新") | @SystemControllerLog(description = "券投放-库存/有效期更新") | ||||
| public ResultData updateStokeAndValidDate(@RequestBody WxCoupon wxCoupon) { | public ResultData updateStokeAndValidDate(@RequestBody WxCoupon wxCoupon) { | ||||
| logger.debug("[" + getIpAddr() + "] WxCouponController::updateStokeAndValidDate"); | logger.debug("[" + getIpAddr() + "] WxCouponController::updateStokeAndValidDate"); | ||||
| @@ -154,15 +174,51 @@ public class WxCouponController extends BaseController { | |||||
| } | } | ||||
| wxCoupon.setTenantId(getTenantId()); | wxCoupon.setTenantId(getTenantId()); | ||||
| if(wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() >0){ | |||||
| // wxCoupon.getFlowParams().put("inventory",wxCoupon.getInventory()); | |||||
| // wxCoupon.getFlowParams().put("remainInventory",wxCoupon.getRemainInventory()); | |||||
| // wxCoupon.getFlowParams().put("type",wxCoupon.getType()); | |||||
| // wxCoupon.getFlowParams().put("validEndDate",wxCoupon.getValidEndDate()); | |||||
| // wxCoupon.getFlowParams().put("validStartDate",wxCoupon.getValidStartDate()); | |||||
| // wxCoupon.getFlowParams().put("validType",wxCoupon.getValidType()); | |||||
| WxCoupon coupon = wxCouponService.findById(wxCoupon); | |||||
| if(coupon!=null){ | |||||
| if(wxCoupon.getValidEndDate().before(coupon.getValidEndDate())){ | |||||
| return new ResultData(ErrorCode.COUPON_STOCK_ENDTIME_ERR); | |||||
| } | |||||
| } | |||||
| //启动审批流 | |||||
| if(wxCoupon.getFlowParams() != null && wxCoupon.getFlowParams().size() >0){ | |||||
| List<Map<String,Object>> variables = (List)wxCoupon.getFlowParams().get("variables"); | |||||
| Map<String,Object> map = new HashedMap(); | |||||
| map.put("key","inventory"); | |||||
| map.put("value",wxCoupon.getInventory()); | |||||
| variables.add(map); | |||||
| map = new HashedMap(); | |||||
| map.put("key","remainInventory"); | |||||
| map.put("value",wxCoupon.getRemainInventory()); | |||||
| variables.add(map); | |||||
| map = new HashedMap(); | |||||
| map.put("key","type"); | |||||
| map.put("value",wxCoupon.getType()); | |||||
| variables.add(map); | |||||
| map = new HashedMap(); | |||||
| map.put("key","validEndDate"); | |||||
| map.put("value",wxCoupon.getValidEndDate()); | |||||
| map = new HashedMap(); | |||||
| map.put("key","validStartDate"); | |||||
| map.put("value",wxCoupon.getValidStartDate()); | |||||
| map = new HashedMap(); | |||||
| map.put("key","validType"); | |||||
| map.put("value",wxCoupon.getValidType()); | |||||
| variables.add(map); | |||||
| map = new HashedMap(); | |||||
| map.put("key","validDays"); | |||||
| map.put("value",wxCoupon.getValidDays()); | |||||
| variables.add(map); | |||||
| wxCoupon.getFlowParams().put("businessId",wxCoupon.getId()); | |||||
| wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | wxFlowService.start(wxCoupon.getFlowParams(), getUserId(), getUser().getName(), getTenantId()); | ||||
| //更新状态 | |||||
| WxCoupon updateCoupon = new WxCoupon(); | |||||
| updateCoupon.setTenantId(wxCoupon.getTenantId()); | |||||
| updateCoupon.setId(wxCoupon.getId()); | |||||
| updateCoupon.setStockApplyStatus(EnumRentContractAppStatus.APPLYING.getCode()); | |||||
| updateCoupon.setUpdateDate(new Date()); | |||||
| wxCouponService.update(updateCoupon); | |||||
| }else{ | }else{ | ||||
| return wxCouponService.updateCouponStockAndEndTime(wxCoupon); | return wxCouponService.updateCouponStockAndEndTime(wxCoupon); | ||||
| } | } | ||||
| @@ -275,10 +331,6 @@ public class WxCouponController extends BaseController { | |||||
| } | } | ||||
| wxCoupon.setTenantId(getTenantId()); | wxCoupon.setTenantId(getTenantId()); | ||||
| PageInfo<WxCouponStatisVo> pages = wxCouponService.findPressData(wxCoupon,pageNum,pageSize); | PageInfo<WxCouponStatisVo> pages = wxCouponService.findPressData(wxCoupon,pageNum,pageSize); | ||||
| List<Long> ids = new ArrayList<>(); | |||||
| for(WxCouponStatisVo vo: pages.getList()) { | |||||
| ids.add(vo.getId()); | |||||
| } | |||||
| return new ResultData(pages); | return new ResultData(pages); | ||||
| } | } | ||||
| @@ -46,7 +46,7 @@ public class WxCouponInjectController extends BaseController { | |||||
| couponInject.setStatus(null); | couponInject.setStatus(null); | ||||
| } | } | ||||
| couponInject.setTenantId(getTenantId()); | couponInject.setTenantId(getTenantId()); | ||||
| couponInject.setSortColumns(WxCouponInject.Field.Id_DESC); | |||||
| couponInject.setSortColumns(WxCouponInject.Field.CreateTime_DESC,WxCouponInject.Field.Id_DESC); | |||||
| final PageInfo<WxCouponInject> page = wxCouponInjectService.listAsPage(couponInject, pageNum, pageSize); | final PageInfo<WxCouponInject> page = wxCouponInjectService.listAsPage(couponInject, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -71,7 +71,7 @@ public class WxCouponOrderController extends BaseController { | |||||
| } | } | ||||
| return wxCouponOrderService.detailAdminVo(couponOrderId); | return wxCouponOrderService.detailAdminVo(couponOrderId); | ||||
| } | } | ||||
| @ApiOperation(value = "退券退款", notes = "{\"couponOrderId\":\"string\"}") | @ApiOperation(value = "退券退款", notes = "{\"couponOrderId\":\"string\"}") | ||||
| @PostMapping("/refund") | @PostMapping("/refund") | ||||
| @SystemControllerLog(description = "券包-退券退款") | @SystemControllerLog(description = "券包-退券退款") | ||||
| @@ -63,7 +63,7 @@ public class WxOrderController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] WxOrderController::list"); | logger.debug("[" + getIpAddr() + "] WxOrderController::list"); | ||||
| if (null == wxOrder) wxOrder = new WxOrder(); | if (null == wxOrder) wxOrder = new WxOrder(); | ||||
| wxOrder.setTenantId(getTenantId()); | wxOrder.setTenantId(getTenantId()); | ||||
| wxOrder.setSortColumns(WxOrder.Field.Id_DESC); | |||||
| wxOrder.setSortColumns(WxOrder.Field.CreateDate_DESC,WxOrder.Field.Id_DESC); | |||||
| final PageInfo<WxOrder> page = wxOrderService.listAsPage(wxOrder, pageNum, pageSize); | final PageInfo<WxOrder> page = wxOrderService.listAsPage(wxOrder, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -0,0 +1,236 @@ | |||||
| package com.iformall.controller.mem; | |||||
| import cn.afterturn.easypoi.excel.ExcelImportUtil; | |||||
| import cn.afterturn.easypoi.excel.entity.ImportParams; | |||||
| import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; | |||||
| import cn.afterturn.easypoi.handler.impl.ExcelDataHandlerDefaultImpl; | |||||
| import cn.afterturn.easypoi.handler.inter.IExcelDataHandler; | |||||
| import com.iformall.domain.po.MallUserInfo; | |||||
| import com.iformall.domain.po.WxMerchant; | |||||
| import com.iformall.domain.po.WxTags; | |||||
| import com.iformall.domain.vo.CUserBaseInfoT; | |||||
| import com.iformall.domain.vo.WxBillExcelTemplateOther; | |||||
| import com.iformall.enums.EnumMerchantStatus; | |||||
| import com.iformall.mapper.WxMerchantMapper; | |||||
| import com.iformall.service.WxBillAllService; | |||||
| import com.iformall.service.WxCUserBasicInfoService; | |||||
| import com.iformall.service.WxTagsService; | |||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.apache.shiro.session.UnknownSessionException; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.data.redis.core.StringRedisTemplate; | |||||
| import org.springframework.scheduling.annotation.Async; | |||||
| import org.springframework.stereotype.Component; | |||||
| import java.io.File; | |||||
| import java.util.*; | |||||
| import java.util.concurrent.TimeUnit; | |||||
| import java.util.stream.Collectors; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Component | |||||
| public class ImportTemplateTask { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private WxCUserBasicInfoService wxCUserBasicInfoService; | |||||
| @Autowired | |||||
| private WxTagsService wxTagsService; | |||||
| @Autowired | |||||
| StringRedisTemplate stringRedisTemplate; | |||||
| @Autowired | |||||
| private WxBillAllService wxBillAllService; | |||||
| @Autowired | |||||
| private WxMerchantMapper wxMerchantMapper; | |||||
| @Async | |||||
| public void importBillData(File file, MallUserInfo user, String importKey, String tenantId) { | |||||
| ImportParams params = new ImportParams(); | |||||
| // 需要验证 | |||||
| params.setImportFields(new String[]{"商户名*", "费用类型*", "费用属性*", "费用所属期-开始时间*", "费用所属期-结束时间*", "收款金额(元)*", "收款日期*", "截止缴款日*", "收款方式"}); | |||||
| IExcelDataHandler<CUserBaseInfoT> handler = new ImportTemplateTask.UserExcelHandler(); | |||||
| handler.setNeedHandlerFields(new String[]{"商户名*", "费用类型*", "费用属性*", "费用所属期-开始时间*", "费用所属期-结束时间*", "收款金额(元)*", "收款日期*", "截止缴款日*"}); | |||||
| params.setNeedVerify(true); | |||||
| ExcelImportResult<WxBillExcelTemplateOther> datalist = null; | |||||
| try { | |||||
| datalist = ExcelImportUtil.importExcelMore(file, WxBillExcelTemplateOther.class, params); | |||||
| } catch (Exception e) { | |||||
| set_redis_value(importKey, "1", "0", "0", "1", true); | |||||
| logger.error(e.getMessage()); | |||||
| // 删除缓存文件 | |||||
| file.delete(); | |||||
| return; | |||||
| } | |||||
| // 删除缓存文件 | |||||
| file.delete(); | |||||
| if (datalist == null) { | |||||
| logger.error("导入模板失败: 模板数据解析失败"); | |||||
| set_redis_value(importKey, "1", "0", "0", "1", true); | |||||
| return; | |||||
| } | |||||
| List<WxBillExcelTemplateOther> successList = datalist.getList(); | |||||
| List<WxBillExcelTemplateOther> failList = datalist.getFailList(); | |||||
| //此处判断商户是否存在 | |||||
| //1 过滤重复商户名 | |||||
| Set<String> merchantSet = successList.parallelStream().filter(s -> StringUtils.isNotEmpty(s.getMerchantName())) | |||||
| .map(s -> StringUtils.trim(s.getMerchantName())) | |||||
| .collect(Collectors.toSet()); | |||||
| //2 查询商户名是否存在 | |||||
| Map<String, WxMerchant> merchantMap = new HashMap<>(); | |||||
| merchantSet.parallelStream().forEach(merchantName -> { | |||||
| WxMerchant wxMerchantQuery = new WxMerchant(); | |||||
| wxMerchantQuery.setTenantId(tenantId); | |||||
| wxMerchantQuery.setName(merchantName); | |||||
| wxMerchantQuery.setStatus(EnumMerchantStatus.VALID.getCode()); | |||||
| WxMerchant wxMerchant = wxMerchantMapper.selectOne(wxMerchantQuery); | |||||
| if (wxMerchant != null) { | |||||
| merchantMap.put(merchantName, wxMerchant); | |||||
| } | |||||
| }); | |||||
| //3 计失败条数 | |||||
| List<WxBillExcelTemplateOther> billSuccessList = new ArrayList<>(); | |||||
| successList.parallelStream().forEach(s -> { | |||||
| if (StringUtils.isNotEmpty(s.getMerchantName())) { | |||||
| WxMerchant wxMerchant = merchantMap.get(s.getMerchantName()); | |||||
| if (wxMerchant != null) { | |||||
| Long merchantId = wxMerchant.getId(); | |||||
| if (merchantId != null) { | |||||
| s.setMerchantId(merchantId); | |||||
| Integer type = wxMerchant.getType(); | |||||
| s.setMerchantType(type); | |||||
| billSuccessList.add(s); | |||||
| } | |||||
| } | |||||
| } | |||||
| }); | |||||
| int billSuccessSize = billSuccessList.size(); | |||||
| int successSize = successList.size(); | |||||
| int failSize = failList.size(); | |||||
| int total = successSize + failSize; | |||||
| int failCount = successSize - billSuccessSize; | |||||
| int all_success = billSuccessSize; | |||||
| int all_fail = failSize + failCount; | |||||
| logger.info("验证通过的数量: " + billSuccessSize); | |||||
| logger.info("验证未通过的数量: " + failSize); | |||||
| //添加到redis里 | |||||
| set_redis_value(importKey, "" + total, "" + all_success, "0", "" + all_fail, total == all_fail); | |||||
| if (billSuccessSize > 0) { | |||||
| try { | |||||
| billSuccessList.parallelStream().forEach(bill -> { | |||||
| try { | |||||
| wxBillAllService.importBill(tenantId, importKey, bill, user); | |||||
| } catch (UnknownSessionException ue) { | |||||
| logger.error("session :" + ue.getMessage()); | |||||
| } | |||||
| }); | |||||
| } catch (Exception e) { | |||||
| set_redis_value(importKey, "1", "0", "0", "1", true); | |||||
| e.printStackTrace(); | |||||
| logger.error("导入模板失败:" + e.getMessage()); | |||||
| } | |||||
| } | |||||
| } | |||||
| private class UserExcelHandler extends ExcelDataHandlerDefaultImpl<CUserBaseInfoT> { | |||||
| @Override | |||||
| public Object importHandler(CUserBaseInfoT obj, String name, Object value) { | |||||
| if (value == null) { | |||||
| value = ""; | |||||
| } | |||||
| System.out.println(name + " + " + value.toString()); | |||||
| return super.importHandler(obj, name, value); | |||||
| } | |||||
| } | |||||
| private void set_redis_value(String importKey, String allCount, String allSuccessCount, String processCount, String failCount, boolean fail) { | |||||
| stringRedisTemplate.opsForHash().put(importKey, "allCount", allCount); | |||||
| stringRedisTemplate.opsForHash().put(importKey, "allSuccessCount", allSuccessCount); | |||||
| stringRedisTemplate.opsForHash().put(importKey, "processCount", processCount); | |||||
| stringRedisTemplate.opsForHash().put(importKey, "failCount", failCount); | |||||
| if (fail) { | |||||
| stringRedisTemplate.expire(importKey, 10, TimeUnit.SECONDS); | |||||
| } | |||||
| } | |||||
| @Async | |||||
| public void importMemberData(File file, MallUserInfo user, String importKey, String tenantId) { | |||||
| ImportParams params = new ImportParams(); | |||||
| // 需要验证 | |||||
| params.setImportFields(new String[]{"姓名", "性别", "手机号*", "微信昵称", "学历", "生日", "地址", "上次活跃时间", "注册时间", "标签", "成长值", "积分"}); | |||||
| IExcelDataHandler<CUserBaseInfoT> handler = new ImportTemplateTask.UserExcelHandler(); | |||||
| handler.setNeedHandlerFields(new String[]{"手机号*"}); | |||||
| params.setNeedVerify(true); | |||||
| ExcelImportResult<CUserBaseInfoT> datalist = null; | |||||
| try { | |||||
| datalist = ExcelImportUtil.importExcelMore(file, CUserBaseInfoT.class, params); | |||||
| } catch (Exception e) { | |||||
| set_redis_value(importKey, "1", "0", "0", "1", true); | |||||
| logger.error(e.getMessage()); | |||||
| // 删除缓存文件 | |||||
| file.delete(); | |||||
| return; | |||||
| } | |||||
| // 删除缓存文件 | |||||
| file.delete(); | |||||
| if (datalist == null) { | |||||
| logger.error("导入模板失败: 模板数据解析失败"); | |||||
| set_redis_value(importKey, "1", "0", "0", "1", true); | |||||
| return; | |||||
| } | |||||
| List<CUserBaseInfoT> successList = datalist.getList(); | |||||
| List<CUserBaseInfoT> failList = datalist.getFailList(); | |||||
| logger.info("验证通过的数量: " + successList.size()); | |||||
| logger.info("验证未通过的数量: " + failList.size()); | |||||
| int total = successList.size() + failList.size(); | |||||
| int all_success = successList.size(); | |||||
| int all_fail = failList.size(); | |||||
| //添加到redis里 | |||||
| set_redis_value(importKey, "" + total, "" + all_success, "0", "" + all_fail, total == all_fail); | |||||
| if (successList.size() > 0) { | |||||
| WxTags wxTagsQ = new WxTags(); | |||||
| List<WxTags> tagList = wxTagsService.findList(wxTagsQ); | |||||
| try { | |||||
| successList.parallelStream().forEach(uBase -> { | |||||
| try { | |||||
| wxCUserBasicInfoService.importOneMem(tenantId, importKey, tagList, uBase, user); | |||||
| } catch (UnknownSessionException ue) { | |||||
| logger.error("session :" + ue.getMessage()); | |||||
| } | |||||
| }); | |||||
| } catch (Exception e) { | |||||
| set_redis_value(importKey, "1", "0", "0", "1", true); | |||||
| e.printStackTrace(); | |||||
| logger.error("导入模板失败:" + e.getMessage()); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -4,6 +4,7 @@ import com.iformall.annotation.SystemControllerLog; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.vo.WxBillAll; | import com.iformall.domain.vo.WxBillAll; | ||||
| import com.iformall.domain.vo.WxBillExcelTemplate; | |||||
| import com.iformall.service.WxBillAllService; | import com.iformall.service.WxBillAllService; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| @@ -153,4 +154,12 @@ public class WxBillAllController extends BaseController { | |||||
| return wxBillAllService.updateReceivePay(wxBillAll, getUser()); | return wxBillAllService.updateReceivePay(wxBillAll, getUser()); | ||||
| } | } | ||||
| @GetMapping("exportTemplate") | |||||
| @SystemControllerLog(description = "账单-导出模板") | |||||
| public void exportTemplate(@ModelAttribute WxBillExcelTemplate wxBillExcelTemplate, HttpServletRequest request, HttpServletResponse response) { | |||||
| logger.debug("[" + getIpAddr() + "] WxBillAllController::exportTemplate"); | |||||
| wxBillAllService.exportTemplate(wxBillExcelTemplate, request, response); | |||||
| } | |||||
| } | } | ||||
| @@ -64,7 +64,7 @@ public class WxBillDailyController extends BaseController { | |||||
| wxBillDaily = new WxBillDaily(); | wxBillDaily = new WxBillDaily(); | ||||
| } | } | ||||
| wxBillDaily.setTenantId(getTenantId()); | wxBillDaily.setTenantId(getTenantId()); | ||||
| final PageInfo<Map<String, Object>> page = wxBillDailyService.listAsPage(wxBillDaily, pageNum, pageSize); | |||||
| final PageInfo<WxBillDaily> page = wxBillDailyService.listAsPage(wxBillDaily, pageNum, pageSize); | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -240,4 +240,11 @@ public class WxBillDailyController extends BaseController { | |||||
| return new ResultData(Result.SUCCESS, "查询成功", entries); | return new ResultData(Result.SUCCESS, "查询成功", entries); | ||||
| } | } | ||||
| @GetMapping("exportBill") | |||||
| @SystemControllerLog(description = "日常费用账单-导出") | |||||
| public void exportBill(@ModelAttribute WxBillDaily wxBillDaily, HttpServletRequest request, HttpServletResponse response) { | |||||
| wxBillDaily.setTenantId(getTenantId()); | |||||
| wxBillDailyService.exportBill(request, response, wxBillDaily); | |||||
| } | |||||
| } | } | ||||
| @@ -7,6 +7,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxBillOther; | import com.iformall.domain.po.WxBillOther; | ||||
| import com.iformall.domain.po.WxBillOtherDeposit; | |||||
| import com.iformall.service.WxBillOtherService; | import com.iformall.service.WxBillOtherService; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| @@ -15,7 +16,8 @@ import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.Map; | |||||
| import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -39,7 +41,7 @@ public class WxBillOtherController extends BaseController { | |||||
| wxBillOther = new WxBillOther(); | wxBillOther = new WxBillOther(); | ||||
| } | } | ||||
| wxBillOther.setTenantId(getTenantId()); | wxBillOther.setTenantId(getTenantId()); | ||||
| final PageInfo<Map<String, Object>> page = wxBillOtherService.listAsPage(wxBillOther, pageNum, pageSize); | |||||
| final PageInfo<WxBillOther> page = wxBillOtherService.listAsPage(wxBillOther, pageNum, pageSize); | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -92,5 +94,11 @@ public class WxBillOtherController extends BaseController { | |||||
| return wxBillOtherService.updatePaid(id); | return wxBillOtherService.updatePaid(id); | ||||
| } | } | ||||
| @GetMapping("exportBill") | |||||
| @SystemControllerLog(description = "其它账单-导出") | |||||
| public void exportBill(@ModelAttribute WxBillOther wxBillOther, HttpServletRequest request, HttpServletResponse response) { | |||||
| wxBillOther.setTenantId(getTenantId()); | |||||
| wxBillOtherService.exportBill(request, response, wxBillOther); | |||||
| } | |||||
| } | } | ||||
| @@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| /** | /** | ||||
| @@ -39,7 +41,7 @@ public class WxBillOtherDepositController extends BaseController { | |||||
| wxBillOtherDeposit = new WxBillOtherDeposit(); | wxBillOtherDeposit = new WxBillOtherDeposit(); | ||||
| } | } | ||||
| wxBillOtherDeposit.setTenantId(getTenantId()); | wxBillOtherDeposit.setTenantId(getTenantId()); | ||||
| final PageInfo<Map<String, Object>> page = wxBillOtherDepositService.listAsPage(wxBillOtherDeposit, pageNum, pageSize); | |||||
| final PageInfo<WxBillOtherDeposit> page = wxBillOtherDepositService.listAsPage(wxBillOtherDeposit, pageNum, pageSize); | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -100,7 +102,13 @@ public class WxBillOtherDepositController extends BaseController { | |||||
| public ResultData adjustDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | public ResultData adjustDeposit(@RequestBody WxBillOtherDeposit wxBillDeposit) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::adjustDeposit"); | logger.debug("[" + getIpAddr() + "] WxBillOtherDepositController::adjustDeposit"); | ||||
| return wxBillOtherDepositService.adjustDeposit(wxBillDeposit); | return wxBillOtherDepositService.adjustDeposit(wxBillDeposit); | ||||
| } | |||||
| @GetMapping("exportBill") | |||||
| @SystemControllerLog(description = "其它押金账单-导出") | |||||
| public void exportBill(@ModelAttribute WxBillOtherDeposit wxBillDeposit, HttpServletRequest request, HttpServletResponse response) { | |||||
| wxBillDeposit.setTenantId(getTenantId()); | |||||
| wxBillOtherDepositService.exportBill(request, response, wxBillDeposit); | |||||
| } | } | ||||
| } | } | ||||
| @@ -14,7 +14,8 @@ import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.Map; | |||||
| import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -38,8 +39,8 @@ public class WxBillPropertyController extends BaseController { | |||||
| wxBillProperty = new WxBillProperty(); | wxBillProperty = new WxBillProperty(); | ||||
| } | } | ||||
| wxBillProperty.setTenantId(getTenantId()); | wxBillProperty.setTenantId(getTenantId()); | ||||
| wxBillProperty.setSortColumns(WxBillProperty.Field.Id_DESC); | |||||
| PageInfo<Map<String, Object>> result = wxBillPropertyService.listAsPage(wxBillProperty, pageNum, pageSize); | |||||
| wxBillProperty.setSortColumns(WxBillProperty.Field.Createtime_DESC,WxBillProperty.Field.Id_DESC); | |||||
| PageInfo<WxBillProperty> result = wxBillPropertyService.listAsPage(wxBillProperty, pageNum, pageSize); | |||||
| return new ResultData(result); | return new ResultData(result); | ||||
| } | } | ||||
| @@ -101,7 +102,7 @@ public class WxBillPropertyController extends BaseController { | |||||
| @SystemControllerLog(description = "物业账单-根据商户获取") | @SystemControllerLog(description = "物业账单-根据商户获取") | ||||
| public ResultData findByPropertyContractId(Long propertyContractId, Integer pageNum, Integer pageSize) { | public ResultData findByPropertyContractId(Long propertyContractId, Integer pageNum, Integer pageSize) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBillPropertyController::findByPropertyContractId"); | logger.debug("[" + getIpAddr() + "] WxBillPropertyController::findByPropertyContractId"); | ||||
| final PageInfo<Map<String, Object>> page = wxBillPropertyService.findByPropertyContractId(propertyContractId, getTenantId(), pageNum, pageSize); | |||||
| final PageInfo<WxBillProperty> page = wxBillPropertyService.findByPropertyContractId(propertyContractId, getTenantId(), pageNum, pageSize); | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -113,4 +114,10 @@ public class WxBillPropertyController extends BaseController { | |||||
| return wxBillPropertyService.updateLatePayStatus(wxBillProperty); | return wxBillPropertyService.updateLatePayStatus(wxBillProperty); | ||||
| } | } | ||||
| @GetMapping("exportBill") | |||||
| @SystemControllerLog(description = "物业账单-导出") | |||||
| public void exportBill(@ModelAttribute WxBillProperty wxBillProperty, HttpServletRequest request, HttpServletResponse response) { | |||||
| wxBillProperty.setTenantId(getTenantId()); | |||||
| wxBillPropertyService.exportBill(request, response, wxBillProperty); | |||||
| } | |||||
| } | } | ||||
| @@ -14,7 +14,8 @@ import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.Map; | |||||
| import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -38,8 +39,8 @@ public class WxBillRentController extends BaseController { | |||||
| wxBillRent = new WxBillRent(); | wxBillRent = new WxBillRent(); | ||||
| } | } | ||||
| wxBillRent.setTenantId(getTenantId()); | wxBillRent.setTenantId(getTenantId()); | ||||
| wxBillRent.setSortColumns(WxBillRent.Field.Id_DESC); | |||||
| final PageInfo<Map<String, Object>> page = wxBillRentService.listAsPage(wxBillRent, pageNum, pageSize); | |||||
| wxBillRent.setSortColumns(WxBillRent.Field.Createtime_DESC,WxBillRent.Field.Id_DESC); | |||||
| final PageInfo<WxBillRent> page = wxBillRentService.listAsPage(wxBillRent, pageNum, pageSize); | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -83,7 +84,7 @@ public class WxBillRentController extends BaseController { | |||||
| @SystemControllerLog(description = "租赁押金账单-根据商户获取") | @SystemControllerLog(description = "租赁押金账单-根据商户获取") | ||||
| public ResultData findByRentContractId(Long rentContractId, Integer pageNum, Integer pageSize) { | public ResultData findByRentContractId(Long rentContractId, Integer pageNum, Integer pageSize) { | ||||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::findByRentContractId"); | logger.debug("[" + getIpAddr() + "] WxBillRentController::findByRentContractId"); | ||||
| final PageInfo<Map<String, Object>> page = wxBillRentService.findByRentContractId(rentContractId, getTenantId(), pageNum, pageSize); | |||||
| final PageInfo<WxBillRent> page = wxBillRentService.findByRentContractId(rentContractId, getTenantId(), pageNum, pageSize); | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -118,4 +119,11 @@ public class WxBillRentController extends BaseController { | |||||
| return wxBillRentService.updateLatePayStatus(wxBillRent); | return wxBillRentService.updateLatePayStatus(wxBillRent); | ||||
| } | } | ||||
| @GetMapping("exportBill") | |||||
| @SystemControllerLog(description = "租赁押金账单-导出") | |||||
| public void exportBill(@ModelAttribute WxBillRent wxBillRent, HttpServletRequest request, HttpServletResponse response) { | |||||
| wxBillRent.setTenantId(getTenantId()); | |||||
| wxBillRentService.exportBill(request, response, wxBillRent); | |||||
| } | |||||
| } | } | ||||
| @@ -77,7 +77,7 @@ public class MallUserInfoController extends BaseController { | |||||
| } | } | ||||
| userInfo.setTenantId(getTenantId()); | userInfo.setTenantId(getTenantId()); | ||||
| userInfo.setSortColumns(MallUserInfo.Field.Id_DESC); | |||||
| userInfo.setSortColumns(MallUserInfo.Field.CreateTime_DESC,MallUserInfo.Field.Id_DESC); | |||||
| final PageInfo<MallUserInfo> page = userInfoService.listAsPage(userInfo, pageNum, pageSize); | final PageInfo<MallUserInfo> page = userInfoService.listAsPage(userInfo, pageNum, pageSize); | ||||
| for (MallUserInfo u : page.getList()) { | for (MallUserInfo u : page.getList()) { | ||||
| MallUserRole r = new MallUserRole(); | MallUserRole r = new MallUserRole(); | ||||
| @@ -1,23 +1,30 @@ | |||||
| package com.iformall.controller.sys; | package com.iformall.controller.sys; | ||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxBusiness; | import com.iformall.domain.po.WxBusiness; | ||||
| import com.iformall.domain.po.WxSubBusiness; | import com.iformall.domain.po.WxSubBusiness; | ||||
| import com.iformall.domain.vo.WxBusinessDataVo; | |||||
| import com.iformall.domain.vo.WxMerchantSubsidyVo; | |||||
| import com.iformall.service.ExcelService; | |||||
| import com.iformall.service.WxBusinessService; | import com.iformall.service.WxBusinessService; | ||||
| import com.iformall.service.WxSubBusinessService; | import com.iformall.service.WxSubBusinessService; | ||||
| import com.iformall.utils.DateUtils; | |||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import org.apache.http.HttpResponse; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.ArrayList; | |||||
| import java.util.HashMap; | |||||
| import java.util.List; | |||||
| import java.util.Map; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import java.math.BigDecimal; | |||||
| import java.text.SimpleDateFormat; | |||||
| import java.util.*; | |||||
| @RestController | @RestController | ||||
| @RequestMapping("wxBusiness") | @RequestMapping("wxBusiness") | ||||
| @@ -27,9 +34,11 @@ public class WxBusinessController extends BaseController { | |||||
| @Autowired | @Autowired | ||||
| private WxBusinessService wxBusinessService; | private WxBusinessService wxBusinessService; | ||||
| @Autowired | @Autowired | ||||
| private WxSubBusinessService wxSubBusinessService; | private WxSubBusinessService wxSubBusinessService; | ||||
| @Autowired | |||||
| private ExcelService excelService; | |||||
| @ApiOperation("业态全列表接口") | @ApiOperation("业态全列表接口") | ||||
| @GetMapping("listAll") | @GetMapping("listAll") | ||||
| @@ -52,63 +61,68 @@ public class WxBusinessController extends BaseController { | |||||
| @ApiOperation("业态分析接口") | @ApiOperation("业态分析接口") | ||||
| @GetMapping("businessDataList") | @GetMapping("businessDataList") | ||||
| @SystemControllerLog(description = "业态分析接口") | @SystemControllerLog(description = "业态分析接口") | ||||
| public ResultData businessDataList(@ModelAttribute WxBusiness wxBusiness) { | |||||
| public ResultData businessDataList(@ModelAttribute WxBusiness wxBusiness) throws Exception{ | |||||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::businessDataList"); | logger.debug("[" + getIpAddr() + "] WxBusinessController::businessDataList"); | ||||
| List<Map<String,String>> result = new ArrayList<>(); | |||||
| Map<String,String> map = new HashMap<>(); | |||||
| map.put("title","餐饮");//业态 | |||||
| map.put("volume","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//销售坪效 | |||||
| map.put("rent","32323.23");//租赁坪效 | |||||
| map.put("rentSaleRate","0.23");//租售比 | |||||
| map.put("comPrice","香奈儿");//客单价 | |||||
| map.put("maxCom","32323.23");//贡献率最高商户 | |||||
| result.add(map); | |||||
| map = new HashMap<>(); | |||||
| map.put("title","娱乐");//业态 | |||||
| map.put("volume","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//销售坪效 | |||||
| map.put("rent","32323.23");//租赁坪效 | |||||
| map.put("rentSaleRate","0.23");//租售比 | |||||
| map.put("comPrice","香奈儿");//客单价 | |||||
| map.put("maxCom","32323.23");//贡献率最高商户 | |||||
| result.add(map); | |||||
| map = new HashMap<>(); | |||||
| map.put("title","影视");//业态 | |||||
| map.put("volume","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//销售坪效 | |||||
| map.put("rent","32323.23");//租赁坪效 | |||||
| map.put("rentSaleRate","0.23");//租售比 | |||||
| map.put("comPrice","香奈儿");//客单价 | |||||
| map.put("maxCom","32323.23");//贡献率最高商户 | |||||
| result.add(map); | |||||
| return new ResultData(result); | |||||
| wxBusiness.setTenantId(getTenantId()); | |||||
| if(wxBusiness.getStartdate() == null || wxBusiness.getEnddate() == null){ | |||||
| Date sDate = DateUtils.getFirstDayForCurrMonth(DateUtils.getLastMonthToDay()); | |||||
| Date eDate = DateUtils.getLastDayForMonth(DateUtils.getLastMonthToDay()); | |||||
| SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); | |||||
| SimpleDateFormat sdT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |||||
| wxBusiness.setStartdate(sdT.parse(sd.format(sDate)+" 00:00:00")); | |||||
| wxBusiness.setEnddate(sdT.parse(sd.format(eDate)+" 23:59:59")); | |||||
| } | |||||
| return wxBusinessService.businessDataList(wxBusiness); | |||||
| } | |||||
| @ApiOperation("导出业态数据列表") | |||||
| @GetMapping("exportBusinessDataList") | |||||
| @SystemControllerLog(description = "导出业态数据列表") | |||||
| public void exportBusinessDataList(@ModelAttribute WxBusiness wxBusiness, HttpServletResponse response) throws Exception{ | |||||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::exportBusinessDataList"); | |||||
| wxBusiness.setTenantId(getTenantId()); | |||||
| if(wxBusiness.getStartdate() == null || wxBusiness.getEnddate() == null){ | |||||
| Date sDate = DateUtils.getFirstDayForCurrMonth(DateUtils.getLastMonthToDay()); | |||||
| Date eDate = DateUtils.getLastDayForMonth(DateUtils.getLastMonthToDay()); | |||||
| SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); | |||||
| SimpleDateFormat sdT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |||||
| wxBusiness.setStartdate(sdT.parse(sd.format(sDate)+" 00:00:00")); | |||||
| wxBusiness.setEnddate(sdT.parse(sd.format(eDate)+" 23:59:59")); | |||||
| } | |||||
| List<Map<String,Object>> dataList = (List<Map<String,Object>>)wxBusinessService.businessDataList(wxBusiness).data; | |||||
| List<WxBusinessDataVo> exeList = new ArrayList<>(); | |||||
| for (Map<String,Object> m:dataList) { | |||||
| WxBusinessDataVo businessDataVo = new WxBusinessDataVo(); | |||||
| businessDataVo.setName((String)m.get("title")); | |||||
| if(m.get("comPrice") != null) | |||||
| businessDataVo.setComPrice(m.get("comPrice").toString()); | |||||
| if(m.get("rent") != null) | |||||
| businessDataVo.setRentRate(m.get("rent").toString()); | |||||
| if(m.get("rentSaleRate") != null) | |||||
| businessDataVo.setRentSaleRate(m.get("rentSaleRate").toString()); | |||||
| if(m.get("volume") != null) { | |||||
| //单位转万 | |||||
| BigDecimal b = (BigDecimal)m.get("volume"); | |||||
| String dstr = b.divide(new BigDecimal(10000)).setScale(2, BigDecimal.ROUND_HALF_UP).toString(); | |||||
| businessDataVo.setSale(dstr); | |||||
| } | |||||
| if(m.get("sale") != null) | |||||
| businessDataVo.setSaleRate(m.get("sale").toString()); | |||||
| exeList.add(businessDataVo); | |||||
| } | |||||
| excelService.exportExcel(exeList, null, "业态统计", WxBusinessDataVo.class, "业态统计列表.xlsx", response, false); | |||||
| } | } | ||||
| @ApiOperation("贡献率排行") | @ApiOperation("贡献率排行") | ||||
| @GetMapping("devoteList") | @GetMapping("devoteList") | ||||
| @SystemControllerLog(description = "业态分析接口") | |||||
| public ResultData devoteList(@ModelAttribute WxBusiness wxBusiness,Integer pageNum, Integer pageSize) { | |||||
| @SystemControllerLog(description = "贡献率排行") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData devoteList(@ModelAttribute WxBusiness wxBusiness,Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] WxBusinessController::devoteList"); | logger.debug("[" + getIpAddr() + "] WxBusinessController::devoteList"); | ||||
| List<Map<String,String>> result = new ArrayList<>(); | |||||
| Map<String,String> map = new HashMap<>(); | |||||
| map.put("merchantName","西贝筱面"); | |||||
| map.put("sale","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//商户销售坪效 | |||||
| map.put("devoteRate","1.23");//贡献率 | |||||
| result.add(map); | |||||
| map = new HashMap<>(); | |||||
| map.put("merchantName","肯德基"); | |||||
| map.put("sale","2323.23");//营业额 | |||||
| map.put("sale","32323.23");//商户销售坪效 | |||||
| map.put("devoteRate","1.23");//贡献率 | |||||
| result.add(map); | |||||
| PageInfo<Map<String,String>> page = new PageInfo<>(); | |||||
| page.setList(result); | |||||
| page.setTotal(2); | |||||
| page.setPageNum(1); | |||||
| page.setPageSize(20); | |||||
| return new ResultData(page); | |||||
| wxBusiness.setTenantId(getTenantId()); | |||||
| return new ResultData(wxBusinessService.devoteList(wxBusiness,pageNum,pageSize)); | |||||
| } | } | ||||
| @@ -0,0 +1,184 @@ | |||||
| package com.iformall.controller.template; | |||||
| import com.alibaba.fastjson.JSONArray; | |||||
| import com.iformall.annotation.SystemControllerLog; | |||||
| import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.Result; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.controller.mem.ImportTemplateTask; | |||||
| import com.iformall.domain.po.MallUserInfo; | |||||
| import com.iformall.enums.EnumImportType; | |||||
| import com.iformall.exception.MallinkException; | |||||
| import com.iformall.utils.Constant; | |||||
| import io.swagger.annotations.Api; | |||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.data.redis.core.StringRedisTemplate; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| import org.springframework.web.multipart.MultipartFile; | |||||
| import java.io.BufferedInputStream; | |||||
| import java.io.File; | |||||
| import java.io.FileOutputStream; | |||||
| import java.io.IOException; | |||||
| import java.util.Map; | |||||
| import java.util.concurrent.TimeUnit; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @RestController | |||||
| @RequestMapping("wxImportTemplate") | |||||
| @Api(description = "模板导入") | |||||
| public class WxImportTemplateController extends BaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private String fmUploadDir; | |||||
| @Autowired | |||||
| StringRedisTemplate stringRedisTemplate; | |||||
| @Autowired | |||||
| private ImportTemplateTask importTemplateTask; | |||||
| private void set_redis_value(String importKey, String allCount, String allSuccessCount, String processCount, String failCount, boolean fail) { | |||||
| stringRedisTemplate.opsForHash().put(importKey, "allCount", allCount); | |||||
| stringRedisTemplate.opsForHash().put(importKey, "allSuccessCount", allSuccessCount); | |||||
| stringRedisTemplate.opsForHash().put(importKey, "processCount", processCount); | |||||
| stringRedisTemplate.opsForHash().put(importKey, "failCount", failCount); | |||||
| if (fail) { | |||||
| stringRedisTemplate.expire(importKey, 10, TimeUnit.SECONDS); | |||||
| } | |||||
| } | |||||
| @PostMapping(value = "/importTemplate", consumes = "multipart/*") | |||||
| @SystemControllerLog(description = "导入数据") | |||||
| public ResultData importTemplate(@RequestParam("file") MultipartFile mFile, @RequestParam("type") Integer type) { | |||||
| logger.debug("[" + getIpAddr() + "] WxImportTemplateController::importTemplate"); | |||||
| if (mFile.isEmpty()) { | |||||
| throw new MallinkException(Result.ERROR, "上传文件不能为空"); | |||||
| } | |||||
| //得到当前用户ID | |||||
| String typeStr = EnumImportType.getEnum(type).getMessage(); | |||||
| final MallUserInfo user = getUser(); | |||||
| String userId = typeStr + "_" + user.getId(); | |||||
| String importKey = Constant.importMemPrev + userId; | |||||
| final String tenantId = getTenantId(); | |||||
| //查询当前用户得到的值是否为空,为空继续,不为空,返回模板正在导入 | |||||
| Boolean allCount = stringRedisTemplate.opsForHash().hasKey(importKey, "allCount"); | |||||
| if (allCount) { | |||||
| return new ResultData(Result.SUCCESS, "模板正在导入"); | |||||
| } | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "allCount", 0 + ""); | |||||
| stringRedisTemplate.expire(importKey, 30, TimeUnit.MINUTES); | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "allSuccessCount", 0 + ""); | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "processCount", ""); | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "failCount", ""); | |||||
| String fpath = fmUploadDir; | |||||
| File targetFile = new File(fpath); | |||||
| if (!targetFile.exists()) { | |||||
| targetFile.mkdirs(); | |||||
| } | |||||
| String fileName = type + ".xlsx"; | |||||
| int dot = mFile.getOriginalFilename().lastIndexOf('.'); | |||||
| fileName = fileName + mFile.getOriginalFilename().substring(dot, mFile.getOriginalFilename().length()); | |||||
| File lFile = new File(fpath + File.separator + fileName); | |||||
| FileOutputStream fos = null; | |||||
| BufferedInputStream fs = null; | |||||
| try { | |||||
| fos = new FileOutputStream(lFile); | |||||
| fs = (BufferedInputStream) mFile.getInputStream(); | |||||
| byte[] buffer = new byte[1024]; | |||||
| int len = 0; | |||||
| while ((len = fs.read(buffer)) != -1) { | |||||
| fos.write(buffer, 0, len); | |||||
| } | |||||
| fos.close(); | |||||
| fs.close(); | |||||
| } catch (Exception e) { | |||||
| stringRedisTemplate.expire(importKey, 3, TimeUnit.SECONDS); | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "allCount", "1"); | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "failCount", "1"); | |||||
| logger.error(e.getMessage()); | |||||
| return new ResultData(ErrorCode.MEM_IMPORT_ERR.getCode(), "模板上传失败"); | |||||
| } finally { | |||||
| if (fos != null) { | |||||
| try { | |||||
| fos.close(); | |||||
| } catch (IOException e) { | |||||
| stringRedisTemplate.expire(importKey, 3, TimeUnit.SECONDS); | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "allCount", "1"); | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "failCount", "1"); | |||||
| logger.error(e.getMessage()); | |||||
| return new ResultData(ErrorCode.MEM_IMPORT_ERR.getCode(), "模板上传失败"); | |||||
| } | |||||
| } | |||||
| if (fs != null) { | |||||
| try { | |||||
| fs.close(); | |||||
| } catch (IOException e) { | |||||
| stringRedisTemplate.expire(importKey, 3, TimeUnit.SECONDS); | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "allCount", "1"); | |||||
| stringRedisTemplate.opsForHash().putIfAbsent(importKey, "failCount", "1"); | |||||
| logger.error(e.getMessage()); | |||||
| return new ResultData(ErrorCode.MEM_IMPORT_ERR.getCode(), "模板上传失败"); | |||||
| } | |||||
| } | |||||
| } | |||||
| if (type.equals(EnumImportType.MEMBER.getCode())) { | |||||
| importTemplateTask.importMemberData(lFile, user, importKey, tenantId); | |||||
| } | |||||
| //暂时不区分账单类型,导入时区分 | |||||
| importTemplateTask.importBillData(lFile, user, importKey, tenantId); | |||||
| return new ResultData(Result.SUCCESS, "模板正在导入"); | |||||
| } | |||||
| @GetMapping("/queryTemplateCount") | |||||
| @SystemControllerLog(description = "导入数据查询") | |||||
| public ResultData queryTemplateCount(@RequestParam("type") Integer type) { | |||||
| String typeStr = EnumImportType.getEnum(type).getMessage(); | |||||
| String importKey = Constant.importMemPrev + typeStr + "_" + getUser().getId(); | |||||
| Map entries = stringRedisTemplate.opsForHash().entries(importKey); | |||||
| logger.info(JSONArray.toJSONString(entries) + ">>>>>>>>>>>>>>>>>>>>>1"); | |||||
| if (entries.size() < 4) { | |||||
| entries.clear(); | |||||
| return new ResultData(Result.SUCCESS, "ok", entries); | |||||
| } | |||||
| String allCount = entries.get("allCount").toString(); | |||||
| String allSuccessCount = entries.get("allSuccessCount").toString(); | |||||
| String processCount = entries.get("processCount").toString(); | |||||
| String failCount = entries.get("failCount").toString(); | |||||
| if (StringUtils.isNotBlank(failCount) && allCount.equals(failCount)) {//stringRedisTemplate.expire(userId,1,TimeUnit.SECONDS); | |||||
| logger.info(JSONArray.toJSONString(entries) + ">>>>>>>>>>>>>>>>>>>>>2"); | |||||
| //完全失败 | |||||
| stringRedisTemplate.opsForHash().delete(importKey, "allCount"); | |||||
| stringRedisTemplate.opsForHash().delete(importKey, "allSuccessCount"); | |||||
| stringRedisTemplate.opsForHash().delete(importKey, "processCount"); | |||||
| stringRedisTemplate.opsForHash().delete(importKey, "failCount"); | |||||
| return new ResultData(ErrorCode.MEM_IMPORT_ERR); | |||||
| } | |||||
| //导入完成 | |||||
| if (StringUtils.isNotBlank(allSuccessCount) && allSuccessCount.equals(processCount)) { | |||||
| ResultData ok = new ResultData(Result.SUCCESS, "ok", entries); | |||||
| stringRedisTemplate.opsForHash().delete(importKey, "allCount"); | |||||
| stringRedisTemplate.opsForHash().delete(importKey, "allSuccessCount"); | |||||
| stringRedisTemplate.opsForHash().delete(importKey, "processCount"); | |||||
| stringRedisTemplate.opsForHash().delete(importKey, "failCount"); | |||||
| return ok; | |||||
| } | |||||
| return new ResultData(Result.SUCCESS, "查询成功", entries); | |||||
| } | |||||
| } | |||||
| @@ -105,7 +105,6 @@ public class WxFlowAbleController extends BaseController { | |||||
| return new ResultData(pageInfo); | return new ResultData(pageInfo); | ||||
| } | } | ||||
| /** | /** | ||||
| * 审批历史 | * 审批历史 | ||||
| */ | */ | ||||
| @@ -100,7 +100,9 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| return true; | return true; | ||||
| if ("com.iformall.mapper.WxActivityJoinMapper.updateStatus".equals(ms.getId())) | if ("com.iformall.mapper.WxActivityJoinMapper.updateStatus".equals(ms.getId())) | ||||
| return true; | return true; | ||||
| if ("com.iformall.mapper.WxCouponMapper.findPressData".equals(ms.getId())) | |||||
| if ("com.iformall.mapper.WxCouponMapper.findCouponList".equals(ms.getId())) | |||||
| return true; | |||||
| if ("com.iformall.mapper.WxCouponMapper.findCouponListCount".equals(ms.getId())) | |||||
| return true; | return true; | ||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -18,7 +18,8 @@ public class UrlCheck { | |||||
| || url.contains("wxMsgCallback") | || url.contains("wxMsgCallback") | ||||
| || url.contains("notify") | || url.contains("notify") | ||||
| || url.contains("pvlog") | || url.contains("pvlog") | ||||
| || url.contains("/wxBillDaily/importTemplate"); | |||||
| || url.contains("/wxBillDaily/importTemplate") | |||||
| || url.contains("/wxImportTemplate/importTemplate"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -113,8 +113,8 @@ fm: | |||||
| exception: false | exception: false | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com | ||||
| deploy: 1 | deploy: 1 | ||||
| open: true | |||||
| upload_dir: /home/test/server/uploads/ | |||||
| open: false | |||||
| upload_dir: /tmp/ | |||||
| ueditor: | ueditor: | ||||
| config: config.json | config: config.json | ||||
| @@ -0,0 +1,2 @@ | |||||
| ALTER TABLE `wx_coupon` | |||||
| ADD COLUMN `approval_type` SMALLINT(1) NULL DEFAULT 0 COMMENT '最后一次操作类型'; | |||||
| @@ -0,0 +1,6 @@ | |||||
| delete from mall_permission where id = 962; | |||||
| INSERT INTO `mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) | |||||
| VALUES (962, '业态分析', 2, 'Y', NULL, 1, NULL, NULL, 'businessList', 'icon-yetaifenxi', 0, 207); | |||||
| update mall_sale_type set menus = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 50, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205, 206, 211, 212, 221, 222, 251, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 501, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 521, 522, 523, 531, 532, 533, 591, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 651, 661, 662, 663, 671, 672, 673, 674, 681, 682, 683, 684, 685, 691, 692, 693, 694, 701, 702, 711, 712, 713, 901, 902, 903, 931, 932, 951, 961,962]' where id = 1; | |||||
| @@ -2,87 +2,87 @@ INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `m | |||||
| VALUES | VALUES | ||||
| (1560252222, 0, '789', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560252222, 0, '789', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560252222, '789', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560253333, 0, '790', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560253333, 0, '790', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560253333, '790', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560254444, 0, '1001', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560254444, 0, '1001', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560254444, '1001', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560255555, 0, '1002', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560255555, 0, '1002', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255555, '1002', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560255556, 0, '1003', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560255556, 0, '1003', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560255556, '1003', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560256666, 0, '1004', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560256666, 0, '1004', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256666, '1004', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560257777, 0, '1005', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560257777, 0, '1005', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560257777, '1005', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560258888, 0, '1006', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560258888, 0, '1006', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560258888, '1006', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560259999, 0, '1007', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560259999, 0, '1007', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560259999, '1007', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560260000, 0, '1008', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560260000, 0, '1008', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260000, '1008', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | ||||
| VALUES | VALUES | ||||
| (1560260001, 0, '1009', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | (1560260001, 0, '1009', '营销审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 3), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '有价卷审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 1), | ||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '卡审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '拼团审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '砍价审批', 9, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '卡审批', 10, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 2), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '拼团审批', 11, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 3), | |||||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560260001, '1009', '砍价审批', 12, 0, '2019-06-11 14:02:42', '2019-06-21 10:34:16', 4); | |||||
| @@ -0,0 +1,10 @@ | |||||
| drop table if exists `wx_msg_limit`; | |||||
| CREATE TABLE `wx_msg_limit` ( | |||||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||||
| `tenant_id` varchar(10) NOT NULL COMMENT '租户id', | |||||
| `type` tinyint(1) DEFAULT '0' COMMENT '1: 短信-验证码(24小时10条)2:短信-营销(24小时3条) 10:prepay_id(7天内3次), 12:form_id(7天内1次), 13.open_id for 小程序统一消息限制(2天内1次),14.open_id for 公众号模板消息限制(2天内1次)', | |||||
| `limit_id` varchar(64) DEFAULT NULL COMMENT '限制ID', | |||||
| `limit_num` smallint(2) DEFAULT '0' COMMENT '限制次数', | |||||
| `limit_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '限制时间', | |||||
| PRIMARY KEY (`id`) | |||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; | |||||
| @@ -0,0 +1 @@ | |||||
| DROP TABLE `wx_coupon_press_data`; | |||||
| @@ -0,0 +1,2 @@ | |||||
| ALTER TABLE `wx_merchant` | |||||
| ADD COLUMN `link_line_phone` varchar(100) NULL DEFAULT NULL COMMENT '客服电话'; | |||||
| @@ -0,0 +1,4 @@ | |||||
| ALTER TABLE `push_limit` | |||||
| ADD COLUMN `enable` TINYINT(2) NULL DEFAULT 0 COMMENT '是否启用,0:Enable,1:Disable'; | |||||
| Update `push_limit` set `enable` = 0; | |||||
| @@ -0,0 +1,17 @@ | |||||
| alter table wx_bill_rent add index t_p(tenant_id,is_preview); | |||||
| alter table wx_bill_rent add index r_m(rent_contract_id,merchant_id); | |||||
| alter table wx_bill_rent add index st(rent_shop_type); | |||||
| alter table wx_bill_rent add index sta(`status`); | |||||
| alter table wx_bill_rent_deposit add index r(rent_contract_id); | |||||
| alter table wx_bill_rent_deposit add index r_m(rent_contract_id,merchant_id); | |||||
| alter table wx_bill_rent_deposit add index sta(`status`); | |||||
| alter table wx_bill_property add index t_p(tenant_id,is_preview); | |||||
| alter table wx_bill_property add index p_m(property_contract_id,merchant_id); | |||||
| alter table wx_bill_property add index st(rent_shop_type); | |||||
| alter table wx_bill_property add index sta(`status`); | |||||
| alter table wx_bill_property_deposit add index p(property_contract_id); | |||||
| alter table wx_bill_property_deposit add index p_m(property_contract_id,merchant_id); | |||||
| alter table wx_bill_property_deposit add index sta(`status`); | |||||
| @@ -0,0 +1,3 @@ | |||||
| alter table wx_bill_daily add index t_t_s(tenant_id,type,`status`); | |||||
| alter table wx_bill_other add index t_s(tenant_id,`status`); | |||||
| alter table wx_bill_other_deposit add index t_s(tenant_id,`status`); | |||||
| @@ -0,0 +1,6 @@ | |||||
| alter table wx_bill_rent add index m(merchant_id); | |||||
| alter table wx_bill_rent add index s_e(starttime,endtime); | |||||
| alter table wx_bill_property add index m(merchant_id); | |||||
| alter table wx_bill_property add index s_e(starttime,endtime); | |||||
| @@ -0,0 +1,4 @@ | |||||
| alter table wx_merchant add index t_b_s_p_t(tenant_id,business_id,`status`,is_public,top_time); | |||||
| alter table wx_merchant add index t_s_i_t(tenant_id,`status`,is_public,top_time); | |||||
| alter table wx_shop add index t_d(tenant_id,is_del); | |||||
| alter table wx_merchant_shop add index d(is_del); | |||||
| @@ -48,7 +48,7 @@ public class WxCreditHistoryController extends BaseController{ | |||||
| log.debug("[" + getIpAddr() + "] WxCreditHistoryController::list"); | log.debug("[" + getIpAddr() + "] WxCreditHistoryController::list"); | ||||
| if (null == wxCreditHistory) wxCreditHistory = new WxCreditHistory(); | if (null == wxCreditHistory) wxCreditHistory = new WxCreditHistory(); | ||||
| wxCreditHistory.setCUserId(getUserId()); | wxCreditHistory.setCUserId(getUserId()); | ||||
| wxCreditHistory.setSortColumns(WxCreditHistory.Field.Id_DESC); | |||||
| wxCreditHistory.setSortColumns(WxCreditHistory.Field.CreateDate_DESC,WxCreditHistory.Field.Id_DESC); | |||||
| final PageInfo<WxCreditHistory> page = wxCreditHistoryService.listAsPage(wxCreditHistory, pageNum, pageSize); | final PageInfo<WxCreditHistory> page = wxCreditHistoryService.listAsPage(wxCreditHistory, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -111,13 +111,13 @@ public class WxOrderController extends BaseController { | |||||
| int min = jo.getIntValue("min"); | int min = jo.getIntValue("min"); | ||||
| if (max!=0 && min ==0 && user.getScore() > max) { | if (max!=0 && min ==0 && user.getScore() > max) { | ||||
| return new ResultData(ErrorCode.COUPON_ONLY_FOR_NEW_MEMBER); | |||||
| return new ResultData(ErrorCode.COUPON_SCORE_NOT_IN_RANGE); | |||||
| } | } | ||||
| if (max==0 && min !=0 && user.getScore() < min) { | if (max==0 && min !=0 && user.getScore() < min) { | ||||
| return new ResultData(ErrorCode.COUPON_ONLY_FOR_NEW_MEMBER); | |||||
| return new ResultData(ErrorCode.COUPON_SCORE_NOT_IN_RANGE); | |||||
| } | } | ||||
| if (max!=0 && min !=0 && (user.getScore() < min || user.getScore() > max)) { | if (max!=0 && min !=0 && (user.getScore() < min || user.getScore() > max)) { | ||||
| return new ResultData(ErrorCode.COUPON_ONLY_FOR_NEW_MEMBER); | |||||
| return new ResultData(ErrorCode.COUPON_SCORE_NOT_IN_RANGE); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -270,21 +270,20 @@ public class WxOrderController extends BaseController { | |||||
| @ApiOperation(value = "根据orderId查询接口", notes = "{\"orderId\":\"string\"}") | @ApiOperation(value = "根据orderId查询接口", notes = "{\"orderId\":\"string\"}") | ||||
| @GetMapping("/findById") | @GetMapping("/findById") | ||||
| public ResultData findById(@RequestBody Map<String, String> paramMap) { | |||||
| String orderIdStr = paramMap.get("orderId"); | |||||
| if (StringUtils.isBlank(orderIdStr)) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "orderId不能为空"); | |||||
| } | |||||
| Long orderId = 0L; | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "String", paramType = "query", required = true) | |||||
| }) | |||||
| public ResultData findById(String orderId) { | |||||
| Long id = 0L; | |||||
| try { | try { | ||||
| orderId = Long.valueOf(orderIdStr); | |||||
| id = Long.valueOf(orderId); | |||||
| } catch (NumberFormatException e) { | } catch (NumberFormatException e) { | ||||
| logger.error("parse orderId failed"); | logger.error("parse orderId failed"); | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "订单ID转换异常"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "订单ID转换异常"); | ||||
| } | } | ||||
| WxOrder order = null; | WxOrder order = null; | ||||
| try { | try { | ||||
| order = wxOrderService.getById(orderId); | |||||
| order = wxOrderService.getById(id); | |||||
| if (order != null) { | if (order != null) { | ||||
| return new ResultData(Result.SUCCESS, "查询成功", order); | return new ResultData(Result.SUCCESS, "查询成功", order); | ||||
| } else { | } else { | ||||
| @@ -297,28 +296,27 @@ public class WxOrderController extends BaseController { | |||||
| } | } | ||||
| @ApiOperation(value = "获取未支付订单", notes = "{\"couponId\":\"string\"}") | @ApiOperation(value = "获取未支付订单", notes = "{\"couponId\":\"string\"}") | ||||
| @GetMapping("/getUnPaidOrder") | |||||
| public ResultData getUnPaidOrder(@RequestBody Map<String, String> paramMap) { | |||||
| String couponIdStr = paramMap.get("couponId"); | |||||
| if (StringUtils.isBlank(couponIdStr)) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "couponId不能为空"); | |||||
| } | |||||
| Long couponId = 0L; | |||||
| @GetMapping("getUnPaidOrder") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "couponId", value = "券id", dataType = "String", paramType = "query", required = true) | |||||
| }) | |||||
| public ResultData getUnPaidOrder(String couponId) { | |||||
| Long id = 0L; | |||||
| try { | try { | ||||
| couponId = Long.valueOf(couponIdStr); | |||||
| id = Long.valueOf(couponId); | |||||
| } catch (NumberFormatException e) { | } catch (NumberFormatException e) { | ||||
| logger.error("parse couponId failed"); | logger.error("parse couponId failed"); | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "券ID转换异常"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "券ID转换异常"); | ||||
| } | } | ||||
| WxCoupon wxCoupon = null; | WxCoupon wxCoupon = null; | ||||
| try { | try { | ||||
| wxCoupon = wxCouponService.getById(couponId); | |||||
| wxCoupon = wxCouponService.getById(id); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("券ID获取券信息失败, couponId: " + couponIdStr); | |||||
| logger.error("券ID获取券信息失败, couponId: " + couponId); | |||||
| return new ResultData(ErrorCode.COUPON_IS_EMPTY); | return new ResultData(ErrorCode.COUPON_IS_EMPTY); | ||||
| } | } | ||||
| if(wxCoupon == null) { | if(wxCoupon == null) { | ||||
| logger.error("券ID获取券信息失败, couponId: " + couponIdStr); | |||||
| logger.error("券ID获取券信息失败, couponId: " + couponId); | |||||
| return new ResultData(ErrorCode.COUPON_IS_EMPTY); | return new ResultData(ErrorCode.COUPON_IS_EMPTY); | ||||
| } | } | ||||
| @@ -18,7 +18,6 @@ import com.iformall.enums.EnumAssignTagsTrigger; | |||||
| import com.iformall.enums.EnumLevelConfigDiscountStatus; | import com.iformall.enums.EnumLevelConfigDiscountStatus; | ||||
| import com.iformall.enums.EnumScoreType; | import com.iformall.enums.EnumScoreType; | ||||
| import com.iformall.enums.EnumUserType; | import com.iformall.enums.EnumUserType; | ||||
| import com.iformall.mapper.WxCUserBasicInfoMapper; | |||||
| import com.iformall.service.*; | import com.iformall.service.*; | ||||
| import com.iformall.service.wechat.FmOpenService; | import com.iformall.service.wechat.FmOpenService; | ||||
| import com.iformall.utils.Constant; | import com.iformall.utils.Constant; | ||||
| @@ -513,21 +512,18 @@ public class WxUserGrantController extends BaseController { | |||||
| user.setCountryCode(phoneNoInfo.getCountryCode()); | user.setCountryCode(phoneNoInfo.getCountryCode()); | ||||
| if (isFirstPhone) { | if (isFirstPhone) { | ||||
| //检查是否存在会员信息 如果有 赋值积分 | //检查是否存在会员信息 如果有 赋值积分 | ||||
| List<WxCUserBasicInfo> basicInfoList = wxCUserBasicInfoService.findInfoByPhone(user.getTenantId(), user.getPhone()); | |||||
| if (basicInfoList != null && !basicInfoList.isEmpty()) { | |||||
| WxCUserBasicInfo basicInfo = basicInfoList.get(0); | |||||
| if(basicInfo != null) { | |||||
| int credit = user.getCredit() == null ? 0 : user.getCredit(); | |||||
| int score = user.getScore() == null ? 0 : user.getScore(); | |||||
| int memScore = basicInfo.getPoins() == null ? 0 : basicInfo.getPoins(); | |||||
| int memCredit = basicInfo.getCredit() == null ? 0 : basicInfo.getCredit(); | |||||
| if (memCredit > 0) { | |||||
| user.setCredit(memCredit); | |||||
| wxCUserService.addCredit(user, EnumScoreType.MEM_IMPORT); | |||||
| } | |||||
| user.setCredit(memCredit + credit); | |||||
| user.setScore(memScore + score); | |||||
| } | |||||
| WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(user.getTenantId(), user.getPhone()); | |||||
| if (basicInfo != null ) { | |||||
| int credit = user.getCredit() == null ? 0 : user.getCredit(); | |||||
| int score = user.getScore() == null ? 0 : user.getScore(); | |||||
| int memScore = basicInfo.getPoins() == null ? 0 : basicInfo.getPoins(); | |||||
| int memCredit = basicInfo.getCredit() == null ? 0 : basicInfo.getCredit(); | |||||
| if (memCredit > 0) { | |||||
| user.setCredit(memCredit); | |||||
| wxCUserService.addCredit(user, EnumScoreType.MEM_IMPORT); | |||||
| } | |||||
| user.setCredit(memCredit + credit); | |||||
| user.setScore(memScore + score); | |||||
| } | } | ||||
| } | } | ||||
| wxCUserService.saveOrUpdate(user); | wxCUserService.saveOrUpdate(user); | ||||
| @@ -97,6 +97,7 @@ public class ActivitySchedule { | |||||
| WxActivity activity = new WxActivity(); | WxActivity activity = new WxActivity(); | ||||
| activity.setStatus(EnumActivityStatus.STATUS_THROW_IN.getCode()); | activity.setStatus(EnumActivityStatus.STATUS_THROW_IN.getCode()); | ||||
| activity.setIsExpired(EnumActivityExpired.YES.getCode()); | activity.setIsExpired(EnumActivityExpired.YES.getCode()); | ||||
| activity.setUpdateTime(new Date()); | |||||
| wxActivityMapper.activityExipred(activity); | wxActivityMapper.activityExipred(activity); | ||||
| } | } | ||||
| @@ -108,6 +109,7 @@ public class ActivitySchedule { | |||||
| logger.info("活动结束任务"); | logger.info("活动结束任务"); | ||||
| WxActivity activity = new WxActivity(); | WxActivity activity = new WxActivity(); | ||||
| activity.setStatus(EnumActivityStatus.STATUS_TAKE_OFFF.getCode()); | activity.setStatus(EnumActivityStatus.STATUS_TAKE_OFFF.getCode()); | ||||
| activity.setUpdateTime(new Date()); | |||||
| wxActivityMapper.activityCompletion(activity); | wxActivityMapper.activityCompletion(activity); | ||||
| List<WxActivity> activityList = new ArrayList(); | List<WxActivity> activityList = new ArrayList(); | ||||
| //宣传页下线 | //宣传页下线 | ||||
| @@ -82,7 +82,7 @@ public class OrderExpiringSchedule { | |||||
| List<WxOrder> orderPresss = wxOrderMapper.findListOfCompleteUnPaidPressOrderByDate(dateMap); | List<WxOrder> orderPresss = wxOrderMapper.findListOfCompleteUnPaidPressOrderByDate(dateMap); | ||||
| orderPresss.stream().forEach( o -> { | orderPresss.stream().forEach( o -> { | ||||
| try { | try { | ||||
| orderPressExpired(o); | |||||
| orderPressExpired(o, true); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("砍价券支付过期失败" + e.getMessage()); | logger.error("砍价券支付过期失败" + e.getMessage()); | ||||
| } | } | ||||
| @@ -93,7 +93,7 @@ public class OrderExpiringSchedule { | |||||
| orderPresss = wxOrderMapper.findListOfUnpaidPressOrderByDate(dateMap); | orderPresss = wxOrderMapper.findListOfUnpaidPressOrderByDate(dateMap); | ||||
| orderPresss.stream().forEach( o -> { | orderPresss.stream().forEach( o -> { | ||||
| try { | try { | ||||
| orderPressExpired(o); | |||||
| orderPressExpired(o, false); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("砍价券过期失败" +e.getMessage()); | logger.error("砍价券过期失败" +e.getMessage()); | ||||
| } | } | ||||
| @@ -165,7 +165,7 @@ public class OrderExpiringSchedule { | |||||
| } | } | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public void orderPressExpired(WxOrder order) { | |||||
| public void orderPressExpired(WxOrder order, boolean payExpired) { | |||||
| Date curDate = new Date(); | Date curDate = new Date(); | ||||
| WxOrder updateOrder = new WxOrder(); | WxOrder updateOrder = new WxOrder(); | ||||
| updateOrder.setId(order.getId()); | updateOrder.setId(order.getId()); | ||||
| @@ -176,7 +176,11 @@ public class OrderExpiringSchedule { | |||||
| // 库存退回 | // 库存退回 | ||||
| wxOrderService.stockBack(order); | wxOrderService.stockBack(order); | ||||
| logger.info("砍价订单: " + order.getId() + " create at " + order.getCreateDate() + " expired at " + curDate); | |||||
| if(payExpired) { | |||||
| logger.info("砍价订单(支付过期): " + order.getId() + ", tenantId" + order.getTenantId() + " create at " + order.getCreateDate() + ", update at " + order.getUpdateDate() + " expired at " + curDate); | |||||
| } else { | |||||
| logger.info("砍价订单(过期): " + order.getId() + ", tenantId" + order.getTenantId() + " create at " + order.getCreateDate() + " expired at " + curDate); | |||||
| } | |||||
| } | } | ||||
| @@ -86,7 +86,7 @@ public enum ErrorCode{ | |||||
| MERCHANT_INFO_NOT_EQUAL(2012, "商户信息不对应"), | MERCHANT_INFO_NOT_EQUAL(2012, "商户信息不对应"), | ||||
| MERCHANT_INFO_NOT_VALID(2013, "商户信息禁用"), | MERCHANT_INFO_NOT_VALID(2013, "商户信息禁用"), | ||||
| MERCHANT_REPORT_DATE_NOT_VALID(999, "上报日期大于当天"), | MERCHANT_REPORT_DATE_NOT_VALID(999, "上报日期大于当天"), | ||||
| MERCHANT_NAME_IS_FOUND(2014, "商户名称已存在"), | |||||
| /** | /** | ||||
| * 券 | * 券 | ||||
| */ | */ | ||||
| @@ -113,6 +113,7 @@ public enum ErrorCode{ | |||||
| COUPON_ONLY_FOR_NEW_MEMBER(2038, "您已参加过新会员活动"), | COUPON_ONLY_FOR_NEW_MEMBER(2038, "您已参加过新会员活动"), | ||||
| COUPON_SCORE_NOT_IN_RANGE(2038, "您的成长值/等级与要求不符"), | COUPON_SCORE_NOT_IN_RANGE(2038, "您的成长值/等级与要求不符"), | ||||
| COUPON_STOCK_NO_EQUAL_ERR(2039, "券库存设置要保证同增同减"), | COUPON_STOCK_NO_EQUAL_ERR(2039, "券库存设置要保证同增同减"), | ||||
| COUPON_STOCK_ENDTIME_ERR(2043, "抱歉,有效期截止时间只能增加不能减少!"), | |||||
| PUSH_LIMIT_UP_TO_1DAYLIMIT(2040, "此用户一天内发券到达疲劳度限制"), | PUSH_LIMIT_UP_TO_1DAYLIMIT(2040, "此用户一天内发券到达疲劳度限制"), | ||||
| PUSH_LIMIT_UP_TO_COUPONLIMIT(2041, "此用户发此券到达疲劳度限制"), | PUSH_LIMIT_UP_TO_COUPONLIMIT(2041, "此用户发此券到达疲劳度限制"), | ||||
| @@ -355,7 +356,7 @@ public enum ErrorCode{ | |||||
| BILL_UPDATE_FAILED(21001,"账单更新失败"), | BILL_UPDATE_FAILED(21001,"账单更新失败"), | ||||
| BILL_OWE_ZERO(21002,"账单欠缴为0"), | BILL_OWE_ZERO(21002,"账单欠缴为0"), | ||||
| BILL_PAY_ERROR(21003,"账单支付错误"), | BILL_PAY_ERROR(21003,"账单支付错误"), | ||||
| BILL_IS_FOUND(21004, "创建的账单已存在"), | |||||
| /** | /** | ||||
| * 商铺 | * 商铺 | ||||
| * */ | * */ | ||||
| @@ -407,6 +408,7 @@ public enum ErrorCode{ | |||||
| DEVICE_ALREADY_EXIST(26001, "设备已经存在"), | DEVICE_ALREADY_EXIST(26001, "设备已经存在"), | ||||
| DEVICE_QRCODE_GET_FAILED(26002, "微信二维码生成失败,请重试"), | DEVICE_QRCODE_GET_FAILED(26002, "微信二维码生成失败,请重试"), | ||||
| DEVICE_REACHED_MAX_NUMBER(26003, "设备已经达到最大数量"), | DEVICE_REACHED_MAX_NUMBER(26003, "设备已经达到最大数量"), | ||||
| DEVICE_HAS_BEEN_BOUND(26004, "设备已经绑定到其他商户"), | |||||
| /** | /** | ||||
| * 消息组件 | * 消息组件 | ||||
| */ | */ | ||||
| @@ -22,7 +22,7 @@ public class PushLimit implements Serializable { | |||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| @io.swagger.annotations.ApiModelProperty(value="",name="tenantId") | |||||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||||
| private String tenantId; | private String tenantId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="每人每天可接收短信数",name="msgAmount") | @io.swagger.annotations.ApiModelProperty(value="每人每天可接收短信数",name="msgAmount") | ||||
| private Integer msgAmount; | private Integer msgAmount; | ||||
| @@ -34,10 +34,12 @@ public class PushLimit implements Serializable { | |||||
| private String timeStart; | private String timeStart; | ||||
| @io.swagger.annotations.ApiModelProperty(value="发券,发短信结束时间",name="timeEnd") | @io.swagger.annotations.ApiModelProperty(value="发券,发短信结束时间",name="timeEnd") | ||||
| private String timeEnd; | private String timeEnd; | ||||
| @io.swagger.annotations.ApiModelProperty(value="",name="createTime") | |||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") | |||||
| private Date createTime; | private Date createTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value="",name="updateTime") | |||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") | |||||
| private Date updateTime; | private Date updateTime; | ||||
| @io.swagger.annotations.ApiModelProperty(value="是否启用,0:Enable,1:Disable",name="enable") | |||||
| private Integer enable; | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| @@ -83,7 +83,7 @@ public class WxActivityJoin extends BaseEntity { | |||||
| private Integer sendMsg; | private Integer sendMsg; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "图片", name = "imgUrl") | @io.swagger.annotations.ApiModelProperty(value = "图片", name = "imgUrl") | ||||
| private String img_url; | |||||
| private String imgUrl; | |||||
| @Transient | @Transient | ||||
| @io.swagger.annotations.ApiModelProperty(value = "状态", name = "statusStr") | @io.swagger.annotations.ApiModelProperty(value = "状态", name = "statusStr") | ||||
| @@ -13,6 +13,7 @@ import javax.validation.constraints.NotNull; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -37,7 +38,7 @@ public class WxBillDaily extends BaseEntity{ | |||||
| @Transient | @Transient | ||||
| private String merchantName; | private String merchantName; | ||||
| @Excel(name = "费用类型*", replace = {"水费_1", "电费_2"}, width = 10, orderNum = "2") | |||||
| @Excel(name = "费用类型*", replace = {"水费_1", "电费_2"}, width = 20, orderNum = "2") | |||||
| @NotNull | @NotNull | ||||
| @io.swagger.annotations.ApiModelProperty(value="账单类型",name="type") | @io.swagger.annotations.ApiModelProperty(value="账单类型",name="type") | ||||
| private Integer type; | private Integer type; | ||||
| @@ -112,6 +113,10 @@ public class WxBillDaily extends BaseEntity{ | |||||
| @SortColumn(column = "shopNumber") | @SortColumn(column = "shopNumber") | ||||
| private String shopNumber; | private String shopNumber; | ||||
| @Transient | |||||
| private List<Map<String, Object>> shops; | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import com.iformall.common.SortColumn; | import com.iformall.common.SortColumn; | ||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| @@ -8,10 +9,11 @@ import lombok.ToString; | |||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.io.Serializable; | |||||
| import java.math.BigDecimal; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -35,12 +37,15 @@ public class WxBillOther extends BaseEntity { | |||||
| return super.getSortColumns(); | return super.getSortColumns(); | ||||
| } | } | ||||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||||
| @Transient | @Transient | ||||
| private String merchantName; | private String merchantName; | ||||
| @Excel(name = "其他费用名称", width = 20, orderNum = "3") | |||||
| @io.swagger.annotations.ApiModelProperty(value="账单名称",name="name") | @io.swagger.annotations.ApiModelProperty(value="账单名称",name="name") | ||||
| private String name; | private String name; | ||||
| @Excel(name = "备注", orderNum = "11", width = 20) | |||||
| @io.swagger.annotations.ApiModelProperty(value="账单备注",name="comments") | @io.swagger.annotations.ApiModelProperty(value="账单备注",name="comments") | ||||
| private String comments; | private String comments; | ||||
| @@ -49,21 +54,29 @@ public class WxBillOther extends BaseEntity { | |||||
| private Long receivePay; | private Long receivePay; | ||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | ||||
| private Long pay; | private Long pay; | ||||
| @Excel(name = "缴款截止日期", orderNum = "7", width = 20, format = "yyyy-MM-dd") | |||||
| @SortColumn(column = "receiveDate") | @SortColumn(column = "receiveDate") | ||||
| @io.swagger.annotations.ApiModelProperty(value="截止收款日期",name="receiveDate") | |||||
| @io.swagger.annotations.ApiModelProperty(value="截止收款日期",name="receiveDate") | |||||
| private Date receiveDate; | private Date receiveDate; | ||||
| @Excel(name = "收款日期", orderNum = "8", width = 20, format = "yyyy-MM-dd") | |||||
| @SortColumn(column = "payDate") | @SortColumn(column = "payDate") | ||||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||||
| private Date payDate; | private Date payDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | ||||
| private Date createtime; | private Date createtime; | ||||
| @Excel(name = "逾期(天)", orderNum = "10", width = 20) | |||||
| @SortColumn(column = "expiredDay") | @SortColumn(column = "expiredDay") | ||||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||||
| private Long expiredDay; | private Long expiredDay; | ||||
| @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | ||||
| private String tenantId; | private String tenantId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | ||||
| private Long owe; | private Long owe; | ||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "9") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @io.swagger.annotations.ApiModelProperty(value="删除 是1否0",name="isDel") | @io.swagger.annotations.ApiModelProperty(value="删除 是1否0",name="isDel") | ||||
| @@ -99,10 +112,36 @@ public class WxBillOther extends BaseEntity { | |||||
| @SortColumn(column = "period") | @SortColumn(column = "period") | ||||
| private Integer period; | private Integer period; | ||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||||
| @Transient | @Transient | ||||
| @SortColumn(column = "shopNumber") | @SortColumn(column = "shopNumber") | ||||
| private String shopNumber; | private String shopNumber; | ||||
| @Transient | |||||
| @Excel(name = "实际应收金额(元)", orderNum = "4", width = 20) | |||||
| private String receivePayStr; | |||||
| @Transient | |||||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||||
| private String payStr; | |||||
| @Transient | |||||
| @Excel(name = "欠缴金额(元)", orderNum = "6", width = 20) | |||||
| private String oweStr; | |||||
| public String getReceivePayStr() { | |||||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public String getPayStr() { | |||||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public String getOweStr() { | |||||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Transient | |||||
| private List<Map<String, Object>> shops; | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import com.iformall.common.SortColumn; | import com.iformall.common.SortColumn; | ||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| @@ -8,9 +9,11 @@ import lombok.ToString; | |||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.math.BigDecimal; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | |||||
| /** | /** | ||||
| * @author gongbiao | * @author gongbiao | ||||
| @@ -34,12 +37,14 @@ public class WxBillOtherDeposit extends BaseEntity { | |||||
| return super.getSortColumns(); | return super.getSortColumns(); | ||||
| } | } | ||||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||||
| @Transient | @Transient | ||||
| private String merchantName; | private String merchantName; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "账单名称", name = "name") | @io.swagger.annotations.ApiModelProperty(value = "账单名称", name = "name") | ||||
| private String name; | private String name; | ||||
| @Excel(name = "押金描述", width = 20, orderNum = "3") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单备注", name = "comments") | @io.swagger.annotations.ApiModelProperty(value = "账单备注", name = "comments") | ||||
| private String comments; | private String comments; | ||||
| @@ -54,6 +59,7 @@ public class WxBillOtherDeposit extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "截止收款日期", name = "receiveDate") | @io.swagger.annotations.ApiModelProperty(value = "截止收款日期", name = "receiveDate") | ||||
| private Date receiveDate; | private Date receiveDate; | ||||
| @Excel(name = "收款日期", orderNum = "6", width = 20, format = "yyyy-MM-dd") | |||||
| @SortColumn(column = "payDate") | @SortColumn(column = "payDate") | ||||
| @io.swagger.annotations.ApiModelProperty(value = "到账日期", name = "payDate") | @io.swagger.annotations.ApiModelProperty(value = "到账日期", name = "payDate") | ||||
| private Date payDate; | private Date payDate; | ||||
| @@ -70,6 +76,7 @@ public class WxBillOtherDeposit extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "欠缴", name = "owe") | @io.swagger.annotations.ApiModelProperty(value = "欠缴", name = "owe") | ||||
| private Long owe; | private Long owe; | ||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期5已退还", name = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "删除 是1否0", name = "isDel") | @io.swagger.annotations.ApiModelProperty(value = "删除 是1否0", name = "isDel") | ||||
| @@ -108,10 +115,41 @@ public class WxBillOtherDeposit extends BaseEntity { | |||||
| @SortColumn(column = "period") | @SortColumn(column = "period") | ||||
| private Integer period; | private Integer period; | ||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||||
| @Transient | @Transient | ||||
| @SortColumn(column = "shopNumber") | @SortColumn(column = "shopNumber") | ||||
| private String shopNumber; | private String shopNumber; | ||||
| @Transient | |||||
| @Excel(name = "实际应收金额(元)", orderNum = "4", width = 20) | |||||
| private String receivePayStr; | |||||
| @Transient | |||||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||||
| private String payStr; | |||||
| public String getReceivePayStr() { | |||||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public String getPayStr() { | |||||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public Date getReturnDate() { | |||||
| if (status == null) { | |||||
| return null; | |||||
| } | |||||
| return status == 5 ? updatetime : null; | |||||
| } | |||||
| @Transient | |||||
| @Excel(name = "退款日", orderNum = "7", width = 20, format = "yyyy-MM-dd") | |||||
| private Date returnDate; | |||||
| @Transient | |||||
| private List<Map<String, Object>> shops; | |||||
| public static enum Field { | public static enum Field { | ||||
| Id_ASC("`id` ASC"), Id_DESC("`id` DESC") | Id_ASC("`id` ASC"), Id_DESC("`id` DESC") | ||||
| , ReceivePay_ASC("`receivePay` ASC"), ReceivePay_DESC("`receivePay` DESC") | , ReceivePay_ASC("`receivePay` ASC"), ReceivePay_DESC("`receivePay` DESC") | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import com.iformall.common.SortColumn; | import com.iformall.common.SortColumn; | ||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| @@ -8,6 +9,7 @@ import lombok.ToString; | |||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.math.BigDecimal; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -34,6 +36,7 @@ public class WxBillProperty extends BaseEntity { | |||||
| return super.getSortColumns(); | return super.getSortColumns(); | ||||
| } | } | ||||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||||
| @Transient | @Transient | ||||
| private String merchantName; | private String merchantName; | ||||
| @@ -43,27 +46,58 @@ public class WxBillProperty extends BaseEntity { | |||||
| @SortColumn(column = "receivePay") | @SortColumn(column = "receivePay") | ||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | ||||
| private Long receivePay; | private Long receivePay; | ||||
| public String getReceivePayStr() { | |||||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "本期账款(元)", width = 20, orderNum = "6") | |||||
| @Transient | |||||
| private String receivePayStr; | |||||
| public String getPayStr() { | |||||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "实收账款(元)", width = 20, orderNum = "7") | |||||
| @Transient | |||||
| private String payStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | ||||
| private Long pay; | private Long pay; | ||||
| @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "10") | |||||
| @SortColumn(column = "receiveDate") | @SortColumn(column = "receiveDate") | ||||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||||
| private Date receiveDate; | private Date receiveDate; | ||||
| @Excel(name = "收款日期", format = "yyyy-MM-dd", width = 20, orderNum = "11") | |||||
| @SortColumn(column = "payDate") | @SortColumn(column = "payDate") | ||||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||||
| private Date payDate; | private Date payDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | ||||
| private Date createtime; | private Date createtime; | ||||
| @Excel(name = "逾期(天) ", width = 20, orderNum = "13") | |||||
| @SortColumn(column = "expiredDay") | @SortColumn(column = "expiredDay") | ||||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||||
| private Long expiredDay; | private Long expiredDay; | ||||
| @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | ||||
| private String tenantId; | private String tenantId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | ||||
| private Long owe; | private Long owe; | ||||
| public String getOweStr() { | |||||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "欠缴金额(元)", width = 20, orderNum = "9") | |||||
| @Transient | |||||
| private String oweStr; | |||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @io.swagger.annotations.ApiModelProperty(value="是否删除 是1否0 未到期不显示",name="isDel") | @io.swagger.annotations.ApiModelProperty(value="是否删除 是1否0 未到期不显示",name="isDel") | ||||
| @@ -85,9 +119,11 @@ public class WxBillProperty extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | ||||
| private Date updatetime; | private Date updatetime; | ||||
| @Excel(name = "周期开始时间", format = "yyyy-MM-dd", width = 20, orderNum = "4") | |||||
| @io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime") | @io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime") | ||||
| private Date starttime; | private Date starttime; | ||||
| @Excel(name = "周期结束时间", format = "yyyy-MM-dd", width = 20, orderNum = "5") | |||||
| @io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime") | @io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime") | ||||
| private Date endtime; | private Date endtime; | ||||
| @@ -107,6 +143,14 @@ public class WxBillProperty extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | ||||
| private Long latePayPrice; | private Long latePayPrice; | ||||
| public String getLatePayPriceStr() { | |||||
| return new BigDecimal(latePayPrice == null ? 0 : latePayPrice).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "滞纳金(元)", width = 20, orderNum = "12") | |||||
| @Transient | |||||
| private String latePayPriceStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账期", name = "period") | @io.swagger.annotations.ApiModelProperty(value = "账期", name = "period") | ||||
| private Integer period; | private Integer period; | ||||
| @@ -128,12 +172,17 @@ public class WxBillProperty extends BaseEntity { | |||||
| @Transient | @Transient | ||||
| @SortColumn(column = "allPeriod") | @SortColumn(column = "allPeriod") | ||||
| private Integer allPeriod; | private Integer allPeriod; | ||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||||
| @Transient | @Transient | ||||
| @SortColumn(column = "shopNumber") | @SortColumn(column = "shopNumber") | ||||
| private String shopNumber; | private String shopNumber; | ||||
| @Transient | @Transient | ||||
| private Integer depositStatus; | private Integer depositStatus; | ||||
| @Transient | |||||
| private Long deposit; | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import com.iformall.common.SortColumn; | import com.iformall.common.SortColumn; | ||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| @@ -8,6 +9,7 @@ import lombok.ToString; | |||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.math.BigDecimal; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -33,6 +35,8 @@ public class WxBillRent extends BaseEntity { | |||||
| super.setSortColumns(this.sortColumns); | super.setSortColumns(this.sortColumns); | ||||
| return super.getSortColumns(); | return super.getSortColumns(); | ||||
| } | } | ||||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||||
| @Transient | @Transient | ||||
| private String merchantName; | private String merchantName; | ||||
| @@ -42,22 +46,42 @@ public class WxBillRent extends BaseEntity { | |||||
| @SortColumn(column = "receivePay") | @SortColumn(column = "receivePay") | ||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | ||||
| private Long receivePay; | private Long receivePay; | ||||
| public String getReceivePayStr() { | |||||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "本期账款(元)", width = 20, orderNum = "6") | |||||
| @Transient | |||||
| private String receivePayStr; | |||||
| public String getPayStr() { | |||||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "实收账款(元)", width = 20, orderNum = "7") | |||||
| @Transient | |||||
| private String payStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | ||||
| private Long pay; | private Long pay; | ||||
| @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "10") | |||||
| @SortColumn(column = "receiveDate") | @SortColumn(column = "receiveDate") | ||||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||||
| private Date receiveDate; | private Date receiveDate; | ||||
| @Excel(name = "收款日期", format = "yyyy-MM-dd", width = 20, orderNum = "11") | |||||
| @SortColumn(column = "payDate") | @SortColumn(column = "payDate") | ||||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||||
| private Date payDate; | private Date payDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | ||||
| private Date createtime; | private Date createtime; | ||||
| @Excel(name = "逾期(天) ", width = 20, orderNum = "13") | |||||
| @SortColumn(column = "expiredDay") | @SortColumn(column = "expiredDay") | ||||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||||
| private Long expiredDay; | private Long expiredDay; | ||||
| @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | ||||
| @@ -66,6 +90,15 @@ public class WxBillRent extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") | ||||
| private Long owe; | private Long owe; | ||||
| public String getOweStr() { | |||||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "欠缴金额(元)", width = 20, orderNum = "9") | |||||
| @Transient | |||||
| private String oweStr; | |||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "8") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @@ -88,9 +121,11 @@ public class WxBillRent extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | ||||
| private Date updatetime; | private Date updatetime; | ||||
| @Excel(name = "周期开始时间", format = "yyyy-MM-dd", width = 20, orderNum = "4") | |||||
| @io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime") | @io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime") | ||||
| private Date starttime; | private Date starttime; | ||||
| @Excel(name = "周期结束时间", format = "yyyy-MM-dd", width = 20, orderNum = "5") | |||||
| @io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime") | @io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime") | ||||
| private Date endtime; | private Date endtime; | ||||
| @@ -110,6 +145,14 @@ public class WxBillRent extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | ||||
| private Long latePayPrice; | private Long latePayPrice; | ||||
| public String getLatePayPriceStr() { | |||||
| return new BigDecimal(latePayPrice == null ? 0 : latePayPrice).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "滞纳金(元)", width = 20, orderNum = "12") | |||||
| @Transient | |||||
| private String latePayPriceStr; | |||||
| @SortColumn(column = "period") | @SortColumn(column = "period") | ||||
| @io.swagger.annotations.ApiModelProperty(value = "账期", name = "period") | @io.swagger.annotations.ApiModelProperty(value = "账期", name = "period") | ||||
| private Integer period; | private Integer period; | ||||
| @@ -133,12 +176,26 @@ public class WxBillRent extends BaseEntity { | |||||
| @Transient | @Transient | ||||
| @SortColumn(column = "allPeriod") | @SortColumn(column = "allPeriod") | ||||
| private Integer allPeriod; | private Integer allPeriod; | ||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||||
| @Transient | @Transient | ||||
| @SortColumn(column = "shopNumber") | @SortColumn(column = "shopNumber") | ||||
| private String shopNumber; | private String shopNumber; | ||||
| @Excel(name = "押金状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "3") | |||||
| @Transient | @Transient | ||||
| private Integer depositStatus; | private Integer depositStatus; | ||||
| @Transient | |||||
| private Integer rentType; | |||||
| @Transient | |||||
| private Long deposit; | |||||
| @Transient | |||||
| @io.swagger.annotations.ApiModelProperty(value = "联营费率", name = "payRatio") | |||||
| private Long payRatio; | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| @@ -38,6 +38,8 @@ public class WxBusiness implements Serializable { | |||||
| @Transient | @Transient | ||||
| @io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="enddate") | @io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="enddate") | ||||
| private Date enddate; | private Date enddate; | ||||
| @Transient | |||||
| private String tenantId; | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| @@ -46,7 +46,6 @@ public class WxCUserBasicInfo extends BaseEntity { | |||||
| @Excel(name = "手机号*", width = 20, orderNum = "3") | @Excel(name = "手机号*", width = 20, orderNum = "3") | ||||
| @io.swagger.annotations.ApiModelProperty(value="微信用户绑定的手机号",name="phone") | @io.swagger.annotations.ApiModelProperty(value="微信用户绑定的手机号",name="phone") | ||||
| @NotNull | @NotNull | ||||
| private String phone; | private String phone; | ||||
| @Excel(name="微信昵称",width = 20,orderNum = "4") | @Excel(name="微信昵称",width = 20,orderNum = "4") | ||||
| @@ -1,11 +1,13 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.io.Serializable; | import java.io.Serializable; | ||||
| import java.math.BigDecimal; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -13,7 +15,8 @@ import java.util.List; | |||||
| @Data | @Data | ||||
| public class WxCardInfo implements Serializable { | public class WxCardInfo implements Serializable { | ||||
| private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
| @Excel(name = "卡号", width = 20, orderNum = "1") | |||||
| @Id | @Id | ||||
| protected Long id; /**主键ID-与coupon_order_id一致*/ | protected Long id; /**主键ID-与coupon_order_id一致*/ | ||||
| @@ -32,6 +35,16 @@ public class WxCardInfo implements Serializable { | |||||
| private Integer amount; | private Integer amount; | ||||
| @io.swagger.annotations.ApiModelProperty(value="购买总金额",name="saleAmount") | @io.swagger.annotations.ApiModelProperty(value="购买总金额",name="saleAmount") | ||||
| private Integer saleAmount; | private Integer saleAmount; | ||||
| public String getRemainingAmountStr() { | |||||
| return new BigDecimal(remainingAmount == null ? 0 : remainingAmount).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "余额(元)", width = 20, orderNum = "6") | |||||
| @Transient | |||||
| private String remainingAmountStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value="剩余面额",name="remainingAmount") | @io.swagger.annotations.ApiModelProperty(value="剩余面额",name="remainingAmount") | ||||
| private Integer remainingAmount; | private Integer remainingAmount; | ||||
| @io.swagger.annotations.ApiModelProperty(value="分账总手续费",name="serviceFeeAmount") | @io.swagger.annotations.ApiModelProperty(value="分账总手续费",name="serviceFeeAmount") | ||||
| @@ -42,6 +55,8 @@ public class WxCardInfo implements Serializable { | |||||
| private Integer remainingShareFeeAmount; | private Integer remainingShareFeeAmount; | ||||
| @io.swagger.annotations.ApiModelProperty(value="分账通道费差(购买时刻的通道费差,分账完结时使用)",name="rateAmount") | @io.swagger.annotations.ApiModelProperty(value="分账通道费差(购买时刻的通道费差,分账完结时使用)",name="rateAmount") | ||||
| private Integer rateAmount; | private Integer rateAmount; | ||||
| @Excel(name = "购买时间 ", width = 20, orderNum = "9", format = "yyyy-MM-dd HH:mm:ss") | |||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | ||||
| private Date createDate; | private Date createDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | ||||
| @@ -1,15 +1,15 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | import cn.afterturn.easypoi.excel.annotation.Excel; | ||||
| import io.swagger.models.auth.In; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import javax.persistence.*; | |||||
| import java.math.BigDecimal; | |||||
| import java.util.*; | |||||
| import javax.persistence.Transient; | |||||
| import java.util.List; | |||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Table; | |||||
| import javax.persistence.Transient; | |||||
| import java.io.Serializable; | import java.io.Serializable; | ||||
| import java.math.BigDecimal; | |||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| @Table(name = "wx_card_spend") | @Table(name = "wx_card_spend") | ||||
| @Data | @Data | ||||
| @@ -17,7 +17,6 @@ public class WxCardSpend implements Serializable { | |||||
| private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
| @Id | @Id | ||||
| @Excel(name="交易编号",width = 20,orderNum = "1") | |||||
| protected Long id; | protected Long id; | ||||
| @Transient | @Transient | ||||
| @@ -33,6 +32,8 @@ public class WxCardSpend implements Serializable { | |||||
| private Long ownerId; | private Long ownerId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | ||||
| private Long merchantId; | private Long merchantId; | ||||
| @Excel(name = "订单号", width = 20, orderNum = "5") | |||||
| @io.swagger.annotations.ApiModelProperty(value="订单账号",name="orderId") | @io.swagger.annotations.ApiModelProperty(value="订单账号",name="orderId") | ||||
| private Long orderId; | private Long orderId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="ip地址",name="ip") | @io.swagger.annotations.ApiModelProperty(value="ip地址",name="ip") | ||||
| @@ -43,6 +44,7 @@ public class WxCardSpend implements Serializable { | |||||
| private Integer payment; | private Integer payment; | ||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额(不包含通道费)",name="realPayment") | @io.swagger.annotations.ApiModelProperty(value="实收金额(不包含通道费)",name="realPayment") | ||||
| private Integer realPayment; | private Integer realPayment; | ||||
| @io.swagger.annotations.ApiModelProperty(value="卡剩余总金额",name="cardRemainAmount") | @io.swagger.annotations.ApiModelProperty(value="卡剩余总金额",name="cardRemainAmount") | ||||
| private Integer cardRemainAmount; | private Integer cardRemainAmount; | ||||
| @io.swagger.annotations.ApiModelProperty(value="卡支付前总金额",name="cardBeforeAmount") | @io.swagger.annotations.ApiModelProperty(value="卡支付前总金额",name="cardBeforeAmount") | ||||
| @@ -58,20 +60,20 @@ public class WxCardSpend implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | ||||
| private Date updateDate; | private Date updateDate; | ||||
| @Excel(name="补贴状态",width = 20,orderNum = "10",replace = { "未支付_0", "已分账_1","已人工分账_2"}) | |||||
| @Excel(name = "支付状态", width = 20, orderNum = "11", replace = {"未支付_0", "已分账_1", "已人工分账_2"}) | |||||
| @io.swagger.annotations.ApiModelProperty(value="支付状态(0:未分帐, 1:已分账, 2:已人工分账)",name="payStatus") | @io.swagger.annotations.ApiModelProperty(value="支付状态(0:未分帐, 1:已分账, 2:已人工分账)",name="payStatus") | ||||
| private Integer payStatus; | private Integer payStatus; | ||||
| @Transient | @Transient | ||||
| @Excel(name="消费金额",width = 20,orderNum = "7") | |||||
| @Excel(name = "消费金额(元)", width = 20, orderNum = "7") | |||||
| private String deductionAmountStr; | private String deductionAmountStr; | ||||
| @Transient | @Transient | ||||
| @Excel(name="收款金额",width = 20,orderNum = "8") | |||||
| @Excel(name = "应付金额(元)", width = 20, orderNum = "9") | |||||
| private String paymentStr; | private String paymentStr; | ||||
| @Transient | @Transient | ||||
| @Excel(name="收款实际金额",width = 20,orderNum = "9") | |||||
| @Excel(name = "实付金额(扣除手续费/元)", width = 20, orderNum = "8") | |||||
| private String realPaymentStr; | private String realPaymentStr; | ||||
| @@ -98,6 +100,14 @@ public class WxCardSpend implements Serializable { | |||||
| @Transient | @Transient | ||||
| private Integer subBusinessId; | private Integer subBusinessId; | ||||
| public String getCardRemainAmountStr() { | |||||
| return new BigDecimal(cardRemainAmount == null ? 0 : cardRemainAmount).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Transient | |||||
| @Excel(name = "卡余额(元) ", width = 20, orderNum = "10") | |||||
| private String cardRemainAmountStr; | |||||
| public String getDeductionAmountStr() { | public String getDeductionAmountStr() { | ||||
| if(getDeductionAmount()!=null) { | if(getDeductionAmount()!=null) { | ||||
| deductionAmountStr = new BigDecimal(getDeductionAmount()).divide(new BigDecimal(100)).toString(); | deductionAmountStr = new BigDecimal(getDeductionAmount()).divide(new BigDecimal(100)).toString(); | ||||
| @@ -146,6 +146,7 @@ public class WxCoupon extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="领取条件",name="condition") | @io.swagger.annotations.ApiModelProperty(value="领取条件",name="condition") | ||||
| private String conditions; | private String conditions; | ||||
| private Integer approvalType; | |||||
| @Transient | @Transient | ||||
| private String merchantParams; | private String merchantParams; | ||||
| @@ -206,6 +207,25 @@ public class WxCoupon extends BaseEntity { | |||||
| @Transient | @Transient | ||||
| private Integer pressSuccCount; | private Integer pressSuccCount; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "过滤可投放0不过滤 1过滤", name = "filterCanPut") | |||||
| @Transient | |||||
| private Integer filterCanPut; | |||||
| //审批模板id 卷、卡、拼团、砍价 | |||||
| @Transient | |||||
| private Long couponModelId; | |||||
| @Transient | |||||
| private Long cardModelId; | |||||
| @Transient | |||||
| private Long groupModelId; | |||||
| @Transient | |||||
| private Long pressModelId; | |||||
| @Transient | |||||
| private Integer limitStart; | |||||
| @Transient | |||||
| private Integer limitEnd; | |||||
| @Transient | @Transient | ||||
| @io.swagger.annotations.ApiModelProperty(value = "审批流参数", name = "flowParams") | @io.swagger.annotations.ApiModelProperty(value = "审批流参数", name = "flowParams") | ||||
| private Map<String, Object> flowParams; | private Map<String, Object> flowParams; | ||||
| @@ -61,6 +61,9 @@ public class WxFlowRecord implements Serializable { | |||||
| @Transient | @Transient | ||||
| private Integer taskType; | private Integer taskType; | ||||
| //coupon 操作类型 | |||||
| @Transient | |||||
| private Integer approvalType; | |||||
| public WxFlowRecord(){} | public WxFlowRecord(){} | ||||
| public WxFlowRecord(Long businessId){ | public WxFlowRecord(Long businessId){ | ||||
| @@ -74,4 +77,9 @@ public class WxFlowRecord implements Serializable { | |||||
| this.businessId = businessId; | this.businessId = businessId; | ||||
| this.tenantId = tenantId; | this.tenantId = tenantId; | ||||
| } | } | ||||
| public WxFlowRecord(Long businessId,String tenantId,Integer approvalType){ | |||||
| this.businessId = businessId; | |||||
| this.tenantId = tenantId; | |||||
| this.approvalType = approvalType; | |||||
| } | |||||
| } | } | ||||
| @@ -36,6 +36,7 @@ public class WxLevelMerchant implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value="折扣率(0-100折扣)",name="discount") | @io.swagger.annotations.ApiModelProperty(value="折扣率(0-100折扣)",name="discount") | ||||
| private Integer discount; | private Integer discount; | ||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| @@ -183,6 +183,9 @@ public class WxMerchant extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "辅谈人", name = "talkUserAux") | @io.swagger.annotations.ApiModelProperty(value = "辅谈人", name = "talkUserAux") | ||||
| private String talkUserAux; | private String talkUserAux; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "客服电话", name = "linkLinePhone") | |||||
| private String linkLinePhone; | |||||
| @Transient | @Transient | ||||
| private WxProfitSharingReceiver wxProfitSharingReceiver; | private WxProfitSharingReceiver wxProfitSharingReceiver; | ||||
| @@ -46,6 +46,13 @@ public class WxMerchantTradeDaily implements Serializable { | |||||
| @Transient | @Transient | ||||
| private String month; | private String month; | ||||
| @Transient | |||||
| private String starttime; | |||||
| @Transient | |||||
| private String endtime; | |||||
| public Integer getTradeAmtInteger(){ | public Integer getTradeAmtInteger(){ | ||||
| if (StringUtils.isBlank(tradeAmt)){ | if (StringUtils.isBlank(tradeAmt)){ | ||||
| return 0; | return 0; | ||||
| @@ -0,0 +1,107 @@ | |||||
| package com.iformall.domain.po; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | |||||
| import javax.persistence.Id; | |||||
| import javax.persistence.Table; | |||||
| import javax.persistence.Transient; | |||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| @Table(name = "wx_msg_limit") | |||||
| @Data | |||||
| @ToString(callSuper = true) | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxMsgLimit extends BaseEntity { | |||||
| @Id | |||||
| protected Long id; | |||||
| @Transient | |||||
| protected List<Long> ids; | |||||
| @Transient | |||||
| protected String sortColumns; | |||||
| @Override | |||||
| public String getSortColumns() { | |||||
| super.setSortColumns(this.sortColumns); | |||||
| return super.getSortColumns(); | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||||
| private String tenantId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="1: 短信-验证码(24小时10条)2:短信-营销(24小时3条) 11:prepay_id(7天内3次), 12:form_id(7天内1次), 13.open_id for 小程序统一消息限制(2天内1次),14.open_id for 公众号模板消息限制(2天内1次)",name="type") | |||||
| private Integer type; | |||||
| @io.swagger.annotations.ApiModelProperty(value="限制ID",name="limitId") | |||||
| private String limitId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="限制次数",name="limitNum") | |||||
| private Integer limitNum; | |||||
| @io.swagger.annotations.ApiModelProperty(value="限制时间(type=1,2时,24小时; tyep=11,12,13时,为自然日结束时间)",name="limitDate") | |||||
| private Date limitDate; | |||||
| @Transient | |||||
| @io.swagger.annotations.ApiModelProperty(value="过期时间(一般为当前时间)",name="expireDate") | |||||
| private Date expireDate; | |||||
| public static enum Field | |||||
| { | |||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||||
| ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") | |||||
| ,Type_ASC("`type` ASC"),Name_DESC("`type` DESC") | |||||
| ,LimitId_ASC("`limit_id` ASC"),LimitId_DESC("`limit_id` DESC") | |||||
| ,LimitDate_ASC("`limit_date` ASC"),LimitDate_DESC("`limit_date` DESC") | |||||
| ; | |||||
| private String value; | |||||
| Field(String value){ | |||||
| this.value = value; | |||||
| } | |||||
| public String getValue() { | |||||
| return value; | |||||
| } | |||||
| public void setCol(String value) { | |||||
| this.value = value; | |||||
| } | |||||
| @Override | |||||
| public String toString() { | |||||
| return this.getValue(); | |||||
| } | |||||
| } | |||||
| public void setSortColumns(WxMsgLimit.Field... fields) | |||||
| { | |||||
| if (fields == null || fields.length == 0) { | |||||
| return; | |||||
| } | |||||
| for (int k = 0; k < fields.length; k++) { | |||||
| if (fields[k] == null) { | |||||
| return; | |||||
| } | |||||
| } | |||||
| StringBuilder sb = new StringBuilder(fields[0].toString()); | |||||
| for (int k = 1; k < fields.length; k++) { | |||||
| sb.append(","); | |||||
| sb.append(fields[k].toString()); | |||||
| } | |||||
| this.sortColumns = sb.toString(); | |||||
| } | |||||
| public void setSortColumns(String sortColumns) | |||||
| { | |||||
| if (sortColumns == null || "".equals(sortColumns.trim())) { | |||||
| return; | |||||
| } | |||||
| if (sortColumns.contains(",")) { | |||||
| String[] cols = sortColumns.split(","); | |||||
| List<Field> fList = new java.util.ArrayList(); | |||||
| for (int k = 0; k < cols.length; k++) { | |||||
| fList.add(Field.valueOf(cols[k])); | |||||
| } | |||||
| this.setSortColumns(fList.toArray(new Field[fList.size()])); | |||||
| } else { | |||||
| this.setSortColumns(Field.valueOf(sortColumns)); | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -132,22 +132,7 @@ public class WxShop extends BaseEntity { | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||||
| ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") | |||||
| ,ShopNumber_ASC("`shopNumber` ASC"),ShopNumber_DESC("`shopNumber` DESC") | |||||
| ,BuildArea_ASC("`buildArea` ASC"),BuildArea_DESC("`buildArea` DESC") | |||||
| ,OperationArea_ASC("`operationArea` ASC"),OperationArea_DESC("`operationArea` DESC") | |||||
| ,Building_ASC("`building` ASC"),Building_DESC("`building` DESC") | |||||
| ,Floor_ASC("`floor` ASC"),Floor_DESC("`floor` DESC") | |||||
| ,Status_ASC("`status` ASC"),Status_DESC("`status` DESC") | |||||
| ,X_ASC("`x` ASC"),X_DESC("`x` DESC") | |||||
| ,Y_ASC("`y` ASC"),Y_DESC("`y` DESC") | |||||
| ,Addr_ASC("`addr` ASC"),Addr_DESC("`addr` DESC") | |||||
| ,BaiduPoi_ASC("`baiduPoi` ASC"),BaiduPoi_DESC("`baiduPoi` DESC") | |||||
| ,Longitude_ASC("`longitude` ASC"),Longitude_DESC("`longitude` DESC") | |||||
| ,Latitude_ASC("`latitude` ASC"),Latitude_DESC("`latitude` DESC") | |||||
| ,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC") | |||||
| ,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC") | |||||
| Id_ASC("s.`id` ASC"), Id_DESC("s.`id` DESC"), TenantId_ASC("s.`tenant_id` ASC"), TenantId_DESC("s.`tenant_id` DESC"), ShopNumber_ASC("s.`shop_number` ASC"), ShopNumber_DESC("s.`shop_number` DESC"), BuildArea_ASC("s.`build_area` ASC"), BuildArea_DESC("s.`build_area` DESC"), OperationArea_ASC("s.`operation_area` ASC"), OperationArea_DESC("s.`operation_area` DESC"), Building_ASC("s.`building` ASC"), Building_DESC("s.`building` DESC"), Floor_ASC("s.`floor` ASC"), Floor_DESC("s.`floor` DESC"), Status_ASC("s.`status` ASC"), Status_DESC("s.`status` DESC"), X_ASC("s.`x` ASC"), X_DESC("s.`x` DESC"), Y_ASC("s.`y` ASC"), Y_DESC("s.`y` DESC"), Addr_ASC("s.`addr` ASC"), Addr_DESC("s.`addr` DESC"), BaiduPoi_ASC("s.`baidu_poi` ASC"), BaiduPoi_DESC("s.`baidu_poi` DESC"), Longitude_ASC("s.`longitude` ASC"), Longitude_DESC("s.`longitude` DESC"), Latitude_ASC("s.`latitude` ASC"), Latitude_DESC("s.`latitude` DESC"), CreateDate_ASC("`s.create_date` ASC"), CreateDate_DESC("s.`create_date` DESC"), UpdateDate_ASC("s.`update_date` ASC"), UpdateDate_DESC("s.`update_date` DESC") | |||||
| ; | ; | ||||
| private String value; | private String value; | ||||
| Field(String value){ | Field(String value){ | ||||
| @@ -0,0 +1,23 @@ | |||||
| package com.iformall.domain.vo; | |||||
| import com.iformall.domain.po.KwMeter; | |||||
| import lombok.Data; | |||||
| import java.util.List; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Data | |||||
| public class KwMerchantMeterVo extends KwMeter { | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户名",name="name") | |||||
| private String merchantName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户联系方式",name="linkPhone") | |||||
| private String merchantLinkPhone; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺列表", name = "shopVoList") | |||||
| private List<WxShopVo> shopVoList; | |||||
| } | |||||
| @@ -14,5 +14,6 @@ public class MarkingSceneDataVo { | |||||
| private int sendCount; //场景营销发券数 | private int sendCount; //场景营销发券数 | ||||
| private int verifiedCount; //场景营销券核销数 | private int verifiedCount; //场景营销券核销数 | ||||
| private String verifiedPercent; //场景营销核销比 | private String verifiedPercent; //场景营销核销比 | ||||
| private String xTime; //时间 | |||||
| private String xtime; //时间 | |||||
| } | } | ||||
| @@ -0,0 +1,52 @@ | |||||
| package com.iformall.domain.vo; | |||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import lombok.Data; | |||||
| import java.math.BigDecimal; | |||||
| import java.util.Date; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Data | |||||
| public class WxBillDailyExportVo { | |||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||||
| private String shopNumber; | |||||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||||
| private String merchantName; | |||||
| @Excel(name = "费用类型", replace = {"水费_1", "电费_2", "空调费_3"}, width = 10, orderNum = "3") | |||||
| private Integer type; | |||||
| @Excel(name = "实际应收金额(元)", orderNum = "4", width = 20) | |||||
| private String receivePayStr; | |||||
| @Excel(name = "实收金额(元)", orderNum = "5", width = 20) | |||||
| private String payStr; | |||||
| @Excel(name = "欠缴金额(元)", orderNum = "6", width = 20) | |||||
| private String oweStr; | |||||
| @Excel(name = "缴款截止日期", orderNum = "7", width = 20, format = "yyyy-MM-dd") | |||||
| private Date receiveDate; | |||||
| @Excel(name = "收款日期", orderNum = "8", width = 20, format = "yyyy-MM-dd") | |||||
| private Date payDate; | |||||
| @Excel(name = "状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6"}, width = 20, orderNum = "9") | |||||
| private Integer status; | |||||
| @Excel(name = "逾期(天)", orderNum = "10", width = 20) | |||||
| private Long expiredDay; | |||||
| private Long receivePay; | |||||
| private Long pay; | |||||
| private Long owe; | |||||
| public String getReceivePayStr() { | |||||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public String getPayStr() { | |||||
| return new BigDecimal(pay == null ? 0 : pay).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| public String getOweStr() { | |||||
| return new BigDecimal(owe == null ? 0 : owe).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,40 @@ | |||||
| package com.iformall.domain.vo; | |||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import lombok.Data; | |||||
| import java.util.Date; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Data | |||||
| public class WxBillExcelTemplate { | |||||
| @Excel(name = "商户名*", width = 20, orderNum = "1") | |||||
| private String merchantName; | |||||
| @Excel(name = "费用类型*", width = 20, orderNum = "2", replace = {"商铺租金_1", "多经点位租金_2", "商铺物业费_3", "多经点位物业费_4", "日常费用_5", "其他费用_6", "其他押金_7"}) | |||||
| private Integer billType; | |||||
| @Excel(name = "费用所属期-开始时间*", width = 20, orderNum = "4", format = "yyyy-MM-dd") | |||||
| private Date starttime; | |||||
| @Excel(name = "费用所属期-结束时间*", width = 20, orderNum = "5", format = "yyyy-MM-dd") | |||||
| private Date endtime; | |||||
| @Excel(name = "收款金额(元)*", width = 20, orderNum = "6") | |||||
| private String payStr; | |||||
| @Excel(name = "收款日期*", width = 20, orderNum = "7", format = "yyyy-MM-dd") | |||||
| private Date payDate; | |||||
| @Excel(name = "截止缴款日*", width = 20, orderNum = "8", format = "yyyy-MM-dd") | |||||
| private Date receiveDate; | |||||
| @Excel(name = "收款方式", width = 20, orderNum = "9") | |||||
| private String payWay; | |||||
| private Long merchantId; | |||||
| private Integer merchantType; | |||||
| } | |||||
| @@ -0,0 +1,15 @@ | |||||
| package com.iformall.domain.vo; | |||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import lombok.Data; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Data | |||||
| public class WxBillExcelTemplateDaily extends WxBillExcelTemplate { | |||||
| @Excel(name = "费用属性*", width = 20, orderNum = "3", replace = {"租金_1", "物业费_2", "水费_3", "电费_4", "空调费_5", "其他费用_6", "其他押金_7"}) | |||||
| private Integer billAttr; | |||||
| } | |||||
| @@ -0,0 +1,15 @@ | |||||
| package com.iformall.domain.vo; | |||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import lombok.Data; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Data | |||||
| public class WxBillExcelTemplateOther extends WxBillExcelTemplate { | |||||
| @Excel(name = "费用属性*", width = 20, orderNum = "3") | |||||
| private String billAttr; | |||||
| } | |||||
| @@ -0,0 +1,20 @@ | |||||
| package com.iformall.domain.vo; | |||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import lombok.Data; | |||||
| @Data | |||||
| public class WxBusinessDataVo { | |||||
| @Excel(name="业态",width = 20,orderNum = "1") | |||||
| private String name; | |||||
| @Excel(name="营业额(万)",width = 20,orderNum = "2") | |||||
| private String sale = "0"; | |||||
| @Excel(name="销售坪效(元/m2)",width = 20,orderNum = "3") | |||||
| private String saleRate = "0" ; | |||||
| @Excel(name="租赁坪效(元/m2)",width = 20,orderNum = "5") | |||||
| private String rentRate = "0"; | |||||
| @Excel(name="租售比",width = 20,orderNum = "6") | |||||
| private String rentSaleRate = "0"; | |||||
| @Excel(name="客单价(元)",width = 20,orderNum = "7") | |||||
| private String comPrice = "0"; | |||||
| } | |||||
| @@ -6,9 +6,6 @@ import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| import lombok.ToString; | import lombok.ToString; | ||||
| import javax.persistence.Transient; | |||||
| import java.util.Date; | |||||
| @Data | @Data | ||||
| @ToString(callSuper = true) | @ToString(callSuper = true) | ||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| @@ -16,11 +13,11 @@ public class WxCardSpendVo extends WxCardSpend { | |||||
| /**卡信息*/ | /**卡信息*/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="卡券名称",name="title") | @io.swagger.annotations.ApiModelProperty(value="卡券名称",name="title") | ||||
| @Excel(name="卡名",width = 20,orderNum = "4") | |||||
| @Excel(name = "卡名称", width = 20, orderNum = "3") | |||||
| private String title; | private String title; | ||||
| @io.swagger.annotations.ApiModelProperty(value="商户名",name="merchantName") | @io.swagger.annotations.ApiModelProperty(value="商户名",name="merchantName") | ||||
| @Excel(name="商户",width = 20,orderNum = "5") | |||||
| @Excel(name = "消费商户", width = 20, orderNum = "4") | |||||
| private String merchantName; | private String merchantName; | ||||
| @io.swagger.annotations.ApiModelProperty(value="补贴额(包含通道费)",name="subsidy") | @io.swagger.annotations.ApiModelProperty(value="补贴额(包含通道费)",name="subsidy") | ||||
| @@ -30,12 +27,12 @@ public class WxCardSpendVo extends WxCardSpend { | |||||
| @io.swagger.annotations.ApiModelProperty(value="补贴状态(0:未补贴, 1:已补贴)",name="status") | @io.swagger.annotations.ApiModelProperty(value="补贴状态(0:未补贴, 1:已补贴)",name="status") | ||||
| private Integer status; | private Integer status; | ||||
| @Excel(name="消费者",width = 20,orderNum = "2") | |||||
| @Excel(name = "消费者", width = 20, orderNum = "1") | |||||
| @io.swagger.annotations.ApiModelProperty(value="持有人昵称",name="onickName") | @io.swagger.annotations.ApiModelProperty(value="持有人昵称",name="onickName") | ||||
| private String onickName; | private String onickName; | ||||
| @Excel(name="手机号",width = 20,orderNum = "3") | |||||
| @Excel(name = "手机", width = 20, orderNum = "2") | |||||
| @io.swagger.annotations.ApiModelProperty(value="持有人绑定的手机号",name="ouPhone") | @io.swagger.annotations.ApiModelProperty(value="持有人绑定的手机号",name="ouPhone") | ||||
| private String ouPhone; | private String ouPhone; | ||||
| @@ -1,12 +1,14 @@ | |||||
| package com.iformall.domain.vo; | package com.iformall.domain.vo; | ||||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import com.iformall.domain.po.WxCardInfo; | import com.iformall.domain.po.WxCardInfo; | ||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| import lombok.ToString; | import lombok.ToString; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.math.BigDecimal; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -22,6 +24,8 @@ public class WxCardVo extends WxCardInfo { | |||||
| private String coverPicture; | private String coverPicture; | ||||
| @io.swagger.annotations.ApiModelProperty(value="详情多图",name="detailPicture") | @io.swagger.annotations.ApiModelProperty(value="详情多图",name="detailPicture") | ||||
| private String detailPicture; | private String detailPicture; | ||||
| @Excel(name = "卡名称", width = 20, orderNum = "4") | |||||
| @io.swagger.annotations.ApiModelProperty(value="券名称",name="title") | @io.swagger.annotations.ApiModelProperty(value="券名称",name="title") | ||||
| private String title; | private String title; | ||||
| @io.swagger.annotations.ApiModelProperty(value="副标题",name="subTitle") | @io.swagger.annotations.ApiModelProperty(value="副标题",name="subTitle") | ||||
| @@ -33,12 +37,39 @@ public class WxCardVo extends WxCardInfo { | |||||
| @io.swagger.annotations.ApiModelProperty(value="购买须知",name="remark") | @io.swagger.annotations.ApiModelProperty(value="购买须知",name="remark") | ||||
| private String remark; | private String remark; | ||||
| public String getPriceStr() { | |||||
| return new BigDecimal(price == null ? 0 : price).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "面额(元)", width = 20, orderNum = "5") | |||||
| @Transient | |||||
| private String priceStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "面额", name = "price") | @io.swagger.annotations.ApiModelProperty(value = "面额", name = "price") | ||||
| private Integer price; | private Integer price; | ||||
| public String getSalePriceStr() { | |||||
| return new BigDecimal(salePrice == null ? 0 : salePrice).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "售价(元)", width = 20, orderNum = "7") | |||||
| @Transient | |||||
| private String salePriceStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "购买金额", name = "salePrice") | @io.swagger.annotations.ApiModelProperty(value = "购买金额", name = "salePrice") | ||||
| private Integer salePrice; | private Integer salePrice; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "补贴类型", name = "subsidyType") | @io.swagger.annotations.ApiModelProperty(value = "补贴类型", name = "subsidyType") | ||||
| private Integer subsidyType; | private Integer subsidyType; | ||||
| public String getSubsidyNumStr() { | |||||
| return new BigDecimal(subsidyNum == null ? 0 : subsidyNum).divide(new BigDecimal(100)).toPlainString(); | |||||
| } | |||||
| @Excel(name = "补贴额(元)", width = 20, orderNum = "8") | |||||
| @Transient | |||||
| private String subsidyNumStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "补贴金额", name = "subsidyNum") | @io.swagger.annotations.ApiModelProperty(value = "补贴金额", name = "subsidyNum") | ||||
| private Integer subsidyNum; | private Integer subsidyNum; | ||||
| @@ -50,15 +81,18 @@ public class WxCardVo extends WxCardInfo { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "该订单对应券的实际过期时间 ", name = "expiredTime") | @io.swagger.annotations.ApiModelProperty(value = "该订单对应券的实际过期时间 ", name = "expiredTime") | ||||
| private Date expiredTime; | private Date expiredTime; | ||||
| @Excel(name = "状态 ", width = 20, orderNum = "10", replace = {"使用中_4", "已过期_5", "已用完_6", "已线下退款_7"}) | |||||
| @io.swagger.annotations.ApiModelProperty(value = "状态", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "状态", name = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @Excel(name = "购买人", width = 20, orderNum = "2") | |||||
| @io.swagger.annotations.ApiModelProperty(value="购买人昵称",name="cnickName") | @io.swagger.annotations.ApiModelProperty(value="购买人昵称",name="cnickName") | ||||
| private String cnickName; | private String cnickName; | ||||
| @io.swagger.annotations.ApiModelProperty(value="持有人昵称",name="onickName") | @io.swagger.annotations.ApiModelProperty(value="持有人昵称",name="onickName") | ||||
| private String onickName; | private String onickName; | ||||
| @Excel(name = "电话", width = 20, orderNum = "3") | |||||
| @io.swagger.annotations.ApiModelProperty(value="持有人绑定的手机号",name="ouPhone") | @io.swagger.annotations.ApiModelProperty(value="持有人绑定的手机号",name="ouPhone") | ||||
| private String ouPhone; | private String ouPhone; | ||||
| @@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||||
| import lombok.Data; | import lombok.Data; | ||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Transient; | |||||
| import java.io.Serializable; | import java.io.Serializable; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -34,4 +35,8 @@ public class WxLevelMerchantCVo implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value="折扣",name="discount") | @io.swagger.annotations.ApiModelProperty(value="折扣",name="discount") | ||||
| private Integer discount; | private Integer discount; | ||||
| @Transient | |||||
| @io.swagger.annotations.ApiModelProperty(value = "客服电话", name = "linkLinePhone") | |||||
| private String linkLinePhone; | |||||
| } | } | ||||
| @@ -81,4 +81,6 @@ public class WxMerchantVo { | |||||
| @io.swagger.annotations.ApiModelProperty(value="优惠活动",name="actionDesc") | @io.swagger.annotations.ApiModelProperty(value="优惠活动",name="actionDesc") | ||||
| private String actionDesc; | private String actionDesc; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "客服电话", name = "linkLinePhone") | |||||
| private String linkLinePhone; | |||||
| } | } | ||||
| @@ -11,7 +11,8 @@ public enum EnumBillAction { | |||||
| OFFLINE_PAY(3, "线下缴费"), | OFFLINE_PAY(3, "线下缴费"), | ||||
| DEPOSIT_PAY(4, "押金缴费"), | DEPOSIT_PAY(4, "押金缴费"), | ||||
| DEPOSIT_RETURN(5, "押金退款"), | DEPOSIT_RETURN(5, "押金退款"), | ||||
| DEPOSIT_MODIFY(6, "押金变更"),; | |||||
| DEPOSIT_MODIFY(6, "押金变更"), | |||||
| IMPORT_PAY(6, "导入缴费"),; | |||||
| public static EnumBillAction getEnum(Integer code) { | public static EnumBillAction getEnum(Integer code) { | ||||
| for (EnumBillAction value : values()) { | for (EnumBillAction value : values()) { | ||||
| @@ -0,0 +1,42 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| public enum EnumBillExcelTemplate { | |||||
| SHOP_RENT(1, "商铺租金"), | |||||
| POINT_RENT(2, "多经点位租金"), | |||||
| SHOP_PROPERTY(3, "商铺物业费"), | |||||
| POINT_PROPERTY(4, "多经点位物业费"), | |||||
| DAILY(5, "日常费用"), | |||||
| OTHER(6, "其他费用"), | |||||
| OTHER_DEPOSIT(7, "其他押金"),; | |||||
| public static EnumBillExcelTemplate getEnum(Integer code) { | |||||
| for (EnumBillExcelTemplate value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumBillExcelTemplate(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,42 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| public enum EnumBillExcelTemplateDaily { | |||||
| RENT(1, "租金"), | |||||
| PROPERTY(2, "物业费"), | |||||
| WATER(3, "水费"), | |||||
| POWER(4, "电费"), | |||||
| AIR_CONDITIONING(5, "空调费"), | |||||
| OTHER(6, "其他费用"), | |||||
| OTHER_DEPOSIT(7, "其他押金"),; | |||||
| public static EnumBillExcelTemplateDaily getEnum(Integer code) { | |||||
| for (EnumBillExcelTemplateDaily value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumBillExcelTemplateDaily(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -5,7 +5,7 @@ package com.iformall.enums; | |||||
| */ | */ | ||||
| public enum EnumCouponConditionType { | public enum EnumCouponConditionType { | ||||
| // 0-可投放;1-已作废; | |||||
| NO_RULES(0, "不限制"), | |||||
| NEW_MEMBER(1, "新会员"), | NEW_MEMBER(1, "新会员"), | ||||
| SCORE_SCOPE(2, "积分值"), | SCORE_SCOPE(2, "积分值"), | ||||
| ; | ; | ||||
| @@ -9,7 +9,7 @@ public enum EnumCouponType { | |||||
| // 100.消费卡 | // 100.消费卡 | ||||
| COUPON_MANJIAN(1, "满减券"), | COUPON_MANJIAN(1, "满减券"), | ||||
| COUPON_DAIJIN(2, "代金券"), | COUPON_DAIJIN(2, "代金券"), | ||||
| COUPON_TUANGOU(3, "团购券"), | |||||
| COUPON_TUANGOU(3, "团购券"),//弃用 | |||||
| COUPON_LIPIN(4, "礼品券"), | COUPON_LIPIN(4, "礼品券"), | ||||
| COUPON_TINGCHE(5, "停车券"), | COUPON_TINGCHE(5, "停车券"), | ||||
| COUPON_MULTIMCH(6, "通用券"), | COUPON_MULTIMCH(6, "通用券"), | ||||
| @@ -17,7 +17,6 @@ public enum EnumCouponType { | |||||
| COUPON_GROUP(9, "团购券"), | COUPON_GROUP(9, "团购券"), | ||||
| COUPON_CREDIT(50,"积分券"), | COUPON_CREDIT(50,"积分券"), | ||||
| COUPON_CREDIT_PARK(51,"积分停车券"), | COUPON_CREDIT_PARK(51,"积分停车券"), | ||||
| CARD_MULTIMCH(100, "消费卡"), | CARD_MULTIMCH(100, "消费卡"), | ||||
| ; | ; | ||||
| @@ -0,0 +1,35 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * Created by luozukai | |||||
| */ | |||||
| public enum EnumFilterPut{ | |||||
| NO(0, "不过滤"), | |||||
| ; | |||||
| public static EnumFilterPut getEnum(Integer code) { | |||||
| for (EnumFilterPut value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumFilterPut(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,43 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| public enum EnumImportType { | |||||
| MEMBER(1, "member"), | |||||
| SHOP_RENT(2, "shop_rent"), | |||||
| POINT_RENT(3, "point_rent"), | |||||
| SHOP_PROPERTY(4, "shop_property"), | |||||
| POINT_PROPERTY(5, "point_property"), | |||||
| DAILY(6, "daily"), | |||||
| OTHER(7, "other"), | |||||
| OTHER_DEPOSIT(8, "other_deposit"),; | |||||
| public static EnumImportType getEnum(Integer code) { | |||||
| for (EnumImportType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumImportType(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,35 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * Created by Stormeye on 2018/08/09. | |||||
| */ | |||||
| public enum EnumMerchantMeterStatus { | |||||
| VALID(0, "有效"), | |||||
| INVALID(1, "无效"),; | |||||
| public static EnumMerchantMeterStatus getEnum(Integer code) { | |||||
| for (EnumMerchantMeterStatus value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumMerchantMeterStatus(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,41 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * Created by Stormeye | |||||
| * 消息限制类型 | |||||
| */ | |||||
| public enum EnumMsgLimitType { | |||||
| // type,name | |||||
| SMS_VALID(1, "短信-验证码"), | |||||
| SMS_SALE(2, "短信-营销"), | |||||
| WEAPP_PREPAYID(11, "小程序prepayId"), | |||||
| WEAPP_FORMID(12, "小程序formId"), | |||||
| WEAPP_OPENID_SEND(101, "小程序发券统一消息"), | |||||
| WXCHAT_OPENID_SEND(201, "公众号发券消息"), | |||||
| ; | |||||
| public static EnumMsgLimitType getEnum(Integer code) { | |||||
| for (EnumMsgLimitType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumMsgLimitType(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -2,12 +2,14 @@ package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.KwMerchantMeter; | import com.iformall.domain.po.KwMerchantMeter; | ||||
| import com.iformall.domain.vo.KwMerchantMeterVo; | |||||
| import java.util.List; | import java.util.List; | ||||
| public interface KwMerchantMeterMapper extends CommonMapper<KwMerchantMeter, Long> { | public interface KwMerchantMeterMapper extends CommonMapper<KwMerchantMeter, Long> { | ||||
| List<KwMerchantMeter> findList(KwMerchantMeter param); | List<KwMerchantMeter> findList(KwMerchantMeter param); | ||||
| List<KwMerchantMeterVo> findListVo(KwMerchantMeter param); | |||||
| int unbindBatch(KwMerchantMeter param); | |||||
| } | } | ||||
| @@ -17,6 +17,6 @@ public interface WxBillDailyMapper extends CommonMapper<WxBillDaily, Long> { | |||||
| void updateWaitPayStatus(Map<String,Object> params); | void updateWaitPayStatus(Map<String,Object> params); | ||||
| List<Map<String,Object>> queryBillDailyList(WxBillDaily record); | |||||
| List<WxBillDaily> queryBillDailyList(WxBillDaily record); | |||||
| } | } | ||||
| @@ -17,6 +17,6 @@ public interface WxBillOtherDepositMapper extends CommonMapper<WxBillOtherDeposi | |||||
| void updateWaitPayStatus(Map<String, Object> params); | void updateWaitPayStatus(Map<String, Object> params); | ||||
| List<Map<String, Object>> queryBillList(WxBillOtherDeposit record); | |||||
| List<WxBillOtherDeposit> queryBillList(WxBillOtherDeposit record); | |||||
| } | } | ||||
| @@ -17,7 +17,7 @@ public interface WxBillOtherMapper extends CommonMapper<WxBillOther, Long> { | |||||
| void updateWaitPayStatus(Map<String, Object> params); | void updateWaitPayStatus(Map<String, Object> params); | ||||
| List<Map<String,Object>> queryBillList(WxBillOther record); | |||||
| List<WxBillOther> queryBillList(WxBillOther record); | |||||
| Map<String,Object> queryPayInfoTotal(Map<String,Object> params); | Map<String,Object> queryPayInfoTotal(Map<String,Object> params); | ||||
| @@ -4,6 +4,7 @@ import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxBillProperty; | import com.iformall.domain.po.WxBillProperty; | ||||
| import com.iformall.domain.po.WxPropertyContract; | import com.iformall.domain.po.WxPropertyContract; | ||||
| import com.iformall.domain.po.WxRentContract; | import com.iformall.domain.po.WxRentContract; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -14,7 +15,7 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long> | |||||
| List<WxBillProperty> findList(WxBillProperty wxBillProperty); | List<WxBillProperty> findList(WxBillProperty wxBillProperty); | ||||
| List<Map<String,Object>> queryBillPropertyList(WxBillProperty record); | |||||
| List<WxBillProperty> queryBillPropertyList(WxBillProperty record); | |||||
| Map<String,Object> queryPayInfo(Map<String,Object> params); | Map<String,Object> queryPayInfo(Map<String,Object> params); | ||||
| @@ -42,4 +43,5 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long> | |||||
| void insertBills(List<WxBillProperty> resultList); | void insertBills(List<WxBillProperty> resultList); | ||||
| WxBillProperty selectBillOne(WxBillProperty propertyQuery); | |||||
| } | } | ||||
| @@ -15,7 +15,7 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> { | |||||
| List<WxBillRent> findList(WxBillRent wxBillRent); | List<WxBillRent> findList(WxBillRent wxBillRent); | ||||
| List<Map<String,Object>> queryBillRentList(WxBillRent record); | |||||
| List<WxBillRent> queryBillRentList(WxBillRent record); | |||||
| Map<String,Object> queryPayInfo(Map<String,Object> params); | Map<String,Object> queryPayInfo(Map<String,Object> params); | ||||
| @@ -41,4 +41,6 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> { | |||||
| void updateBills(@Param("bills") List<WxBillRent> resultList); | void updateBills(@Param("bills") List<WxBillRent> resultList); | ||||
| WxBillRent selectBillOne(WxBillRent rentQuery); | |||||
| } | } | ||||
| @@ -2,6 +2,7 @@ package com.iformall.mapper; | |||||
| import java.util.*; | import java.util.*; | ||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.WxBusiness; | import com.iformall.domain.po.WxBusiness; | ||||
| import io.lettuce.core.dynamic.annotation.Param; | import io.lettuce.core.dynamic.annotation.Param; | ||||
| @@ -12,4 +13,9 @@ public interface WxBusinessMapper extends CommonMapper<WxBusiness, String> { | |||||
| List<WxBusiness> findListAll(); | List<WxBusiness> findListAll(); | ||||
| List<WxBusiness> findListForMerchant(@Param("tenantId") String tenantId); | List<WxBusiness> findListForMerchant(@Param("tenantId") String tenantId); | ||||
| List<WxBusiness> findListForCoupon(@Param("tenantId") String tenantId); | List<WxBusiness> findListForCoupon(@Param("tenantId") String tenantId); | ||||
| List<Map<String,Object>> businessDataList(WxBusiness wxBusiness); | |||||
| List<Map<String,Object>> devoteList(WxBusiness wxBusiness); | |||||
| } | } | ||||
| @@ -10,14 +10,6 @@ import com.iformall.domain.po.WxCoupon; | |||||
| public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> { | public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> { | ||||
| List<WxCouponStatisVo> findPressData(WxCoupon wxCoupon); | List<WxCouponStatisVo> findPressData(WxCoupon wxCoupon); | ||||
| void delPressData(WxCoupon wxCoupon); | |||||
| void insertPressData(WxCoupon wxCoupon); | |||||
| void updatePressData1(WxCoupon wxCoupon); | |||||
| void updatePressData2(WxCoupon wxCoupon); | |||||
| void updatePressData3(WxCoupon wxCoupon); | |||||
| void updatePressData4(WxCoupon wxCoupon); | |||||
| void updatePressData5(WxCoupon wxCoupon); | |||||
| List<WxCouponStatisVo> findCouponData(WxCoupon wxCoupon); | List<WxCouponStatisVo> findCouponData(WxCoupon wxCoupon); | ||||
| List<WxCouponStatisVo> findCountData(WxCoupon wxCoupon); | List<WxCouponStatisVo> findCountData(WxCoupon wxCoupon); | ||||
| @@ -86,4 +78,7 @@ public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> { | |||||
| // 库存,有效期修改 | // 库存,有效期修改 | ||||
| int updateStockAndValidDate(WxCoupon wxCoupon); | int updateStockAndValidDate(WxCoupon wxCoupon); | ||||
| WxCoupon findCouponModel(WxCoupon wxCoupon); | |||||
| Integer findCouponListCount(WxCoupon wxCoupon); | |||||
| } | } | ||||
| @@ -19,4 +19,7 @@ public interface WxMerchantMapper extends CommonMapper<WxMerchant, Long> { | |||||
| List<WxMerchant> findQrcodeEmptyList(); | List<WxMerchant> findQrcodeEmptyList(); | ||||
| List<Map<String,Object>> findBusByFloorId(Map<String, Object> params); | List<Map<String,Object>> findBusByFloorId(Map<String, Object> params); | ||||
| int hasMerchant(WxMerchant wxMerchant); | |||||
| } | } | ||||
| @@ -0,0 +1,16 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxMsgLimit; | |||||
| import java.util.List; | |||||
| public interface WxMsgLimitMapper extends CommonMapper<WxMsgLimit, String> { | |||||
| List<WxMsgLimit> findList(WxMsgLimit wxMsgWxLimit); | |||||
| int updateLimitNum(WxMsgLimit wxMsgWxLimit); | |||||
| int delLimitNum(WxMsgLimit wxMsgWxLimit); | |||||
| } | |||||
| @@ -58,7 +58,7 @@ public class ExcelService { | |||||
| cellStyle.setFont(font); | cellStyle.setFont(font); | ||||
| Row row = sheetAt.createRow(sheetAt.getLastRowNum() + 2); | Row row = sheetAt.createRow(sheetAt.getLastRowNum() + 2); | ||||
| Cell cell = row.createCell(0); | Cell cell = row.createCell(0); | ||||
| cell.setCellValue("*为必填字段(此段文字导入数据时请删除)"); | |||||
| cell.setCellValue("*为必填字段(导入数据时此行文字请删除)"); | |||||
| cell.setCellStyle(cellStyle); | cell.setCellStyle(cellStyle); | ||||
| } | } | ||||
| } | } | ||||
| @@ -3,6 +3,9 @@ package com.iformall.service; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.vo.WxBillAll; | import com.iformall.domain.vo.WxBillAll; | ||||
| import com.iformall.domain.vo.WxBillExcelTemplate; | |||||
| import com.iformall.domain.vo.WxBillExcelTemplateOther; | |||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -55,4 +58,9 @@ public interface WxBillAllService { | |||||
| ResultData updateReceivePay(WxBillAll wxBillAll, MallUserInfo user); | ResultData updateReceivePay(WxBillAll wxBillAll, MallUserInfo user); | ||||
| void addBillAction(Long billId, Long oldPrice, Long newPrice, MallUserInfo mallUserInfo); | void addBillAction(Long billId, Long oldPrice, Long newPrice, MallUserInfo mallUserInfo); | ||||
| void exportTemplate(WxBillExcelTemplate wxBillExcelTemplate, HttpServletRequest request, HttpServletResponse response); | |||||
| void importBill(String tenantId, String importKey, WxBillExcelTemplateOther bill, MallUserInfo user); | |||||
| } | } | ||||
| @@ -23,7 +23,7 @@ public interface WxBillDailyService { | |||||
| * @param record | * @param record | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<Map<String, Object>> listAsPage(WxBillDaily record, Integer pageIndex, Integer pageSize); | |||||
| PageInfo<WxBillDaily> listAsPage(WxBillDaily record, Integer pageIndex, Integer pageSize); | |||||
| void updateBillStatus(WxBillDaily record); | void updateBillStatus(WxBillDaily record); | ||||
| @@ -33,7 +33,7 @@ public interface WxBillDailyService { | |||||
| * @param id | * @param id | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| Map<String, Object> getById(Long id); | |||||
| WxBillDaily getById(Long id); | |||||
| /** | /** | ||||
| * 保存或更新实体 | * 保存或更新实体 | ||||
| @@ -57,4 +57,6 @@ public interface WxBillDailyService { | |||||
| void insertData(WxBillDailyVo billDaily, String importKey, MallUserInfo user); | void insertData(WxBillDailyVo billDaily, String importKey, MallUserInfo user); | ||||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillDaily wxBillDaily); | |||||
| } | } | ||||
| @@ -5,6 +5,8 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxBillOtherDeposit; | import com.iformall.domain.po.WxBillOtherDeposit; | ||||
| import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| /** | /** | ||||
| @@ -20,7 +22,7 @@ public interface WxBillOtherDepositService { | |||||
| * @param record | * @param record | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<Map<String, Object>> listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize); | |||||
| PageInfo<WxBillOtherDeposit> listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize); | |||||
| void updateBillStatus(WxBillOtherDeposit record); | void updateBillStatus(WxBillOtherDeposit record); | ||||
| @@ -30,7 +32,7 @@ public interface WxBillOtherDepositService { | |||||
| * @param id | * @param id | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| Map<String, Object> getById(Long id); | |||||
| WxBillOtherDeposit getById(Long id); | |||||
| /** | /** | ||||
| * 保存或更新实体 | * 保存或更新实体 | ||||
| @@ -53,4 +55,7 @@ public interface WxBillOtherDepositService { | |||||
| ResultData returnDeposit(WxBillOtherDeposit wxBillDeposit, MallUserInfo user); | ResultData returnDeposit(WxBillOtherDeposit wxBillDeposit, MallUserInfo user); | ||||
| ResultData adjustDeposit(WxBillOtherDeposit wxBillDeposit); | ResultData adjustDeposit(WxBillOtherDeposit wxBillDeposit); | ||||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOtherDeposit wxBillDeposit); | |||||
| } | } | ||||
| @@ -5,6 +5,8 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxBillOther; | import com.iformall.domain.po.WxBillOther; | ||||
| import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| /** | /** | ||||
| @@ -20,7 +22,7 @@ public interface WxBillOtherService { | |||||
| * @param record | * @param record | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<Map<String, Object>> listAsPage(WxBillOther record, Integer pageIndex, Integer pageSize); | |||||
| PageInfo<WxBillOther> listAsPage(WxBillOther record, Integer pageIndex, Integer pageSize); | |||||
| void updateBillStatus(WxBillOther record); | void updateBillStatus(WxBillOther record); | ||||
| @@ -30,7 +32,7 @@ public interface WxBillOtherService { | |||||
| * @param id | * @param id | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| Map<String, Object> getById(Long id); | |||||
| WxBillOther getById(Long id); | |||||
| /** | /** | ||||
| * 保存或更新实体 | * 保存或更新实体 | ||||
| @@ -50,4 +52,6 @@ public interface WxBillOtherService { | |||||
| ResultData updatePaid(Long id); | ResultData updatePaid(Long id); | ||||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillOther wxBillOther); | |||||
| } | } | ||||
| @@ -6,6 +6,8 @@ import com.iformall.domain.po.MallUserInfo; | |||||
| import com.iformall.domain.po.WxBillProperty; | import com.iformall.domain.po.WxBillProperty; | ||||
| import com.iformall.domain.po.WxBillRent; | import com.iformall.domain.po.WxBillRent; | ||||
| import javax.servlet.http.HttpServletRequest; | |||||
| import javax.servlet.http.HttpServletResponse; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| /** | /** | ||||
| @@ -22,7 +24,7 @@ public interface WxBillPropertyService { | |||||
| * @param record | * @param record | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<Map<String, Object>> listAsPage(WxBillProperty record, Integer pageIndex, Integer pageSize); | |||||
| PageInfo<WxBillProperty> listAsPage(WxBillProperty record, Integer pageIndex, Integer pageSize); | |||||
| void updateBillStatus(WxBillProperty record); | void updateBillStatus(WxBillProperty record); | ||||
| @@ -32,7 +34,7 @@ public interface WxBillPropertyService { | |||||
| * @param id | * @param id | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| Map<String, Object> getById(Long id); | |||||
| WxBillProperty getById(Long id); | |||||
| /** | /** | ||||
| * 保存或更新实体 | * 保存或更新实体 | ||||
| @@ -50,7 +52,7 @@ public interface WxBillPropertyService { | |||||
| void deleteById(Long id); | void deleteById(Long id); | ||||
| PageInfo<Map<String, Object>> findByPropertyContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize); | |||||
| PageInfo<WxBillProperty> findByPropertyContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize); | |||||
| ResultData updatePaid(Long id); | ResultData updatePaid(Long id); | ||||
| @@ -58,4 +60,6 @@ public interface WxBillPropertyService { | |||||
| ResultData updateLatePayStatus(WxBillProperty wxBillProperty); | ResultData updateLatePayStatus(WxBillProperty wxBillProperty); | ||||
| void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillProperty wxBillProperty); | |||||
| } | } | ||||