develop # Conflicts: # mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java # mallinkSchedule/src/main/java/com/iformall/schedule/BillNotificationSchedule.java # mallinkService/src/main/java/com/iformall/domain/po/WxMsgModel.java # mallinkService/src/main/java/com/iformall/domain/po/WxMsgValidationcodeModel.java # mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java # mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java # mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java # mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml # mallinkService/src/main/resources/mapper/WxRentContractMapper.xmlrelease_toaliyun_real
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxBrand; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.enums.EnumDelFlag; | |||
| @@ -22,7 +23,6 @@ import org.springframework.web.bind.annotation.*; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import static com.iformall.domain.po.WxBrand.Field.Id_DESC; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -48,7 +48,7 @@ public class WxBrandController extends BaseController { | |||
| if (null == wxBrand) { | |||
| wxBrand = new WxBrand(); | |||
| } | |||
| wxBrand.setSortColumns(Id_DESC); | |||
| wxBrand.setSortColumns(BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<WxBrand> page = wxBrandService.listAsPage(wxBrand, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.WxProfitSharingReceiver; | |||
| import com.iformall.domain.vo.WxMerchantVo; | |||
| @@ -35,6 +36,23 @@ public class WxMerchantController extends BaseController { | |||
| @Autowired | |||
| private QrCodeService qrCodeService; | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("listVo") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商户-列表") | |||
| public ResultData listVo(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::list"); | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listVoAsPage(wxMerchant, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @@ -45,7 +63,7 @@ public class WxMerchantController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::list"); | |||
| if (null == wxMerchant) wxMerchant = new WxMerchant(); | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| wxMerchant.setSortColumns(WxMerchant.Field.TopTime_DESC); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| final PageInfo<WxMerchant> page = wxMerchantService.listAsPage(wxMerchant, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -195,7 +213,7 @@ public class WxMerchantController extends BaseController { | |||
| @SystemControllerLog(description = "商户-商户数据导出") | |||
| public void exportData(@ModelAttribute WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response) { | |||
| wxMerchant.setTenantId(getTenantId()); | |||
| wxMerchant.setSortColumns(WxMerchant.Field.TopTime_DESC); | |||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | |||
| wxMerchantService.exportData(wxMerchant,request,response); | |||
| } | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxShop; | |||
| import com.iformall.service.WxShopService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| @@ -42,7 +43,7 @@ public class WxShopController extends BaseController { | |||
| wxShop = new WxShop(); | |||
| } | |||
| wxShop.setTenantId(getTenantId()); | |||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||
| wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<Map<String, Object>> page = wxShopService.listMapAsPage(wxShop, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| @@ -127,7 +128,7 @@ public class WxShopController extends BaseController { | |||
| wxShop = new WxShop(); | |||
| } | |||
| wxShop.setTenantId(getTenantId()); | |||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||
| wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<Map<String, Object>> page = wxShopService.listShopFromContract(wxShop, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -141,7 +142,7 @@ public class WxShopController extends BaseController { | |||
| wxShop = new WxShop(); | |||
| } | |||
| wxShop.setTenantId(getTenantId()); | |||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||
| wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); | |||
| wxShopService.exportShop(wxShop, request, response); | |||
| } | |||
| @@ -154,7 +155,7 @@ public class WxShopController extends BaseController { | |||
| wxShop = new WxShop(); | |||
| } | |||
| wxShop.setTenantId(getTenantId()); | |||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||
| wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); | |||
| wxShopService.exportNotRentShop(wxShop, request, response); | |||
| } | |||
| @@ -170,7 +171,7 @@ public class WxShopController extends BaseController { | |||
| wxShop = new WxShop(); | |||
| } | |||
| wxShop.setTenantId(getTenantId()); | |||
| wxShop.setSortColumns(WxShop.Field.CreateDate_DESC,WxShop.Field.Id_DESC); | |||
| wxShop.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<Map<String, Object>> page = wxShopService.notRentListMapAsPage(wxShop, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| @@ -4,9 +4,8 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxBillProperty; | |||
| import com.iformall.domain.po.WxPropertyContract; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.EnumIsPreview; | |||
| import com.iformall.enums.EnumRentStartType; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxPropertyContractMapper; | |||
| @@ -21,6 +20,7 @@ import org.springframework.web.bind.annotation.*; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| /** | |||
| @@ -180,4 +180,18 @@ public class WxPropertyContractController extends BaseController { | |||
| return new ResultData(); | |||
| } | |||
| /** | |||
| * 预览账单展示,编辑账期,后端生成账单金额 | |||
| * @param wxPropertyContract | |||
| * @return | |||
| */ | |||
| @PostMapping("buildBillPriceList") | |||
| @SystemControllerLog(description = "物业合同-生成账单列表金额") | |||
| public ResultData buildBillPriceList(@RequestBody WxPropertyContract wxPropertyContract) throws Exception{ | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::buildBillPriceList"); | |||
| WxPropertyContract dbRent = wxPropertyContractMapper.selectByPrimaryKey(wxPropertyContract.getId()); | |||
| dbRent.setPreviewBillRentList(wxPropertyContract.getPreviewBillRentList()); | |||
| List<WxBillProperty> result = wxPropertyContractService.buildProperty(new WxMerchant(),getUserId(),dbRent, EnumIsPreview.YES.getCode(), false); | |||
| return new ResultData(result); | |||
| } | |||
| } | |||
| @@ -2,18 +2,19 @@ package com.iformall.controller.contract; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.EnumBillAction; | |||
| import com.iformall.enums.EnumFromType; | |||
| import com.iformall.enums.EnumIsPreview; | |||
| import com.iformall.enums.EnumRentStartType; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBillActionMapper; | |||
| import com.iformall.mapper.WxRentContractMapper; | |||
| import com.iformall.service.WxBillRentService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.WxPayAccountBillService; | |||
| import com.iformall.service.WxRentContractService; | |||
| import com.iformall.service.*; | |||
| import com.iformall.utils.DateUtils; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @@ -25,10 +26,9 @@ import org.springframework.web.bind.annotation.*; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.math.BigDecimal; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.Date; | |||
| import java.util.HashMap; | |||
| import java.util.Map; | |||
| import java.util.*; | |||
| /** | |||
| * @author gongbiao | |||
| @@ -49,6 +49,42 @@ public class WxRentContractController extends BaseController { | |||
| @Autowired | |||
| private WxRentContractMapper wxRentContractMapper; | |||
| @Autowired | |||
| private WxBillActionMapper wxBillActionMapper; | |||
| @Autowired | |||
| private WxBillPropertyService wxBillPropertyService; | |||
| @GetMapping("test") | |||
| @SystemControllerLog(description = "获取两个时间相差,返回n月零n天") | |||
| public ResultData test(String startDate, String endDate) throws Exception{ | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| List<WxBillRent> billRentList = wxBillRentService.findLatePayBill(); | |||
| for (WxBillRent wxBillRent : billRentList) { | |||
| WxBillAction billAction = new WxBillAction(); | |||
| billAction.setId(idWorker.nextId()); | |||
| billAction.setCreatetime(new Date()); | |||
| billAction.setUserName("系统端"); | |||
| billAction.setAction(EnumBillAction.UPDATE_LATE_PAY_MONEY.getCode()); | |||
| billAction.setBillId(wxBillRent.getId()); | |||
| BigDecimal divide = new BigDecimal(wxBillRent.getOwe()).multiply(new BigDecimal(wxBillRent.getLatePayRatio())).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP); | |||
| billAction.setDetails("系统计入"+ divide.toString()+"元"); | |||
| wxBillActionMapper.insertSelective(billAction); | |||
| } | |||
| List<WxBillProperty> billPropertyList = wxBillPropertyService.findLatePayBill(); | |||
| for (WxBillProperty wxBillRent : billPropertyList) { | |||
| WxBillAction billAction = new WxBillAction(); | |||
| billAction.setId(idWorker.nextId()); | |||
| billAction.setCreatetime(new Date()); | |||
| billAction.setUserName("系统端"); | |||
| billAction.setAction(EnumBillAction.UPDATE_LATE_PAY_MONEY.getCode()); | |||
| billAction.setBillId(wxBillRent.getId()); | |||
| BigDecimal divide = new BigDecimal(wxBillRent.getOwe()).multiply(new BigDecimal(wxBillRent.getLatePayRatio())).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP); | |||
| billAction.setDetails("系统计入"+ divide.toString()+"元"); | |||
| wxBillActionMapper.insertSelective(billAction); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("getDateDiff") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "startDate", value = "开始时间", dataType = "string", paramType = "query", required = true), | |||
| @@ -78,6 +114,21 @@ public class WxRentContractController extends BaseController { | |||
| return new ResultData(result); | |||
| } | |||
| /** | |||
| * 预览账单展示,编辑账期,后端生成账单金额 | |||
| * @param wxRentContract | |||
| * @return | |||
| */ | |||
| @PostMapping("buildBillPriceList") | |||
| @SystemControllerLog(description = "租赁合同-生成账单列表金额") | |||
| public ResultData buildBillPriceList(@RequestBody WxRentContract wxRentContract) throws Exception{ | |||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::buildBillPriceList"); | |||
| WxRentContract dbRent = wxRentContractMapper.selectByPrimaryKey(wxRentContract.getId()); | |||
| dbRent.setPreviewBillRentList(wxRentContract.getPreviewBillRentList()); | |||
| List<WxBillRent> result = wxRentContractService.buildRent(new WxMerchant(),getUserId(),dbRent, EnumIsPreview.YES.getCode(), false); | |||
| return new ResultData(result); | |||
| } | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "租赁合同-添加") | |||
| public ResultData add(@RequestBody WxRentContract wxRentContract) { | |||
| @@ -129,7 +180,13 @@ public class WxRentContractController extends BaseController { | |||
| if(wxRentContract.getRentStartType()!=null && wxRentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){ | |||
| wxRentContract.setRentalStartDate(wxRentContract.getStartDate()); | |||
| } | |||
| return wxRentContractService.update(wxRentContract, user.getId(),user.getName(),EnumFromType.OTHER.getCode(),oldDate); | |||
| ResultData update = null; | |||
| try { | |||
| update = wxRentContractService.update(wxRentContract, user.getId(), user.getName(), EnumFromType.OTHER.getCode(), oldDate); | |||
| } catch (MallinkException e) { | |||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR); | |||
| } | |||
| return update; | |||
| } | |||
| /** | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxMerchantTradeDaily; | |||
| import com.iformall.domain.vo.WxMerchantTradeDailyVo; | |||
| import com.iformall.service.WxMerchantTradeDailyService; | |||
| @@ -55,7 +56,7 @@ public class WxMerchantTradeDailyController extends BaseController { | |||
| SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); | |||
| wxMerchantTradeDaily.setReportDate(fmt.format(new Date())); | |||
| } | |||
| wxMerchantTradeDaily.setSortColumns(WxMerchantTradeDailyVo.Field.MerchantId_DESC); | |||
| wxMerchantTradeDaily.setSortColumns(BaseEntity.SortField.MerchantId_DESC); | |||
| PageInfo<WxMerchantTradeDailyVo> page = wxMerchantTradeDailyService.listAsPageVo(wxMerchantTradeDaily, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| @@ -115,7 +116,7 @@ public class WxMerchantTradeDailyController extends BaseController { | |||
| SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); | |||
| wxMerchantTradeDaily.setReportDate(fmt.format(new Date())); | |||
| } | |||
| wxMerchantTradeDaily.setSortColumns(WxMerchantTradeDailyVo.Field.MerchantId_DESC); | |||
| wxMerchantTradeDaily.setSortColumns(BaseEntity.SortField.MerchantId_DESC); | |||
| wxMerchantTradeDailyService.exportData(wxMerchantTradeDaily, request, response); | |||
| } | |||
| @@ -112,7 +112,7 @@ public class WxUserStructureController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxUserStructureController::findUserAgeStructure"); | |||
| WxLevelConfig wxLevelConfig = new WxLevelConfig(); | |||
| wxLevelConfig.setTenantId(getTenantId()); | |||
| wxLevelConfig.setSortColumns(WxLevelConfig.Field.Points_ASC); | |||
| wxLevelConfig.setSortColumns(BaseEntity.SortField.Points_ASC); | |||
| List<WxLevelConfig> levelList = wxLevelConfigService.findList(wxLevelConfig); | |||
| for( int i = 0; i < levelList.size(); i++) { | |||
| @@ -6,8 +6,12 @@ import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.KwBox; | |||
| import com.iformall.domain.po.KwMeter; | |||
| import com.iformall.enums.EnumBoxStatus; | |||
| import com.iformall.enums.EnumMeterBindStatus; | |||
| import com.iformall.enums.EnumMeterStatus; | |||
| import com.iformall.service.kw.KwBoxService; | |||
| import com.iformall.service.kw.KwMeterService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @@ -20,7 +24,7 @@ import org.springframework.web.bind.annotation.*; | |||
| import java.util.List; | |||
| @RestController | |||
| @RequestMapping("kwBox") | |||
| @RequestMapping("kwAdminBox") | |||
| @Api(description="开物盒子") | |||
| public class KwBoxController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @@ -28,6 +32,9 @@ public class KwBoxController extends BaseController { | |||
| @Autowired | |||
| private KwBoxService kwBoxService; | |||
| @Autowired | |||
| private KwMeterService kwMeterService; | |||
| @ApiOperation("设备列表") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @@ -54,7 +61,8 @@ public class KwBoxController extends BaseController { | |||
| return new ResultData(ErrorCode.DEVICE_ALREADY_EXIST); | |||
| kwBox.setTenantId(getTenantId()); | |||
| kwBox.setStatus(EnumBoxStatus.VALID.getCode()); | |||
| return kwBoxService.saveOrUpdate(kwBox); | |||
| kwBoxService.saveOrUpdate(kwBox); | |||
| return new ResultData(kwBox); | |||
| } | |||
| @ApiOperation("更新设备") | |||
| @@ -65,7 +73,11 @@ public class KwBoxController extends BaseController { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| if (kwBox.getId() == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| return kwBoxService.saveOrUpdate(kwBox); | |||
| kwBox.setImei(null); | |||
| kwBox.setIccid(null); | |||
| kwBox.setComKey(null); | |||
| kwBoxService.saveOrUpdate(kwBox); | |||
| return new ResultData(kwBox); | |||
| } | |||
| @ApiOperation("设备详情") | |||
| @@ -76,7 +88,7 @@ public class KwBoxController extends BaseController { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| KwBox kwBox = kwBoxService.getById(id); | |||
| if (kwBox == null) | |||
| return new ResultData(ErrorCode.SCREENAD_NOT_FOUND); | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| kwBox.setMeters(kwBoxService.findMeters(kwBox)); | |||
| return new ResultData(kwBox); | |||
| @@ -91,6 +103,78 @@ public class KwBoxController extends BaseController { | |||
| KwBox kwBox = new KwBox(); | |||
| kwBox.setId(id); | |||
| kwBox.setStatus(EnumBoxStatus.INVALID.getCode()); | |||
| return kwBoxService.saveOrUpdate(kwBox); | |||
| kwBoxService.saveOrUpdate(kwBox); | |||
| kwMeterService.unbindBatch(id); | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("绑定设备") | |||
| @PostMapping("bind") | |||
| @SystemControllerLog(description = "电表设备-添加设备") | |||
| public Result bind(@RequestBody KwMeter kwMeter) { | |||
| if (kwMeter == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| if (kwMeter.getBoxId() == null || | |||
| (kwMeter.getId() == null && kwMeter.getIds() == null)) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| KwBox kwBox = kwBoxService.getById(kwMeter.getBoxId()); | |||
| if (kwBox == null || kwBox.getStatus().equals(EnumBoxStatus.INVALID.getCode())) | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| KwMeter record = new KwMeter(); | |||
| record.setBoxId(kwMeter.getBoxId()); | |||
| record.setBindStatus(EnumMeterBindStatus.BIND.getCode()); | |||
| record.setStatus(EnumMeterStatus.VALID.getCode()); | |||
| List<KwMeter> KwMeters = kwMeterService.findList(record); | |||
| if (kwMeter.getId() != null) { | |||
| if (KwMeters.size() >= kwBox.getMaxTagNum()) | |||
| return new ResultData(ErrorCode.DEVICE_REACHED_MAX_NUMBER); | |||
| record = kwMeterService.getById(kwMeter.getId()); | |||
| if (record == null) | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| if (record.getBoxId() != 0 && record.getBindStatus().equals(EnumMeterBindStatus.BIND.getCode())) | |||
| return new ResultData(ErrorCode.DEVICE_ALREADY_EXIST); | |||
| kwMeterService.bind(kwMeter.getBoxId(),kwMeter.getId()); | |||
| } else { | |||
| if (kwMeter.getIds() != null) { | |||
| if (KwMeters.size() + kwMeter.getIds().size() > kwBox.getMaxTagNum()) | |||
| return new ResultData(ErrorCode.DEVICE_REACHED_MAX_NUMBER); | |||
| } | |||
| kwMeterService.bindBatch(kwMeter.getBoxId(),kwMeter.getIds()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("绑定设备") | |||
| @PostMapping("unbind") | |||
| @SystemControllerLog(description = "电表设备-添加设备") | |||
| public Result unbind(@RequestBody KwMeter kwMeter) { | |||
| if (kwMeter == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| if (kwMeter.getBoxId() == null && kwMeter.getId() == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| if (kwMeter.getId() != null) { | |||
| KwMeter record = kwMeterService.getById(kwMeter.getId()); | |||
| if (record == null) | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| kwMeterService.unbind(kwMeter.getId()); | |||
| } else { | |||
| if (kwMeter.getBoxId() != null) { | |||
| KwBox kwBox = kwBoxService.getById(kwMeter.getBoxId()); | |||
| if (kwBox == null) | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| kwMeterService.unbindBatch(kwMeter.getBoxId()); | |||
| } | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| } | |||
| @@ -6,8 +6,11 @@ import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.dto.KwMerchantMeterDto; | |||
| import com.iformall.domain.dto.KwMeterDataDto; | |||
| import com.iformall.domain.po.KwMerchantMeter; | |||
| import com.iformall.domain.po.KwMeter; | |||
| import com.iformall.domain.vo.KwMerchantMeterVo; | |||
| import com.iformall.enums.EnumMerchantMeterStatus; | |||
| import com.iformall.enums.EnumMerchantStatus; | |||
| import com.iformall.service.kw.KwMerchantMeterService; | |||
| @@ -36,17 +39,28 @@ public class KwMerchantMeterController extends BaseController { | |||
| @Autowired | |||
| private KwMeterDataService kwMeterDataService; | |||
| @ApiOperation("设备列表") | |||
| @ApiOperation("商户列表") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "电表设备-设备列表") | |||
| public Result list(@ModelAttribute KwMerchantMeter kwMerchantMeter, Integer pageNum, Integer pageSize) { | |||
| if (kwMerchantMeter == null) kwMerchantMeter = new KwMerchantMeter(); | |||
| kwMerchantMeter.setTenantId(getTenantId()); | |||
| kwMerchantMeter.setStatus(EnumMerchantMeterStatus.VALID.getCode()); | |||
| return new ResultData(kwMerchantMeterService.listAsPage(kwMerchantMeter, pageNum, pageSize)); | |||
| @SystemControllerLog(description = "商户列表") | |||
| public Result list(@ModelAttribute KwMerchantMeterDto kwMerchantMeterDto, Integer pageNum, Integer pageSize) { | |||
| if (kwMerchantMeterDto == null) kwMerchantMeterDto = new KwMerchantMeterDto(); | |||
| kwMerchantMeterDto.setTenantId(getTenantId()); | |||
| return new ResultData(kwMerchantMeterService.listVoAsPage(kwMerchantMeterDto, pageNum, pageSize)); | |||
| } | |||
| @ApiOperation("商户详情") | |||
| @GetMapping("detail") | |||
| @SystemControllerLog(description = "商户详情") | |||
| public Result detail(@RequestParam Long id) { | |||
| if (id == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| KwMerchantMeterVo kwMerchantMeterVo = kwMerchantMeterService.getById(id); | |||
| if (kwMerchantMeterVo == null) | |||
| return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND); | |||
| return new ResultData(kwMerchantMeterVo); | |||
| } | |||
| @ApiOperation("绑定设备") | |||
| @@ -81,20 +95,16 @@ public class KwMerchantMeterController extends BaseController { | |||
| if (kwMerchantMeter == null) | |||
| 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); | |||
| if (kwMerchantMeter.getMeterId() != null) { | |||
| kwMerchantMeterService.unbind(kwMerchantMeter.getMeterId()); | |||
| } else { | |||
| kwMerchantMeterService.unbindBatch(kwMerchantMeter); | |||
| kwMerchantMeterService.unbindBatch(kwMerchantMeter.getMerchantId()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| } | |||
| @@ -1,27 +1,47 @@ | |||
| package com.iformall.controller.device; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| 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.domain.po.KwBox; | |||
| import com.iformall.domain.po.KwMeter; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.EnumBoxStatus; | |||
| import com.iformall.enums.EnumMerchantMeterStatus; | |||
| import com.iformall.enums.EnumMeterBindStatus; | |||
| import com.iformall.enums.EnumMeterStatus; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.ExcelService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.kw.KwBoxService; | |||
| import com.iformall.service.kw.KwMerchantMeterService; | |||
| import com.iformall.service.kw.KwMeterDataService; | |||
| import com.iformall.service.kw.KwMeterService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.apache.poi.hssf.usermodel.HSSFRow; | |||
| import org.apache.poi.hssf.usermodel.HSSFSheet; | |||
| import org.apache.poi.hssf.usermodel.HSSFWorkbook; | |||
| import org.apache.poi.poifs.filesystem.POIFSFileSystem; | |||
| import org.apache.poi.ss.usermodel.Cell; | |||
| import org.apache.poi.ss.usermodel.Row; | |||
| import org.apache.poi.xssf.usermodel.XSSFRow; | |||
| import org.apache.poi.xssf.usermodel.XSSFSheet; | |||
| import org.apache.poi.xssf.usermodel.XSSFWorkbook; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import org.springframework.web.multipart.MultipartFile; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| import java.util.Optional; | |||
| @RestController | |||
| @RequestMapping("kwMeter") | |||
| @@ -32,9 +52,21 @@ public class KwMeterController extends BaseController { | |||
| @Autowired | |||
| private KwMeterService kwMeterService; | |||
| @Autowired | |||
| private KwMeterDataService kwMeterDataService; | |||
| @Autowired | |||
| private KwMerchantMeterService kwMerchantMeterService; | |||
| @Autowired | |||
| private KwBoxService kwBoxService; | |||
| @Autowired | |||
| private ExcelService excelService; | |||
| @Autowired | |||
| private WxMerchantService wxMerchantService; | |||
| @ApiOperation("设备列表") | |||
| @GetMapping("list") | |||
| @@ -70,65 +102,10 @@ public class KwMeterController extends BaseController { | |||
| kwMeter.setBoxId(0L); | |||
| kwMeter.setStatus(EnumMeterStatus.VALID.getCode()); | |||
| kwMeter.setBindStatus(EnumMeterBindStatus.UNBIND.getCode()); | |||
| return kwMeterService.saveOrUpdate(kwMeter); | |||
| kwMeterService.saveOrUpdate(kwMeter); | |||
| return new ResultData(kwMeter); | |||
| } | |||
| @ApiOperation("绑定设备") | |||
| @PostMapping("bind") | |||
| @SystemControllerLog(description = "电表设备-添加设备") | |||
| public Result bind(@RequestBody KwMeter kwMeter) { | |||
| if (kwMeter == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| if (kwMeter.getBoxId() == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| if (kwMeter.getId() == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| KwBox kwBox = kwBoxService.getById(kwMeter.getBoxId()); | |||
| if (kwBox == null || kwBox.getStatus().equals(EnumBoxStatus.INVALID.getCode())) | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| KwMeter record = new KwMeter(); | |||
| record.setBoxId(kwMeter.getBoxId()); | |||
| record.setStatus(EnumMeterStatus.VALID.getCode()); | |||
| List<KwMeter> KwMeters = kwMeterService.findList(record); | |||
| if (KwMeters.size() >= kwBox.getMaxTagNum()) | |||
| return new ResultData(ErrorCode.DEVICE_REACHED_MAX_NUMBER); | |||
| record = kwMeterService.getById(kwMeter.getId()); | |||
| if (record == null) | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| if (record.getBoxId() != 0) | |||
| return new ResultData(ErrorCode.DEVICE_ALREADY_EXIST); | |||
| kwMeter.setBindStatus(EnumMeterBindStatus.BIND.getCode()); | |||
| return kwMeterService.saveOrUpdate(kwMeter); | |||
| } | |||
| @ApiOperation("绑定设备") | |||
| @PostMapping("unbind") | |||
| @SystemControllerLog(description = "电表设备-添加设备") | |||
| public Result unbind(@RequestBody KwMeter kwMeter) { | |||
| if (kwMeter == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| if (kwMeter.getBoxId() == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| if (kwMeter.getId() == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| KwBox kwBox = kwBoxService.getById(kwMeter.getBoxId()); | |||
| if (kwBox == null) | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| KwMeter record = kwMeterService.getById(kwMeter.getId()); | |||
| if (record == null) | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| kwMeter.setBoxId(0L); | |||
| kwMeter.setBindStatus(EnumMeterBindStatus.UNBIND.getCode()); | |||
| return kwMeterService.saveOrUpdate(kwMeter); | |||
| } | |||
| @ApiOperation("更新设备") | |||
| @PostMapping("update") | |||
| @@ -138,7 +115,9 @@ public class KwMeterController extends BaseController { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| if (kwMeter.getId() == null) | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| return kwMeterService.saveOrUpdate(kwMeter); | |||
| kwMeter.setAddress(null); | |||
| kwMeterService.saveOrUpdate(kwMeter); | |||
| return new ResultData(kwMeter); | |||
| } | |||
| @ApiOperation("设备详情") | |||
| @@ -150,7 +129,6 @@ public class KwMeterController extends BaseController { | |||
| KwMeter kwMeter = kwMeterService.getById(id); | |||
| if (kwMeter == null) | |||
| return new ResultData(ErrorCode.DEVICE_NOT_FOUND); | |||
| return new ResultData(kwMeter); | |||
| } | |||
| @@ -163,6 +141,126 @@ public class KwMeterController extends BaseController { | |||
| KwMeter kwMeter = new KwMeter(); | |||
| kwMeter.setId(id); | |||
| kwMeter.setStatus(EnumBoxStatus.INVALID.getCode()); | |||
| return kwMeterService.saveOrUpdate(kwMeter); | |||
| kwMeterService.unbind(id); | |||
| kwMerchantMeterService.unbind(id); | |||
| kwMeterService.saveOrUpdate(kwMeter); | |||
| return new ResultData(kwMeter); | |||
| } | |||
| private KwBox addOrBind(KwBox kwBox) { | |||
| KwBox record = new KwBox(); | |||
| record.setImei(kwBox.getImei()); | |||
| record.setStatus(EnumBoxStatus.VALID.getCode()); | |||
| List<KwBox> list = kwBoxService.findList(record); | |||
| if (list.size() > 0) return list.get(0); | |||
| kwBox.setTenantId(getTenantId()); | |||
| kwBox.setStatus(EnumBoxStatus.VALID.getCode()); | |||
| kwBoxService.saveOrUpdate(kwBox); | |||
| return kwBox; | |||
| } | |||
| public void addOrBind(KwMerchantMeter kwMerchantMeter) { | |||
| if (kwMerchantMeter == null)return; | |||
| if (kwMerchantMeter.getMerchantId() == null)return; | |||
| if (kwMerchantMeter.getMeterId() == null)return; | |||
| KwMerchantMeter record = new KwMerchantMeter(); | |||
| record.setMeterId(kwMerchantMeter.getMeterId()); | |||
| record.setStatus(EnumMerchantMeterStatus.VALID.getCode()); | |||
| if (kwMerchantMeterService.selectCount(record) > 0) return; | |||
| kwMerchantMeter.setStatus(EnumMerchantMeterStatus.VALID.getCode()); | |||
| kwMerchantMeterService.saveOrUpdate(kwMerchantMeter); | |||
| } | |||
| @ApiOperation("导入设备") | |||
| @PostMapping(value = "import", consumes = "multipart/*") | |||
| @SystemControllerLog(description = "电表管理-导入数据") | |||
| public Result importMeters(@RequestParam("file") MultipartFile mFile) { | |||
| if (mFile == null) { | |||
| return new ResultData(ErrorCode.EXCEL_IMPORT_ERROR); | |||
| } | |||
| try { | |||
| XSSFWorkbook workbook = new XSSFWorkbook(mFile.getInputStream()); | |||
| XSSFSheet sheet = workbook.getSheetAt(0); | |||
| for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) { | |||
| XSSFRow row = sheet.getRow(i); | |||
| KwMeter kwMeter = new KwMeter(); | |||
| Cell c = row.getCell(0,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL); | |||
| if (c != null) { | |||
| kwMeter.setAddress(c.getStringCellValue()); | |||
| } else { | |||
| continue; | |||
| } | |||
| c = row.getCell(1,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL); | |||
| if (c != null) {kwMeter.setPlace(c.getStringCellValue());} | |||
| c = row.getCell(2,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL); | |||
| if (c != null) {kwMeter.setBrand(c.getStringCellValue());} | |||
| c = row.getCell(3,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL); | |||
| if (c != null) {kwMeter.setModel(c.getStringCellValue());} | |||
| c = row.getCell(4,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL); | |||
| if (c != null) {kwMeter.setProtocol(Integer.parseInt(c.getStringCellValue()));} | |||
| c = row.getCell(5,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL); | |||
| if (c != null) {kwMeter.setBandrate(Integer.parseInt(c.getStringCellValue()));} | |||
| if (kwMeter.getProtocol() != null || kwMeter.getBandrate() != null) { | |||
| JSONObject jsonObject = new JSONObject(); | |||
| if (kwMeter.getProtocol() != null) jsonObject.put("protocol",kwMeter.getProtocol()); | |||
| if (kwMeter.getBandrate() != null) jsonObject.put("bandrate",kwMeter.getBandrate()); | |||
| kwMeter.setConfig(jsonObject.toJSONString()); | |||
| } | |||
| c = row.getCell(6,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL); | |||
| if (c != null) { | |||
| String imei = c.getStringCellValue(); | |||
| KwBox kwBox = new KwBox(); | |||
| kwBox.setImei(imei); | |||
| kwBox = addOrBind(kwBox); | |||
| kwMeter.setBindStatus(EnumMeterBindStatus.BIND.getCode()); | |||
| kwMeter.setBoxId(kwBox.getId()); | |||
| } | |||
| add(kwMeter); | |||
| c = row.getCell(7,Row.MissingCellPolicy.RETURN_BLANK_AS_NULL); | |||
| if (c != null) { | |||
| String merchantName = c.getStringCellValue(); | |||
| Optional<WxMerchant> wxMerchant = wxMerchantService.findByName(merchantName); | |||
| if (wxMerchant.isPresent()) { | |||
| KwMerchantMeter kwMerchantMeter = new KwMerchantMeter(); | |||
| kwMerchantMeter.setMerchantId(wxMerchant.get().getId()); | |||
| kwMerchantMeter.setMeterId(kwMeter.getId()); | |||
| addOrBind(kwMerchantMeter); | |||
| } | |||
| } | |||
| } | |||
| }catch(Exception e) { | |||
| return new ResultData(ErrorCode.EXCEL_IMPORT_ERROR); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @GetMapping("/exportTemplate") | |||
| @SystemControllerLog(description = "电表管理-导出模板") | |||
| public void exportTemplate(HttpServletRequest request, HttpServletResponse response) { | |||
| List <KwMeter> meterList = new ArrayList<>(); | |||
| KwMeter meter1 = new KwMeter(); | |||
| meter1.setAddress("000020492980"); | |||
| meter1.setPlace("1栋-3楼-2号电井"); | |||
| meter1.setBrand("人民电器"); | |||
| meter1.setModel("DS866"); | |||
| meter1.setProtocol(1); | |||
| meter1.setBandrate(1200); | |||
| meter1.setBoxImei("865501040775810"); | |||
| meter1.setMerchantName("富茂旗舰店"); | |||
| meterList.add(meter1); | |||
| excelService.exportExcel(meterList, null, "电表模板", KwMeter.class, "电表模板.xlsx", response, true); | |||
| } | |||
| } | |||
| @@ -10,6 +10,8 @@ import com.iformall.domain.dto.KwMeterDataDto; | |||
| import com.iformall.domain.po.KwMeterData; | |||
| import com.iformall.domain.vo.KwMeterDataVo; | |||
| import com.iformall.enums.EnumMeterDataReportType; | |||
| import com.iformall.service.kw.KwMeterDataService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| @@ -20,7 +22,13 @@ import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.util.List; | |||
| import java.text.SimpleDateFormat; | |||
| import java.time.LocalDate; | |||
| import java.time.LocalDateTime; | |||
| import java.time.ZoneId; | |||
| import java.time.format.DateTimeFormatter; | |||
| import java.time.temporal.TemporalAdjusters; | |||
| import java.util.*; | |||
| @RestController | |||
| @RequestMapping("kwMeterData") | |||
| @@ -36,14 +44,65 @@ public class KwMeterDataController extends BaseController { | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "电表设备-设备列表") | |||
| @SystemControllerLog(description = "电表设备-电表数据") | |||
| public Result list(@ModelAttribute KwMeterDataDto kwMeterDataDto, Integer pageNum, Integer pageSize) { | |||
| if (kwMeterDataDto == null) kwMeterDataDto = new KwMeterDataDto(); | |||
| kwMeterDataDto.setTenantId(getTenantId()); | |||
| return new ResultData(kwMeterDataService.listVoAsPage(kwMeterDataDto, pageNum,pageSize)); | |||
| return new ResultData(kwMeterDataService.listVoAsPage(kwMeterDataDto, pageNum, pageSize)); | |||
| } | |||
| @ApiOperation("数据列表") | |||
| @GetMapping("listPower") | |||
| @SystemControllerLog(description = "电表设备-电表数据") | |||
| public Result listPower(@ModelAttribute KwMeterDataDto kwMeterDataDto) { | |||
| if (kwMeterDataDto == null) kwMeterDataDto = new KwMeterDataDto(); | |||
| kwMeterDataDto.setTenantId(getTenantId()); | |||
| List<KwMeterDataVo> kwMeterDataVos = kwMeterDataService.findVoList(kwMeterDataDto); | |||
| List<KwMeterDataVo> monthDailyPower = new ArrayList<>(); | |||
| if (kwMeterDataDto.getReportTime() != null){ | |||
| if (kwMeterDataDto.getReportType().equals(EnumMeterDataReportType.DAY.getCode())) { | |||
| Date date = null; | |||
| try { | |||
| date = new SimpleDateFormat("yyyy-MM").parse(kwMeterDataDto.getReportTime()); | |||
| } catch (Exception e) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); | |||
| } | |||
| LocalDate localDate= LocalDateTime.ofInstant(date.toInstant(),ZoneId.systemDefault()).toLocalDate(); | |||
| int days = localDate.lengthOfMonth(); | |||
| LocalDate firstDate = localDate.with(TemporalAdjusters.firstDayOfMonth()); | |||
| for (int i = 0; i < days; i++) { | |||
| String dateStr = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(firstDate.plusDays(i)); | |||
| Optional<KwMeterDataVo> optionalKwMeterDataVo = kwMeterDataVos.stream().filter(md -> md.getReportTime().equals(dateStr)).findFirst(); | |||
| if (optionalKwMeterDataVo.isPresent()) | |||
| monthDailyPower.add(optionalKwMeterDataVo.get()); | |||
| else { | |||
| KwMeterDataVo kwMeterDataVo = new KwMeterDataVo(); | |||
| kwMeterDataVo.setReportTime(dateStr); | |||
| monthDailyPower.add(kwMeterDataVo); | |||
| } | |||
| } | |||
| return new ResultData(monthDailyPower); | |||
| } | |||
| if (kwMeterDataDto.getReportType().equals(EnumMeterDataReportType.HOUR.getCode())){ | |||
| } | |||
| if (kwMeterDataDto.getReportType().equals(EnumMeterDataReportType.MONTH.getCode())){ | |||
| } | |||
| if (kwMeterDataDto.getReportType().equals(EnumMeterDataReportType.BY_HOUR.getCode())){ | |||
| } | |||
| } | |||
| return new ResultData(kwMeterDataVos); | |||
| } | |||
| @ApiOperation("获取电量") | |||
| @GetMapping("getPower") | |||
| @@ -63,5 +122,4 @@ public class KwMeterDataController extends BaseController { | |||
| return new ResultData(kwMeterDataService.getPower(kwMeterDataDto)); | |||
| } | |||
| } | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxActivity; | |||
| import com.iformall.enums.EnumActivityStatus; | |||
| import com.iformall.exception.MallinkException; | |||
| @@ -43,7 +44,7 @@ public class WxActivityController extends BaseController { | |||
| wxActivity.setStatus(null); | |||
| } | |||
| wxActivity.setTenantId(getTenantId()); | |||
| wxActivity.setSortColumns(WxActivity.Field.CreateTime_DESC,WxActivity.Field.Id_DESC); | |||
| wxActivity.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<WxActivity> page = wxActivityService.listAsPage(wxActivity, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxActivityJoin; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.WxActivityJoinService; | |||
| @@ -44,7 +45,7 @@ public class WxActivityJoinController extends BaseController { | |||
| wxActivityJoin = new WxActivityJoin(); | |||
| } | |||
| wxActivityJoin.setTenantId(getTenantId()); | |||
| wxActivityJoin.setSortColumns(WxActivityJoin.Field.CreateTime_DESC,WxActivityJoin.Field.Id_DESC); | |||
| wxActivityJoin.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<WxActivityJoin> page = wxActivityJoinService.listAsPage(wxActivityJoin, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -8,6 +8,7 @@ import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxCampaign; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.WxCouponChannel; | |||
| @@ -60,7 +61,7 @@ public class WxCampaignController extends BaseController { | |||
| wxCampaign.setStatus(null); | |||
| } | |||
| wxCampaign.setTenantId(getTenantId()); | |||
| wxCampaign.setSortColumns(WxCampaign.Field.CreateTime_DESC,WxCampaign.Field.Id_DESC); | |||
| wxCampaign.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<WxCampaign> page = wxCampaignService.listAsPage(wxCampaign, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -8,10 +8,7 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.controller.app.WxAppinfoController; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.dto.WxCouponChannelDto; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.WxCouponChannel; | |||
| import com.iformall.domain.po.WxRentContract; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.vo.WxCouponChannelAddVo; | |||
| import com.iformall.domain.vo.WxCouponChannelVo; | |||
| import com.iformall.enums.EnumCouponChannelStatus; | |||
| @@ -70,7 +67,7 @@ public class WxCouponChannelController extends BaseController { | |||
| wxCouponChannel.setStatus(null); | |||
| } | |||
| wxCouponChannel.setTenantId(getTenantId()); | |||
| wxCouponChannel.setSortColumns(WxCouponChannel.Field.UpdateDate_DESC); | |||
| wxCouponChannel.setSortColumns(BaseEntity.SortField.UpdateDate_DESC); | |||
| final PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -6,6 +6,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxCouponInject; | |||
| import com.iformall.service.WxCouponInjectService; | |||
| @@ -46,7 +47,7 @@ public class WxCouponInjectController extends BaseController { | |||
| couponInject.setStatus(null); | |||
| } | |||
| couponInject.setTenantId(getTenantId()); | |||
| couponInject.setSortColumns(WxCouponInject.Field.CreateTime_DESC,WxCouponInject.Field.Id_DESC); | |||
| couponInject.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<WxCouponInject> page = wxCouponInjectService.listAsPage(couponInject, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -6,6 +6,7 @@ import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.WxCouponSend; | |||
| import com.iformall.domain.vo.WxCouponSendVo; | |||
| @@ -50,7 +51,7 @@ public class WxCouponSendController extends BaseController { | |||
| if (null == wxCouponSend) wxCouponSend = new WxCouponSend(); | |||
| wxCouponSend.setTenantId(getTenantId()); | |||
| wxCouponSend.setStatus(EnumCouponSendStatus.VALID.getCode()); | |||
| wxCouponSend.setSortColumns(WxCouponSend.Field.CreateDate_DESC); | |||
| wxCouponSend.setSortColumns(BaseEntity.SortField.CreateDate_DESC); | |||
| final PageInfo<WxCouponSendVo> page = wxCouponSendService.listAsPage(wxCouponSend, pageNum, pageSize); | |||
| for (WxCouponSendVo cs:page.getList()) | |||
| @@ -6,6 +6,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxGame; | |||
| import com.iformall.enums.EnumGameStatus; | |||
| import com.iformall.service.WxGameService; | |||
| @@ -38,7 +39,7 @@ public class WxGameController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxGameController::list"); | |||
| if (null == wxGame) wxGame = new WxGame(); | |||
| wxGame.setTenantId(getTenantId()); | |||
| wxGame.setSortColumns(WxGame.Field.Id_DESC); | |||
| wxGame.setSortColumns(BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<WxGame> page = wxGameService.listAsPage(wxGame, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.WxMerchantSubsidy; | |||
| import com.iformall.domain.vo.WxMerchantSubsidyVo; | |||
| @@ -40,7 +41,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| @ApiOperation("补贴记录汇总") | |||
| @GetMapping("sum") | |||
| @SystemControllerLog(description = "商户-补贴记录-汇总") | |||
| public ResultData count(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy) { | |||
| public ResultData count(@ModelAttribute WxMerchantSubsidyVo wxMerchantSubsidy) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("subsidy/sum: " + ipStr + " :" + wxMerchantSubsidy.toString()); | |||
| if (wxMerchantSubsidy == null) { | |||
| @@ -57,7 +58,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| wxMerchantSubsidy.setStatusS(tmpList); | |||
| } | |||
| } | |||
| Map retMap = wxMerchantSubsidyService.sumForSubsidy(wxMerchantSubsidy); | |||
| List<Map<String, Object>> retMap = wxMerchantSubsidyService.sumForSubsidy(wxMerchantSubsidy); | |||
| return new ResultData(retMap); | |||
| } | |||
| @@ -67,7 +68,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "商户-补贴记录-列表") | |||
| public ResultData listMonth(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy, Integer pageNum, Integer pageSize) { | |||
| public ResultData listMonth(@ModelAttribute WxMerchantSubsidyVo wxMerchantSubsidy, Integer pageNum, Integer pageSize) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("subsidy/list: " + ipStr + " :" + wxMerchantSubsidy.toString()); | |||
| if (wxMerchantSubsidy == null) { | |||
| @@ -84,7 +85,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| wxMerchantSubsidy.setStatusS(tmpList); | |||
| } | |||
| } | |||
| wxMerchantSubsidy.setSortColumns(WxMerchantSubsidy.Field.CreateDate_DESC); | |||
| wxMerchantSubsidy.setSortColumns(BaseEntity.SortField.CreateDate_DESC); | |||
| final PageInfo<WxMerchantSubsidyVo> page = wxMerchantSubsidyService.listAsPage(wxMerchantSubsidy, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -92,7 +93,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| @ApiOperation("更新补贴记录") | |||
| @PostMapping("updateSubsidied") | |||
| @SystemControllerLog(description = "商户-更新补贴记录") | |||
| public ResultData updateSubsidied(@RequestBody WxMerchantSubsidy wxMerchantSubsidy) { | |||
| public ResultData updateSubsidied(@RequestBody WxMerchantSubsidyVo wxMerchantSubsidy) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("subsidy/update: " + ipStr + " :" + wxMerchantSubsidy.toString()); | |||
| if (wxMerchantSubsidy == null) { | |||
| @@ -117,7 +118,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| @ApiOperation("补贴记录导出") | |||
| @GetMapping("/exportData") | |||
| @SystemControllerLog(description = "商户-补贴记录-导出") | |||
| public void exportData(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy, HttpServletRequest request, HttpServletResponse response) { | |||
| public void exportData(@ModelAttribute WxMerchantSubsidyVo wxMerchantSubsidy, HttpServletRequest request, HttpServletResponse response) { | |||
| logger.info("[" + getIpAddr() + "] subsidy/exportData"); | |||
| if (wxMerchantSubsidy == null) { | |||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "过滤条件不能为空"); | |||
| @@ -133,7 +134,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||
| wxMerchantSubsidy.setStatusS(tmpList); | |||
| } | |||
| } | |||
| wxMerchantSubsidy.setSortColumns(WxMerchantSubsidy.Field.CreateDate_DESC); | |||
| wxMerchantSubsidy.setSortColumns(BaseEntity.SortField.CreateDate_DESC); | |||
| wxMerchantSubsidyService.exportData(wxMerchantSubsidy, request, response); | |||
| } | |||
| @@ -7,10 +7,7 @@ import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.dto.OrderSaveDto; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.WxCouponChannel; | |||
| import com.iformall.domain.po.WxOrder; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.vo.WxOrderQueryVo; | |||
| import com.iformall.enums.EnumCouponChannelStatus; | |||
| import com.iformall.enums.EnumCouponChannelType; | |||
| @@ -63,7 +60,7 @@ public class WxOrderController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxOrderController::list"); | |||
| if (null == wxOrder) wxOrder = new WxOrder(); | |||
| wxOrder.setTenantId(getTenantId()); | |||
| wxOrder.setSortColumns(WxOrder.Field.CreateDate_DESC,WxOrder.Field.Id_DESC); | |||
| wxOrder.setSortColumns(BaseEntity.SortField.CreateDate_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<WxOrder> page = wxOrderService.listAsPage(wxOrder, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -0,0 +1,91 @@ | |||
| package com.iformall.controller.market; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxPrepayment; | |||
| import com.iformall.domain.po.WxPrepaymentHistory; | |||
| import com.iformall.enums.EnumUserType; | |||
| import com.iformall.service.WxPrepaymentService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| /** | |||
| * @author gongbiao | |||
| */ | |||
| @RestController | |||
| @RequestMapping("prepayment") | |||
| @Api(description = "预付费") | |||
| public class WxPrepaymentController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxPrepaymentService wxPrepaymentService; | |||
| @ApiOperation("列表查询") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "预付费-列表查询") | |||
| public ResultData list(@ModelAttribute WxPrepayment wxPrepayment, Integer pageNum, Integer pageSize) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("prepayment/list: " + ipStr); | |||
| if (wxPrepayment == null) { | |||
| wxPrepayment = new WxPrepayment(); | |||
| } | |||
| final PageInfo<WxPrepayment> page = wxPrepaymentService.listAsPage(wxPrepayment, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("列表查询历史") | |||
| @GetMapping("listHistory") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| @SystemControllerLog(description = "预付费-列表查询历史") | |||
| public ResultData listHistory(@ModelAttribute WxPrepaymentHistory wxPrepaymentHistory, Integer pageNum, Integer pageSize) { | |||
| String ipStr = getIpAddr(); | |||
| logger.info("prepayment/listHistory: " + ipStr); | |||
| if (wxPrepaymentHistory == null) { | |||
| wxPrepaymentHistory = new WxPrepaymentHistory(); | |||
| } | |||
| final PageInfo<WxPrepaymentHistory> page = wxPrepaymentService.listHistoryAsPage(wxPrepaymentHistory, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("首次充值") | |||
| @PostMapping("payFirst") | |||
| @SystemControllerLog(description = "预付费-交费") | |||
| public ResultData payFirst(@RequestBody WxPrepayment wxPrepayment) { | |||
| logger.debug("[" + getIpAddr() + "] prepayment::add"); | |||
| wxPrepayment.setTenantId(getTenantId()); | |||
| wxPrepayment.setOperationType(EnumUserType.MALLUSER.getCode()); | |||
| wxPrepayment.setOperator(getUserId()); | |||
| wxPrepaymentService.payFirst(wxPrepayment); | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("再次充值") | |||
| @PostMapping("payAgain") | |||
| @SystemControllerLog(description = "预付费-交费或扣费") | |||
| public ResultData payAgain(@RequestBody WxPrepayment wxPrepayment) { | |||
| logger.debug("[" + getIpAddr() + "] prepayment::update"); | |||
| wxPrepayment.setTenantId(getTenantId()); | |||
| wxPrepayment.setOperationType(EnumUserType.MALLUSER.getCode()); | |||
| wxPrepayment.setOperator(getUserId()); | |||
| wxPrepaymentService.payAgain(wxPrepayment); | |||
| return new ResultData(); | |||
| } | |||
| } | |||
| @@ -9,6 +9,7 @@ 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.WxBillExcelTemplate; | |||
| import com.iformall.domain.vo.WxBillExcelTemplateOther; | |||
| import com.iformall.enums.EnumMerchantStatus; | |||
| import com.iformall.mapper.WxMerchantMapper; | |||
| @@ -57,8 +58,102 @@ public class ImportTemplateTask { | |||
| ImportParams params = new ImportParams(); | |||
| // 需要验证 | |||
| params.setImportFields(new String[]{"商户名*", "费用类型*", "费用属性*", "费用所属期-开始时间*", "费用所属期-结束时间*", "收款金额(元)*", "收款日期*", "截止缴款日*", "收款方式"}); | |||
| IExcelDataHandler<CUserBaseInfoT> handler = new ImportTemplateTask.UserExcelHandler(); | |||
| handler.setNeedHandlerFields(new String[]{"商户名*", "费用类型*", "费用属性*", "费用所属期-开始时间*", "费用所属期-结束时间*", "收款金额(元)*", "收款日期*", "截止缴款日*"}); | |||
| params.setNeedVerify(true); | |||
| ExcelImportResult<WxBillExcelTemplate> datalist = null; | |||
| try { | |||
| datalist = ExcelImportUtil.importExcelMore(file, WxBillExcelTemplate.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<WxBillExcelTemplate> successList = datalist.getList(); | |||
| List<WxBillExcelTemplate> 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<WxBillExcelTemplate> billSuccessList = new ArrayList<>(); | |||
| successList.parallelStream().forEach(s -> { | |||
| if (StringUtils.isNotEmpty(s.getMerchantName()) && null != s.getBillType() | |||
| && StringUtils.isNotEmpty(s.getBillAttr()) && null != s.getStarttime() | |||
| && null != s.getEndtime() && StringUtils.isNotEmpty(s.getPayStr()) | |||
| && null != s.getPayDate() && null != s.getReceiveDate()) { | |||
| 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.stream().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()); | |||
| } | |||
| } | |||
| } | |||
| public void importBillDataOther(File file, MallUserInfo user, String importKey, String tenantId) { | |||
| ImportParams params = new ImportParams(); | |||
| // 需要验证 | |||
| params.setImportFields(new String[]{"商户名*", "费用类型*", "费用名称*", "费用所属期-开始时间*", "费用所属期-结束时间*", "实际应收金额(元)*", "收款金额(元)*", "收款日期*", "截止缴款日*", "收款方式"}); | |||
| params.setNeedVerify(true); | |||
| ExcelImportResult<WxBillExcelTemplateOther> datalist = null; | |||
| @@ -107,7 +202,8 @@ public class ImportTemplateTask { | |||
| if (StringUtils.isNotEmpty(s.getMerchantName()) && null != s.getBillType() | |||
| && StringUtils.isNotEmpty(s.getBillAttr()) && null != s.getStarttime() | |||
| && null != s.getEndtime() && StringUtils.isNotEmpty(s.getPayStr()) | |||
| && null != s.getPayDate() && null != s.getReceiveDate()) { | |||
| && null != s.getPayDate() && null != s.getReceiveDate() | |||
| && StringUtils.isNotEmpty(s.getReceivePayStr())) { | |||
| WxMerchant wxMerchant = merchantMap.get(s.getMerchantName()); | |||
| if (wxMerchant != null) { | |||
| Long merchantId = wxMerchant.getId(); | |||
| @@ -138,7 +234,7 @@ public class ImportTemplateTask { | |||
| try { | |||
| billSuccessList.stream().forEach(bill -> { | |||
| try { | |||
| wxBillAllService.importBill(tenantId, importKey, bill, user); | |||
| wxBillAllService.importBillOther(tenantId, importKey, bill, user); | |||
| } catch (UnknownSessionException ue) { | |||
| logger.error("session :" + ue.getMessage()); | |||
| } | |||
| @@ -39,8 +39,6 @@ import java.util.Map; | |||
| import java.util.concurrent.TimeUnit; | |||
| import java.util.stream.Collectors; | |||
| import static com.iformall.domain.po.WxCouponOrder.Field.CreateDate_DESC; | |||
| @RestController | |||
| @RequestMapping("wxCUserBasicInfo") | |||
| @Api(description = "会员管理相关接口") | |||
| @@ -140,7 +138,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| } | |||
| String tenantId = getTenantId(); | |||
| wxCUserBasicInfo.setTenantId(tenantId); | |||
| wxCUserBasicInfo.setSortColumns(WxCUserBasicInfo.Field.ActiveTime_DESC); | |||
| wxCUserBasicInfo.setSortColumns(BaseEntity.SortField.ActiveTime_DESC); | |||
| PageInfo<WxCUserBasicInfo> page = wxCUserBasicInfoService.listAsPage(wxCUserBasicInfo, pageNum, pageSize); | |||
| if (page.getSize() > 0) { | |||
| @@ -230,7 +228,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||
| WxCouponOrder corder = new WxCouponOrder(); | |||
| corder.setCUserId(userId); | |||
| corder.setTenantId(getTenantId()); | |||
| corder.setSortColumns(CreateDate_DESC); | |||
| corder.setSortColumns(BaseEntity.SortField.CreateDate_DESC); | |||
| PageInfo<WxCouponOrder> page = wxCouponOrderService.listAsPage(corder, pageNum, pageSize); | |||
| if (page.getSize() > 0) { | |||
| List<WxCouponOrder> list = page.getList(); | |||
| @@ -18,6 +18,9 @@ import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| @RestController | |||
| @RequestMapping("wxCreditHistory") | |||
| public class WxCreditHistoryController extends BaseController { | |||
| @@ -87,4 +90,11 @@ public class WxCreditHistoryController extends BaseController { | |||
| return new ResultData(Result.SUCCESS); | |||
| } | |||
| @GetMapping("exportData") | |||
| @SystemControllerLog(description = "积分历史-导出数据") | |||
| public void exportData(@ModelAttribute WxCreditHistory wxCreditHistory, HttpServletRequest request, HttpServletResponse response) { | |||
| wxCreditHistory.setTenantId(getTenantId()); | |||
| wxCreditHistoryService.exportData(request, response, wxCreditHistory); | |||
| } | |||
| } | |||
| @@ -3,6 +3,7 @@ package com.iformall.controller.mem; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -45,7 +46,7 @@ public class WxLevelConfigController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxLevelConfigController::list"); | |||
| if (null == wxLevelConfig) wxLevelConfig = new WxLevelConfig(); | |||
| wxLevelConfig.setTenantId(getTenantId()); | |||
| wxLevelConfig.setSortColumns(WxLevelConfig.Field.Points_ASC); | |||
| wxLevelConfig.setSortColumns(BaseEntity.SortField.Points_ASC); | |||
| final PageInfo<WxLevelConfig> page = wxLevelConfigService.listAsPage(wxLevelConfig, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxMsgCallback; | |||
| import com.iformall.service.WxMsgCallbackService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| @@ -35,7 +36,7 @@ public class WxMsgCallbackController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgCallbackController::list"); | |||
| if (null == wxMsgCallback) wxMsgCallback = new WxMsgCallback(); | |||
| wxMsgCallback.setTenantId(getTenantId()); | |||
| wxMsgCallback.setSortColumns(WxMsgCallback.Field.Createtime_DESC); | |||
| wxMsgCallback.setSortColumns(BaseEntity.SortField.Createtime_DESC); | |||
| final PageInfo<WxMsgCallback> page = wxMsgCallbackService.listAsPage(wxMsgCallback, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.msg.WxMsg; | |||
| import com.iformall.service.WxMsgService; | |||
| import com.iformall.utils.Constant; | |||
| @@ -47,7 +48,7 @@ public class WxMsgController extends BaseController { | |||
| if (null == wxMsg) wxMsg = new WxMsg(); | |||
| wxMsg.setTenantId(getTenantId()); | |||
| //wxMsg.setWay(EnumSendWay.TAG.getCode()); | |||
| wxMsg.setSortColumns(WxMsg.Field.Createtime_DESC); | |||
| wxMsg.setSortColumns(BaseEntity.SortField.Createtime_DESC); | |||
| final PageInfo<WxMsg> page = wxMsgService.listAsPage(wxMsg, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxMsgModel; | |||
| import com.iformall.service.WxMsgModelService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| @@ -33,7 +34,7 @@ public class WxMsgModelController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgModelController::list"); | |||
| if (null == wxMsgModel) wxMsgModel = new WxMsgModel(); | |||
| wxMsgModel.setTenantId(getTenantId()); | |||
| wxMsgModel.setSortColumns(WxMsgModel.Field.Createtime_DESC); | |||
| wxMsgModel.setSortColumns(BaseEntity.SortField.Createtime_DESC); | |||
| final PageInfo<WxMsgModel> page = wxMsgModelService.listAsPage(wxMsgModel, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -5,6 +5,7 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxMsgSignature; | |||
| import com.iformall.service.WxMsgSignatureService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| @@ -33,7 +34,7 @@ public class WxMsgSignatureController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgSignatureController::list"); | |||
| if (null == wxMsgSignature) wxMsgSignature = new WxMsgSignature(); | |||
| wxMsgSignature.setTenantId(getTenantId()); | |||
| wxMsgSignature.setSortColumns(WxMsgSignature.Field.Createtime_DESC); | |||
| wxMsgSignature.setSortColumns(BaseEntity.SortField.Createtime_DESC); | |||
| final PageInfo<WxMsgSignature> page = wxMsgSignatureService.listAsPage(wxMsgSignature, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -6,9 +6,11 @@ import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxMsgValidationcodeModel; | |||
| import com.iformall.enums.EnumMsgModelReplace; | |||
| import com.iformall.service.WxMsgValidationcodeModelService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -22,6 +24,7 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| @Autowired | |||
| private WxMsgValidationcodeModelService wxMsgValidationcodeModelService; | |||
| @ApiOperation("消息模板-列表") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @@ -31,10 +34,16 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeModelController::list"); | |||
| if (null == wxMsgValidationcodeModel) wxMsgValidationcodeModel = new WxMsgValidationcodeModel(); | |||
| wxMsgValidationcodeModel.setTenantId(getTenantId()); | |||
| final PageInfo<WxMsgValidationcodeModel> page = wxMsgValidationcodeModelService.listAsPage(wxMsgValidationcodeModel, pageNum, pageSize); | |||
| PageInfo<WxMsgValidationcodeModel> page = wxMsgValidationcodeModelService.listAsPage(wxMsgValidationcodeModel, pageNum, pageSize); | |||
| page.getList().forEach(m -> { | |||
| for (EnumMsgModelReplace e : EnumMsgModelReplace.values()) { | |||
| m.setContent(m.getContent().replace(e.getCode(),e.getMessage())); | |||
| } | |||
| }); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("消息模板-添加") | |||
| @PostMapping("add") | |||
| @SystemControllerLog(description = "消息验证模板-添加") | |||
| public ResultData add(@RequestBody WxMsgValidationcodeModel wxMsgValidationcodeModel) { | |||
| @@ -45,6 +54,7 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| return wxMsgValidationcodeModelService.saveOrUpdate(wxMsgValidationcodeModel); | |||
| } | |||
| @ApiOperation("消息模板-更新") | |||
| @PostMapping("update") | |||
| @SystemControllerLog(description = "消息验证模板-更新") | |||
| public ResultData update(@RequestBody WxMsgValidationcodeModel wxMsgValidationcodeModel) { | |||
| @@ -53,6 +63,16 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("消息模板-打开/关闭发送") | |||
| @PostMapping("updateOpen") | |||
| @SystemControllerLog(description = "消息验证模板-打开/关闭发送") | |||
| public ResultData updateOpen(@RequestBody WxMsgValidationcodeModel wxMsgValidationcodeModel) { | |||
| logger.debug("[" + getIpAddr() + "] WxMsgValidationcodeModelController::updateOpen"); | |||
| wxMsgValidationcodeModelService.update(wxMsgValidationcodeModel); | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("消息模板-删除") | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "消息验证模板-删除") | |||
| @@ -62,6 +82,7 @@ public class WxMsgValidationcodeModelController extends BaseController { | |||
| return new ResultData(Result.SUCCESS, "删除成功", null); | |||
| } | |||
| @ApiOperation("消息模板-查询") | |||
| @GetMapping("/findById") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "消息验证模板-查询") | |||
| @@ -4,11 +4,12 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxBillAction; | |||
| import com.iformall.service.WxBillActionService; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.service.*; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -30,6 +31,7 @@ public class WxBillActionController extends BaseController { | |||
| @Autowired | |||
| private WxBillActionService wxBillActionService; | |||
| @ApiOperation("账单操作记录列表") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @@ -41,9 +43,8 @@ public class WxBillActionController extends BaseController { | |||
| wxBillAction = new WxBillAction(); | |||
| } | |||
| wxBillAction.setTenantId(getTenantId()); | |||
| wxBillAction.setSortColumns(WxBillAction.Field.Id_DESC); | |||
| wxBillAction.setSortColumns(BaseEntity.SortField.Id_DESC); | |||
| PageInfo<WxBillAction> result = wxBillActionService.listAsPage(wxBillAction, pageNum, pageSize); | |||
| return new ResultData(result); | |||
| } | |||
| } | |||
| @@ -5,10 +5,13 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxBillProperty; | |||
| import com.iformall.domain.po.WxBillRent; | |||
| import com.iformall.service.WxBillPropertyService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -39,7 +42,7 @@ public class WxBillPropertyController extends BaseController { | |||
| wxBillProperty = new WxBillProperty(); | |||
| } | |||
| wxBillProperty.setTenantId(getTenantId()); | |||
| wxBillProperty.setSortColumns(WxBillProperty.Field.Createtime_DESC,WxBillProperty.Field.Id_DESC); | |||
| wxBillProperty.setSortColumns(BaseEntity.SortField.Createtime_DESC,BaseEntity.SortField.Id_DESC); | |||
| PageInfo<WxBillProperty> result = wxBillPropertyService.listAsPage(wxBillProperty, pageNum, pageSize); | |||
| return new ResultData(result); | |||
| } | |||
| @@ -60,6 +63,14 @@ public class WxBillPropertyController extends BaseController { | |||
| return wxBillPropertyService.saveOrUpdate(wxBillProperty, getUser()); | |||
| } | |||
| @ApiOperation("修改滞纳金") | |||
| @PostMapping("updateLatePayMoney") | |||
| @SystemControllerLog(description = "修改滞纳金") | |||
| public ResultData updateLatePayMoney(@RequestBody WxBillProperty wxBillProperty) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateLatePayMoney"); | |||
| return wxBillPropertyService.updateLatePayMoney(wxBillProperty, getUser()); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "物业账单-删除") | |||
| @@ -5,10 +5,12 @@ import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.BaseEntity; | |||
| import com.iformall.domain.po.WxBillRent; | |||
| import com.iformall.service.WxBillRentService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -39,7 +41,7 @@ public class WxBillRentController extends BaseController { | |||
| wxBillRent = new WxBillRent(); | |||
| } | |||
| wxBillRent.setTenantId(getTenantId()); | |||
| wxBillRent.setSortColumns(WxBillRent.Field.Createtime_DESC,WxBillRent.Field.Id_DESC); | |||
| wxBillRent.setSortColumns(BaseEntity.SortField.Createtime_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<WxBillRent> page = wxBillRentService.listAsPage(wxBillRent, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -59,6 +61,14 @@ public class WxBillRentController extends BaseController { | |||
| return wxBillRentService.saveOrUpdate(wxBillRent, getUser()); | |||
| } | |||
| @ApiOperation("修改滞纳金") | |||
| @PostMapping("updateLatePayMoney") | |||
| @SystemControllerLog(description = "修改滞纳金") | |||
| public ResultData updateLatePayMoney(@RequestBody WxBillRent wxBillRent) { | |||
| logger.debug("[" + getIpAddr() + "] WxBillRentController::updateLatePayMoney"); | |||
| return wxBillRentService.updateLatePayMoney(wxBillRent, getUser()); | |||
| } | |||
| @GetMapping("/del") | |||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||
| @SystemControllerLog(description = "租赁押金账单-删除") | |||
| @@ -6,10 +6,7 @@ import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.MallRole; | |||
| import com.iformall.domain.po.MallRolePermission; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.domain.po.MallUserRole; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.EnumUserAdmin; | |||
| import com.iformall.service.MallRolePermissionService; | |||
| import com.iformall.service.MallRoleService; | |||
| @@ -57,7 +54,7 @@ public class MallRoleController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] MallRoleController::list"); | |||
| String tenantId = getTenantId(); | |||
| sysRole.setTenantId(tenantId); | |||
| sysRole.setSortColumns(MallRole.Field.Id_DESC); | |||
| sysRole.setSortColumns(BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<MallRole> page = sysRoleService.listAsPage(sysRole, pageNum, pageSize); | |||
| for (MallRole r : page.getList()) { | |||
| MallRolePermission p = new MallRolePermission(); | |||
| @@ -77,7 +77,7 @@ public class MallUserInfoController extends BaseController { | |||
| } | |||
| userInfo.setTenantId(getTenantId()); | |||
| userInfo.setSortColumns(MallUserInfo.Field.CreateTime_DESC,MallUserInfo.Field.Id_DESC); | |||
| userInfo.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<MallUserInfo> page = userInfoService.listAsPage(userInfo, pageNum, pageSize); | |||
| for (MallUserInfo u : page.getList()) { | |||
| MallUserRole r = new MallUserRole(); | |||
| @@ -2,6 +2,7 @@ package com.iformall.controller.sys; | |||
| import com.amazonaws.services.s3.model.*; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.service.QrCodeService; | |||
| @@ -78,7 +79,11 @@ public class UploadController extends BaseController { | |||
| @SystemControllerLog(description = "上传图片") | |||
| public ResultData awsImgUpload(@RequestParam("file") MultipartFile multiReq) throws Exception{ | |||
| logger.info("[" + getIpAddr() + "] UploadController::awsImgUpload"); | |||
| long size = multiReq.getSize(); | |||
| final long length = 2097152; | |||
| if (size > length) { | |||
| return new ResultData(ErrorCode.PICTURE_SIZE_EXCEED); | |||
| } | |||
| String fileName = UUID.randomUUID().toString(); | |||
| String tempFileName = fileName; | |||
| String fileFormat = ""; | |||
| @@ -124,7 +129,7 @@ public class UploadController extends BaseController { | |||
| } else { | |||
| ObjectMetadata metadata = new ObjectMetadata(); | |||
| metadata.setContentType(multiReq.getContentType()); | |||
| metadata.setContentLength(multiReq.getSize()); | |||
| metadata.setContentLength(size); | |||
| ResultData data = qrCodeService.awsUpload(multiReq.getInputStream(), metadata, fileName, getTenantId()); | |||
| return data; | |||
| } | |||
| @@ -136,10 +136,13 @@ public class WxImportTemplateController extends BaseController { | |||
| } | |||
| if (type.equals(EnumImportType.MEMBER.getCode())) { | |||
| importTemplateTask.importMemberData(lFile, user, importKey, tenantId); | |||
| } else if (type.equals(EnumImportType.SHOP_RENT.getCode()) || type.equals(EnumImportType.POINT_RENT.getCode()) | |||
| || type.equals(EnumImportType.SHOP_PROPERTY.getCode()) || type.equals(EnumImportType.POINT_PROPERTY.getCode())) { | |||
| importTemplateTask.importBillData(lFile, user, importKey, tenantId); | |||
| } else if (type.equals(EnumImportType.DAILY.getCode()) || type.equals(EnumImportType.OTHER.getCode()) | |||
| || type.equals(EnumImportType.OTHER_DEPOSIT.getCode())) { | |||
| importTemplateTask.importBillDataOther(lFile, user, importKey, tenantId); | |||
| } | |||
| //暂时不区分账单类型,导入时区分 | |||
| importTemplateTask.importBillData(lFile, user, importKey, tenantId); | |||
| return new ResultData(Result.SUCCESS, "模板正在导入"); | |||
| } | |||
| @@ -110,6 +110,14 @@ public class TenantInfoImpl implements TenantInfo { | |||
| return true; | |||
| if ("com.iformall.mapper.WxBusinessMapper.devoteList".equals(ms.getId())) | |||
| return true; | |||
| if ("com.iformall.mapper.WxBillRentMapper.findLatePayBill".equals(ms.getId())) | |||
| return true; | |||
| if ("com.iformall.mapper.WxBillPropertyMapper.findLatePayBill".equals(ms.getId())) | |||
| return true; | |||
| if ("com.iformall.mapper.WxBillRentMapper.updateNotPaidStatus".equals(ms.getId())) | |||
| return true; | |||
| if ("com.iformall.mapper.WxBillPropertyMapper.updateNotPaidStatus".equals(ms.getId())) | |||
| return true; | |||
| return false; | |||
| } | |||
| } | |||
| @@ -19,6 +19,7 @@ public class UrlCheck { | |||
| || url.contains("notify") | |||
| || url.contains("pvlog") | |||
| || url.contains("/wxBillDaily/importTemplate") | |||
| || url.contains("/kwMeter/import") | |||
| || url.contains("/wxImportTemplate/importTemplate"); | |||
| } | |||
| @@ -14,8 +14,8 @@ spring: | |||
| default-property-inclusion: non_null | |||
| servlet: | |||
| multipart: | |||
| max-file-size: 2MB | |||
| max-request-size: 2MB | |||
| max-file-size: 20MB | |||
| max-request-size: 200MB | |||
| cache: | |||
| type: REDIS | |||
| cache-names: redis_cache #缓存的名字(可以不指定) | |||
| @@ -1,7 +0,0 @@ | |||
| update wx_bill_rent set is_preview = 0 where rent_contract_id in( | |||
| select id from wx_rent_contract where apply_status = 2 | |||
| ); | |||
| update wx_bill_property set is_preview = 0 where property_contract_id in( | |||
| select id from wx_property_contract where apply_status = 2 | |||
| ); | |||
| @@ -1 +0,0 @@ | |||
| alter table wx_merchant_trade_daily modify column trade_amt BIGINT(20); | |||
| @@ -1,22 +0,0 @@ | |||
| drop table if exists `wx_activity`; | |||
| CREATE TABLE IF NOT EXISTS `wx_activity` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `cover_img` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '封面图', | |||
| `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '活动名称', | |||
| `sub_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '副标题', | |||
| `detail` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '活动正文', | |||
| `html` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '富文本', | |||
| `person_limit` int(11) NOT NULL COMMENT '报名人数', | |||
| `activity_time` datetime NOT NULL COMMENT '活动时间', | |||
| `useCredit` smallint(2) DEFAULT 0 COMMENT '使用积分1是0否', | |||
| `credit` int(11) DEFAULT 0 COMMENT '消耗积分', | |||
| `type` smallint(2) NOT NULL COMMENT '类型 1固定格式2自由图文', | |||
| `status` smallint(2) NOT NULL COMMENT '状态0上线 1下线', | |||
| `start_time` datetime NOT NULL COMMENT '活动开始显示时间', | |||
| `end_time` datetime NOT NULL COMMENT '活动结束显示时间', | |||
| `create_time` datetime NOT NULL COMMENT '创建时间', | |||
| `update_time` datetime NOT NULL COMMENT '更新时间', | |||
| PRIMARY KEY (`id`), | |||
| INDEX `id_index` USING BTREE (`id`) comment '' | |||
| ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='活动表' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||
| @@ -1,28 +0,0 @@ | |||
| update wx_msg_validationcode_model set content = '<!DOCTYPE html> | |||
| <html> | |||
| <head> | |||
| <meta charset="utf-8"> | |||
| <meta name="viewport" content="width=device-width,initial-scale=1.0"> | |||
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |||
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |||
| <meta name="renderer" content="webkit"> | |||
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |||
| <title>富茂审批邮件</title> | |||
| <title></title> | |||
| <script> document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + ''px'';</script> | |||
| </head> | |||
| <body> | |||
| <div id="box" style="padding:80px 20%;background:#E9E7E7;min-height:100vh;"> | |||
| <header style="height:140px;width:100%;display:flex;background:rgba(31,47,62,1);border-radius:15px 15px 0px 0px;"> | |||
| <img style="height:auto;width:292px;display:flex;align-self: center;justify-content: center;padding:0 40px;" src="https://s3.cn-northwest-1.amazonaws.com.cn/iformall-net/cimg/changrong-logo.png"/> | |||
| </header> | |||
| <div style="background:#fff;"> | |||
| <div style="font-size:26px;font-family:MicrosoftYaHei-Bold;font-weight:bold;color:rgba(85,85,85,1);line-height: 32px;padding:56px 55px 0;">审批通过通知</div> | |||
| <div style="font-size:18px;font-family:MicrosoftYaHei;font-weight:400;color:rgba(85,85,85,1);padding: 36px 55px;">编号<span>{contract}</span>的{bustype}已经审批通过,请登录<a href="{page}">{page}</a>跟进后续工作</div> | |||
| </div> | |||
| </div> | |||
| </body> | |||
| </html>' where name = '审批通过通知'; | |||
| @@ -1,31 +0,0 @@ | |||
| INSERT INTO `mall_permission` | |||
| (`id`,`name`, `parent_id`,`available`,`permission`,`resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`,`sort`) | |||
| VALUES | |||
| (663, '活动报名', 604, 'Y', null, 1, null, null, 'regActivityList', null, 0, 663); | |||
| DROP TABLE IF EXISTS `mall_sale_type` ; | |||
| CREATE TABLE `mall_sale_type` ( | |||
| `id` bigint(64) NOT NULL, | |||
| `name` varchar(32) DEFAULT NULL COMMENT '销售类型', | |||
| `type` tinyint(2) DEFAULT NULL COMMENT '资源类型1:尊享全能版 2:尊享营销版 3.速享版', | |||
| `period` tinyint(2) DEFAULT NULL COMMENT '有效期(单位月)', | |||
| `menus` json DEFAULT NULL COMMENT '菜单列表', | |||
| PRIMARY KEY (`id`), | |||
| UNIQUE `id_UNIQUE` USING BTREE (`id`) comment '' | |||
| ) ENGINE=`InnoDB` ROW_FORMAT=DYNAMIC COMMENT='系统销售表' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||
| INSERT INTO `mall_sale_type` | |||
| (`id`,`name`, `type`, `period`, `menus`) | |||
| VALUES | |||
| (1, '尊享全能版', 1, 12, | |||
| '[1,2,3,4,5,6,7,8,9,10,101,102,103,104,105,106,107,201,202,203,204,205,206,211,212,221,222,251,301,302,303,304,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,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,951,961]' | |||
| ), | |||
| (2, '尊享营销版', 2, 12, | |||
| '[1,2,4,5,6,7,8,9,10,101,102,103,104,105,106,107,201,202,203,204,205,211,212,221,222,251,409,410,411,501,502,503,504,505,506,507,508,509,511,512,513,521,522,523,531,532,533,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,951,961]' | |||
| ), | |||
| (3, '速享版', 3, 1, | |||
| '[2,4,5,6,7,10,201,202,205,211,212,221,222,251,409,410,411,501,502,503,504,505,506,507,508,511,512,513,521,522,523,531,532,533,601,602,603,604,605,606,607,608,609,610,611,612,621,622,623,624,625,626,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]' | |||
| ) | |||
| ; | |||
| @@ -1,5 +0,0 @@ | |||
| alter table wx_rent_contract | |||
| add column `rent_start_type` int(1) DEFAULT 1 COMMENT '1按租赁日生产2按计租日生成账单'; | |||
| alter table wx_property_contract | |||
| add column `rent_start_type` int(1) DEFAULT 1 COMMENT '1按租赁日生产2按计租日生成账单'; | |||
| @@ -1,20 +0,0 @@ | |||
| drop table if exists `wx_campaign_join`; | |||
| CREATE TABLE IF NOT EXISTS `wx_campaign_join` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `user_id` bigint(20) NOT NULL COMMENT 'C端用户ID', | |||
| `campaign_id` bigint(20) NOT NULL COMMENT '活动ID', | |||
| `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '姓名', | |||
| `nick_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称', | |||
| `birthday` datetime COMMENT '生日', | |||
| `sex` smallint(2) DEFAULT 0 COMMENT '性别0保密1男2女', | |||
| `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '地址', | |||
| `answer` json NOT NULL COMMENT '答案', | |||
| `sign_in` smallint(2) DEFAULT 0 COMMENT '签到状态1签到0未签到', | |||
| `status` smallint(2) DEFAULT 0 COMMENT '状态0未确认-报名中1确认-报名成功2取消-报名失败3过期', | |||
| `create_time` datetime NOT NULL COMMENT '创建时间', | |||
| `update_time` datetime NOT NULL COMMENT '更新时间', | |||
| PRIMARY KEY (`id`), | |||
| INDEX `id_index` USING BTREE (`id`) comment '' | |||
| ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='活动报名表' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||
| @@ -1 +0,0 @@ | |||
| alter table `wx_campaign_join` add column phone varchar(15) NOT NULL COMMENT '手机号'; | |||
| @@ -1 +0,0 @@ | |||
| drop table if exists `wx_activity`; | |||
| @@ -1,2 +0,0 @@ | |||
| alter table wx_brand | |||
| add column `is_del` SMALLINT(1) DEFAULT 0 COMMENT '是否删除1是0否'; | |||
| @@ -1,18 +0,0 @@ | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(87,'456','17','限时活动报名成功','富茂','亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(117,'1001','17','限时活动报名成功','长融世贸广场','亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(217,'1002','17','限时活动报名成功','同保楼 同福街','亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(317,'1003','17','限时活动报名成功','杭州东站西子国际','亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(417,'1004','17','限时活动报名成功','莱迪1086商业中心','亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(517,'1005','17','限时活动报名成功','永修铜锣湾广场','亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(617,'1006','17','限时活动报名成功','欧堡利亚海悦城','亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(717,'1007','17','限时活动报名成功','澳林广场','亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(1000000001,'789','17','限时活动报名成功','富茂','亲爱的{person},您已成功报名{party},盼望您于{time}到场参加活动,谢谢。',now(),1,0,null); | |||
| @@ -1,18 +0,0 @@ | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(88,'456','18','限时活动参加提醒','富茂','亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(118,'1001','18','限时活动参加提醒','长融世贸广场','亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(218,'1002','18','限时活动参加提醒','同保楼 同福街','亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(318,'1003','18','限时活动参加提醒','杭州东站西子国际','亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(418,'1004','18','限时活动参加提醒','莱迪1086商业中心','亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(518,'1005','18','限时活动参加提醒','永修铜锣湾广场','亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(618,'1006','18','限时活动参加提醒','欧堡利亚海悦城','亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(718,'1007','18','限时活动参加提醒','澳林广场','亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。',now(),1,0,null); | |||
| insert into wx_msg_validationcode_model(id,tenant_id,type,name,signature,content,createtime,status,minutes,model_id) | |||
| values(1000000002,'789','18','限时活动参加提醒','富茂','亲爱的{person},{party}活动将在{time}准时开始,感谢您能够抽出宝贵时间准时到活动现场参与,谢谢。',now(),1,0,null); | |||
| @@ -1,2 +0,0 @@ | |||
| alter table wx_merchant | |||
| add column `is_del` SMALLINT(1) DEFAULT 0 COMMENT '是否删除1是0否'; | |||
| @@ -1,2 +0,0 @@ | |||
| alter table wx_campaign_join add column img_url json COMMENT '图片'; | |||
| update wx_campaign_join set img_url=json_array(); | |||
| @@ -1,2 +0,0 @@ | |||
| alter table wx_campaign add column `activity_end_time` datetime COMMENT '活动结束时间', | |||
| change column `activity_time` activity_start_time datetime COMMENT '活动开始时间'; | |||
| @@ -1,7 +0,0 @@ | |||
| ALTER TABLE `wx_campaign` | |||
| ADD COLUMN `produce_type` SMALLINT(2) NULL DEFAULT NULL COMMENT '产品类型,类型3适用(1-券,2-报名)', | |||
| ADD COLUMN `produce_id` BIGINT(20) NULL DEFAULT NULL COMMENT '产品ID,类型3适用', | |||
| ADD COLUMN `page_path` VARCHAR(50) NULL DEFAULT NULL COMMENT '小程序跳转路径,类型3适用', | |||
| ADD COLUMN `page_scene` VARCHAR(50) NULL DEFAULT NULL COMMENT '小程序跳转二维码,类型3适用', | |||
| CHANGE COLUMN `type` `type` SMALLINT(11) NULL DEFAULT NULL COMMENT '类型 1-固定格式,2-自由图文,3-小程序路径' ; | |||
| @@ -1,32 +0,0 @@ | |||
| INSERT INTO `mall_permission` | |||
| (`id`,`name`, `parent_id`,`available`,`permission`,`resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`,`sort`) | |||
| VALUES | |||
| (903, '审批管理', 7, 'Y', null, 0, null, null, null, 'icon-shenpiguanli', 0, 903), | |||
| (931, '流程模板', 903, 'Y', null, 1, null, null, 'processTemplate', null, 0, 931), | |||
| (932, '类型设置', 903, 'Y', null, 1, null, null, 'processTypeSet', null, 0, 932); | |||
| DROP TABLE IF EXISTS `mall_sale_type` ; | |||
| CREATE TABLE `mall_sale_type` ( | |||
| `id` bigint(64) NOT NULL, | |||
| `name` varchar(32) DEFAULT NULL COMMENT '销售类型', | |||
| `type` tinyint(2) DEFAULT NULL COMMENT '资源类型1:尊享全能版 2:尊享营销版 3.速享版', | |||
| `period` tinyint(2) DEFAULT NULL COMMENT '有效期(单位月)', | |||
| `menus` json DEFAULT NULL COMMENT '菜单列表', | |||
| PRIMARY KEY (`id`), | |||
| UNIQUE `id_UNIQUE` USING BTREE (`id`) comment '' | |||
| ) ENGINE=`InnoDB` ROW_FORMAT=DYNAMIC COMMENT='系统销售表' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||
| INSERT INTO `mall_sale_type` | |||
| (`id`,`name`, `type`, `period`, `menus`) | |||
| VALUES | |||
| (1, '尊享全能版', 1, 12, | |||
| '[1,2,3,4,5,6,7,8,9,10,101,102,103,104,105,106,107,201,202,203,204,205,206,211,212,221,222,251,301,302,303,304,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,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]' | |||
| ), | |||
| (2, '尊享营销版', 2, 12, | |||
| '[1,2,4,5,6,7,8,9,10,101,102,103,104,105,106,107,201,202,203,204,205,211,212,221,222,251,409,410,411,501,502,503,504,505,506,507,508,509,511,512,513,521,522,523,531,532,533,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]' | |||
| ), | |||
| (3, '速享版', 3, 1, | |||
| '[2,4,5,6,7,10,201,202,205,211,212,221,222,251,409,410,411,501,502,503,504,505,506,507,508,511,512,513,521,522,523,531,532,533,601,602,603,604,605,606,607,608,609,610,611,612,621,622,623,624,625,626,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]' | |||
| ) | |||
| ; | |||
| @@ -1,25 +0,0 @@ | |||
| drop table if exists `wx_activity`; | |||
| CREATE TABLE IF NOT EXISTS `wx_activity` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `cover_img` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '封面图', | |||
| `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '活动名称', | |||
| `sub_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '副标题', | |||
| `detail` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '活动正文', | |||
| `html` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '富文本', | |||
| `person_limit` int(11) NOT NULL COMMENT '报名人数', | |||
| `activity_start_time` datetime NOT NULL COMMENT '活动开始时间', | |||
| `activity_end_time` datetime NOT NULL COMMENT '活动开始时间', | |||
| `useCredit` smallint(2) DEFAULT 0 COMMENT '使用积分1是0否', | |||
| `credit` int(11) DEFAULT 0 COMMENT '消耗积分', | |||
| `type` smallint(2) NOT NULL COMMENT '类型 1固定格式2自由图文', | |||
| `status` smallint(2) NOT NULL COMMENT '状态0上线 1下线', | |||
| `start_time` datetime NOT NULL COMMENT '活动报名开始时间', | |||
| `end_time` datetime NOT NULL COMMENT '活动报名结束时间', | |||
| `question` json NOT NULL COMMENT '问题', | |||
| `is_expired` smallint(2) DEFAULT 1 COMMENT '是否过期1是0否', | |||
| `create_time` datetime NOT NULL COMMENT '创建时间', | |||
| `update_time` datetime NOT NULL COMMENT '更新时间', | |||
| PRIMARY KEY (`id`), | |||
| INDEX `id_index` USING BTREE (`id`) comment '' | |||
| ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='活动表' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||
| @@ -1,2 +0,0 @@ | |||
| alter table wx_coupon | |||
| add column `is_del` SMALLINT(1) DEFAULT 0 COMMENT '是否删除1是0否'; | |||
| @@ -1,11 +0,0 @@ | |||
| drop table if exists `wx_flow_model`; | |||
| CREATE TABLE `wx_flow_model` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(10) NOT NULL COMMENT '租户id', | |||
| `name` varchar(255) DEFAULT NULL COMMENT '名称', | |||
| `flow` varchar(255) DEFAULT NULL COMMENT '流程', | |||
| `create_user` bigint(20) NOT NULL COMMENT '创建用户', | |||
| `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||
| `update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||
| PRIMARY KEY (`id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; | |||
| @@ -1,21 +0,0 @@ | |||
| drop table if exists `wx_activity_join`; | |||
| CREATE TABLE IF NOT EXISTS `wx_activity_join` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `user_id` bigint(20) NOT NULL COMMENT 'C端用户ID', | |||
| `activity_id` bigint(20) NOT NULL COMMENT '活动ID', | |||
| `name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '姓名', | |||
| `nick_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称', | |||
| `birthday` datetime COMMENT '生日', | |||
| `phone` varchar(15) NOT NULL COMMENT '手机号', | |||
| `sex` smallint(2) DEFAULT 0 COMMENT '性别0保密1男2女', | |||
| `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '地址', | |||
| `answer` json NOT NULL COMMENT '答案', | |||
| `sign_in` smallint(2) DEFAULT 0 COMMENT '签到状态1签到0未签到', | |||
| `status` smallint(2) DEFAULT 0 COMMENT '状态0未确认-报名中1确认-报名成功2取消-报名失败3过期', | |||
| `create_time` datetime NOT NULL COMMENT '创建时间', | |||
| `update_time` datetime NOT NULL COMMENT '更新时间', | |||
| PRIMARY KEY (`id`), | |||
| INDEX `id_index` USING BTREE (`id`) comment '' | |||
| ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='活动报名表' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||
| @@ -1,5 +0,0 @@ | |||
| alter table wx_activity_join add column img_url json COMMENT '图片'; | |||
| update wx_activity_join set img_url=json_array(); | |||
| ###删除wx_campaign_join | |||
| drop table if exists `wx_campaign_join`; | |||
| @@ -1,4 +0,0 @@ | |||
| alter table wx_activity | |||
| add column use_img smallint(2) DEFAULT 0 COMMENT '是否上传图片1是0否', | |||
| add column img_detail varchar(255) DEFAULT '' COMMENT '图片说明' | |||
| ; | |||
| @@ -1 +0,0 @@ | |||
| alter table wx_activity modify column html mediumtext COMMENT '富文本'; | |||
| @@ -1 +0,0 @@ | |||
| alter table wx_activity change column useCredit use_credit smallint(2) default 0 comment '使用积分1是0否'; | |||
| @@ -1,4 +0,0 @@ | |||
| alter table wx_campaign | |||
| modify column page_path varchar(255) comment '小程序跳转路径,类型3适用', | |||
| modify column page_scene varchar(255) comment '小程序跳转二维码,类型3适用,类型3适用' | |||
| ; | |||
| @@ -1,13 +0,0 @@ | |||
| drop table if exists `wx_flow_config`; | |||
| CREATE TABLE `wx_flow_config` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `parent_id` bigint(20) NOT NULL COMMENT '父类id', | |||
| `tenant_id` varchar(10) NOT NULL COMMENT '租户id', | |||
| `name` varchar(255) DEFAULT NULL COMMENT '名称', | |||
| `type` tinyint(1) DEFAULT '0' COMMENT '流程类型1合同审批2账单审批3终止合同', | |||
| `status` tinyint(1) DEFAULT '0' COMMENT '状态0启用 1停用', | |||
| `model_id` bigint(20) NOT NULL COMMENT '模板id', | |||
| `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||
| `update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||
| PRIMARY KEY (`id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; | |||
| @@ -1,3 +0,0 @@ | |||
| alter table wx_activity_join | |||
| change column nick_name nick_name varchar(20) comment '昵称', | |||
| change column answer answer json comment '答案'; | |||
| @@ -1,5 +0,0 @@ | |||
| alter table wx_rent_contract | |||
| add column rent_input_way smallint(2) DEFAULT 1 comment '租金录入方式1合铺录入2分铺录入', | |||
| add column adjust_ratio_way smallint(2) DEFAULT 1 comment '年租金调整方式1按比例2按金额'; | |||
| update wx_rent_contract set rent_input_way=2 where rent_shop_type=1; | |||
| @@ -1,4 +0,0 @@ | |||
| #租赁合同 | |||
| alter table wx_rent_contract add column operation_type smallint(2) default 1 comment '1区分租赁物业2合并租赁物业'; | |||
| #物业合同 | |||
| alter table wx_property_contract add column operation_type smallint(2) default 1 comment '1区分租赁物业2合并租赁物业'; | |||
| @@ -1,3 +0,0 @@ | |||
| alter table wx_merchant | |||
| ADD COLUMN `talk_user_main` VARCHAR(50) NULL DEFAULT NULL COMMENT '主谈人', | |||
| ADD COLUMN `talk_user_aux` VARCHAR(50) NULL DEFAULT NULL COMMENT '辅谈人'; | |||
| @@ -1,2 +0,0 @@ | |||
| alter table wx_activity ADD COLUMN `send_msg` smallint(2) DEFAULT 0 COMMENT '是否发送短信1是0否'; | |||
| alter table wx_activity_join ADD COLUMN `send_msg` smallint(2) DEFAULT 0 COMMENT '是否发送短信1是0否'; | |||
| @@ -1 +0,0 @@ | |||
| alter table mall_user_info drop column flow_permission; | |||
| @@ -1,9 +0,0 @@ | |||
| update mall_permission set name = '商铺租金合同' where name ='商铺租赁合同'; | |||
| INSERT INTO `mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) | |||
| VALUES | |||
| (305, '商铺租赁合同', 3, 'Y', NULL, 1, NULL, NULL, 'rentLeaselist', 'icon-wuyehetong', 0, 305); | |||
| update mall_permission set name = '多经点位租金合同' where name ='多经点位租赁合同'; | |||
| INSERT INTO `mall_permission` (`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) | |||
| VALUES | |||
| (306, '多经点位租赁合同', 3, 'Y', NULL, 1, NULL, NULL, 'pointLeaselist', 'icon-wuyehetong', 0, 306); | |||
| @@ -1 +0,0 @@ | |||
| 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]' where id = 1; | |||
| @@ -1,3 +0,0 @@ | |||
| alter table wx_property_contract | |||
| add column rent_input_way smallint(2) DEFAULT 1 comment '租金录入方式1合铺录入2分铺录入', | |||
| add column adjust_ratio_way smallint(2) DEFAULT 1 comment '年租金调整方式1按比例2按金额'; | |||
| @@ -1,2 +0,0 @@ | |||
| ALTER TABLE `wx_bill_other` MODIFY COLUMN `comments` varchar(255) COLLATE utf8mb4_unicode_ci; | |||
| ALTER TABLE `wx_bill_other_deposit` MODIFY COLUMN `comments` varchar(255) COLLATE utf8mb4_unicode_ci; | |||
| @@ -1,25 +0,0 @@ | |||
| CREATE TABLE `wx_flow_config` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `parent_id` bigint(20) NOT NULL COMMENT '父类id', | |||
| `tenant_id` varchar(10) NOT NULL COMMENT '租户id', | |||
| `name` varchar(255) DEFAULT NULL COMMENT '名称', | |||
| `type` tinyint(1) DEFAULT '0' COMMENT '流程类型4商铺签约5多径签约6商铺终止7多径终止8账单变更9有价卷上架', | |||
| `model_id` bigint(20) NOT NULL COMMENT '模板id', | |||
| `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||
| `update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||
| `sort` tinyint(1) DEFAULT '0' COMMENT '顺序', | |||
| PRIMARY KEY (`id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; | |||
| CREATE TABLE `wx_flow_model` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(10) NOT NULL COMMENT '租户id', | |||
| `name` varchar(255) DEFAULT NULL COMMENT '名称', | |||
| `flow` json DEFAULT NULL COMMENT '流程', | |||
| `create_user` bigint(20) NOT NULL COMMENT '创建用户', | |||
| `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |||
| `update_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', | |||
| `flow_id` varchar(255) DEFAULT NULL COMMENT '流程id', | |||
| PRIMARY KEY (`id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC; | |||
| @@ -1,110 +0,0 @@ | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '789', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '789', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '789', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '789', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '789', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '789', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '789', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '790', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '790', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '790', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '790', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '790', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '790', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '790', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1001', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1001', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1001', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1001', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1001', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1001', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '1001', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1002', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1002', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1002', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1002', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1002', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1002', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '1002', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1003', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1003', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1003', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1003', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1003', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1003', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '1003', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1004', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1004', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1004', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1004', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1004', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1004', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '1004', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1005', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1005', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1005', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1005', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1005', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1005', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '1005', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1006', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1006', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1006', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1006', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1006', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1006', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '1006', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1007', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1007', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1007', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1007', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1007', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1007', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '1007', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1008', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1008', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1008', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1008', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1008', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1008', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '1008', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1009', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1009', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 0, '1009', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1009', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1009', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256630, '1009', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| ((select unix_timestamp(now()) + CEILING(RAND()*90000+10000)), 1560256631, '1009', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1); | |||
| @@ -1,4 +0,0 @@ | |||
| UPDATE `mall_permission` set `name` = '商铺租金账单' WHERE id = 402; | |||
| UPDATE `mall_permission` set `name` = '多经点位租金账单' WHERE id = 404; | |||
| @@ -1,81 +0,0 @@ | |||
| delete from wx_flow_config where tenant_id !='456'; | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| (1561037689, 0, '1001', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561000622, 0, '1001', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1561026138, 1561000622, '1001', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1561035391, 1561000622, '1001', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1561002700, 1561000622, '1001', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1561028078, 1561000622, '1001', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1560971400, 1561037689, '1001', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561054659, 0, '1002', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561051609, 0, '1002', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1560987400, 1561051609, '1002', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1560983105, 1561051609, '1002', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1560971226, 1561051609, '1002', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1561057278, 1561051609, '1002', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1561030661, 1561054659, '1002', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561020831, 0, '1003', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1560974564, 0, '1003', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1560983628, 1560974564, '1003', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561019138, 1561020831, '1003', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1560985450, 1561020831, '1003', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1561052800, 1561020831, '1003', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1561020810, 1561020831, '1003', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1561030951, 0, '1004', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1561031751, 0, '1004', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561047137, 1561030951, '1004', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1560980346, 1561030951, '1004', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1560990605, 1561030951, '1004', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1561004716, 1561030951, '1004', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1561059134, 1561031751, '1004', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561058629, 0, '1005', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1560981619, 0, '1005', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561016658, 1560981619, '1005', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561031019, 1561058629, '1005', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1561050999, 1561058629, '1005', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1561023445, 1561058629, '1005', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1561059049, 1561058629, '1005', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1561013248, 0, '1006', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561044349, 0, '1006', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1561012583, 1561013248, '1006', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561049102, 1561044349, '1006', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1561052002, 1561044349, '1006', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1561038202, 1561044349, '1006', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1560979080, 1561044349, '1006', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1561020704, 0, '1007', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561056649, 0, '1007', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1561006459, 1561020704, '1007', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561048605, 1561056649, '1007', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1561024693, 1561056649, '1007', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1560977117, 1561056649, '1007', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1561052381, 1561056649, '1007', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1561034575, 0, '1008', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1561060600, 0, '1008', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561048087, 1561034575, '1008', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1560997446, 1561034575, '1008', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1561051779, 1561034575, '1008', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1560987028, 1561034575, '1008', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1561025368, 1561060600, '1008', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1560979235, 0, '1009', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561044274, 0, '1009', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1560982828, 1560979235, '1009', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561041930, 1561044274, '1009', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1561051961, 1561044274, '1009', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1561000314, 1561044274, '1009', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1560972165, 1561044274, '1009', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1561009249, 0, '789', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1561048493, 0, '789', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561020995, 1561009249, '789', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3), | |||
| (1561008855, 1561009249, '789', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1560973533, 1561009249, '789', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1561033189, 1561009249, '789', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1561041774, 1561048493, '789', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561054066, 0, '790', '合同审批', 0, 0, '2019-06-11 13:42:18', '2019-06-11 13:42:18', 1), | |||
| (1560974795, 0, '790', '账单审批', 0, 0, '2019-06-11 13:49:43', '2019-06-11 13:49:43', 2), | |||
| (1561056192, 1560974795, '790', '账单应收金额变更', 8, 0, '2019-06-11 14:02:44', '2019-06-11 14:02:44', 1), | |||
| (1561048116, 1561054066, '790', '多经点位合同终止', 7, 0, '2019-06-11 14:02:43', '2019-06-11 14:02:43', 4), | |||
| (1560973899, 1561054066, '790', '多径点位合同签约', 5, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 2), | |||
| (1561010589, 1561054066, '790', '商铺合同签约', 4, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 1), | |||
| (1560977371, 1561054066, '790', '商铺合同终止', 6, 0, '2019-06-11 14:02:42', '2019-06-11 14:02:42', 3); | |||
| @@ -1 +0,0 @@ | |||
| update mall_permission set icon = 'icon-zhangdan' where name ='商铺租赁合同'; | |||
| @@ -1,12 +0,0 @@ | |||
| ALTER TABLE `wx_pay_order` | |||
| ADD COLUMN `rate_amount` int(11) NULL DEFAULT NULL COMMENT '分账通道费差'; | |||
| ALTER TABLE `wx_pay_account` | |||
| ADD COLUMN `real_rate` int(6) NULL DEFAULT NULL COMMENT '支付实际费率(万分之几)' after `rate`; | |||
| update `wx_pay_account` set `real_rate` = `rate`; | |||
| ALTER TABLE `wx_pay_account_bill` | |||
| ADD COLUMN `real_rate` int(6) NULL DEFAULT NULL COMMENT '支付实际费率(万分之几)' after `rate`; | |||
| update `wx_pay_account_bill` set `real_rate` = `rate`; | |||
| @@ -1,2 +0,0 @@ | |||
| ALTER TABLE `wx_card_info` | |||
| ADD COLUMN `rate_amount` int(11) NULL DEFAULT NULL COMMENT '分账通道费差(分账完结时使用)' after `remaining_share_fee_amount`; | |||
| @@ -1 +0,0 @@ | |||
| ALTER TABLE `wx_bill_action` ADD COLUMN `pay_date` datetime DEFAULT NULL COMMENT '付款时间'; | |||
| @@ -1,2 +0,0 @@ | |||
| ALTER TABLE `wx_screen_ad` | |||
| DROP COLUMN `qrcode`; | |||
| @@ -1,4 +0,0 @@ | |||
| ALTER TABLE `wx_c_user_basic_info` | |||
| ADD COLUMN `act_record` INT(11) NULL DEFAULT '0' AFTER `active_time`; | |||
| ALTER TABLE `wx_coupon` | |||
| ADD COLUMN `condition` JSON NULL DEFAULT NULL AFTER `is_del`; | |||
| @@ -1,2 +0,0 @@ | |||
| ALTER TABLE `wx_coupon` | |||
| CHANGE COLUMN `condition` `conditions` JSON NULL DEFAULT NULL ; | |||
| @@ -1,8 +0,0 @@ | |||
| ALTER TABLE `wx_coupon` | |||
| ADD COLUMN `put_apply_status` SMALLINT(1) NULL DEFAULT 0 COMMENT '投放审核状态0未审核1审核中2审核完成3驳回4异常终止5撤回'; | |||
| ALTER TABLE `wx_coupon` | |||
| ADD COLUMN `stock_apply_status` SMALLINT(1) NULL DEFAULT 0 COMMENT '库存审核状态0未审核1审核中2审核完成3驳回4异常终止5撤回'; | |||
| ALTER TABLE `wx_coupon` | |||
| ADD COLUMN `cancle_apply_status` SMALLINT(1) NULL DEFAULT 0 COMMENT '作废审核状态0未审核1审核中2审核完成3驳回4异常终止5撤回'; | |||
| @@ -1,4 +0,0 @@ | |||
| ALTER TABLE `wx_coupon_action_log` | |||
| ADD COLUMN `create_time_md` varchar(8) NULL DEFAULT NULL AFTER `create_time`; | |||
| UPDATE `wx_coupon_action_log` set `create_time_md` = DATE_FORMAT(create_time, '%m/%d'); | |||
| @@ -1,18 +0,0 @@ | |||
| CREATE TABLE `wx_coupon_press_data` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(10) NOT NULL COMMENT '租户ID', | |||
| `cover_img` varchar(1024) NOT NULL COMMENT '封面图', | |||
| `title` varchar(50) NOT NULL COMMENT '券名称', | |||
| `sale_price` int(11) NOT NULL COMMENT '售价(适用于类型2,3,4,5)', | |||
| `price` int(11) NOT NULL COMMENT '面额', | |||
| `change_rate` varchar(10) NULL default null COMMENT '转化率', | |||
| `press_count` varchar(10) NULL default null COMMENT '砍价发起次数', | |||
| `press_succ_count` varchar(10) NULL default null COMMENT '1.主动领取2.定向投放', | |||
| `join_count` varchar(10) NULL default null COMMENT '参与人次', | |||
| `payment_rate` varchar(10) NULL DEFAULT NULL COMMENT '核销比', | |||
| PRIMARY KEY (`id`), | |||
| UNIQUE `id_UNIQUE` USING BTREE (`id`) comment '' | |||
| ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='砍价营销数据' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||
| insert into `wx_coupon_press_data`(`id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price`) | |||
| select `id`, `tenant_id`, `cover_img`, `title`, `sale_price`, `price` from wx_coupon where type = 8; | |||
| @@ -1,2 +0,0 @@ | |||
| ALTER TABLE `wx_coupon` | |||
| ADD COLUMN `approval_type` SMALLINT(1) NULL DEFAULT 0 COMMENT '最后一次操作类型'; | |||
| @@ -1,6 +0,0 @@ | |||
| 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; | |||
| @@ -1,88 +0,0 @@ | |||
| INSERT INTO `wx_flow_config` (`id`, `parent_id`, `tenant_id`, `name`, `type`, `model_id`, `create_date`, `update_date`, `sort`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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`) | |||
| VALUES | |||
| (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', '卡审批', 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); | |||
| @@ -1,10 +0,0 @@ | |||
| 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; | |||
| @@ -1,6 +0,0 @@ | |||
| ALTER TABLE `wx_order_press` | |||
| ADD COLUMN `coupon_id` bigint(20) null default null AFTER `tenant_id`; | |||
| UPDATE `wx_order_press` op, `wx_order` o | |||
| SET op.coupon_id = o.product_id | |||
| WHERE op.order_id = o.id and op.coupon_id is null; | |||
| @@ -1 +0,0 @@ | |||
| DROP TABLE `wx_coupon_press_data`; | |||
| @@ -1,2 +0,0 @@ | |||
| ALTER TABLE `wx_merchant` | |||
| ADD COLUMN `link_line_phone` varchar(100) NULL DEFAULT NULL COMMENT '客服电话'; | |||
| @@ -1,4 +0,0 @@ | |||
| ALTER TABLE `push_limit` | |||
| ADD COLUMN `enable` TINYINT(2) NULL DEFAULT 0 COMMENT '是否启用,0:Enable,1:Disable'; | |||
| Update `push_limit` set `enable` = 0; | |||
| @@ -1,17 +0,0 @@ | |||
| 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`); | |||