diff --git a/admin-pc/.env.development b/admin-pc/.env.development index 71e75bb..1ff3211 100644 --- a/admin-pc/.env.development +++ b/admin-pc/.env.development @@ -1,5 +1,5 @@ NODE_ENV=development -VUE_APP_API_BASE_URL=https://fission-star-api.hhlm1688.com/fission-star-api/ +VUE_APP_API_BASE_URL=http://localhost:8001/fission-star-api/ VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview diff --git a/admin-pc/.env.production b/admin-pc/.env.production index 49b756a..2acf8e0 100644 --- a/admin-pc/.env.production +++ b/admin-pc/.env.production @@ -1,4 +1,4 @@ NODE_ENV=production -VUE_APP_API_BASE_URL=https://fission-star-api.hhlm1688.com/fission-star-api/ +VUE_APP_API_BASE_URL=http://localhost:8000/fission-star-api/ VUE_APP_CAS_BASE_URL=http://localhost:8888/cas VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview \ No newline at end of file diff --git a/module-common/pom.xml b/module-common/pom.xml index f76c9e6..b7a5d70 100644 --- a/module-common/pom.xml +++ b/module-common/pom.xml @@ -64,6 +64,10 @@ wechatpay-java 0.2.15 + + commons-fileupload + commons-fileupload + \ No newline at end of file diff --git a/module-common/src/main/java/org/jeecg/api/controller/AppletFenController.java b/module-common/src/main/java/org/jeecg/api/controller/AppletFenController.java index 6d1bc69..538cbfb 100644 --- a/module-common/src/main/java/org/jeecg/api/controller/AppletFenController.java +++ b/module-common/src/main/java/org/jeecg/api/controller/AppletFenController.java @@ -14,6 +14,7 @@ import org.jeecg.modules.commonVio.entity.CommonVio; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.math.BigDecimal; @Api(tags="分享页接口") @RestController @@ -26,8 +27,8 @@ public class AppletFenController { @ApiOperation(value="获取分享记录列表带分页", notes="获取分享记录列表带分页") @GetMapping(value = "/getSharePage") - public Result getSharePage(@RequestHeader("X-Access-Token") String token, Integer state, PageBean pageBean) { - return appletFenService.getSharePage(token,state,pageBean); + public Result getSharePage(@RequestHeader("X-Access-Token") String token, Integer state,Integer status, PageBean pageBean) { + return appletFenService.getSharePage(token,state,status,pageBean); } //获取个人分享记录详情 @@ -37,6 +38,19 @@ public class AppletFenController { return appletFenService.getShareInfo(token,id); } + //激活 + @ApiOperation(value="激活", notes="激活") + @PostMapping(value = "/openVip") + public Result openVip (@RequestHeader("X-Access-Token") String token,String code){ + return appletFenService.openVip(token,code); + } + + @ApiOperation(value="提现", notes="提现") + @PostMapping(value = "/openMoney") + public Result openMoney (@RequestHeader("X-Access-Token") String token, BigDecimal money){ + return appletFenService.openMoney(token,money); + } + //校验个人转发是否达标 @ApiOperation(value="校验个人转发是否达标", notes="校验个人转发是否达标") @@ -121,8 +135,12 @@ public class AppletFenController { return appletFenService.saveOrUpdateVideoShare(token,commonVio); } - - + //删除分享记录 + @ApiOperation(value="删除分享记录", notes="删除分享记录") + @PostMapping(value = "/deleteLog") + public Result deleteLog(@RequestHeader("X-Access-Token") String token,Integer state,String id){ + return appletFenService.deleteLog(token,state,id); + } diff --git a/module-common/src/main/java/org/jeecg/api/controller/AppletInfoController.java b/module-common/src/main/java/org/jeecg/api/controller/AppletInfoController.java index ba0a1cf..4b8fb51 100644 --- a/module-common/src/main/java/org/jeecg/api/controller/AppletInfoController.java +++ b/module-common/src/main/java/org/jeecg/api/controller/AppletInfoController.java @@ -4,6 +4,7 @@ package org.jeecg.api.controller; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import net.sf.jsqlparser.statement.create.table.Index; import org.jeecg.api.bean.LoginReq; import org.jeecg.api.service.AppletInfoService; import org.jeecg.common.api.vo.Result; @@ -21,6 +22,46 @@ public class AppletInfoController { @Resource private AppletInfoService appletInfoService; + + //获取我的推广数据 - 基础数据 + @ApiOperation(value="获取个人资料信息", notes="获取个人资料信息") + @GetMapping(value = "/getUserInfoVip") + public Result getUserInfoVip(@RequestHeader("X-Access-Token") String token){ + return appletInfoService.getUserInfoVip(token); + } + + + + + + + + + + + //获取我的推广数据列表 + @ApiOperation(value="获取我的推广数据列表", notes="获取我的推广数据列表") + @GetMapping(value = "/getUserInfoVipList") + public Result getUserInfoVipList(@RequestHeader("X-Access-Token") String token, Integer state,Integer role){ + return appletInfoService.getUserInfoVipList(token); + } + + + //获取我的钱包数据信息 -钱包流水列表 + + @ApiOperation(value="获取我的钱包数据信息 -钱包流水列表", notes="获取我的钱包数据信息 -钱包流水列表") + @GetMapping(value = "/getWalletList") + public Result getWalletList(@RequestHeader("X-Access-Token") String token, Integer state,String time){ + return appletInfoService.getWalletList(token,state); + } + + + + + + + + //获取个人资料信息 @ApiOperation(value="获取个人资料信息", notes="获取个人资料信息") @GetMapping(value = "/getUserInfo") @@ -47,4 +88,6 @@ public class AppletInfoController { + + } diff --git a/module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java b/module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java index b686ba2..c44767c 100644 --- a/module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java +++ b/module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java @@ -43,8 +43,8 @@ public class AppletLoginController { //获取基础配置信息 @ApiOperation(value="获取基础配置信息", notes="获取基础配置信息") @GetMapping(value = "/getConfig") - public Result getConfig(){ - return Result.OK("获取基础配置信息成功"); + public Result getConfig(){ + return appletLoginService.getConfig(); } @@ -61,6 +61,14 @@ public class AppletLoginController { } + //获取新闻动态详情的接口 + @ApiOperation(value="获取新闻动态详情的接口", notes="获取新闻动态详情的接口") + @GetMapping(value = "/getNewsById") + public Result getNewsById(String id){ + return appletLoginService.getNewsById(id); + } + + @ApiOperation(value="获取轮播图", notes="获取轮播图") @GetMapping(value = "/getBanner") public Result getBanner(){ diff --git a/module-common/src/main/java/org/jeecg/api/service/AppletFenService.java b/module-common/src/main/java/org/jeecg/api/service/AppletFenService.java index 8090529..c52a6b6 100644 --- a/module-common/src/main/java/org/jeecg/api/service/AppletFenService.java +++ b/module-common/src/main/java/org/jeecg/api/service/AppletFenService.java @@ -7,16 +7,25 @@ import org.jeecg.modules.commonBook.entity.CommonBook; import org.jeecg.modules.commonMember.entity.CommonMember; import org.jeecg.modules.commonTeam.entity.CommonTeam; import org.jeecg.modules.commonVio.entity.CommonVio; +import org.springframework.web.bind.annotation.RequestHeader; + +import java.math.BigDecimal; public interface AppletFenService { //获取分享记录列表带分页 - Result getSharePage(String token,Integer state,PageBean pageBean); + Result getSharePage(String token,Integer state,Integer status,PageBean pageBean); //获取个人分享记录详情 Result getShareInfo(String token,String id); + //激活 + Result openVip (String token,String code); + + //提现 + Result openMoney (String token, BigDecimal money); + //校验个人转发是否达标 Result checkShare(String token); @@ -51,4 +60,8 @@ public interface AppletFenService { //增加或者修改视频分享 Result saveOrUpdateVideoShare(String token, CommonVio commonVio); + + //删除分享记录 + Result deleteLog(String token, Integer state, String id); + } diff --git a/module-common/src/main/java/org/jeecg/api/service/AppletInfoService.java b/module-common/src/main/java/org/jeecg/api/service/AppletInfoService.java index 2847f81..55691dc 100644 --- a/module-common/src/main/java/org/jeecg/api/service/AppletInfoService.java +++ b/module-common/src/main/java/org/jeecg/api/service/AppletInfoService.java @@ -4,11 +4,19 @@ package org.jeecg.api.service; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.RequestHeader; public interface AppletInfoService { + Result getUserInfoVip(String token); + + + Result getUserInfoVipList(String token); + + Result getWalletList(String token, Integer state); + //获取个人资料信息 Result getUserInfo(String token); diff --git a/module-common/src/main/java/org/jeecg/api/service/AppletLoginService.java b/module-common/src/main/java/org/jeecg/api/service/AppletLoginService.java index 553cd02..3a01a45 100644 --- a/module-common/src/main/java/org/jeecg/api/service/AppletLoginService.java +++ b/module-common/src/main/java/org/jeecg/api/service/AppletLoginService.java @@ -34,6 +34,10 @@ public interface AppletLoginService { Result getNews(PageBean pageBean); + //获取动态详情 + Result getNewsById(String id); + + //获取首页banner Result getBanner(); diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/AppletFenServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/AppletFenServiceImpl.java index c3651a8..379a4f0 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/AppletFenServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/AppletFenServiceImpl.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.jeecg.api.bean.PageBean; import org.jeecg.api.service.AppletFenService; import org.jeecg.common.api.vo.Result; @@ -23,6 +24,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; @Slf4j @Service @@ -43,7 +47,7 @@ public class AppletFenServiceImpl implements AppletFenService { //获取分享记录列表带分页 @Override - public Result getSharePage(String token,Integer state, PageBean pageBean){ + public Result getSharePage(String token,Integer state,Integer status, PageBean pageBean){ HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); if(state == 0){ Page page = new Page<>(pageBean.getPageNo(), pageBean.getPageSize()); @@ -53,6 +57,18 @@ public class AppletFenServiceImpl implements AppletFenService { .eq(CommonMember::getUserId,hanHaiMember.getId()) .orderByDesc(CommonMember::getCreateTime) .page(page); + + if(status!=null){ + pageList = commonMemberService + .lambdaQuery() + .eq(CommonMember::getUserId,hanHaiMember.getId()) + .eq(CommonMember::getStatus,status) + .orderByDesc(CommonMember::getCreateTime) + .page(page); + } + + + return Result.OK("个人分享",pageList); } if(state == 1){ @@ -62,6 +78,16 @@ public class AppletFenServiceImpl implements AppletFenService { .eq(CommonVio::getUserId,hanHaiMember.getId()) .orderByDesc(CommonVio::getCreateTime) .page(page); + + + + if(status!=null){ + pageList = commonVioService.lambdaQuery() + .eq(CommonVio::getUserId,hanHaiMember.getId()) + .eq(CommonVio::getStatus,status) + .orderByDesc(CommonVio::getCreateTime) + .page(page); + } return Result.OK("视频分享",pageList); } if(state == 2){ @@ -71,6 +97,15 @@ public class AppletFenServiceImpl implements AppletFenService { .eq(CommonTeam::getUserId,hanHaiMember.getId()) .orderByDesc(CommonTeam::getCreateTime) .page(page); + + + if(status!=null){ + pageList = commonTeamService.lambdaQuery() + .eq(CommonTeam::getUserId,hanHaiMember.getId()) + .eq(CommonTeam::getStatus,status) + .orderByDesc(CommonTeam::getCreateTime) + .page(page); + } return Result.OK("群分享",pageList); } if(state == 3){ @@ -80,6 +115,15 @@ public class AppletFenServiceImpl implements AppletFenService { .eq(CommonBook::getUserId,hanHaiMember.getId()) .orderByDesc(CommonBook::getCreateTime) .page(page); + + if(status!=null){ + pageList = commonBookService.lambdaQuery() + .eq(CommonBook::getUserId,hanHaiMember.getId()) + .eq(CommonBook::getStatus,status) + .orderByDesc(CommonBook::getCreateTime) + .page(page); + } + return Result.OK("文章分享",pageList); } return Result.error("参数错误"); @@ -93,6 +137,21 @@ public class AppletFenServiceImpl implements AppletFenService { return Result.OK("个人分享详情",commonMember); } + + //激活 + @Override + public Result openVip (String token,String code){ + return Result.OK("激活成功"); + } + + //提现 + @Override + public Result openMoney (String token, BigDecimal money){ + return Result.OK("提现成功"); + } + + + //获取视频分享记录详情 @Override public Result getVideoShareInfo(String token,String id){ @@ -122,7 +181,12 @@ public class AppletFenServiceImpl implements AppletFenService { @Override public Result checkShare(String token){ HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); - return Result.OK("已转发5次",10); + Map map = new HashMap<>(); + map.put("title","已转发5次"); + map.put("need_num",30); + map.put("num",5); + map.put("open",false); + return Result.OK("查询成功",map); } @@ -130,21 +194,36 @@ public class AppletFenServiceImpl implements AppletFenService { @Override public Result checkVideoShare(String token){ HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); - return Result.OK("已转发5次",10); + Map map = new HashMap<>(); + map.put("title","已转发5次"); + map.put("need_num",3); + map.put("num",15); + map.put("open",true); + return Result.OK("查询成功",map); } //校验群转发是否达标 @Override public Result checkGroupShare(String token){ HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); - return Result.OK("已转发5次",10); + Map map = new HashMap<>(); + map.put("title","已转发5次"); + map.put("need_num",10); + map.put("num",5); + map.put("open",false); + return Result.OK("查询成功",map); } //校验文章转发是否达标 @Override public Result checkArticleShare(String token){ HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); - return Result.OK("已转发5次",10); + Map map = new HashMap<>(); + map.put("title","已转发5次"); + map.put("need_num",3); + map.put("num",5); + map.put("open",true); + return Result.OK("查询成功",map); } @@ -191,7 +270,29 @@ public class AppletFenServiceImpl implements AppletFenService { return Result.OK("保存成功"); } - + //删除分享记录 + @Override + public Result deleteLog(String token, Integer state, String id){ + if(state == null){ + return Result.error("类型不能为空"); + } + if(StringUtils.isEmpty(id)){ + return Result.error("标识不能为空"); + } + if(state == 0){ + commonMemberService.removeById(id); + } + if(state == 1){ + commonVioService.removeById(id); + } + if(state == 2){ + commonTeamService.removeById(id); + } + if(state == 3){ + commonBookService.removeById(id); + } + return Result.OK("删除成功"); + } diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/AppletInfoServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/AppletInfoServiceImpl.java index dafde34..69ce3fb 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/AppletInfoServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/AppletInfoServiceImpl.java @@ -5,18 +5,30 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.aliyun.oss.OSS; import com.aliyun.oss.OSSClientBuilder; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; -import org.apache.tomcat.util.http.fileupload.FileItem; -import org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.jeecg.api.service.AppletInfoService; +import org.jeecg.api.wxUtils.HttpClientUtil; +import org.jeecg.api.wxUtils.WxQrCodeVo; import org.jeecg.common.api.vo.Result; import org.jeecg.config.shiro.ShiroRealm; +import org.jeecg.modules.commonConfig.entity.CommonConfig; +import org.jeecg.modules.commonConfig.service.ICommonConfigService; +import org.jeecg.modules.commonMember.entity.CommonMember; +import org.jeecg.modules.commonMember.service.ICommonMemberService; +import org.jeecg.modules.commonMoney.entity.CommonMoney; +import org.jeecg.modules.commonMoney.service.ICommonMoneyService; import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; +import org.springframework.util.CommonsLogWriter; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; @@ -25,7 +37,9 @@ import org.springframework.web.multipart.commons.CommonsMultipartFile; import javax.annotation.Resource; import java.io.*; +import java.util.Date; import java.util.HashMap; +import java.util.List; import java.util.Map; @Slf4j @@ -36,7 +50,55 @@ public class AppletInfoServiceImpl implements AppletInfoService { private ShiroRealm shiroRealm; @Autowired private IHanHaiMemberService hanHaiMemberService; + @Autowired + private ICommonMoneyService commonMoneyService; + @Autowired + private ICommonConfigService commonConfigService; + @Value("${wechat-dm.mpAppId}") + private String appid; + @Value("${wechat-dm.mpAppSecret}") + private String secret; + @Value("${jeecg.oss.endpoint}") + private String endpoint; + @Value("${jeecg.oss.accessKey}") + private String accessKey; + @Value("${jeecg.oss.secretKey}") + private String secretKey; + @Value("${jeecg.oss.bucketName}") + private String bucketName; + + @Override + public Result getUserInfoVip(String token){ + HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + Map map = new HashMap(); + map.put("user_sum",1000); + map.put("z_sum",900); + map.put("j_sum",100); + map.put("pidInfo",hanHaiMember); + map.put("money",888); + map.put("sum_money",888); + map.put("get_money",99); + map.put("vip_time",new Date()); + return Result.OK(map); + } + + + @Override + public Result getUserInfoVipList(String token){ + Page page = new Page(1, 10); + IPage pageList = hanHaiMemberService.page(page); + return Result.OK(pageList); + } + + + + @Override + public Result getWalletList(String token, Integer state){ + Page page = new Page(1, 10); + IPage pageList = commonMoneyService.page(page); + return Result.OK(pageList); + } //获取个人资料信息 @Override @@ -61,189 +123,190 @@ public class AppletInfoServiceImpl implements AppletInfoService { //获取推广二维码 @Override public Result getQrCode(String token){ -// HanHaiMember member = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); -// -// CityConf vsion = cityConfService.lambdaQuery() -// .eq(CityConf::getKeyIcon, "v_sion") -// .one(); -// Integer vsionStr = Integer.parseInt(vsion.getKeyValue()); -// String trial = "release"; -// if(vsionStr == 0){ -// trial= "release"; -// }else if(vsionStr == 1){ -// trial= "trial"; -// }else{ -// trial= "develop"; -// } -// -//// WxQrCodeVo o = (WxQrCodeVo)redisUtil.get("CodeImage::" + trial+ member.getId()); -//// if(o!=null){ -//// -//// -//// o.setName("瑶都万能墙欢迎您的加入"); -//// return Result.OK(o); -//// } -// -// Map param = new HashMap<>(); -// -// CityConf xcxSharePage = cityConfService.lambdaQuery() -// .eq(CityConf::getKeyIcon, "xcxSharePage") -// .one(); -// -// -// -// -// -// String key = "shareId=" + member.getId(); -// -// param.put("path", xcxSharePage.getKeyValue() + "?" + key); //跳转页面 -// String accessToken = this.getAccessToken(); -// RestTemplate rest = new RestTemplate(); -// InputStream inputStream = null; -// OutputStream outputStream = null; -// File file = null; -// -//// LambdaQueryWrapper configImg = new LambdaQueryWrapper<>(); -//// configImg.eq(DbConf::getIsDel,0).eq(DbConf::getKeyValue,"codeImg"); -//// DbConf oneImg = confService.getOne(configImg); -// -// CityConf oneImage = cityConfService.lambdaQuery() -// .eq(CityConf::getKeyIcon, "codeImg") -// .one(); -// -// -// -// -// String codeImg = oneImage.getKeyValue(); -// try{ -// String url = "https://api.weixin.qq.com/wxa/getwxacode?access_token=" + accessToken; -// param.put("scene", member.getId()); -// param.put("width", 150); -// param.put("auto_color", false); -// param.put("env_version", trial); -// Map line_color = new HashMap<>(); -// line_color.put("r", 0); -// line_color.put("g", 0); -// line_color.put("b", 0); -// param.put("line_color", line_color); -// MultiValueMap headers = new LinkedMultiValueMap<>(); -// org.springframework.http.HttpEntity requestEntity = new org.springframework.http.HttpEntity(JSON.toJSONString(param), headers); -// ResponseEntity entity = rest.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]); -// byte[] result = entity.getBody(); -// -// inputStream = new ByteArrayInputStream(result); -// String tempSave = codeImg; -// String filePath = tempSave; -// -// file = new File(filePath); -// if (!file.exists()) { -// file.createNewFile(); -// } -// outputStream = new FileOutputStream(file); -// int len = 0; -// byte[] buf = new byte[1024]; -// while ((len = inputStream.read(buf, 0, 1024)) != -1) { -// outputStream.write(buf, 0, len); -// } -// outputStream.flush(); -// /** -// * 将文件上传至阿里云 -// */ -// DiskFileItemFactory factory = new DiskFileItemFactory(16, null); -// FileItem item = factory.createItem("File", "text/plain", true, file.getName()); -// int bytesRead = 0; -// byte[] buffer = new byte[8192]; -// try { -// FileInputStream fis = new FileInputStream(file); -// OutputStream os = item.getOutputStream(); -// while ((bytesRead = fis.read(buffer, 0, 8192)) != -1) { -// os.write(buffer, 0, bytesRead); -// } -// os.close(); -// fis.close(); -// } catch (IOException e) { -// e.printStackTrace(); -// } -// MultipartFile mf = new CommonsMultipartFile(item); -// //返回图片下载地址 -// WxQrCodeVo wxCodeVo = new WxQrCodeVo(); -// wxCodeVo.setUrl(this.uploadAliYunOss(mf)); -// -// -// -// -// wxCodeVo.setName("瑶都万能墙欢迎您的加入"); -// -//// redisUtil.set("CodeImage::"+trial+member.getId(),wxCodeVo); -// return Result.OK(wxCodeVo); + HanHaiMember member = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + + CommonConfig vsion = commonConfigService.lambdaQuery() + .eq(CommonConfig::getKeyName, "v_sion") + .one(); + + Integer vsionStr = Integer.parseInt(vsion.getKeyContent()); + String trial = "release"; + if(vsionStr == 0){ + trial= "release"; + }else if(vsionStr == 1){ + trial= "trial"; + }else{ + trial= "develop"; + } + +// WxQrCodeVo o = (WxQrCodeVo)redisUtil.get("CodeImage::" + trial+ member.getId()); +// if(o!=null){ // -// } catch (Exception e) { -// e.printStackTrace(); -// } finally { // -// if (inputStream != null) { -// try { -// inputStream.close(); -// } catch (IOException e) { -// e.printStackTrace(); -// } -// } -// if (outputStream != null) { -// try { -// outputStream.close(); -// } catch (IOException e) { -// e.printStackTrace(); -// } -// } -// //删除文件 -// if (file.exists()) { -// file.delete(); -// } +// o.setName("瑶都万能墙欢迎您的加入"); +// return Result.OK(o); // } -// return null; + + Map param = new HashMap<>(); + + + CommonConfig xcxSharePage = commonConfigService.lambdaQuery() + .eq(CommonConfig::getKeyName, "xcxSharePage") + .one(); + + + + + + String key = "shareId=" + member.getId(); + + param.put("path", xcxSharePage.getKeyContent() + "?" + key); //跳转页面 + String accessToken = this.getAccessToken(); + RestTemplate rest = new RestTemplate(); + InputStream inputStream = null; + OutputStream outputStream = null; + File file = null; + +// LambdaQueryWrapper configImg = new LambdaQueryWrapper<>(); +// configImg.eq(DbConf::getIsDel,0).eq(DbConf::getKeyValue,"codeImg"); +// DbConf oneImg = confService.getOne(configImg); + + + CommonConfig oneImage = commonConfigService.lambdaQuery() + .eq(CommonConfig::getKeyName, "codeImg") + .one(); + + + + String codeImg = oneImage.getKeyValue(); + try{ + String url = "https://api.weixin.qq.com/wxa/getwxacode?access_token=" + accessToken; + param.put("scene", member.getId()); + param.put("width", 150); + param.put("auto_color", false); + param.put("env_version", trial); + Map line_color = new HashMap<>(); + line_color.put("r", 0); + line_color.put("g", 0); + line_color.put("b", 0); + param.put("line_color", line_color); + MultiValueMap headers = new LinkedMultiValueMap<>(); + org.springframework.http.HttpEntity requestEntity = new org.springframework.http.HttpEntity(JSON.toJSONString(param), headers); + ResponseEntity entity = rest.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]); + byte[] result = entity.getBody(); + + inputStream = new ByteArrayInputStream(result); + String tempSave = codeImg; + String filePath = tempSave; + + file = new File(filePath); + if (!file.exists()) { + file.createNewFile(); + } + outputStream = new FileOutputStream(file); + int len = 0; + byte[] buf = new byte[1024]; + while ((len = inputStream.read(buf, 0, 1024)) != -1) { + outputStream.write(buf, 0, len); + } + outputStream.flush(); + /** + * 将文件上传至阿里云 + */ + DiskFileItemFactory factory = new DiskFileItemFactory(16, null); + FileItem item = factory.createItem("File", "text/plain", true, file.getName()); + int bytesRead = 0; + byte[] buffer = new byte[8192]; + try { + FileInputStream fis = new FileInputStream(file); + OutputStream os = item.getOutputStream(); + while ((bytesRead = fis.read(buffer, 0, 8192)) != -1) { + os.write(buffer, 0, bytesRead); + } + os.close(); + fis.close(); + } catch (IOException e) { + e.printStackTrace(); + } + MultipartFile mf = new CommonsMultipartFile(item); + //返回图片下载地址 + WxQrCodeVo wxCodeVo = new WxQrCodeVo(); + wxCodeVo.setUrl(this.uploadAliYunOss(mf)); + + + + + wxCodeVo.setName("欢迎您的加入"); + +// redisUtil.set("CodeImage::"+trial+member.getId(),wxCodeVo); + return Result.OK(wxCodeVo); + + } catch (Exception e) { + e.printStackTrace(); + } finally { + + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (outputStream != null) { + try { + outputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + //删除文件 + if (file.exists()) { + file.delete(); + } + } return null; } -// /** -// * 获取令牌 -// * -// * @return -// */ -// private String getAccessToken() { -// String requestUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret; -// String doGet2 = HttpClientUtil.doGet2(requestUrl); -// Map map = JSON.parseObject(doGet2, new TypeReference>() { -// }); -// return map.get("access_token"); -// } -// /** -// * 上传文件至阿里云oss -// * -// * @return -// */ -// private String uploadAliYunOss(MultipartFile mf) throws Exception { -// String uploadFile = "WxCodeFile"; -// String fileName = new StringBuffer(mf.getOriginalFilename()).append(".jpg").toString();// 获取文件名 -// String dbpath = uploadFile + File.separator + fileName; -// if (dbpath.contains("\\")) { -// dbpath = dbpath.replace("\\", "/"); -// } -// String endpoint = this.endpoint; -// String accessKey = this.accessKey; -// String secretKey = this.secretKey; -// // 创建OSSClient实例。 -// OSS ossClient = new OSSClientBuilder().build(endpoint, accessKey, secretKey); -// // 上传Byte数组。 -// byte[] content = mf.getBytes(); -// String bucketName = this.bucketName; -// ossClient.putObject(bucketName, dbpath, new ByteArrayInputStream(content)); -// // 关闭OSSClient。 -// ossClient.shutdown(); -// return dbpath; -// } -// -// + /** + * 获取令牌 + * + * @return + */ + private String getAccessToken() { + String requestUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret; + String doGet2 = HttpClientUtil.doGet2(requestUrl); + Map map = JSON.parseObject(doGet2, new TypeReference>() { + }); + return map.get("access_token"); + } + /** + * 上传文件至阿里云oss + * + * @return + */ + private String uploadAliYunOss(MultipartFile mf) throws Exception { + String uploadFile = "WxCodeFile"; + String fileName = new StringBuffer(mf.getOriginalFilename()).append(".jpg").toString();// 获取文件名 + String dbpath = uploadFile + File.separator + fileName; + if (dbpath.contains("\\")) { + dbpath = dbpath.replace("\\", "/"); + } + String endpoint = this.endpoint; + String accessKey = this.accessKey; + String secretKey = this.secretKey; + // 创建OSSClient实例。 + OSS ossClient = new OSSClientBuilder().build(endpoint, accessKey, secretKey); + // 上传Byte数组。 + byte[] content = mf.getBytes(); + String bucketName = this.bucketName; + ossClient.putObject(bucketName, dbpath, new ByteArrayInputStream(content)); + // 关闭OSSClient。 + ossClient.shutdown(); + return dbpath; + } + + diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java index cd5b52d..4b400c9 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java @@ -221,6 +221,14 @@ public class AppletLoginServiceImpl implements AppletLoginService { } + //获取动态详情 + @Override + public Result getNewsById(String id){ + CommonNews byId = commonNewsService.getById(id); + return Result.OK("动态详情",byId); + } + + //获取首页banner @Override public Result getBanner(){ diff --git a/module-common/src/main/java/org/jeecg/api/wxUtils/HttpClientUtil.java b/module-common/src/main/java/org/jeecg/api/wxUtils/HttpClientUtil.java new file mode 100644 index 0000000..62721c4 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/api/wxUtils/HttpClientUtil.java @@ -0,0 +1,1120 @@ +package org.jeecg.api.wxUtils; + + +import com.alibaba.fastjson.JSON; +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.client.CookieStore; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.*; +import org.apache.http.client.utils.HttpClientUtils; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.conn.ssl.SSLConnectionSocketFactory; +import org.apache.http.conn.ssl.SSLContextBuilder; +import org.apache.http.conn.ssl.TrustStrategy; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.BasicCookieStore; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; + +import javax.net.ssl.SSLContext; +import java.io.IOException; +import java.net.URI; +import java.nio.charset.Charset; +import java.security.KeyManagementException; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 通过url获取数据 + * + * @author zc + * + */ +public class HttpClientUtil { + + /** + * 设置可访问https + * @return + */ + public static CloseableHttpClient createSSLClientDefault() { + try { + SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() { + //信任所有 + public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { + return true; + } + }).build(); + SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); + + return HttpClients.custom().setSSLSocketFactory(sslsf).build(); + } catch (KeyManagementException e) { + e.printStackTrace(); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } catch (KeyStoreException e) { + e.printStackTrace(); + } + return HttpClients.createDefault(); + } +/*************************************Get**********************************************/ + /** + * 一般查询用doget + * @param url + * @param param + * @param + * @return + */ + public static String doGet(String url, Map param) { + // 创建Httpclient对象 + CloseableHttpClient httpclient = createSSLClientDefault();//调用createSSLClientDefault + String resultString = ""; + CloseableHttpResponse response = null; + try { + + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + CookieStore cookieStore = new BasicCookieStore(); + httpclient = HttpClients.custom().setDefaultCookieStore(cookieStore).build(); + // 创建http GET请求 + HttpGet httpGet = new HttpGet(uri); + //设置请求头 +// if (parameter != null) { +// //签名 +// httpGet.addHeader("Sign",parameter.getSign()); +// //用户ID +// httpGet.addHeader("User_ID",parameter.getUserId()+""); +// //用户角色ID +// httpGet.addHeader("User_RID",parameter.getRId()); +// //用户单位ID +// httpGet.addHeader("Dept_ID",parameter.getDeptId()+""); +// //用户科室ID +// httpGet.addHeader("Unit_ID",parameter.getUnitid()+""); +// httpGet.addHeader("CacheKey",parameter.getCacheKey()); +// httpGet.addHeader("Org_id", parameter.getOrg_id() + ""); +// httpGet.addHeader("Product_id", parameter.getProduct_id() + ""); +// httpGet.addHeader("Timestamp", parameter.getTimestamp()); +// } + + // 执行请求 + response = httpclient.execute(httpGet); + // 判断返回状态是否为200 + if (response.getStatusLine().getStatusCode() == 200) { + resultString = EntityUtils.toString(response.getEntity(), + "UTF-8"); + } + + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (response != null) { + response.close(); + } + httpclient.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return resultString; + } + + public static String doGet(String url) { + return doGet(url, null); + } + + public static String doGet3(String url, Map param) { + // 创建Httpclient对象 + //调用createSSLClientDefault + CloseableHttpClient httpclient = createSSLClientDefault(); + String resultString = ""; + CloseableHttpResponse response = null; + try { + + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + + // 创建http GET请求 + HttpGet httpGet = new HttpGet(uri); + //设置请求头 +// if (parameter != null) { +// //签名 +// httpGet.addHeader("Sign",parameter.getSign()); +// //用户ID +// httpGet.addHeader("User_ID",parameter.getUserId()+""); +// //用户角色ID +// httpGet.addHeader("User_RID",parameter.getRId()); +// //用户单位ID +// httpGet.addHeader("Dept_ID",parameter.getDeptId()+""); +// //用户科室ID +// httpGet.addHeader("Unit_ID",parameter.getUnitid()+""); +// httpGet.addHeader("CacheKey",parameter.getCacheKey()); +// httpGet.addHeader("Org_id", parameter.getOrg_id() + ""); +// httpGet.addHeader("Product_id", parameter.getProduct_id() + ""); +// httpGet.addHeader("Timestamp", parameter.getTimestamp()); +// } + + // 执行请求 + response = httpclient.execute(httpGet); + // 判断返回状态是否为200 + if (response.getStatusLine().getStatusCode() == 200) { + resultString = EntityUtils.toString(response.getEntity(), + "UTF-8"); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (response != null) { + response.close(); + } + httpclient.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return resultString; + } + + /** + * 上传文件的doGet + * @param url + * @param param + * @param + * @return + */ + public static String doGet2(String url, Map param) { + + // 创建Httpclient对象 + CloseableHttpClient httpclient = createSSLClientDefault(); + String resultString = ""; + CloseableHttpResponse response = null; + try { + + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + // 创建http GET请求 + HttpGet httpGet = new HttpGet(uri); +// if (parameter != null) { +// //用户ID +// httpGet.addHeader("User_ID",parameter.getUserId()+""); +// //用户角色ID +// httpGet.addHeader("User_RID",parameter.getRId()); +// //用户单位ID +// httpGet.addHeader("Dept_ID",parameter.getDeptId()+""); +// //用户科室ID +// httpGet.addHeader("Unit_ID",parameter.getUnitid()+""); +// httpGet.addHeader("CacheKey",parameter.getCacheKey()); +// httpGet.addHeader("Org_id", parameter.getOrg_id()); +// httpGet.addHeader("Product_id", parameter.getProduct_id()); +// httpGet.addHeader("Sign", parameter.getSign()); +// httpGet.addHeader("requestCode", parameter.getRequestCode()); +// httpGet.addHeader("Content-Type", "application/json;charset=UTF-8"); +// httpGet.addHeader("Timestamp", parameter.getTimestamp()); +// } + // 执行请求 + response = httpclient.execute(httpGet); + if (response.getStatusLine().getStatusCode() == 200) { + resultString = EntityUtils.toString(response.getEntity(), + "UTF-8"); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (response != null) { + response.close(); + } + httpclient.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return resultString; + } + + public static String doGet2(String url) { + return doGet2(url, null); + + } + + public static String doGet4(String url, Map param) { + // 创建Httpclient对象 + //调用createSSLClientDefault + CloseableHttpClient httpclient = createSSLClientDefault(); + String resultString = ""; + CloseableHttpResponse response = null; + try { + + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + + // 创建http GET请求 + HttpGet httpGet = new HttpGet(uri); + //设置请求头 +// httpGet.addHeader(""); +// if (parameter != null) { +// //签名 +// httpGet.addHeader("Sign",parameter.getSign()); +// //用户ID +// httpGet.addHeader("User_ID",parameter.getUserId()+""); +// //用户角色ID +// httpGet.addHeader("User_RID",parameter.getRId()); +// //用户单位ID +// httpGet.addHeader("Dept_ID",parameter.getDeptId()+""); +// //用户科室ID +// httpGet.addHeader("Unit_ID",parameter.getUnitid()+""); +// httpGet.addHeader("CacheKey",parameter.getCacheKey()); +// httpGet.addHeader("Org_id", parameter.getOrg_id() + ""); +// httpGet.addHeader("Product_id", parameter.getProduct_id() + ""); +// httpGet.addHeader("Timestamp", parameter.getTimestamp()); +// } + + // 执行请求 + response = httpclient.execute(httpGet); + // 判断返回状态是否为200 + if (response.getStatusLine().getStatusCode() == 200) { + resultString = EntityUtils.toString(response.getEntity(), + "UTF-8"); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (response != null) { + response.close(); + } + httpclient.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return resultString; + } + + public static String doGet5(String url, Map param) { + // 创建Httpclient对象 + //调用createSSLClientDefault + CloseableHttpClient httpclient = createSSLClientDefault(); + String resultString = ""; + CloseableHttpResponse response = null; + try { + + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + + // 创建http GET请求 + HttpGet httpGet = new HttpGet(uri); + //设置请求头 +// httpGet.addHeader(""); +// if (parameter != null) { +// httpGet.addHeader("Accept","application/json, text/javascript, */*; q=0.01"); +// httpGet.addHeader("Accept-Encoding","gzip, deflate, br"); +// httpGet.addHeader("Accept-Language","zh-CN,zh;q=0.9"); +// httpGet.addHeader("Connection","keep-alive"); + httpGet.addHeader("Cookie","PHPSESSID=b1epvn4gilmvlqd63gb71sgb4m"); +// httpGet.addHeader("Host","www.5577yc.com"); +// httpGet.addHeader("Referer","https://www.5577yc.com/pc/member/index.html"); +// httpGet.addHeader("Sec-Fetch-Mode","cors"); +// httpGet.addHeader("Sec-Fetch-Site","same-origin"); +// httpGet.addHeader("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"); + httpGet.addHeader("X-Requested-With","XMLHttpRequest"); +// httpGet.addHeader("Org_id", parameter.getOrg_id() + ""); +// httpGet.addHeader("Product_id", parameter.getProduct_id() + ""); +// httpGet.addHeader("Timestamp", parameter.getTimestamp()); +// } + + // 执行请求 + response = httpclient.execute(httpGet); + // 判断返回状态是否为200 + if (response.getStatusLine().getStatusCode() == 200) { + resultString = EntityUtils.toString(response.getEntity(), + "UTF-8"); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + if (response != null) { + response.close(); + } + httpclient.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return resultString; + } + + public static String doGet5(String url) { + return doGet5(url, null); + + } + /*************************************Get**********************************************/ + + /*************************************Post**********************************************/ + /** + * 原始doPost 基本不用 + * @param url + * @param param + * @param + * @return + */ + public static String doPost(String url, Map param) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + + try { + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(url); + + // 创建参数列表 + if (param != null) { + List paramList = new ArrayList<>(); + for (String key : param.keySet()) { + paramList.add(new BasicNameValuePair(key, param.get(key))); + } + // 模拟表单 + UrlEncodedFormEntity entity = new UrlEncodedFormEntity( + paramList); + httpPost.setEntity(entity); + } + // 执行http请求 + response = httpClient.execute(httpPost); + + + + + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + return resultString; + } + + /** + * 项目经常用的doPost2 + * @param url + * @param param + * @param + * @return + */ + public static String doPost2(String url, Map param){ + + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + + try { + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(uri); + httpPost.setHeader("Content-type", "application/x-www-form-urlencoded"); +// httpPost.setHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"); + // 创建参数列表 + if (param != null) { + List paramList = new ArrayList<>(); + for (String key : param.keySet()) { + paramList.add(new BasicNameValuePair(key, param.get(key))); + } + + // 模拟表单 + UrlEncodedFormEntity entity = new UrlEncodedFormEntity( + paramList,"UTF-8"); + entity.setContentEncoding("UTF-8"); + entity.setContentType("application/x-www-form-urlencoded"); + httpPost.setEntity(entity); + + } + // 执行http请求 + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + return resultString; + } + + /** + * .net登录post + * @param url + * @param param + * @param + * @return + */ + public static String doPost3(String url, Map param){ + + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + + try { + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(uri); + // 创建参数列表 + if (param != null) { + List paramList = new ArrayList<>(); + for (String key : param.keySet()) { + paramList.add(new BasicNameValuePair(key, param.get(key))); + } + // 模拟表单 + UrlEncodedFormEntity entity = new UrlEncodedFormEntity( + paramList, Charset.forName("UTF-8")); + entity.setContentEncoding("UTF-8"); + httpPost.setEntity(entity); + } + // 执行http请求 + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + return resultString; + } + + + + /** + * 微信文件上传 + * @param url + * @param content + * @param fileName + * @return + */ + public static String doPost6(String url, byte[] content,String fileName){ + + String resultString = null; + //创建HttpClient + CloseableHttpClient httpClient = HttpClients.createDefault(); + HttpPost httpPost = new HttpPost(url); + org.apache.http.entity.mime.MultipartEntityBuilder builder = org.apache.http.entity.mime.MultipartEntityBuilder.create(); + /*绑定文件参数,传入文件流和contenttype,此处也可以继续添加其他formdata参数*/ + builder.addBinaryBody("file",content, ContentType.MULTIPART_FORM_DATA,fileName); + HttpEntity entity = builder.build(); + httpPost.setEntity(entity); + HttpResponse response = null; + //执行提交 + try{ + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + HttpClientUtils.closeQuietly(httpClient); + HttpClientUtils.closeQuietly(response); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + return resultString; + } + + + /** + * 微信公众号文件上传 + * @param url + * @param content + * @param fileName + * @return + */ + public static String doPost7(String url, byte[] content,String fileName){ + + String resultString = null; + //创建HttpClient + CloseableHttpClient httpClient = HttpClients.createDefault(); + HttpPost httpPost = new HttpPost(url); + org.apache.http.entity.mime.MultipartEntityBuilder builder = org.apache.http.entity.mime.MultipartEntityBuilder.create(); + /*绑定文件参数,传入文件流和contenttype,此处也可以继续添加其他formdata参数*/ + builder.addBinaryBody("media",content, ContentType.MULTIPART_FORM_DATA,fileName); + HttpEntity entity = builder.build(); + httpPost.setEntity(entity); + HttpResponse response = null; + //执行提交 + try{ + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + HttpClientUtils.closeQuietly(httpClient); + HttpClientUtils.closeQuietly(response); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + return resultString; + } + + /** + * 项目经常用的doPost4 + * @param url + * @param param + * @return + */ + public static String doPost4(String url, Map param){ + + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + StringBuffer cookie = new StringBuffer(); + Map map = new HashMap<>(); + try { + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(uri); + // 创建参数列表 + if (param != null) { + List paramList = new ArrayList<>(); + for (String key : param.keySet()) { + paramList.add(new BasicNameValuePair(key, param.get(key))); + } + httpPost.addHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"); + // 模拟表单 + UrlEncodedFormEntity entity = new UrlEncodedFormEntity( + paramList, Charset.forName("UTF-8")); + httpPost.setEntity(entity); + } + // 执行http请求 + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + return resultString; + } + + + /** + * 项目经常用的doPost4 + * @param url + * @param param + * @param parameter + * @return + */ + public static String doPost5(String url, Map param,String parameter){ + + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + StringBuffer cookie = new StringBuffer(); + Map map = new HashMap<>(); + try { + // 创建uri + CookieStore cookieStore = new BasicCookieStore(); + httpClient = HttpClients.custom().setDefaultCookieStore(cookieStore).build(); + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(uri); + // 创建参数列表 + if (param != null) { + List paramList = new ArrayList<>(); + for (String key : param.keySet()) { + paramList.add(new BasicNameValuePair(key, param.get(key))); + } + httpPost.addHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"); + httpPost.addHeader("Host","www.www7945.com"); + httpPost.addHeader("Origin","https://www.www7945.com"); + httpPost.addHeader("Referer","https://www.www7945.com/mobile/"); + httpPost.addHeader("User-Agent:","Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"); + httpPost.addHeader("Connection","keep-alive"); + // 模拟表单 + UrlEncodedFormEntity entity = new UrlEncodedFormEntity( + paramList, Charset.forName("UTF-8")); + entity.setContentEncoding("UTF-8"); + httpPost.setEntity(entity); + } + if(parameter!=null){ + httpPost.addHeader("Cookie",parameter); + } + // 执行http请求 + response = httpClient.execute(httpPost); + String tokenStr = null; + + if (response != null) { + int statusCode = response.getStatusLine().getStatusCode(); + if (statusCode == HttpStatus.SC_OK) { + // 获得Cookies + List cookies = cookieStore.getCookies(); + for (org.apache.http.cookie.Cookie c : cookies) { + cookie.append(c.getName()).append("=").append(c.getValue()).append(";"); + if (c.getName().contains("token")) { + tokenStr = c.getValue(); + } + } + } + } + map.put("token",tokenStr); + map.put("cookie",cookie.toString()); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + map.put("resultString",JSON.parse(resultString)); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + if(parameter!=null){ + return resultString; + } + return JSON.toJSONString(map); + } + + + + public static String doPost5(String url) { + return doPost5(url, null,null); + } + + public static String doPost4(String url) { + return doPost4(url, null); + } + + public static String doPost2(String url) { + return doPost2(url); + } + + + public static String doPost(String url) { + return doPost(url, null); + } + + /** + * 当数据需要以JSON格式传输 + * @param url + * @param json + * @param + * @return + */ + public static String doPostJson(String url, String json) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + try { + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(url); + // 创建请求内容 + StringEntity entity = new StringEntity(json, + ContentType.APPLICATION_JSON); + httpPost.setEntity(entity); + // 执行http请求 + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + return resultString; + } + + + public static String doPostJson3(String url, String json) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + try { + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(url); + // 创建请求内容 + StringEntity entity = new StringEntity(json, + ContentType.APPLICATION_FORM_URLENCODED); + httpPost.setEntity(entity); + // 执行http请求 + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + return resultString; + } + + /** + * 文件上传 + * @param url + * @param json + * @param + * @return + */ + public static String doPostJson2(String url, String json) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + try { + // 创建Http Post请求 + HttpPost httpPost = new HttpPost(url); + // 创建请求内容 + StringEntity entity = new StringEntity(json, + ContentType.APPLICATION_JSON); + httpPost.setEntity(entity); + // 执行http请求 + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + return resultString; + } + + /*************************************Post**********************************************/ + + + + + + + + + /*************************************Delete**********************************************/ + /** + * 原始删除 基本不怎么用 + * @param url + * @return + */ + public static String doDelete(String url) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + + try { + // 创建Http Post请求 + HttpDelete httpPost = new HttpDelete(url); + // 执行http请求 + response = httpClient.execute(httpPost); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return resultString; + } + + /** + * 常用删除 + * @param url + * @param param + * @param + * @return + */ + public static String doDelete2(String url,Map param) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + + try { + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + // 创建Http Delete请求 + HttpDelete httpDelete = new HttpDelete(uri); + // 执行http请求 + response = httpClient.execute(httpDelete); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return resultString; + } + + /** + * 上传文件删除 + * @param url + * @param param + * @param + * @return + */ + public static String doDelete3(String url,Map param) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + + try { + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + // 创建Http Delete请求 + HttpDelete httpDelete = new HttpDelete(uri); + // 执行http请求 + response = httpClient.execute(httpDelete); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return resultString; + } + + /*************************************Delete**********************************************/ + + + + + + + + + + /*************************************Put**********************************************/ + public static String doPut(String url) { + return doPut(url, null); + } + + /** + * 修改 + * @param url + * @param param + * @param + * @return + */ + public static String doPut(String url, Map param) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + + try { + // 创建uri + URIBuilder builder = new URIBuilder(url); + if (param != null) { + for (String key : param.keySet()) { + builder.addParameter(key, param.get(key)); + } + } + URI uri = builder.build(); + // 创建Http Put请求 + HttpPut httpPut = new HttpPut(uri); + // 创建参数列表 + if (param != null) { + List paramList = new ArrayList<>(); + for (String key : param.keySet()) { + paramList.add(new BasicNameValuePair(key, param.get(key))); + } + // 模拟表单 + UrlEncodedFormEntity entity = new UrlEncodedFormEntity( + paramList, Charset.forName("UTF-8"));//Charset.forName("UTF-8")解决乱码 + entity.setContentEncoding("UTF-8"); + httpPut.setEntity(entity); + } + // 执行http请求 + response = httpClient.execute(httpPut); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + return resultString; + } + + /** + * 以JSON格式修改 + * @param url + * @param json + * @param parameter + * @return + */ + public static String doPutJson(String url, String json) { + // 创建Httpclient对象 + CloseableHttpClient httpClient = createSSLClientDefault(); + CloseableHttpResponse response = null; + String resultString = ""; + try { + // 创建Http Post请求 + HttpPut httpPut = new HttpPut(url); + // 创建请求内容 + StringEntity entity = new StringEntity(json, + ContentType.APPLICATION_JSON); + httpPut.setEntity(entity); + // 执行http请求 + response = httpClient.execute(httpPut); + resultString = EntityUtils.toString(response.getEntity(), "utf-8"); + } catch (Exception e) { + e.printStackTrace(); + } finally { + try { + response.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + return resultString; + } + + + +} + diff --git a/module-common/src/main/java/org/jeecg/api/wxUtils/WxQrCodeVo.java b/module-common/src/main/java/org/jeecg/api/wxUtils/WxQrCodeVo.java new file mode 100644 index 0000000..48f37b3 --- /dev/null +++ b/module-common/src/main/java/org/jeecg/api/wxUtils/WxQrCodeVo.java @@ -0,0 +1,18 @@ +package org.jeecg.api.wxUtils; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class WxQrCodeVo { + /**图片地址*/ + @ApiModelProperty(value = "图片地址") + private String url; + + @ApiModelProperty(value = "二维码名称") + private String name; + + @ApiModelProperty(value = "二维码背景图") + private String bjImage; + +} diff --git a/module-common/src/main/java/org/jeecg/modules/commonConfig/controller/CommonConfigController.java b/module-common/src/main/java/org/jeecg/modules/commonConfig/controller/CommonConfigController.java index 60ca8bd..c122adc 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonConfig/controller/CommonConfigController.java +++ b/module-common/src/main/java/org/jeecg/modules/commonConfig/controller/CommonConfigController.java @@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: 公共配置表 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ @Api(tags="公共配置表") diff --git a/module-common/src/main/java/org/jeecg/modules/commonConfig/entity/CommonConfig.java b/module-common/src/main/java/org/jeecg/modules/commonConfig/entity/CommonConfig.java index d95ed24..c82222b 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonConfig/entity/CommonConfig.java +++ b/module-common/src/main/java/org/jeecg/modules/commonConfig/entity/CommonConfig.java @@ -20,7 +20,7 @@ import lombok.experimental.Accessors; /** * @Description: 公共配置表 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ @Data diff --git a/module-common/src/main/java/org/jeecg/modules/commonConfig/mapper/CommonConfigMapper.java b/module-common/src/main/java/org/jeecg/modules/commonConfig/mapper/CommonConfigMapper.java index 17b8a8b..ca6c8ae 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonConfig/mapper/CommonConfigMapper.java +++ b/module-common/src/main/java/org/jeecg/modules/commonConfig/mapper/CommonConfigMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 公共配置表 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ public interface CommonConfigMapper extends BaseMapper { diff --git a/module-common/src/main/java/org/jeecg/modules/commonConfig/service/ICommonConfigService.java b/module-common/src/main/java/org/jeecg/modules/commonConfig/service/ICommonConfigService.java index 4fd40f8..4db2af1 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonConfig/service/ICommonConfigService.java +++ b/module-common/src/main/java/org/jeecg/modules/commonConfig/service/ICommonConfigService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description: 公共配置表 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ public interface ICommonConfigService extends IService { diff --git a/module-common/src/main/java/org/jeecg/modules/commonConfig/service/impl/CommonConfigServiceImpl.java b/module-common/src/main/java/org/jeecg/modules/commonConfig/service/impl/CommonConfigServiceImpl.java index 30a2232..d17a6bd 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonConfig/service/impl/CommonConfigServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/modules/commonConfig/service/impl/CommonConfigServiceImpl.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** * @Description: 公共配置表 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ @Service diff --git a/module-common/src/main/java/org/jeecg/modules/commonMoney/controller/CommonMoneyController.java b/module-common/src/main/java/org/jeecg/modules/commonMoney/controller/CommonMoneyController.java index 4a8f351..cb494a1 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonMoney/controller/CommonMoneyController.java +++ b/module-common/src/main/java/org/jeecg/modules/commonMoney/controller/CommonMoneyController.java @@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: 提现流水 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ @Api(tags="提现流水") diff --git a/module-common/src/main/java/org/jeecg/modules/commonMoney/entity/CommonMoney.java b/module-common/src/main/java/org/jeecg/modules/commonMoney/entity/CommonMoney.java index 5c225d6..531e1fd 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonMoney/entity/CommonMoney.java +++ b/module-common/src/main/java/org/jeecg/modules/commonMoney/entity/CommonMoney.java @@ -20,7 +20,7 @@ import lombok.experimental.Accessors; /** * @Description: 提现流水 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ @Data @@ -63,4 +63,8 @@ public class CommonMoney implements Serializable { @Excel(name = "当前余额", width = 15) @ApiModelProperty(value = "当前余额") private java.math.BigDecimal money; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; } diff --git a/module-common/src/main/java/org/jeecg/modules/commonMoney/mapper/CommonMoneyMapper.java b/module-common/src/main/java/org/jeecg/modules/commonMoney/mapper/CommonMoneyMapper.java index 5e0d807..6aee601 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonMoney/mapper/CommonMoneyMapper.java +++ b/module-common/src/main/java/org/jeecg/modules/commonMoney/mapper/CommonMoneyMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 提现流水 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ public interface CommonMoneyMapper extends BaseMapper { diff --git a/module-common/src/main/java/org/jeecg/modules/commonMoney/service/ICommonMoneyService.java b/module-common/src/main/java/org/jeecg/modules/commonMoney/service/ICommonMoneyService.java index fb3d850..78b0772 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonMoney/service/ICommonMoneyService.java +++ b/module-common/src/main/java/org/jeecg/modules/commonMoney/service/ICommonMoneyService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description: 提现流水 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ public interface ICommonMoneyService extends IService { diff --git a/module-common/src/main/java/org/jeecg/modules/commonMoney/service/impl/CommonMoneyServiceImpl.java b/module-common/src/main/java/org/jeecg/modules/commonMoney/service/impl/CommonMoneyServiceImpl.java index 6e97bdf..0b02816 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonMoney/service/impl/CommonMoneyServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/modules/commonMoney/service/impl/CommonMoneyServiceImpl.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** * @Description: 提现流水 * @Author: jeecg-boot - * @Date: 2025-03-22 + * @Date: 2025-03-27 * @Version: V1.0 */ @Service diff --git a/module-common/src/main/java/org/jeecg/modules/commonMoney/vue/CommonMoneyList.vue b/module-common/src/main/java/org/jeecg/modules/commonMoney/vue/CommonMoneyList.vue index 21fee68..c215e4d 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonMoney/vue/CommonMoneyList.vue +++ b/module-common/src/main/java/org/jeecg/modules/commonMoney/vue/CommonMoneyList.vue @@ -141,6 +141,11 @@ align:"center", dataIndex: 'money' }, + { + title:'标题', + align:"center", + dataIndex: 'title' + }, { title: '操作', dataIndex: 'action', @@ -179,6 +184,7 @@ fieldList.push({type:'string',value:'status',text:'提现状态',dictCode:''}) fieldList.push({type:'BigDecimal',value:'price',text:'提现金额',dictCode:''}) fieldList.push({type:'BigDecimal',value:'money',text:'当前余额',dictCode:''}) + fieldList.push({type:'string',value:'title',text:'标题',dictCode:''}) this.superFieldList = fieldList } } diff --git a/module-common/src/main/java/org/jeecg/modules/commonMoney/vue/modules/CommonMoneyForm.vue b/module-common/src/main/java/org/jeecg/modules/commonMoney/vue/modules/CommonMoneyForm.vue index 897eb1a..d894483 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonMoney/vue/modules/CommonMoneyForm.vue +++ b/module-common/src/main/java/org/jeecg/modules/commonMoney/vue/modules/CommonMoneyForm.vue @@ -23,6 +23,11 @@ + + + + + diff --git a/module-common/src/main/java/org/jeecg/modules/commonMoney/vue3/CommonMoney.data.ts b/module-common/src/main/java/org/jeecg/modules/commonMoney/vue3/CommonMoney.data.ts index cb9bb90..8fa52d4 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonMoney/vue3/CommonMoney.data.ts +++ b/module-common/src/main/java/org/jeecg/modules/commonMoney/vue3/CommonMoney.data.ts @@ -24,6 +24,11 @@ export const columns: BasicColumn[] = [ align:"center", dataIndex: 'money' }, + { + title: '标题', + align:"center", + dataIndex: 'title' + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ @@ -50,4 +55,9 @@ export const formSchema: FormSchema[] = [ field: 'money', component: 'InputNumber', }, + { + label: '标题', + field: 'title', + component: 'Input', + }, ]; diff --git a/module-common/src/main/java/org/jeecg/modules/commonVio/entity/CommonVio.java b/module-common/src/main/java/org/jeecg/modules/commonVio/entity/CommonVio.java index 6a46125..5fa53dd 100644 --- a/module-common/src/main/java/org/jeecg/modules/commonVio/entity/CommonVio.java +++ b/module-common/src/main/java/org/jeecg/modules/commonVio/entity/CommonVio.java @@ -89,4 +89,9 @@ public class CommonVio implements Serializable { @Excel(name = "视频", width = 15) @ApiModelProperty(value = "视频") private java.lang.String vio; + + /**广告弹出时间*/ + @Excel(name = "广告弹出时间", width = 15) + @ApiModelProperty(value = "广告弹出时间") + private java.lang.Integer timeNum; } diff --git a/module-system/pom.xml b/module-system/pom.xml index 2172fff..2d8a2cf 100644 --- a/module-system/pom.xml +++ b/module-system/pom.xml @@ -45,7 +45,17 @@ jimureport-spring-boot-starter 1.5.0-beta - + + commons-fileupload + commons-fileupload + 1.4 + + + commons-io + commons-io + + + org.apache.httpcomponents