| @@ -25,6 +25,9 @@ public class UserApplication { | |||
| @Value("${fm.exception}") | |||
| private boolean fmException; | |||
| @Value("${fm.exception_emails}") | |||
| private String fmExceptionEmails; | |||
| @Value("${fm.open}") | |||
| private boolean fmOpen; | |||
| @@ -33,6 +36,11 @@ public class UserApplication { | |||
| return fmException; | |||
| } | |||
| @Bean | |||
| public String fmExceptionEmails() { | |||
| return fmExceptionEmails; | |||
| } | |||
| @Bean | |||
| public boolean isFmOpen() { | |||
| return fmOpen; | |||
| @@ -219,7 +219,7 @@ public class WxAppinfoController extends BaseController { | |||
| private void downFile(String filePath, String filename, HttpServletResponse response, HttpServletRequest req) throws IOException { | |||
| try { | |||
| response.reset(); | |||
| response.setContentType("bin"); | |||
| response.setContentType("image/png"); | |||
| String agent = req.getHeader("user-agent"); | |||
| if (agent.contains("Firefox")) { | |||
| response.setHeader("Content-disposition", | |||
| @@ -12,6 +12,10 @@ import java.util.Map; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.domain.po.WxCouponOrder; | |||
| import com.iformall.mapper.WxCUserBasicInfoMapper; | |||
| import com.iformall.service.WxCUserBasicInfoService; | |||
| import com.iformall.utils.DataUtil; | |||
| import com.iformall.utils.DateUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -43,6 +47,8 @@ public class WxCUserDataController extends BaseController { | |||
| private WxUserVisitService wxUserVisitService; | |||
| @Autowired | |||
| private WxCouponOrderService wxCouponOrderService; | |||
| @Autowired | |||
| private WxCUserBasicInfoService wxCUserBasicInfoService; | |||
| @GetMapping("findUserCountData") | |||
| @ApiOperation("查询用户数量接口") | |||
| @@ -117,6 +123,31 @@ public class WxCUserDataController extends BaseController { | |||
| map.put("monthVos", monthVos);//月用户增加数列表 | |||
| map.put("dayPercentage", dayPercentage);//日环比 | |||
| map.put("weekPercentage", weekPercentage); //周同比 | |||
| long weekVosCount = 0l; | |||
| for (UserStructureVo us:weekVos) { | |||
| weekVosCount += us.getCount(); | |||
| } | |||
| map.put("weekVosCount", weekVosCount); //周新增会员 | |||
| //自然增长(全部排出导入的) | |||
| //String startdate = DateUtils.getTimeBefore(30, new Date()); | |||
| //String systemTime = DateUtils.getSystemTime("yyyy-MM-dd"); | |||
| //Date startDate = DateUtils.getDateFromString(startdate + " 00:00:00","yyyy-MM-dd HH:mm:ss").getTime(); | |||
| //Date endDate = DateUtils.getDateFromString(systemTime + " 23:59:59","yyyy-MM-dd HH:mm:ss").getTime(); | |||
| dto.setStartTime(null); | |||
| dto.setEndTime(null); | |||
| long growCount = wxCUserService.findCount(dto); | |||
| map.put("growCount", growCount); | |||
| //全部导入的 | |||
| WxCUserBasicInfoDto wxCUserBasicInfoDto = new WxCUserBasicInfoDto(); | |||
| wxCUserBasicInfoDto.setTenantId(getTenantId()); | |||
| wxCUserBasicInfoDto.setStartTime(null); | |||
| wxCUserBasicInfoDto.setEndTime(null); | |||
| long importCount = wxCUserBasicInfoService.findCountByFilter(wxCUserBasicInfoDto); | |||
| map.put("importCount", importCount); | |||
| map.put("allHistoryUserCount", growCount+importCount); | |||
| return new ResultData(map); | |||
| } | |||
| @@ -145,6 +176,12 @@ public class WxCUserDataController extends BaseController { | |||
| List<UserStructureVo> weekVos = new ArrayList<>();//每周uv | |||
| List<UserStructureVo> monthVos = new ArrayList<>();//每月uv | |||
| //今日活跃数 | |||
| String today = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | |||
| params.put("startTime",today+" 00:00:00"); | |||
| params.put("endTime",today+" 23:59:59"); | |||
| long todayVisitCount = wxUserVisitService.queryVisitUv(params); | |||
| long yesterdayCount = 0;//昨天活跃数 | |||
| long beforeYesterdayCount = 0;//前天活跃数 | |||
| long thisMonthCount = 0;//月总数 | |||
| @@ -207,6 +244,13 @@ public class WxCUserDataController extends BaseController { | |||
| mapVo.put("monthVos", monthVos);//月活跃数列表 | |||
| mapVo.put("dayPercentage", dayPercentage);//日环比 | |||
| mapVo.put("weekPercentage", weekPercentage); //周同比 | |||
| mapVo.put("todayVisitCount", todayVisitCount); //今日活跃数 | |||
| long weekVosCount = 0l; | |||
| for (UserStructureVo us:weekVos) { | |||
| weekVosCount += us.getCount(); | |||
| } | |||
| mapVo.put("weekVosCount", weekVosCount);//周活跃数总数 | |||
| return new ResultData(mapVo); | |||
| } | |||
| @@ -27,7 +27,25 @@ public class WxChartDataController extends BaseController { | |||
| @Autowired | |||
| private WxChartDataService wxChartDataService; | |||
| @ApiOperation("queryData") | |||
| @ApiOperation("chart=49商铺出租数据:" + | |||
| "total商铺总数 totalShop店铺个数 totalPoint多径点位个数, rentTotal已出租总数 rentTotalShop已出租店铺 rentTotalPoint已出租点位" + | |||
| ",notRentTotal未出租总数 notRentTotalShop未出租店铺 notRentTotalPoint未出租点位" + | |||
| ","+ | |||
| "--------------------------------------"+ | |||
| "chart=50费用收缴数据:" + | |||
| "ysje 应收金额 ssje 实收金额 zjsjl收缴率 rent*租赁收缴率 property*物业收缴率 deposit*押金收缴率 other*其他费用收缴率" + | |||
| "rentOwe 租赁总额 propertyOwe物业总额 otherOwe其他总额 depositOwe押金总额 totalOwe欠缴总额"+ | |||
| "--------------------------------------"+ | |||
| "chart=52营销数据:" + | |||
| "当前”券交易数据“替换为”营销数据“:cardHistory卡营销历史 pressSendHistory砍价营销历史 groupHistory拼团营销历史 couponHistory卷营销历史," + | |||
| "卡、卷、砍价、拼团走势以及右边的数据总览,对应原来 营销系统->卡、卷、砍价、拼团营销数据" + | |||
| "--------------------------------------"+ | |||
| "chart=51首页场景发卷:" + | |||
| "carStopHistory停车发卷 couponVerifyHistory核销发卷 orderHistory交易发卷 micropayHistory收银台发卷"+ | |||
| "--------------------------------------" + | |||
| "触达用户=数据总览的活跃用户数据" | |||
| ) | |||
| @GetMapping("/queryData") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "chart", value = "chart", dataType = "String", paramType = "query", required = true), | |||
| @@ -5,6 +5,7 @@ import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCreditHistory; | |||
| import com.iformall.domain.vo.WxCreditHistoryVo; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.WxCreditHistoryService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| @@ -51,8 +52,13 @@ public class WxCreditHistoryController extends BaseController | |||
| logger.debug("[" + getIpAddr() + "] WxCreditHistoryController::add"); | |||
| wxCreditHistory.setTenantId(getTenantId()); | |||
| wxCreditHistory.setOperatorId(getUser().getId()); | |||
| WxCreditHistory credit = wxCreditHistoryService.saveOrUpdate(wxCreditHistory); | |||
| return new ResultData(Result.SUCCESS,"操作成功",credit); | |||
| try { | |||
| WxCreditHistory credit = wxCreditHistoryService.saveOrUpdate(wxCreditHistory); | |||
| return new ResultData(Result.SUCCESS, "操作成功", credit); | |||
| } catch (MallinkException e) { | |||
| logger.error(e.getMessage()); | |||
| return new ResultData(e.getErrorCode(), e.getMessage()); | |||
| } | |||
| } | |||
| @ApiOperation("根据id查询接口") | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.annotation.SystemControllerLog; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxFlowRecord; | |||
| @@ -9,6 +10,7 @@ import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -95,7 +97,14 @@ public class WxFlowAbleController extends BaseController { | |||
| logger.debug("[" + getIpAddr() + "] FlowAbleController::myHandelList"); | |||
| record.setUserId(super.getUser().getId()); | |||
| record.setStatus(EnumFlowRecordStatus.NEW.getCode()); | |||
| return new ResultData(wxFlowService.myHandelList(record,pageNum,pageSize)); | |||
| PageInfo<WxFlowRecord> pageInfo = wxFlowService.myHandelList(record,pageNum,pageSize); | |||
| List<WxFlowRecord> recordList = pageInfo.getList(); | |||
| for (WxFlowRecord wxFlowRecord:recordList) { | |||
| if(StringUtils.isBlank(wxFlowRecord.getVariables())){ | |||
| wxFlowRecord.setVariables("{}"); | |||
| } | |||
| } | |||
| return new ResultData(pageInfo); | |||
| } | |||
| @@ -42,8 +42,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(R0bER9E9OB9/YQcpNXMyYDwofNVb8/pFl4nrApS8mi0=) | |||
| password: ENC(50YqJd0iK/2r2YnmEd5RKaki3ktU73UDapBJrVYfqmc=) # 授权密码 | |||
| username: ENC(lknBjZsA24AaQEXuy0fFw3acd4v4Xsf3CsgDcRZgjlYnNAL9R07d/w==) | |||
| password: ENC(gIkVPuYMmJ/EDxry8QIfGumIAk4plAwolGrfg1fiM3U=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -111,6 +111,7 @@ jasypt: | |||
| fm: | |||
| exception: false | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 1 | |||
| open: true | |||
| @@ -40,17 +40,17 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(I2YKxnRVPY7J1r/bwzwHOhQCjj3nVqCWEbVTJvBq7y0=) | |||
| password: ENC(APQMO9XQRzMKd0eap+oSSOYH9MQe/r5K0YFF9A9mizU=) # 授权密码 | |||
| username: ENC(IiL/PHP9wCkpibWHRH/Mts8K9fh4izYqaiaF66bDrqtEHP+KUcJRRg==) | |||
| password: ENC(m7L57m8mk6tApVoa4XIDQnXF0VxnYjKe4LVdzcgb+xY=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| auth: true | |||
| starttls: | |||
| enable: true | |||
| socketFactory: | |||
| port: 465 | |||
| class: javax.net.ssl.SSLSocketFactory | |||
| smtp: | |||
| auth: true | |||
| starttls: | |||
| enable: true | |||
| socketFactory: | |||
| port: 465 | |||
| class: javax.net.ssl.SSLSocketFactory | |||
| # RABBITMQ | |||
| rabbitmq: | |||
| host: localhost | |||
| @@ -95,6 +95,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 3 | |||
| open: true | |||
| @@ -40,8 +40,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(HFbRXtAFVxU36Hk0yT3reyvRuLrw3RhMlbxFj9Ev/VY=) | |||
| password: ENC(pk4+/3C5n2hMYmgi+VTqI4P1m77DllW8y4KElMXXmIo=) # 授权密码 | |||
| username: ENC(TtJQE2C4cWo8CpVGMMl5hiy5eykepd96J5XjsW3Kj5fgP+6+5ctDNQ==) | |||
| password: ENC(Zh6A6kRtA2ABtH6nzdvsqQSO1/8p3mparJr8neI2BLU=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -95,6 +95,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 2 | |||
| open: true | |||
| @@ -0,0 +1,4 @@ | |||
| ALTER TABLE wx_score_rules | |||
| ADD COLUMN type smallint(2) not null default '1' COMMENT '1成长值 2积分' AFTER `update_date`, | |||
| ADD COLUMN clear_year int(11) COMMENT '清除前多少年积分' AFTER `type`; | |||
| @@ -0,0 +1,6 @@ | |||
| INSERT INTO `wx_business` (`id`, `title`, `type`, `create_date`, `update_date`) | |||
| VALUES | |||
| (7, '美妆', 1, '2018-08-10 22:15:17', '2019-04-09 19:32:30'), | |||
| (8, '珠宝', 1, '2018-08-10 22:15:17', '2019-04-09 19:32:30'), | |||
| (9, '服务', 1, '2018-08-10 22:15:17', '2019-04-09 19:32:30'), | |||
| (10, '家居', 1, '2018-08-10 22:15:17', '2019-04-09 19:32:30'); | |||
| @@ -0,0 +1,4 @@ | |||
| alter table wx_c_user_basic_info alter column credit set default 0; | |||
| alter table wx_c_user alter column credit set default 0; | |||
| update wx_c_user_basic_info set credit = 0 where credit is null; | |||
| update wx_c_user set credit = 0 where credit is null; | |||
| @@ -0,0 +1,2 @@ | |||
| alter table wx_bill_rent add column comments varchar (255) default ''; | |||
| alter table wx_bill_property add column comments varchar(255) default ''; | |||
| @@ -0,0 +1,4 @@ | |||
| ALTER TABLE `wx_msg_model` | |||
| ADD COLUMN `email_bg_img` varchar(300) DEFAULT NULL COMMENT '邮箱背景图片'; | |||
| @@ -21,13 +21,21 @@ public class BApplication { | |||
| @Value("${fm.exception}") | |||
| private boolean fmException; | |||
| @Value("${fm.exception_emails}") | |||
| private String fmExceptionEmails; | |||
| @Value("${fm.open}") | |||
| private boolean fmOpen; | |||
| @Bean | |||
| public boolean isFmException() { | |||
| return fmException; | |||
| } | |||
| @Bean | |||
| public boolean isFmException() { | |||
| return fmException; | |||
| } | |||
| @Bean | |||
| public String fmExceptionEmails() { | |||
| return fmExceptionEmails; | |||
| } | |||
| @Bean | |||
| public boolean isFmOpen() { | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||
| @@ -8,7 +9,10 @@ import com.iformall.domain.po.WxCreditHistory; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.WxMerchantBUser; | |||
| import com.iformall.domain.vo.WxCreditHistoryVo; | |||
| import com.iformall.domain.vo.WxMerchantVo; | |||
| import com.iformall.enums.EnumUserType; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.WxCUserBasicInfoService; | |||
| import com.iformall.service.WxCreditHistoryService; | |||
| import com.iformall.service.WxMerchantService; | |||
| @@ -44,6 +48,14 @@ public class WxCreditHistoryController extends BaseController { | |||
| @ApiImplicitParam(name="spend",value="消费金额",dataType="int", paramType = "query",required=true)}) | |||
| public ResultData findByMerchantIdAndSpend(@RequestParam Long merchantId, @RequestParam String spendStr) { | |||
| log.debug("[" + getIpAddr() + "] WxCreditHistoryController::findByMerchantIdAndSpend"); | |||
| WxMerchant wxMerchant = new WxMerchant(); | |||
| wxMerchant.setStatus(EnumYesOrNo.YES.getCode()); | |||
| wxMerchant.setId(getUser().getMerchantId()); | |||
| wxMerchant = wxMerchantService.findOne(wxMerchant); | |||
| //普通商户只允许查询自己的消费金额所增加的积分 | |||
| if (wxMerchant.getIsAdmin() != EnumYesOrNo.YES.getCode() && merchantId.longValue() != getUser().getMerchantId().longValue()) { | |||
| return new ResultData(ErrorCode.USER_NO_PERMISSION); | |||
| } | |||
| return new ResultData(wxCreditHistoryService.findByMerchantIdAndSpend(merchantId,spendStr,getTenantId())); | |||
| } | |||
| @@ -69,8 +81,13 @@ public class WxCreditHistoryController extends BaseController { | |||
| wxCreditHistory.setMerchantId(getUser().getMerchantId()); | |||
| //B端操作用户 | |||
| wxCreditHistory.setOperatorType(EnumUserType.BUSER.getCode()); | |||
| WxCreditHistory credit = wxCreditHistoryService.saveOrUpdate(wxCreditHistory); | |||
| return new ResultData(Result.SUCCESS,"操作成功",credit); | |||
| try { | |||
| WxCreditHistory credit = wxCreditHistoryService.saveOrUpdate(wxCreditHistory); | |||
| return new ResultData(Result.SUCCESS, "操作成功", credit); | |||
| } catch (MallinkException e) { | |||
| log.error(e.getMessage()); | |||
| return new ResultData(e.getErrorCode(), e.getMessage()); | |||
| } | |||
| } | |||
| @ApiOperation("分页列表接口") | |||
| @@ -83,7 +100,7 @@ public class WxCreditHistoryController extends BaseController { | |||
| if (null == wxCreditHistory) wxCreditHistory = new WxCreditHistory(); | |||
| WxMerchantBUser bUser = getUser(); | |||
| WxMerchant merchant = wxMerchantService.getById(wxCreditHistory.getMerchantId()); | |||
| if (merchant != null && merchant.getIsAdmin() == 1) { | |||
| if (merchant != null && merchant.getIsAdmin() != null && merchant.getIsAdmin() == 1) { | |||
| wxCreditHistory.setOperatorId(bUser.getId()); | |||
| wxCreditHistory.setOperatorType(EnumUserType.BUSER.getCode()); | |||
| wxCreditHistory.setMerchantId(null); | |||
| @@ -41,8 +41,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(R0bER9E9OB9/YQcpNXMyYDwofNVb8/pFl4nrApS8mi0=) | |||
| password: ENC(50YqJd0iK/2r2YnmEd5RKaki3ktU73UDapBJrVYfqmc=) # 授权密码 | |||
| username: ENC(lknBjZsA24AaQEXuy0fFw3acd4v4Xsf3CsgDcRZgjlYnNAL9R07d/w==) | |||
| password: ENC(gIkVPuYMmJ/EDxry8QIfGumIAk4plAwolGrfg1fiM3U=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -85,6 +85,7 @@ wechat: | |||
| fm: | |||
| exception: false | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 1 | |||
| open: true | |||
| @@ -39,8 +39,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(I2YKxnRVPY7J1r/bwzwHOhQCjj3nVqCWEbVTJvBq7y0=) | |||
| password: ENC(APQMO9XQRzMKd0eap+oSSOYH9MQe/r5K0YFF9A9mizU=) # 授权密码 | |||
| username: ENC(IiL/PHP9wCkpibWHRH/Mts8K9fh4izYqaiaF66bDrqtEHP+KUcJRRg==) | |||
| password: ENC(m7L57m8mk6tApVoa4XIDQnXF0VxnYjKe4LVdzcgb+xY=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -88,6 +88,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 3 | |||
| open: true | |||
| @@ -39,8 +39,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(HFbRXtAFVxU36Hk0yT3reyvRuLrw3RhMlbxFj9Ev/VY=) | |||
| password: ENC(pk4+/3C5n2hMYmgi+VTqI4P1m77DllW8y4KElMXXmIo=) # 授权密码 | |||
| username: ENC(TtJQE2C4cWo8CpVGMMl5hiy5eykepd96J5XjsW3Kj5fgP+6+5ctDNQ==) | |||
| password: ENC(Zh6A6kRtA2ABtH6nzdvsqQSO1/8p3mparJr8neI2BLU=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -88,6 +88,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 2 | |||
| open: true | |||
| @@ -21,13 +21,21 @@ public class CApplication { | |||
| @Value("${fm.exception}") | |||
| private boolean fmException; | |||
| @Value("${fm.exception_emails}") | |||
| private String fmExceptionEmails; | |||
| @Value("${fm.open}") | |||
| private boolean fmOpen; | |||
| @Bean | |||
| public boolean isFmException() { | |||
| return fmException; | |||
| } | |||
| @Bean | |||
| public boolean isFmException() { | |||
| return fmException; | |||
| } | |||
| @Bean | |||
| public String fmExceptionEmails() { | |||
| return fmExceptionEmails; | |||
| } | |||
| @Bean | |||
| public boolean isFmOpen() { | |||
| @@ -5,6 +5,7 @@ import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCreditHistory; | |||
| import com.iformall.domain.vo.WxCreditHistoryVo; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.WxCreditHistoryService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| @@ -29,8 +30,13 @@ public class WxCreditHistoryController extends BaseController{ | |||
| log.debug("[" + getIpAddr() + "] WxCreditHistoryController::add"); | |||
| wxCreditHistory.setTenantId(getTenantId()); | |||
| wxCreditHistory.setOperatorId(getUser().getId()); | |||
| WxCreditHistory credit = wxCreditHistoryService.saveOrUpdate(wxCreditHistory); | |||
| return new ResultData(Result.SUCCESS,"操作成功",credit); | |||
| try { | |||
| WxCreditHistory credit = wxCreditHistoryService.saveOrUpdate(wxCreditHistory); | |||
| return new ResultData(Result.SUCCESS, "操作成功", credit); | |||
| } catch (MallinkException e) { | |||
| log.error(e.getMessage()); | |||
| return new ResultData(e.getErrorCode(), e.getMessage()); | |||
| } | |||
| } | |||
| @ApiOperation("用户积分列表") | |||
| @@ -41,8 +41,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(R0bER9E9OB9/YQcpNXMyYDwofNVb8/pFl4nrApS8mi0=) | |||
| password: ENC(50YqJd0iK/2r2YnmEd5RKaki3ktU73UDapBJrVYfqmc=) # 授权密码 | |||
| username: ENC(lknBjZsA24AaQEXuy0fFw3acd4v4Xsf3CsgDcRZgjlYnNAL9R07d/w==) | |||
| password: ENC(gIkVPuYMmJ/EDxry8QIfGumIAk4plAwolGrfg1fiM3U=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -84,7 +84,8 @@ jasypt: | |||
| password: oRqdnDbK5pj3eMmB | |||
| fm: | |||
| exception: false | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 1 | |||
| open: true | |||
| @@ -39,8 +39,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(I2YKxnRVPY7J1r/bwzwHOhQCjj3nVqCWEbVTJvBq7y0=) | |||
| password: ENC(APQMO9XQRzMKd0eap+oSSOYH9MQe/r5K0YFF9A9mizU=) # 授权密码 | |||
| username: ENC(IiL/PHP9wCkpibWHRH/Mts8K9fh4izYqaiaF66bDrqtEHP+KUcJRRg==) | |||
| password: ENC(m7L57m8mk6tApVoa4XIDQnXF0VxnYjKe4LVdzcgb+xY=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -88,6 +88,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 3 | |||
| open: true | |||
| @@ -39,8 +39,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(HFbRXtAFVxU36Hk0yT3reyvRuLrw3RhMlbxFj9Ev/VY=) | |||
| password: ENC(pk4+/3C5n2hMYmgi+VTqI4P1m77DllW8y4KElMXXmIo=) # 授权密码 | |||
| username: ENC(TtJQE2C4cWo8CpVGMMl5hiy5eykepd96J5XjsW3Kj5fgP+6+5ctDNQ==) | |||
| password: ENC(Zh6A6kRtA2ABtH6nzdvsqQSO1/8p3mparJr8neI2BLU=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -88,6 +88,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 2 | |||
| open: true | |||
| @@ -23,6 +23,9 @@ public class ConsumerApplication { | |||
| @Value("${fm.exception}") | |||
| private boolean fmException; | |||
| @Value("${fm.exception_emails}") | |||
| private String fmExceptionEmails; | |||
| @Value("${fm.open}") | |||
| private boolean fmOpen; | |||
| @@ -31,6 +34,11 @@ public class ConsumerApplication { | |||
| return fmException; | |||
| } | |||
| @Bean | |||
| public String fmExceptionEmails() { | |||
| return fmExceptionEmails; | |||
| } | |||
| @Bean | |||
| public boolean isFmOpen() { | |||
| return fmOpen; | |||
| @@ -43,8 +43,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(R0bER9E9OB9/YQcpNXMyYDwofNVb8/pFl4nrApS8mi0=) | |||
| password: ENC(50YqJd0iK/2r2YnmEd5RKaki3ktU73UDapBJrVYfqmc=) # 授权密码 | |||
| username: ENC(lknBjZsA24AaQEXuy0fFw3acd4v4Xsf3CsgDcRZgjlYnNAL9R07d/w==) | |||
| password: ENC(gIkVPuYMmJ/EDxry8QIfGumIAk4plAwolGrfg1fiM3U=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -104,6 +104,7 @@ jasypt: | |||
| fm: | |||
| exception: false | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 1 | |||
| open: true | |||
| @@ -27,21 +27,11 @@ spring: | |||
| host: 127.0.0.1 | |||
| port: 6379 | |||
| password: ENC(8gYU47Fu93NUJPhwPCiPbAT+6VFA1YDx1egK4Z0Nl6w=) | |||
| timeout: 3600 | |||
| expire: 1800 #30分钟 | |||
| database: 1 | |||
| defaultExpiration: 2592000 # 默认生命周期30天 | |||
| jedis: | |||
| pool: | |||
| max-active: 8 | |||
| max-idle: 8 | |||
| max-wait: -1 | |||
| min-idle: 0 | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(I2YKxnRVPY7J1r/bwzwHOhQCjj3nVqCWEbVTJvBq7y0=) | |||
| password: ENC(APQMO9XQRzMKd0eap+oSSOYH9MQe/r5K0YFF9A9mizU=) # 授权密码 | |||
| username: ENC(IiL/PHP9wCkpibWHRH/Mts8K9fh4izYqaiaF66bDrqtEHP+KUcJRRg==) | |||
| password: ENC(m7L57m8mk6tApVoa4XIDQnXF0VxnYjKe4LVdzcgb+xY=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -89,6 +79,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 3 | |||
| open: true | |||
| @@ -40,8 +40,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(HFbRXtAFVxU36Hk0yT3reyvRuLrw3RhMlbxFj9Ev/VY=) | |||
| password: ENC(pk4+/3C5n2hMYmgi+VTqI4P1m77DllW8y4KElMXXmIo=) # 授权密码 | |||
| username: ENC(TtJQE2C4cWo8CpVGMMl5hiy5eykepd96J5XjsW3Kj5fgP+6+5ctDNQ==) | |||
| password: ENC(Zh6A6kRtA2ABtH6nzdvsqQSO1/8p3mparJr8neI2BLU=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -89,6 +89,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 2 | |||
| open: true | |||
| @@ -23,6 +23,9 @@ public class ScheduleApplication { | |||
| @Value("${fm.exception}") | |||
| private boolean fmException; | |||
| @Value("${fm.exception_emails}") | |||
| private String fmExceptionEmails; | |||
| @Value("${fm.open}") | |||
| private boolean fmOpen; | |||
| @@ -31,6 +34,11 @@ public class ScheduleApplication { | |||
| return fmException; | |||
| } | |||
| @Bean | |||
| public String fmExceptionEmails() { | |||
| return fmExceptionEmails; | |||
| } | |||
| @Bean | |||
| public boolean isFmOpen() { | |||
| return fmOpen; | |||
| @@ -43,8 +43,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(R0bER9E9OB9/YQcpNXMyYDwofNVb8/pFl4nrApS8mi0=) | |||
| password: ENC(50YqJd0iK/2r2YnmEd5RKaki3ktU73UDapBJrVYfqmc=) # 授权密码 | |||
| username: ENC(lknBjZsA24AaQEXuy0fFw3acd4v4Xsf3CsgDcRZgjlYnNAL9R07d/w==) | |||
| password: ENC(gIkVPuYMmJ/EDxry8QIfGumIAk4plAwolGrfg1fiM3U=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -87,6 +87,7 @@ jasypt: | |||
| fm: | |||
| exception: false | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 1 | |||
| open: true | |||
| @@ -40,8 +40,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(I2YKxnRVPY7J1r/bwzwHOhQCjj3nVqCWEbVTJvBq7y0=) | |||
| password: ENC(APQMO9XQRzMKd0eap+oSSOYH9MQe/r5K0YFF9A9mizU=) # 授权密码 | |||
| username: ENC(IiL/PHP9wCkpibWHRH/Mts8K9fh4izYqaiaF66bDrqtEHP+KUcJRRg==) | |||
| password: ENC(m7L57m8mk6tApVoa4XIDQnXF0VxnYjKe4LVdzcgb+xY=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -89,6 +89,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 3 | |||
| open: true | |||
| @@ -40,8 +40,8 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(HFbRXtAFVxU36Hk0yT3reyvRuLrw3RhMlbxFj9Ev/VY=) | |||
| password: ENC(pk4+/3C5n2hMYmgi+VTqI4P1m77DllW8y4KElMXXmIo=) # 授权密码 | |||
| username: ENC(TtJQE2C4cWo8CpVGMMl5hiy5eykepd96J5XjsW3Kj5fgP+6+5ctDNQ==) | |||
| password: ENC(Zh6A6kRtA2ABtH6nzdvsqQSO1/8p3mparJr8neI2BLU=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| @@ -89,6 +89,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 2 | |||
| open: true | |||
| @@ -25,6 +25,9 @@ public class GlobalDefultExceptionHandler { | |||
| @Autowired | |||
| private boolean isFmException; | |||
| @Autowired | |||
| private String fmExceptionEmails; | |||
| @Autowired | |||
| private MailService mailService; | |||
| @@ -51,7 +54,7 @@ public class GlobalDefultExceptionHandler { | |||
| sb.append("\n"); | |||
| sb.append(sw.toString()); | |||
| String[] receivers = new String[] {"hupeng@iformall.com", "wuguoqiang@iformall.com", "gongbiao@iformall.com", "luozukai@iformall.com"}; | |||
| String[] receivers = fmExceptionEmails.split(","); | |||
| //发送邮件 | |||
| mailService.sendSimpleMail(receivers, "请求地址:" + request.getRequestURL() + "异常", sb.toString()); | |||
| @@ -64,9 +64,21 @@ public class WxCUserBasicInfoDto implements Serializable{ | |||
| @Transient | |||
| protected String sortColumns; | |||
| //1 查询导入的数据 | |||
| @Transient | |||
| protected Integer queryImport; | |||
| @Transient | |||
| protected List<WxCUserBasicInfoFilterDto> filterList; | |||
| public Integer getQueryImport() { | |||
| return queryImport; | |||
| } | |||
| public void setQueryImport(Integer queryImport) { | |||
| this.queryImport = queryImport; | |||
| } | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| @@ -128,6 +128,17 @@ public class WxBillProperty implements Serializable { | |||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金状态", name = "latePayStatus") | |||
| private Integer latePayStatus; | |||
| @io.swagger.annotations.ApiModelProperty(value = "备注", name = "comments") | |||
| private String comments; | |||
| public String getComments() { | |||
| return comments; | |||
| } | |||
| public void setComments(String comments) { | |||
| this.comments = comments; | |||
| } | |||
| public Integer getLatePayStatus() { | |||
| return latePayStatus; | |||
| } | |||
| @@ -131,6 +131,17 @@ public class WxBillRent implements Serializable { | |||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金状态", name = "latePayStatus") | |||
| private Integer latePayStatus; | |||
| @io.swagger.annotations.ApiModelProperty(value = "备注", name = "comments") | |||
| private String comments; | |||
| public String getComments() { | |||
| return comments; | |||
| } | |||
| public void setComments(String comments) { | |||
| this.comments = comments; | |||
| } | |||
| public Integer getLatePayStatus() { | |||
| return latePayStatus; | |||
| } | |||
| @@ -235,7 +235,7 @@ public class WxCampaign implements Serializable { | |||
| public String getWeappScene() { | |||
| if(type == null) | |||
| return ""; | |||
| return "t:bt:" + type + ":" +id; | |||
| return "t:bd:" + type + ":" +id; | |||
| } | |||
| public static enum Field | |||
| @@ -61,7 +61,15 @@ public class WxMsgModel implements Serializable { | |||
| @io.swagger.annotations.ApiModelProperty(value="modelid",name="modelId") | |||
| private Integer modelId; | |||
| private String emailBgImg; | |||
| public String getEmailBgImg() { | |||
| return emailBgImg; | |||
| } | |||
| public void setEmailBgImg(String emailBgImg) { | |||
| this.emailBgImg = emailBgImg; | |||
| } | |||
| public String getTenantId() { | |||
| return tenantId; | |||
| @@ -133,6 +133,7 @@ public class WxShop implements Serializable { | |||
| @Transient | |||
| private Date enddate; | |||
| //闲置时间 | |||
| @io.swagger.annotations.ApiModelProperty(value = "闲置时间", name = "freeDay") | |||
| @Transient | |||
| private Integer freeDay; | |||
| @@ -52,4 +52,7 @@ public class WxCreditHistoryVo { | |||
| @io.swagger.annotations.ApiModelProperty(value="操作人",name="operator") | |||
| private String operator; | |||
| @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | |||
| private Long merchantId; | |||
| } | |||
| @@ -0,0 +1,32 @@ | |||
| package com.iformall.enums; | |||
| public enum EnumMerchantType { | |||
| MERCHANT_MORE(-1, "多商户") | |||
| ; | |||
| public static EnumMerchantType getEnum(Integer code) { | |||
| for (EnumMerchantType value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumMerchantType(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -0,0 +1,33 @@ | |||
| package com.iformall.enums; | |||
| public enum EnumYesOrNo { | |||
| YES(1, "是"), | |||
| NO(0, "否"), | |||
| ; | |||
| public static EnumYesOrNo getEnum(Integer code) { | |||
| for (EnumYesOrNo value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumYesOrNo(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -33,4 +33,6 @@ public interface WxCUserBasicInfoMapper extends CommonMapper<WxCUserBasicInfo, S | |||
| List<WxCUserBasicInfoVo> findVoList(WxCUserBasicInfo wxCUserBasicInfo); | |||
| Integer countVoList(WxCUserBasicInfo wxCUserBasicInfo); | |||
| } | |||
| @@ -7,10 +7,13 @@ import com.iformall.domain.po.WxMsgConfig; | |||
| public interface WxMsgConfigMapper extends CommonMapper<WxMsgConfig, String> { | |||
| List<WxMsgConfig> findList(WxMsgConfig wxMsgConfig); | |||
| /** | |||
| * 减剩余条数 | |||
| * @param wxMsgConfig | |||
| */ | |||
| void updateRemains(WxMsgConfig wxMsgConfig); | |||
| } | |||
| @@ -16,4 +16,5 @@ public interface WxUserVisitMapper extends CommonMapper<WxUserVisit, Long> { | |||
| List<TouchUsersReportVo> touchUsersReportData(HashMap<String,Object> params); | |||
| Long queryVisitUv(HashMap<String,Object> params); | |||
| } | |||
| @@ -1,6 +1,5 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.common.ResultData; | |||
| import java.util.Map; | |||
| @@ -129,4 +129,6 @@ public interface WxCUserBasicInfoService { | |||
| * @param response | |||
| */ | |||
| void exportCarPayData(WxCarPayRecord record, HttpServletRequest request, HttpServletResponse response); | |||
| long findCountByFilter(WxCUserBasicInfoDto dto); | |||
| } | |||
| @@ -82,4 +82,6 @@ public interface WxMerchantService { | |||
| WxMerchantVo findMerchantById(Long id); | |||
| WxMerchant findOne(WxMerchant wxMerchant); | |||
| } | |||
| @@ -50,8 +50,8 @@ public interface WxUserVisitService { | |||
| List<TouchUsersReportVo> touchUsersReportList(HashMap<String,Object> params); | |||
| Long queryVisitUv(HashMap<String,Object> params); | |||
| } | |||
| @@ -384,7 +384,6 @@ public class DataTowerServiceImpl implements DataTowerService { | |||
| dataMap.put("contract", contractRunning(tenantId)); | |||
| dataMap.put("message", messageRunning(tenantId)); | |||
| dataMap.put("bill", billRunning(tenantId)); | |||
| return dataMap; | |||
| } | |||
| @@ -143,6 +143,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| if(wxBillDaily==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillDaily.getPay(); | |||
| wxBillDaily.setPayDate(record.getPayDate()); | |||
| wxBillDaily.setPay(record.getPay()); | |||
| wxBillDaily.setReceivePay(record.getReceivePay()); | |||
| @@ -160,7 +161,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillDaily.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay()).divide(new BigDecimal(100)).toPlainString(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| wxBillAction.setUserId(user.getId()); | |||
| @@ -128,6 +128,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||
| if(wxBillDeposit==null){ | |||
| return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillDeposit.getPay(); | |||
| wxBillDeposit.setPayDate(record.getPayDate()); | |||
| wxBillDeposit.setPay(record.getPay()); | |||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | |||
| @@ -145,7 +146,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillDeposit.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay()).divide(new BigDecimal(100)).toPlainString(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| wxBillAction.setUserId(user.getId()); | |||
| @@ -144,6 +144,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| if (wxBillOtherDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillOtherDeposit.getPay(); | |||
| wxBillOtherDeposit.setPayDate(record.getPayDate()); | |||
| wxBillOtherDeposit.setPay(record.getPay()); | |||
| wxBillOtherDeposit.setReceivePay(record.getReceivePay()); | |||
| @@ -161,7 +162,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillOtherDeposit.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay()).divide(new BigDecimal(100)).toPlainString(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| wxBillAction.setUserId(user.getId()); | |||
| @@ -143,6 +143,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| if(wxBillOther==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillOther.getPay(); | |||
| wxBillOther.setPayDate(record.getPayDate()); | |||
| wxBillOther.setPay(record.getPay()); | |||
| wxBillOther.setReceivePay(record.getReceivePay()); | |||
| @@ -160,7 +161,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillOther.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay()).divide(new BigDecimal(100)).toPlainString(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| wxBillAction.setUserId(user.getId()); | |||
| @@ -128,6 +128,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||
| if(record==null){ | |||
| return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillDeposit.getPay(); | |||
| wxBillDeposit.setPayDate(record.getPayDate()); | |||
| wxBillDeposit.setPay(record.getPay()); | |||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | |||
| @@ -145,7 +146,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillDeposit.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay()).divide(new BigDecimal(100)).toPlainString(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| wxBillAction.setUserId(user.getId()); | |||
| @@ -127,6 +127,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| if(property==null){ | |||
| return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = property.getPay(); | |||
| property.setRevenue(record.getRevenue()); | |||
| property.setLatePayRatio(record.getLatePayRatio()); | |||
| property.setLatePayTime(record.getLatePayTime()); | |||
| @@ -147,7 +148,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(property.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay()).divide(new BigDecimal(100)).toPlainString(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| wxBillAction.setUserId(user.getId()); | |||
| @@ -127,6 +127,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| if(wxBillRent==null){ | |||
| return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillRent.getPay(); | |||
| wxBillRent.setRevenue(record.getRevenue()); | |||
| wxBillRent.setLatePayRatio(record.getLatePayRatio()); | |||
| wxBillRent.setLatePayTime(record.getLatePayTime()); | |||
| @@ -147,7 +148,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(wxBillRent.getId()); | |||
| String message = EnumBillPayWay.getEnum(record.getPayWay()).getMessage(); | |||
| String price = new BigDecimal(record.getPay()).divide(new BigDecimal(100)).toPlainString(); | |||
| String price = new BigDecimal(record.getPay() - addpay).divide(new BigDecimal(100)).toPlainString(); | |||
| wxBillAction.setDetails(message + price + "元"); | |||
| wxBillAction.setAction(EnumBillAction.OFFLINE_PAY.getCode()); | |||
| wxBillAction.setUserId(user.getId()); | |||
| @@ -829,5 +829,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { | |||
| excelService.exportExcel(list,null,sheetName,WxCarPayRecord.class,sheetName+".xls",response); | |||
| } | |||
| @Override | |||
| public long findCountByFilter(WxCUserBasicInfoDto dto) { | |||
| return wxCUserBasicInfoMapper.findCount(dto); | |||
| } | |||
| } | |||
| @@ -2477,4 +2477,5 @@ public class WxChartServiceImpl implements WxChartDataService { | |||
| return new ResultData(datamap); | |||
| } | |||
| } | |||
| @@ -10,10 +10,7 @@ import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.vo.WxCreditHistoryVo; | |||
| import com.iformall.enums.EnumBusiness; | |||
| import com.iformall.enums.EnumScoreRules; | |||
| import com.iformall.enums.EnumScoreType; | |||
| import com.iformall.enums.EnumUserType; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.WxCreditHistoryService; | |||
| @@ -141,6 +138,9 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||
| } | |||
| }); | |||
| } | |||
| if (Long.valueOf(EnumMerchantType.MERCHANT_MORE.getCode()).equals(credit.getMerchantId())) { | |||
| credit.setMerchantName(EnumMerchantType.MERCHANT_MORE.getMessage()); | |||
| } | |||
| } | |||
| return new PageInfo<>(wxCreditHistoryVoList); | |||
| } | |||
| @@ -397,12 +397,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| // 给审批人发送代办通知短信 | |||
| List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstance.getId()); | |||
| for (MallUserInfo mallUserInfo:mallUserInfoList) { | |||
| sendAssigneeMsgAndEmail(tenantId,mallUserInfo.getPhone(),mallUserInfo.getEmail(),starterInfo.getName(),businessId); | |||
| sendAssigneeMsgAndEmail(tenantId,mallUserInfo.getPhone(),mallUserInfo.getEmail(),starterInfo.getName(),businessId,flowType); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| public void sendAssigneeMsgAndEmail(String tenantId,String phone,String email,String userName,Long businessId){ | |||
| public void sendAssigneeMsgAndEmail(String tenantId,String phone,String email,String userName,Long businessId,Integer flowType){ | |||
| Map<String,String> dynamicContentMap = new HashMap<>(); | |||
| dynamicContentMap.put("userName",userName); | |||
| dynamicContentMap.put("page", Constant.adminPage); | |||
| @@ -476,6 +476,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| mailMsg.setModelId(EnumMailMsgModel.MAIL_ASSIGNEE_NODIFY.getCode()); | |||
| mailMsg.setTo(new String[]{email}); | |||
| mailMsg.setTenantId(tenantId); | |||
| if(1 == flowType.intValue() || 3 == flowType.intValue()){ | |||
| msgReplaceMap.put("bustype","合同"); | |||
| }else if(2 == flowType.intValue()){ | |||
| msgReplaceMap.put("bustype","账单"); | |||
| msgReplaceMap.put("contract", businessId.toString()); | |||
| } | |||
| mailMsg.setDynamicContentMap(msgReplaceMap); | |||
| mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| } | |||
| @@ -710,7 +716,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| String assignee = ""; | |||
| List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstanceId); | |||
| for (MallUserInfo mallUserInfo:mallUserInfoList) { | |||
| sendAssigneeMsgAndEmail(tenantId,mallUserInfo.getPhone(),mallUserInfo.getEmail(),userName,businessId); | |||
| sendAssigneeMsgAndEmail(tenantId,mallUserInfo.getPhone(),mallUserInfo.getEmail(),userName,businessId,flowType); | |||
| } | |||
| // 给发起人发送短信 | |||
| @@ -863,8 +869,6 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| //给发起人发送驳回消息 | |||
| Map<String,String> msgReplaceMap = new HashedMap(); | |||
| WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); | |||
| wxMsgValidationcode.setTenantId(tenantId); | |||
| msgReplaceMap.put("contract",(String)getVariableByKey(variables,"contractNumber")); | |||
| msgReplaceMap.put("page",Constant.adminPage); | |||
| WxMsgRecord wxMsgRecord = new WxMsgRecord(); | |||
| @@ -891,6 +895,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| mailMsg.setModelId(EnumMailMsgModel.MAIL_REJECT_NODIFY.getCode()); | |||
| mailMsg.setTo(new String[]{email}); | |||
| mailMsg.setTenantId(tenantId); | |||
| if(1 == flowType.intValue() || 3 == flowType.intValue()){ | |||
| msgReplaceMap.put("bustype","合同"); | |||
| }else if(2 == flowType.intValue()){ | |||
| msgReplaceMap.put("bustype","账单"); | |||
| msgReplaceMap.put("contract", businessId.toString()); | |||
| } | |||
| mailMsg.setDynamicContentMap(msgReplaceMap); | |||
| mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| } | |||
| @@ -560,4 +560,9 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| List<WxMerchantVo> listCVo = wxMerchantMapper.findListCVo(merchant); | |||
| return listCVo.isEmpty() ? new WxMerchantVo() : listCVo.get(0); | |||
| } | |||
| @Override | |||
| public WxMerchant findOne(WxMerchant wxMerchant) { | |||
| return wxMerchantMapper.selectOne(wxMerchant); | |||
| } | |||
| } | |||
| @@ -75,7 +75,7 @@ public class WxMsgCallbackServiceImpl implements WxMsgCallbackService { | |||
| List<WxMsgCallback> wxMsgCallbacks = JSONArray.parseArray(param.get("item"), WxMsgCallback.class); | |||
| wxMsgConfig = list.get(0); | |||
| wxMsgConfig.setRemains(wxMsgConfig.getRemains() - wxMsgCallbacks.size()); | |||
| wxMsgConfigMapper.updateByPrimaryKeySelective(wxMsgConfig); | |||
| //wxMsgConfigMapper.updateByPrimaryKeySelective(wxMsgConfig); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| for (WxMsgCallback wxMsgCallback : wxMsgCallbacks) { | |||
| WxMsgCallback callback=wxMsgCallbackMapper.queryCallbackByBatchNoAndPhone(wxMsgCallback); | |||
| @@ -1,6 +1,5 @@ | |||
| package com.iformall.service.impl; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| @@ -8,17 +7,16 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.EnumMsgModel; | |||
| import com.iformall.enums.EnumMsgSendStatus; | |||
| import com.iformall.enums.EnumVerifyCode; | |||
| import com.iformall.domain.po.msg.WxMsgRecord; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.mq.MqBaseProducer; | |||
| import com.iformall.service.WxMsgValidationcodeService; | |||
| import com.iformall.utils.*; | |||
| import org.apache.commons.collections.map.HashedMap; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import java.util.*; | |||
| import java.util.stream.Collectors; | |||
| @@ -48,6 +46,9 @@ public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeServic | |||
| @Autowired | |||
| WxMsgCallbackMapper wxMsgCallbackMapper; | |||
| @Autowired | |||
| MqBaseProducer mqBaseProducer; | |||
| @Override | |||
| public PageInfo<WxMsgValidationcode> listAsPage(WxMsgValidationcode record, Integer pageIndex, Integer pageSize) { | |||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMsgValidationcodeMapper.findList(record)); | |||
| @@ -78,8 +79,6 @@ public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeServic | |||
| @Override | |||
| public ResultData sendvalidationcode(WxMsgValidationcode wxMsgValidationcode) { | |||
| //1、查看是否存在未过期的短信,有返回成功 没有继续 | |||
| List<WxMsgValidationcode> wxmsgvalidationcodelist = wxMsgValidationcodeMapper.findList(wxMsgValidationcode); | |||
| Date currentdate = new Date(); | |||
| @@ -87,60 +86,70 @@ public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeServic | |||
| validationcode.getExpiretime().after(currentdate)).collect(Collectors.toList()); | |||
| if(wxmsgvalidationcodelist.size()>0) return new ResultData(ErrorCode.MSG_REPEAT_SEND.getCode(),ErrorCode.MSG_REPEAT_SEND.getMessage()); | |||
| //2、根据tenantid查询出商场名称作为签名 | |||
| /*WxMall wxMall = new WxMall(); | |||
| wxMall.setTenantId(wxMsgValidationcode.getTenantId()); | |||
| List<WxMall> wxmallist = wxMallMapper.findList(wxMall);*/ | |||
| //3、从短信配置中查询密钥 bid 等信息 | |||
| WxMsgConfig wxMsgConfig = new WxMsgConfig(); | |||
| wxMsgConfig.setTenantId(wxMsgValidationcode.getTenantId()); | |||
| List<WxMsgConfig> wxMsgConfigs = wxMsgConfigMapper.findList(wxMsgConfig); | |||
| if (wxMsgConfigs.size() == 0) new ResultData(ErrorCode.MSG_SEND_ERROR.getCode(),"发送失败"); | |||
| wxMsgConfig = wxMsgConfigs.get(0); | |||
| WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel(); | |||
| wxMsgValidationcodeModel.setTenantId(wxMsgConfig.getTenantId()); | |||
| wxMsgValidationcodeModel.setType(EnumMsgModel.VALIDATION_CODE.getCode()); | |||
| wxMsgValidationcodeModel = wxMsgValidationcodeModelMapper.findList(wxMsgValidationcodeModel).get(0); | |||
| wxMsgValidationcode.setSignature(wxMsgValidationcodeModel.getSignature()); | |||
| String secret = wxMsgConfig.getSecret(); | |||
| String bid = wxMsgConfig.getBid(); | |||
| String publickey = wxMsgConfig.getPublickey(); | |||
| //验证码 | |||
| // WxMsgConfig wxMsgConfig = new WxMsgConfig(); | |||
| // wxMsgConfig.setTenantId(wxMsgValidationcode.getTenantId()); | |||
| // List<WxMsgConfig> wxMsgConfigs = wxMsgConfigMapper.findList(wxMsgConfig); | |||
| // if (wxMsgConfigs.size() == 0) new ResultData(ErrorCode.MSG_SEND_ERROR.getCode(),"发送失败"); | |||
| // wxMsgConfig = wxMsgConfigs.get(0); | |||
| // | |||
| // WxMsgValidationcodeModel wxMsgValidationcodeModel = new WxMsgValidationcodeModel(); | |||
| // wxMsgValidationcodeModel.setTenantId(wxMsgConfig.getTenantId()); | |||
| // wxMsgValidationcodeModel.setType(EnumMsgModel.VALIDATION_CODE.getCode()); | |||
| // wxMsgValidationcodeModel = wxMsgValidationcodeModelMapper.findList(wxMsgValidationcodeModel).get(0); | |||
| // wxMsgValidationcode.setSignature(wxMsgValidationcodeModel.getSignature()); | |||
| // | |||
| // String secret = wxMsgConfig.getSecret(); | |||
| // String bid = wxMsgConfig.getBid(); | |||
| // String publickey = wxMsgConfig.getPublickey(); | |||
| // //验证码 | |||
| int code = (int) ((Math.random() * 9 + 1) * 100000); | |||
| String phone = wxMsgValidationcode.getPhone(); | |||
| String signature = wxMsgValidationcode.getSignature(); | |||
| //内容 | |||
| String msg = wxMsgValidationcodeModel.getContent().replace("{s6}", String.valueOf(code)); | |||
| wxMsgValidationcode.setCode(String.valueOf(code)); | |||
| wxMsgValidationcode.setMsg(msg); | |||
| String notifyUrl = wxMsgConfig.getNotifyurl(); | |||
| Integer modelId = wxMsgValidationcodeModel.getModelId(); | |||
| String result = WiwideUtil.sendMsg(secret, bid, publickey, phone, signature, msg, notifyUrl, EnumVerifyCode.YES.getCode().toString(), modelId); | |||
| JSONObject jsonObjectResult = JSONObject.parseObject(result); | |||
| String ret = jsonObjectResult.get("ret").toString(); | |||
| String batchNo = jsonObjectResult.get("data").toString(); | |||
| if (ret.equals("1")) { | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| wxMsgValidationcode.setId(idWorker.nextId()); | |||
| long currentTime = System.currentTimeMillis() ; | |||
| Date createtime=new Date(currentTime); | |||
| Integer minutes = wxMsgValidationcodeModel.getMinutes(); | |||
| currentTime +=minutes*60*1000; | |||
| Date expiredate=new Date(currentTime); | |||
| wxMsgValidationcode.setExpiretime(expiredate); | |||
| wxMsgValidationcode.setCreatetime(createtime); | |||
| wxMsgValidationcodeMapper.insertSelective(wxMsgValidationcode); | |||
| addMsgCallback(wxMsgValidationcode,batchNo); | |||
| return new ResultData(Result.SUCCESS,"发送成功"); | |||
| } | |||
| return new ResultData(ErrorCode.MSG_SEND_ERROR.getCode(),"发送失败"); | |||
| // String phone = wxMsgValidationcode.getPhone(); | |||
| // String signature = wxMsgValidationcode.getSignature(); | |||
| // //内容 | |||
| // String msg = wxMsgValidationcodeModel.getContent().replace("{s6}", String.valueOf(code)); | |||
| // wxMsgValidationcode.setCode(String.valueOf(code)); | |||
| // wxMsgValidationcode.setMsg(msg); | |||
| // String notifyUrl = wxMsgConfig.getNotifyurl(); | |||
| // Integer modelId = wxMsgValidationcodeModel.getModelId(); | |||
| //给发起人发送驳回消息 | |||
| Map<String,String> msgReplaceMap = new HashedMap(); | |||
| msgReplaceMap.put("s6",String.valueOf(code)); | |||
| WxMsgRecord wxMsgRecord = new WxMsgRecord(); | |||
| wxMsgRecord.setMsgType(EnumMsgRecordType.SMS.getCode()); | |||
| wxMsgRecord.setModelType(EnumMsgModel.VALIDATION_CODE.getCode()); | |||
| wxMsgRecord.setReceiver(wxMsgValidationcode.getPhone()); | |||
| wxMsgRecord.setTenantId(wxMsgValidationcode.getTenantId()); | |||
| wxMsgRecord.setDynamicContentMap(msgReplaceMap); | |||
| mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode()); | |||
| return new ResultData(Result.SUCCESS,"发送成功"); | |||
| // String result = WiwideUtil.sendMsg(secret, bid, publickey, phone, signature, msg, notifyUrl, EnumVerifyCode.YES.getCode().toString(), modelId); | |||
| // JSONObject jsonObjectResult = JSONObject.parseObject(result); | |||
| // String ret = jsonObjectResult.get("ret").toString(); | |||
| // String batchNo = jsonObjectResult.get("data").toString(); | |||
| // if (ret.equals("1")) { | |||
| // final IdWorker idWorker = IdWorker.get(); | |||
| // wxMsgValidationcode.setId(idWorker.nextId()); | |||
| // long currentTime = System.currentTimeMillis() ; | |||
| // Date createtime=new Date(currentTime); | |||
| // Integer minutes = wxMsgValidationcodeModel.getMinutes(); | |||
| // currentTime +=minutes*60*1000; | |||
| // Date expiredate=new Date(currentTime); | |||
| // wxMsgValidationcode.setExpiretime(expiredate); | |||
| // wxMsgValidationcode.setCreatetime(createtime); | |||
| // wxMsgValidationcodeMapper.insertSelective(wxMsgValidationcode); | |||
| // addMsgCallback(wxMsgValidationcode,batchNo); | |||
| // return new ResultData(Result.SUCCESS,"发送成功"); | |||
| // } | |||
| // return new ResultData(ErrorCode.MSG_SEND_ERROR.getCode(),"发送失败"); | |||
| } | |||
| @Override | |||
| @@ -968,7 +968,19 @@ public class WxOrderServiceImpl implements WxOrderService { | |||
| creditHistory.setCouponId(coupon.getId()); | |||
| creditHistory.setBusinessId(Long.valueOf(coupon.getBusiness())); | |||
| creditHistory.setSpend(updateOrder.getPayment()); | |||
| //creditHistory.setMerchantId(wxMerchant.getId()); | |||
| //如果券与商户一对一 则直接将消费商户更新为此商户 若一对多 则消费商户显示多商户 | |||
| WxCouponMerchant wxCouponMerchant = new WxCouponMerchant(); | |||
| wxCouponMerchant.setProductId(coupon.getId()); | |||
| wxCouponMerchant.setStatus(EnumCouponMerchantStatus.COUPON_MERCHANT_STATUS_VALID.getCode()); | |||
| List<WxCouponMerchant> list = wxCouponMerchantMapper.findList(wxCouponMerchant); | |||
| if (list != null && list.size() > 0) { | |||
| if (list.size() == 1) { | |||
| creditHistory.setMerchantId(list.get(0).getMerchantId()); | |||
| } | |||
| if (list.size() > 1) { | |||
| creditHistory.setMerchantId(Long.valueOf(EnumMerchantType.MERCHANT_MORE.getCode())); | |||
| } | |||
| } | |||
| wxCreditHistoryService.saveOrUpdate(creditHistory); | |||
| } catch (Exception e) { | |||
| logger.error("积分值:" + e.getMessage()); | |||
| @@ -187,11 +187,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| //保存租赁合同信息 | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| if (record.getStartDate().after(record.getRentalStartDate())) { | |||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR, "起租开始时间不能大于计租开始时间"); | |||
| } | |||
| int dayType = record.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode()) ? Calendar.DAY_OF_MONTH : Calendar.MONTH; | |||
| //计租开始时间 | |||
| Calendar instance = Calendar.getInstance(); | |||
| instance.setTime(record.getRentalStartDate()); | |||
| @@ -262,6 +258,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| } | |||
| } else { | |||
| WxShop wxShop = wxShopMapper.selectByPrimaryKey(shopId); | |||
| if (wxShop == null) { | |||
| return new ResultData(ErrorCode.SHOP_IS_NOT_FOUND.getCode(), "店铺 " + shopNumber + " 已删除"); | |||
| } | |||
| if (wxShop.getStatus().equals(EnumShopStatus.RENT.getCode())) { | |||
| return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + wxShop.getShopNumber() + " 已出租"); | |||
| } | |||
| @@ -485,6 +484,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| } | |||
| } else { | |||
| WxShop wxShop = wxShopMapper.selectByPrimaryKey(shopId); | |||
| if (wxShop == null) { | |||
| return new ResultData(ErrorCode.SHOP_IS_NOT_FOUND.getCode(), "店铺 " + shopNumber + " 已删除"); | |||
| } | |||
| if (wxShop.getStatus().equals(EnumShopStatus.RENT.getCode())) { | |||
| return new ResultData(ErrorCode.SHOP_IS_RENT.getCode(), "店铺 " + wxShop.getShopNumber() + " 已出租"); | |||
| } | |||
| @@ -1445,13 +1447,22 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| } else { | |||
| WxShop record = new WxShop(); | |||
| record.setId(wxRentContract.getShopId()); | |||
| Map<String, Object> wxShop = wxShopMapper.findListMap(record).get(0); | |||
| //店铺信息 | |||
| result.put("shopNumber", wxShop.get("shopNumber")); | |||
| result.put("floorName", wxShop.get("floor")); | |||
| result.put("buildingName", wxShop.get("building")); | |||
| result.put("buildArea", wxShop.get("buildArea")); | |||
| result.put("operationArea", wxShop.get("operationArea")); | |||
| List<Map<String, Object>> wxShops = wxShopMapper.findListMap(record); | |||
| if (!wxShops.isEmpty()) { | |||
| //店铺信息 | |||
| Map<String, Object> wxShop = wxShops.get(0); | |||
| result.put("shopNumber", wxShop.get("shopNumber")); | |||
| result.put("floorName", wxShop.get("floor")); | |||
| result.put("buildingName", wxShop.get("building")); | |||
| result.put("buildArea", wxShop.get("buildArea")); | |||
| result.put("operationArea", wxShop.get("operationArea")); | |||
| } else { | |||
| result.put("shopNumber", " "); | |||
| result.put("floorName", " "); | |||
| result.put("buildingName", " "); | |||
| result.put("buildArea", " "); | |||
| result.put("operationArea", " "); | |||
| } | |||
| } | |||
| //MALL信息 | |||
| WxMall wxMall = new WxMall(); | |||
| @@ -1748,8 +1759,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| JSONObject shopObject = objects.getJSONObject(j); | |||
| JSONArray adjustRatioArr = shopObject.getJSONArray("adjustRatio"); | |||
| String shopNumber = shopObject.getString("shopNumber"); | |||
| double ratioStr = new BigDecimal(adjustRatioArr.getIntValue(i)).divide(new BigDecimal(100)).doubleValue(); | |||
| adjustRatioStr.append(shopNumber).append("[").append(ratioStr).append("]"); | |||
| adjustRatioStr.append(shopNumber).append("[").append(adjustRatioArr.getIntValue(i)).append("]"); | |||
| } | |||
| adjustRatioList.add(adjustRatioStr.toString()); | |||
| } | |||
| @@ -122,7 +122,20 @@ public class WxTopicServiceImpl implements WxTopicService { | |||
| @Override | |||
| public WxTopic findById(WxTopic record) { | |||
| WxTopic wxTopic = wxTopicMapper.selectByPrimaryKey(record.getId()); | |||
| wxTopic.setCouponList(wxCouponMapper.findCouponByTopic(record)); | |||
| List<WxCoupon> wxCouponList = wxCouponMapper.findCouponByTopic(record); | |||
| wxTopic.setCouponList(wxCouponList); | |||
| String couponIds = ""; | |||
| if(CollectionUtils.isNotEmpty(wxCouponList)) { | |||
| for (int i = 0; i < wxCouponList.size(); i++) { | |||
| WxCoupon wxCoupon = wxCouponList.get(i); | |||
| if (i == wxCouponList.size() - 1) { | |||
| couponIds += wxCoupon.getType() +"-"+ wxCoupon.getId().toString(); | |||
| } else { | |||
| couponIds += wxCoupon.getType() +"-"+ wxCoupon.getId().toString() + ","; | |||
| } | |||
| } | |||
| wxTopic.setCouponIds(couponIds); | |||
| } | |||
| return wxTopic; | |||
| } | |||
| } | |||
| @@ -57,12 +57,10 @@ public class WxUserVisitServiceImpl implements WxUserVisitService { | |||
| public List<TouchUsersReportVo> touchUsersReportList(HashMap<String, Object> params) { | |||
| return wxUserVisitMapper.touchUsersReportList(params); | |||
| } | |||
| @Override | |||
| public Long queryVisitUv(HashMap<String, Object> params) { | |||
| return wxUserVisitMapper.queryVisitUv(params); | |||
| } | |||
| } | |||
| @@ -91,6 +91,9 @@ public class SendCallBackSmsServiceImpl implements MsgSendService { | |||
| if (ret.equals(EnumMsgSendStatus.MSG_SEND_SUCCESS.getCode().toString())) { | |||
| record.setSendstatus(EnumMsgSendStatus.MSG_SEND_SUCCESS.getCode()); | |||
| //扣减剩余条数 | |||
| wxMsgConfig.setRemains(1l); | |||
| wxMsgConfigMapper.updateRemains(wxMsgConfig); | |||
| } else { | |||
| record.setSendstatus(EnumMsgSendStatus.MSG_SEND_FAIL.getCode()); | |||
| } | |||
| @@ -54,6 +54,11 @@ public class SendEmailServiceImpl implements MsgSendService { | |||
| for (Map.Entry<String, String> entry : mailMsg.getDynamicContentMap().entrySet()) { | |||
| msg = msg.replace("{"+entry.getKey()+"}", entry.getValue()); | |||
| } | |||
| logger.info("wxMsgModel.getEmailBgImg():"+wxMsgModel.getEmailBgImg()); | |||
| if(StringUtils.isNotBlank(wxMsgModel.getEmailBgImg())){ | |||
| msg = msg.replace("{bg}", wxMsgModel.getEmailBgImg()); | |||
| } | |||
| logger.info("msg:"+msg); | |||
| mailMsg.setMsg(msg); | |||
| } | |||
| @@ -102,6 +102,9 @@ public class SendSmsServiceImpl implements MsgSendService { | |||
| } | |||
| wxMsgValidationcodeMapper.insertSelective(wxMsgValidationcode); | |||
| wxMsgValidationcodeService.addMsgCallback(wxMsgValidationcode,batchNo); | |||
| //扣减剩余条数 | |||
| wxMsgConfig.setRemains(1l); | |||
| wxMsgConfigMapper.updateRemains(wxMsgConfig); | |||
| }else{ | |||
| throw new MallinkException(1001,"运营商返回失败:"+result); | |||
| } | |||
| @@ -29,6 +29,7 @@ | |||
| <result column="shop_info" jdbcType="VARCHAR" property="shopInfo"/> | |||
| <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | |||
| <result column="late_pay_status" jdbcType="INTEGER" property="latePayStatus"/> | |||
| <result column="comments" jdbcType="VARCHAR" property="comments"/> | |||
| </resultMap> | |||
| @@ -37,7 +38,7 @@ | |||
| `createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`, | |||
| `merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`, | |||
| `revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`, | |||
| `pay_way`,`late_pay_status` | |||
| `pay_way`,`late_pay_status`,`comments` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -90,7 +91,8 @@ | |||
| else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe)end) | |||
| else br.late_pay_price end latePayPrice, | |||
| (select max(period) from wx_bill_property where property_contract_id=br.property_contract_id) | |||
| allPeriod,d.`status` depositStatus,br.`shop_info` shopInfo,br.pay_way payWay,br.late_pay_status latePayStatus | |||
| allPeriod,d.`status` depositStatus,br.`shop_info` shopInfo,br.pay_way payWay,br.late_pay_status latePayStatus, | |||
| br.`comments` | |||
| from wx_bill_property br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| left join wx_bill_property_deposit d on br.property_contract_id=d.property_contract_id | |||
| @@ -156,6 +158,7 @@ | |||
| <update id="update" parameterType="com.iformall.domain.po.WxBillProperty"> | |||
| update wx_bill_property set updatetime = now() | |||
| <if test=" null != receivePay ">,receive_pay = #{receivePay},owe=#{receivePay}</if> | |||
| <if test=" null != comments ">,comments = #{comments}</if> | |||
| where id = #{id} | |||
| </update> | |||
| @@ -29,6 +29,7 @@ | |||
| <result column="shop_info" jdbcType="VARCHAR" property="shopInfo"/> | |||
| <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | |||
| <result column="late_pay_status" jdbcType="INTEGER" property="latePayStatus"/> | |||
| <result column="comments" jdbcType="VARCHAR" property="comments"/> | |||
| </resultMap> | |||
| @@ -37,7 +38,7 @@ | |||
| `createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`, | |||
| `merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`, | |||
| `revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`, | |||
| `pay_way`,`late_pay_status` | |||
| `pay_way`,`late_pay_status`,`comments` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -93,7 +94,8 @@ | |||
| else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe)end) | |||
| else br.late_pay_price end latePayPrice, | |||
| (select max(period) from wx_bill_rent where rent_contract_id=br.rent_contract_id) allPeriod,d.`status` | |||
| depositStatus,br.shop_info shopInfo,br.pay_way payWay,br.late_pay_status latePayStatus | |||
| depositStatus,br.shop_info shopInfo,br.pay_way payWay,br.late_pay_status latePayStatus, | |||
| br.`comments` | |||
| from wx_bill_rent br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| left join wx_rent_contract r on br.rent_contract_id=r.id | |||
| @@ -154,6 +156,7 @@ | |||
| <update id="update" parameterType="com.iformall.domain.po.WxBillRent"> | |||
| update wx_bill_rent set updatetime = now() | |||
| <if test=" null != receivePay ">,receive_pay = #{receivePay},owe=#{receivePay}</if> | |||
| <if test=" null != comments ">,comments = #{comments}</if> | |||
| where id = #{id} | |||
| </update> | |||
| @@ -367,6 +367,9 @@ | |||
| <if test=" null != phones"> | |||
| and cu.phone in (${phones}) | |||
| </if> | |||
| <if test="1 = queryImport"> | |||
| and create_date like '%00:00:00' | |||
| </if> | |||
| <if test=" null != levelStartScore and (0 != levelStartScore and '' != levelStartScore)"> | |||
| and cu.poins >= #{levelStartScore} | |||
| @@ -124,7 +124,8 @@ | |||
| credit.receipt_url receiptUrl, | |||
| credit.operator_type operatorType, | |||
| credit.operator_id operatorId, | |||
| merchant.NAME merchantName | |||
| merchant.NAME merchantName, | |||
| credit.merchant_id merchantId | |||
| FROM | |||
| wx_c_user_basic_info basic | |||
| INNER JOIN wx_credit_history credit ON basic.id = credit.c_user_id | |||
| @@ -113,7 +113,9 @@ | |||
| <include refid="dynamicWhereConditions" /> | |||
| </select> | |||
| <update id="updateRemains" parameterType="com.iformall.domain.po.WxMsgConfig"> | |||
| update wx_msg_config set remains = if(remains - #{remains} < 0,0,remains - #{remains}) where `tenant_id` = #{tenantId} | |||
| </update> | |||
| @@ -10,11 +10,12 @@ | |||
| <result column="createtime" jdbcType="TIMESTAMP" property="createtime" /> | |||
| <result column="status" jdbcType="INTEGER" property="status" /> | |||
| <result column="model_id" jdbcType="INTEGER" property="modelId" /> | |||
| <result column="email_bg_img" property="emailBgImg" /> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`name`,`signature`,`content`,`createtime`,`status`,`model_id` | |||
| `id`,`tenant_id`,`name`,`signature`,`content`,`createtime`,`status`,`model_id`,email_bg_img | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -126,5 +126,15 @@ | |||
| </if> | |||
| order by day_date desc | |||
| </select> | |||
| <select id="queryVisitUv" resultType="Long" parameterType="hashmap"> | |||
| select count(visit_uv) from wx_user_visit where tenant_id=#{tenantId} | |||
| <if test="startTime != null"> | |||
| and day_date >= #{startTime} | |||
| </if> | |||
| <if test="endTime != null"> | |||
| and day_date <= #{endTime} | |||
| </if> | |||
| </select> | |||
| </mapper> | |||
| @@ -22,6 +22,9 @@ public class SocketServerApplication { | |||
| @Value("${fm.exception}") | |||
| private boolean fmException; | |||
| @Value("${fm.exception_emails}") | |||
| private String fmExceptionEmails; | |||
| @Value("${fm.open}") | |||
| private boolean fmOpen; | |||
| @@ -30,6 +33,11 @@ public class SocketServerApplication { | |||
| return fmException; | |||
| } | |||
| @Bean | |||
| public String fmExceptionEmails() { | |||
| return fmExceptionEmails; | |||
| } | |||
| @Bean | |||
| public boolean isFmOpen() { | |||
| return fmOpen; | |||
| @@ -43,14 +43,17 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(R0bER9E9OB9/YQcpNXMyYDwofNVb8/pFl4nrApS8mi0=) | |||
| password: ENC(50YqJd0iK/2r2YnmEd5RKaki3ktU73UDapBJrVYfqmc=) # 授权密码 | |||
| username: ENC(lknBjZsA24AaQEXuy0fFw3acd4v4Xsf3CsgDcRZgjlYnNAL9R07d/w==) | |||
| password: ENC(gIkVPuYMmJ/EDxry8QIfGumIAk4plAwolGrfg1fiM3U=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| auth: true | |||
| starttls: | |||
| enable: true | |||
| socketFactory: | |||
| port: 465 | |||
| class: javax.net.ssl.SSLSocketFactory | |||
| rocketmq: | |||
| nameServer: 127.0.0.1:9876 | |||
| producer: | |||
| @@ -101,6 +104,7 @@ jasypt: | |||
| fm: | |||
| exception: false | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 1 | |||
| open: true | |||
| @@ -40,14 +40,17 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(I2YKxnRVPY7J1r/bwzwHOhQCjj3nVqCWEbVTJvBq7y0=) | |||
| password: ENC(APQMO9XQRzMKd0eap+oSSOYH9MQe/r5K0YFF9A9mizU=) # 授权密码 | |||
| username: ENC(IiL/PHP9wCkpibWHRH/Mts8K9fh4izYqaiaF66bDrqtEHP+KUcJRRg==) | |||
| password: ENC(m7L57m8mk6tApVoa4XIDQnXF0VxnYjKe4LVdzcgb+xY=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| auth: true | |||
| starttls: | |||
| enable: true | |||
| socketFactory: | |||
| port: 465 | |||
| class: javax.net.ssl.SSLSocketFactory | |||
| # RABBITMQ | |||
| rabbitmq: | |||
| host: localhost | |||
| @@ -86,6 +89,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 3 | |||
| open: true | |||
| @@ -40,14 +40,17 @@ spring: | |||
| mail: | |||
| host: smtp.exmail.qq.com | |||
| username: ENC(HFbRXtAFVxU36Hk0yT3reyvRuLrw3RhMlbxFj9Ev/VY=) | |||
| password: ENC(pk4+/3C5n2hMYmgi+VTqI4P1m77DllW8y4KElMXXmIo=) # 授权密码 | |||
| username: ENC(TtJQE2C4cWo8CpVGMMl5hiy5eykepd96J5XjsW3Kj5fgP+6+5ctDNQ==) | |||
| password: ENC(Zh6A6kRtA2ABtH6nzdvsqQSO1/8p3mparJr8neI2BLU=) # 授权密码 | |||
| properties: | |||
| mail: | |||
| smtp: | |||
| auth: true | |||
| starttls: | |||
| enable: true | |||
| socketFactory: | |||
| port: 465 | |||
| class: javax.net.ssl.SSLSocketFactory | |||
| # RABBITMQ | |||
| rabbitmq: | |||
| host: 127.0.0.1 | |||
| @@ -86,6 +89,7 @@ wechat: | |||
| fm: | |||
| exception: true | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||
| deploy: 2 | |||
| open: true | |||