Browse Source

修复提交

master
主管理员 3 months ago
parent
commit
9e9a30ca56
81 changed files with 2587 additions and 154 deletions
  1. +2
    -0
      .idea/answer-api.iml
  2. +8
    -3
      .idea/compiler.xml
  3. +2
    -4
      .idea/encodings.xml
  4. +6
    -0
      .idea/inspectionProfiles/Project_Default.xml
  5. +7
    -7
      admin-pc/.env.development
  6. +3
    -3
      admin-pc/.env.production
  7. +0
    -4
      applet-answer-api/pom.xml
  8. +7
    -0
      applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletIndexController.java
  9. +20
    -5
      applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletPostController.java
  10. +11
    -0
      applet-answer-api/src/main/java/org/jeecg/api/service/AnswerAppletIndexService.java
  11. +45
    -1
      applet-answer-api/src/main/java/org/jeecg/api/service/impl/AnswerAppletIndexServiceImpl.java
  12. +1
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/controller/AnswerIntroduceController.java
  13. +1
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/entity/AnswerIntroduce.java
  14. +1
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/mapper/AnswerIntroduceMapper.java
  15. +1
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/service/IAnswerIntroduceService.java
  16. +1
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/service/impl/AnswerIntroduceServiceImpl.java
  17. +2
    -6
      applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/vue/AnswerIntroduceList.vue
  18. +2
    -2
      applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/vue/modules/AnswerIntroduceForm.vue
  19. +6
    -8
      applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/vue3/AnswerIntroduce.data.ts
  20. +1
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/controller/AnswerTopiLogController.java
  21. +13
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/entity/AnswerTopiLog.java
  22. +1
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/mapper/AnswerTopiLogMapper.java
  23. +1
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/service/IAnswerTopiLogService.java
  24. +1
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/service/impl/AnswerTopiLogServiceImpl.java
  25. +18
    -0
      applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/AnswerTopiLogList.vue
  26. +15
    -0
      applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/modules/AnswerTopiLogForm.vue
  27. +31
    -1
      applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/AnswerTopiLog.data.ts
  28. +56
    -0
      applet-home-api/pom.xml
  29. +27
    -0
      applet-home-api/src/main/java/org/jeecg/api/controller/AppletHomeIndexController.java
  30. +25
    -0
      applet-home-api/src/main/java/org/jeecg/api/controller/AppletHomeInfoController.java
  31. +28
    -0
      applet-home-api/src/main/java/org/jeecg/api/controller/AppletHomeLoginController.java
  32. +171
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/controller/AnswerTopiLogController.java
  33. +62
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/entity/AnswerTopiLog.java
  34. +17
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/mapper/AnswerTopiLogMapper.java
  35. +5
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/mapper/xml/AnswerTopiLogMapper.xml
  36. +14
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/service/IAnswerTopiLogService.java
  37. +19
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/service/impl/AnswerTopiLogServiceImpl.java
  38. +183
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/AnswerTopiLogList.vue
  39. +114
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/modules/AnswerTopiLogForm.vue
  40. +84
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/modules/AnswerTopiLogModal.Style#Drawer.vue
  41. +60
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/modules/AnswerTopiLogModal.vue
  42. +61
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/AnswerTopiLog.api.ts
  43. +43
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/AnswerTopiLog.data.ts
  44. +162
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/AnswerTopiLogList.vue
  45. +58
    -0
      applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/components/AnswerTopiLogModal.vue
  46. +171
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/controller/HomeBannerController.java
  47. +57
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/entity/HomeBanner.java
  48. +17
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/mapper/HomeBannerMapper.java
  49. +5
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/mapper/xml/HomeBannerMapper.xml
  50. +14
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/service/IHomeBannerService.java
  51. +19
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/service/impl/HomeBannerServiceImpl.java
  52. +172
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue/HomeBannerList.vue
  53. +104
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue/modules/HomeBannerForm.vue
  54. +84
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue/modules/HomeBannerModal.Style#Drawer.vue
  55. +60
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue/modules/HomeBannerModal.vue
  56. +61
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue3/HomeBanner.api.ts
  57. +26
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue3/HomeBanner.data.ts
  58. +162
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue3/HomeBannerList.vue
  59. +58
    -0
      applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue3/components/HomeBannerModal.vue
  60. +41
    -0
      applet-rice-api/pom.xml
  61. +3
    -0
      module-base/base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  62. +0
    -61
      module-base/base-core/src/main/java/org/jeecg/modules/bean/LoginReq.java
  63. +8
    -2
      module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java
  64. +50
    -0
      module-common/src/main/java/org/jeecg/api/controller/AppletMyInfoController.java
  65. +2
    -1
      module-common/src/main/java/org/jeecg/api/service/AppletLoginService.java
  66. +1
    -1
      module-common/src/main/java/org/jeecg/api/service/OfficialLoginService.java
  67. +5
    -5
      module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java
  68. +8
    -15
      module-common/src/main/java/org/jeecg/api/service/impl/OfficialLoginServiceImpl.java
  69. +1
    -1
      module-common/src/main/java/org/jeecg/api/untils/ConvertUtils.java
  70. +1
    -1
      module-common/src/main/java/org/jeecg/api/untils/HttpConf.java
  71. +16
    -0
      module-system/pom.xml
  72. +1
    -1
      module-system/src/main/java/org/jeecg/api/untils/bean/HttpRequestUtil.java
  73. +1
    -1
      module-system/src/main/java/org/jeecg/api/untils/bean/Sign.java
  74. +1
    -1
      module-system/src/main/java/org/jeecg/api/untils/bean/StatisBean.java
  75. +1
    -1
      module-system/src/main/java/org/jeecg/api/untils/bean/WXUnitl.java
  76. +1
    -1
      module-system/src/main/java/org/jeecg/api/untils/bean/WeiXinQRCode.java
  77. +1
    -1
      module-system/src/main/java/org/jeecg/api/untils/bean/WeiXinResult.java
  78. +1
    -3
      module-system/src/main/java/org/jeecg/api/untils/bean/WeiXinUnitl.java
  79. +1
    -1
      module-system/src/main/java/org/jeecg/api/untils/bean/WinXinEntity.java
  80. +35
    -3
      module-system/src/main/resources/application-dev.yml
  81. +2
    -0
      pom.xml

+ 2
- 0
.idea/answer-api.iml View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4" />

+ 8
- 3
.idea/compiler.xml View File

@ -2,17 +2,20 @@
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="module-system" />
<module name="applet-answer-api" />
<module name="applet-home-api" />
<module name="jeecg-system-cloud-api" />
<module name="module-pay" />
<module name="base-tools" />
<module name="base-core" />
<module name="module-common" />
<module name="applet-rice-api" />
<module name="jeecg-system-local-api" />
</profile>
</annotationProcessing>
@ -22,15 +25,17 @@
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="answer-api" options="-parameters" />
<module name="answer-api" options="" />
<module name="applet-answer-api" options="-parameters" />
<module name="base-api" options="-parameters" />
<module name="applet-home-api" options="-parameters" />
<module name="applet-rice-api" options="-parameters" />
<module name="base-api" options="" />
<module name="base-core" options="-parameters" />
<module name="base-tools" options="-parameters" />
<module name="jeecg-system-cloud-api" options="-parameters" />
<module name="jeecg-system-local-api" options="-parameters" />
<module name="module-applet-answer" options="-parameters" />
<module name="module-base" options="-parameters" />
<module name="module-base" options="" />
<module name="module-common" options="-parameters" />
<module name="module-pay" options="-parameters" />
<module name="module-system" options="-parameters" />


+ 2
- 4
.idea/encodings.xml View File

@ -2,16 +2,14 @@
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/applet-answer-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-applet-answer/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/applet-home-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/applet-rice-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-base/base-api/jeecg-system-cloud-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-base/base-api/jeecg-system-local-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-base/base-api/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-base/base-core/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-base/base-tools/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-base/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-pay/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/module-system/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
</component>
</project>

+ 6
- 0
.idea/inspectionProfiles/Project_Default.xml View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

+ 7
- 7
admin-pc/.env.development View File

@ -1,7 +1,7 @@
NODE_ENV=development
VUE_APP_API_BASE_URL=http://localhost:8080/answer-api/
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
# 微应用列表必须VUE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VUE_APP_SUB_jeecg-app-1 = '//localhost:8092'
NODE_ENV=development
VUE_APP_API_BASE_URL=http://localhost:8000/answer-api/
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
# 微应用列表必须VUE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VUE_APP_SUB_jeecg-app-1 = '//localhost:8092'

+ 3
- 3
admin-pc/.env.production View File

@ -1,4 +1,4 @@
NODE_ENV=production
VUE_APP_API_BASE_URL=http://localhost:8080/answer-api/
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
NODE_ENV=production
VUE_APP_API_BASE_URL=http://localhost:8000/answer-api/
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

+ 0
- 4
applet-answer-api/pom.xml View File

@ -47,10 +47,6 @@
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>base-core</artifactId>
</dependency>
<!-- lzx:公用工具类每个新模块必加 -->
<dependency>


+ 7
- 0
applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletIndexController.java View File

@ -34,6 +34,13 @@ public class AnswerAppletIndexController {
return answerAppletIndexService.articleList();
}
//获取品牌介绍
@ApiOperation(value="首页-品牌介绍接口", notes="首页-品牌介绍接口")
@GetMapping(value = "/getBrand")
public Result<?> getBrand(){
return answerAppletIndexService.getBrand();
}
@ApiOperation(value="首页-轮播图接口", notes="首页-轮播图接口")
@GetMapping(value = "/bannerList")
public Result<?> bannerList(){


+ 20
- 5
applet-answer-api/src/main/java/org/jeecg/api/controller/AnswerAppletPostController.java View File

@ -4,10 +4,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.api.service.AnswerAppletIndexService;
import org.jeecg.modules.answerReservation.entity.AnswerReservation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.jeecg.common.api.vo.Result;
import javax.annotation.Resource;
@ -21,9 +18,27 @@ public class AnswerAppletPostController {
@Resource
private AnswerAppletIndexService answerAppletIndexService;
//提交问答记录
@ApiOperation(value="提交问答记录", notes="提交问答记录")
@PostMapping(value = "/submitLog")
public Result<?> submitLog(@RequestHeader("X-Access-Token") String token,String topId,String context) {
return answerAppletIndexService.submitLog(token,topId,context);
}
//查询我的问答记录
@ApiOperation(value="查询我的问答记录", notes="查询我的问答记录")
@GetMapping(value = "/queryMyLog")
public Result<?> queryMyLog(@RequestHeader("X-Access-Token") String token) {
return answerAppletIndexService.queryMyLog(token);
}
//提交预约信息
@ApiOperation(value="提交预约信息", notes="提交预约信息")
@GetMapping(value = "/submit")
@PostMapping(value = "/submit")
public Result<?> submit(@RequestHeader("X-Access-Token") String token, AnswerReservation bean) {
return answerAppletIndexService.submit(token,bean);
}


+ 11
- 0
applet-answer-api/src/main/java/org/jeecg/api/service/AnswerAppletIndexService.java View File

@ -17,6 +17,17 @@ public interface AnswerAppletIndexService {
//首页-获取banner
Result<?> bannerList();
//获取品牌介绍
Result<?> getBrand();
//提交问答记录
Result<?> submitLog(String token,String topId,String context);
//查询我的问答记录
Result<?> queryMyLog(String token);
//提交预约信息
Result<?> submit(String token, AnswerReservation bean);


+ 45
- 1
applet-answer-api/src/main/java/org/jeecg/api/service/impl/AnswerAppletIndexServiceImpl.java View File

@ -7,9 +7,11 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.answerArticle.entity.AnswerArticle;
import org.jeecg.modules.answerArticle.service.IAnswerArticleService;
import org.jeecg.modules.answerIntroduce.entity.AnswerIntroduce;
import org.jeecg.modules.answerIntroduce.service.IAnswerIntroduceService;
import org.jeecg.modules.answerReservation.entity.AnswerReservation;
import org.jeecg.modules.answerReservation.service.IAnswerReservationService;
import org.jeecg.modules.answerTopiLog.entity.AnswerTopiLog;
import org.jeecg.modules.answerTopiLog.service.IAnswerTopiLogService;
import org.jeecg.modules.answerTopic.entity.AnswerTopic;
import org.jeecg.modules.answerTopic.service.IAnswerTopicService;
@ -21,6 +23,7 @@ import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Slf4j
@ -88,11 +91,52 @@ public class AnswerAppletIndexServiceImpl implements AnswerAppletIndexService {
return Result.OK(list);
}
//获取品牌介绍
@Override
public Result<?> getBrand(){
List<AnswerIntroduce> list = answerIntroduceService.list();
return Result.OK(list);
}
//提价问答记录
@Override
public Result<?> submitLog(String token,String topId,String context){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//查询用户已提交记录
AnswerTopiLog one = answerTopiLogService.lambdaQuery()
.eq(AnswerTopiLog::getUserId, hanHaiMember.getId())
.eq(AnswerTopiLog::getTopId, topId)
.one();
if(one!=null){
return Result.error("您已提交过该记录,请勿重复提交");
}
AnswerTopiLog answerTopiLog = new AnswerTopiLog();
answerTopiLog.setUserId(hanHaiMember.getId());
answerTopiLog.setTopId(topId);
answerTopiLog.setContext(context);
answerTopiLog.setCreateTime(new Date());
answerTopiLogService.save(answerTopiLog);
return Result.OK();
}
//查询我的问答记录
@Override
public Result<?> queryMyLog(String token){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
List<AnswerTopiLog> list = answerTopiLogService.lambdaQuery()
.eq(AnswerTopiLog::getUserId, hanHaiMember.getId())
.list();
return Result.OK(list);
}
//提交预约信息
@Override
public Result<?> submit(String token, AnswerReservation bean){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiAccount(token);
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//姓名不能为空
if(StringUtils.isBlank(bean.getName())){
return Result.error("请输入姓名");


+ 1
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/controller/AnswerIntroduceController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 品牌介绍
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
@Api(tags="品牌介绍")


+ 1
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/entity/AnswerIntroduce.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 品牌介绍
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
@Data


+ 1
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/mapper/AnswerIntroduceMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 品牌介绍
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
public interface AnswerIntroduceMapper extends BaseMapper<AnswerIntroduce> {


+ 1
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/service/IAnswerIntroduceService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 品牌介绍
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
public interface IAnswerIntroduceService extends IService<AnswerIntroduce> {


+ 1
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/service/impl/AnswerIntroduceServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 品牌介绍
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
@Service


+ 2
- 6
applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/vue/AnswerIntroduceList.vue View File

@ -126,11 +126,6 @@
align:"center",
dataIndex: 'title'
},
{
title:'介绍文章',
align:"center",
dataIndex: 'details'
},
{
title:'类型',
align:"center",
@ -139,7 +134,8 @@
{
title:'主图',
align:"center",
dataIndex: 'image'
dataIndex: 'image',
scopedSlots: {customRender: 'imgSlot'}
},
{
title: '操作',


+ 2
- 2
applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/vue/modules/AnswerIntroduceForm.vue View File

@ -10,7 +10,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="介绍文章" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="details">
<a-input v-model="model.details" placeholder="请输入介绍文章" ></a-input>
<j-editor v-model="model.details" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -20,7 +20,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="主图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image">
<a-input v-model="model.image" placeholder="请输入主图" ></a-input>
<j-image-upload isMultiple v-model="model.image" ></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>


+ 6
- 8
applet-answer-api/src/main/java/org/jeecg/modules/answerIntroduce/vue3/AnswerIntroduce.data.ts View File

@ -9,11 +9,6 @@ export const columns: BasicColumn[] = [
align:"center",
dataIndex: 'title'
},
{
title: '介绍文章',
align:"center",
dataIndex: 'details'
},
{
title: '类型',
align:"center",
@ -22,7 +17,8 @@ export const columns: BasicColumn[] = [
{
title: '主图',
align:"center",
dataIndex: 'image'
dataIndex: 'image',
customRender:render.renderAvatar,
},
];
//查询数据
@ -38,7 +34,7 @@ export const formSchema: FormSchema[] = [
{
label: '介绍文章',
field: 'details',
component: 'Input',
component: 'JCodeEditor', //TODO String后缀暂未添加
},
{
label: '类型',
@ -48,6 +44,8 @@ export const formSchema: FormSchema[] = [
{
label: '主图',
field: 'image',
component: 'Input',
component: 'JImageUpload',
componentProps:{
},
},
];

+ 1
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/controller/AnswerTopiLogController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
@Api(tags="问答记录")


+ 13
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/entity/AnswerTopiLog.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
@Data
@ -47,4 +47,16 @@ public class AnswerTopiLog implements Serializable {
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**用户*/
@Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户")
private java.lang.String userId;
/**问题?*/
@Excel(name = "问题?", width = 15)
@ApiModelProperty(value = "问题?")
private java.lang.String topId;
/**答案*/
@Excel(name = "答案", width = 15)
@ApiModelProperty(value = "答案")
private java.lang.String context;
}

+ 1
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/mapper/AnswerTopiLogMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
public interface AnswerTopiLogMapper extends BaseMapper<AnswerTopiLog> {


+ 1
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/service/IAnswerTopiLogService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
public interface IAnswerTopiLogService extends IService<AnswerTopiLog> {


+ 1
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/service/impl/AnswerTopiLogServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-19
* @Date: 2024-11-22
* @Version: V1.0
*/
@Service


+ 18
- 0
applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/AnswerTopiLogList.vue View File

@ -121,6 +121,21 @@
return parseInt(index)+1;
}
},
{
title:'用户',
align:"center",
dataIndex: 'userId'
},
{
title:'问题?',
align:"center",
dataIndex: 'topId'
},
{
title:'答案',
align:"center",
dataIndex: 'context'
},
{
title: '操作',
dataIndex: 'action',
@ -155,6 +170,9 @@
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'userId',text:'用户',dictCode:''})
fieldList.push({type:'string',value:'topId',text:'问题?',dictCode:''})
fieldList.push({type:'string',value:'context',text:'答案',dictCode:''})
this.superFieldList = fieldList
}
}


+ 15
- 0
applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/modules/AnswerTopiLogForm.vue View File

@ -3,6 +3,21 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="问题?" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="topId">
<a-input v-model="model.topId" placeholder="请输入问题?" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="答案" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="context">
<a-input v-model="model.context" placeholder="请输入答案" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>


+ 31
- 1
applet-answer-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/AnswerTopiLog.data.ts View File

@ -4,10 +4,40 @@ import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
];
{
title: '用户',
align:"center",
dataIndex: 'userId'
},
{
title: '问题?',
align:"center",
dataIndex: 'topId'
},
{
title: '答案',
align:"center",
dataIndex: 'context'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '用户',
field: 'userId',
component: 'Input',
},
{
label: '问题?',
field: 'topId',
component: 'Input',
},
{
label: '答案',
field: 'context',
component: 'Input',
},
];

+ 56
- 0
applet-home-api/pom.xml View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>answer-api</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>applet-home-api</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<repositories>
<repository>
<id>aliyun</id>
<name>aliyun Repository</name>
<url>https://maven.aliyun.com/repository/public</url>
</repository>
<repository>
<id>jeecg</id>
<name>jeecg Repository</name>
<url>https://maven.jeecg.org/nexus/content/repositories/jeecg</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.22</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<!-- lzx:公用工具类每个新模块必加 -->
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>base-core</artifactId>
</dependency>
</dependencies>
</project>

+ 27
- 0
applet-home-api/src/main/java/org/jeecg/api/controller/AppletHomeIndexController.java View File

@ -0,0 +1,27 @@
package org.jeecg.api.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.jeecg.common.api.vo.Result;
import javax.annotation.Resource;
@Api(tags="租房-登录接口")
@RestController
@RequestMapping("/home_index")
@Slf4j
public class AppletHomeIndexController {
@ApiOperation(value="首页-轮播图接口", notes="首页-轮播图接口")
@GetMapping(value = "/bannerList")
public Result<?> bannerList()
{
return null;
}
}

+ 25
- 0
applet-home-api/src/main/java/org/jeecg/api/controller/AppletHomeInfoController.java View File

@ -0,0 +1,25 @@
package org.jeecg.api.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.jeecg.common.api.vo.Result;
import javax.annotation.Resource;
@Api(tags="租房-我的接口")
@RestController
@RequestMapping("/home_info")
@Slf4j
public class AppletHomeInfoController {
}

+ 28
- 0
applet-home-api/src/main/java/org/jeecg/api/controller/AppletHomeLoginController.java View File

@ -0,0 +1,28 @@
package org.jeecg.api.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.jeecg.common.api.vo.Result;
import javax.annotation.Resource;
@Api(tags="租房-登录接口")
@RestController
@RequestMapping("/home_login")
@Slf4j
public class AppletHomeLoginController {
}

+ 171
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/controller/AnswerTopiLogController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.answerTopiLog.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.answerTopiLog.entity.AnswerTopiLog;
import org.jeecg.modules.answerTopiLog.service.IAnswerTopiLogService;
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.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
@Api(tags="问答记录")
@RestController
@RequestMapping("/answerTopiLog/answerTopiLog")
@Slf4j
public class AnswerTopiLogController extends JeecgController<AnswerTopiLog, IAnswerTopiLogService> {
@Autowired
private IAnswerTopiLogService answerTopiLogService;
/**
* 分页列表查询
*
* @param answerTopiLog
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "问答记录-分页列表查询")
@ApiOperation(value="问答记录-分页列表查询", notes="问答记录-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<AnswerTopiLog>> queryPageList(AnswerTopiLog answerTopiLog,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<AnswerTopiLog> queryWrapper = QueryGenerator.initQueryWrapper(answerTopiLog, req.getParameterMap());
Page<AnswerTopiLog> page = new Page<AnswerTopiLog>(pageNo, pageSize);
IPage<AnswerTopiLog> pageList = answerTopiLogService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param answerTopiLog
* @return
*/
@AutoLog(value = "问答记录-添加")
@ApiOperation(value="问答记录-添加", notes="问答记录-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody AnswerTopiLog answerTopiLog) {
answerTopiLogService.save(answerTopiLog);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param answerTopiLog
* @return
*/
@AutoLog(value = "问答记录-编辑")
@ApiOperation(value="问答记录-编辑", notes="问答记录-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody AnswerTopiLog answerTopiLog) {
answerTopiLogService.updateById(answerTopiLog);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "问答记录-通过id删除")
@ApiOperation(value="问答记录-通过id删除", notes="问答记录-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
answerTopiLogService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "问答记录-批量删除")
@ApiOperation(value="问答记录-批量删除", notes="问答记录-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.answerTopiLogService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "问答记录-通过id查询")
@ApiOperation(value="问答记录-通过id查询", notes="问答记录-通过id查询")
@GetMapping(value = "/queryById")
public Result<AnswerTopiLog> queryById(@RequestParam(name="id",required=true) String id) {
AnswerTopiLog answerTopiLog = answerTopiLogService.getById(id);
if(answerTopiLog==null) {
return Result.error("未找到对应数据");
}
return Result.OK(answerTopiLog);
}
/**
* 导出excel
*
* @param request
* @param answerTopiLog
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, AnswerTopiLog answerTopiLog) {
return super.exportXls(request, answerTopiLog, AnswerTopiLog.class, "问答记录");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, AnswerTopiLog.class);
}
}

+ 62
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/entity/AnswerTopiLog.java View File

@ -0,0 +1,62 @@
package org.jeecg.modules.answerTopiLog.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
@Data
@TableName("answer_topi_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="answer_topi_log对象", description="问答记录")
public class AnswerTopiLog implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**用户*/
@Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户")
private java.lang.String userId;
/**问题?*/
@Excel(name = "问题?", width = 15)
@ApiModelProperty(value = "问题?")
private java.lang.String topId;
/**答案*/
@Excel(name = "答案", width = 15)
@ApiModelProperty(value = "答案")
private java.lang.String context;
}

+ 17
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/mapper/AnswerTopiLogMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.answerTopiLog.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.answerTopiLog.entity.AnswerTopiLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
public interface AnswerTopiLogMapper extends BaseMapper<AnswerTopiLog> {
}

+ 5
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/mapper/xml/AnswerTopiLogMapper.xml View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.answerTopiLog.mapper.AnswerTopiLogMapper">
</mapper>

+ 14
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/service/IAnswerTopiLogService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.answerTopiLog.service;
import org.jeecg.modules.answerTopiLog.entity.AnswerTopiLog;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
public interface IAnswerTopiLogService extends IService<AnswerTopiLog> {
}

+ 19
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/service/impl/AnswerTopiLogServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.answerTopiLog.service.impl;
import org.jeecg.modules.answerTopiLog.entity.AnswerTopiLog;
import org.jeecg.modules.answerTopiLog.mapper.AnswerTopiLogMapper;
import org.jeecg.modules.answerTopiLog.service.IAnswerTopiLogService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 问答记录
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
@Service
public class AnswerTopiLogServiceImpl extends ServiceImpl<AnswerTopiLogMapper, AnswerTopiLog> implements IAnswerTopiLogService {
}

+ 183
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/AnswerTopiLogList.vue View File

@ -0,0 +1,183 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('问答记录')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<answer-topi-log-modal ref="modalForm" @ok="modalFormOk"></answer-topi-log-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import AnswerTopiLogModal from './modules/AnswerTopiLogModal'
export default {
name: 'AnswerTopiLogList',
mixins:[JeecgListMixin, mixinDevice],
components: {
AnswerTopiLogModal
},
data () {
return {
description: '问答记录管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户',
align:"center",
dataIndex: 'userId'
},
{
title:'问题?',
align:"center",
dataIndex: 'topId'
},
{
title:'答案',
align:"center",
dataIndex: 'context'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/answerTopiLog/answerTopiLog/list",
delete: "/answerTopiLog/answerTopiLog/delete",
deleteBatch: "/answerTopiLog/answerTopiLog/deleteBatch",
exportXlsUrl: "/answerTopiLog/answerTopiLog/exportXls",
importExcelUrl: "answerTopiLog/answerTopiLog/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'userId',text:'用户',dictCode:''})
fieldList.push({type:'string',value:'topId',text:'问题?',dictCode:''})
fieldList.push({type:'string',value:'context',text:'答案',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 114
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/modules/AnswerTopiLogForm.vue View File

@ -0,0 +1,114 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<a-input v-model="model.userId" placeholder="请输入用户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="问题?" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="topId">
<a-input v-model="model.topId" placeholder="请输入问题?" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="答案" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="context">
<a-input v-model="model.context" placeholder="请输入答案" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'AnswerTopiLogForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/answerTopiLog/answerTopiLog/add",
edit: "/answerTopiLog/answerTopiLog/edit",
queryById: "/answerTopiLog/answerTopiLog/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/modules/AnswerTopiLogModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<answer-topi-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></answer-topi-log-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import AnswerTopiLogForm from './AnswerTopiLogForm'
export default {
name: 'AnswerTopiLogModal',
components: {
AnswerTopiLogForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue/modules/AnswerTopiLogModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<answer-topi-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></answer-topi-log-form>
</j-modal>
</template>
<script>
import AnswerTopiLogForm from './AnswerTopiLogForm'
export default {
name: 'AnswerTopiLogModal',
components: {
AnswerTopiLogForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/AnswerTopiLog.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/answerTopiLog/answerTopiLog/list',
save='/answerTopiLog/answerTopiLog/add',
edit='/answerTopiLog/answerTopiLog/edit',
deleteOne = '/answerTopiLog/answerTopiLog/delete',
deleteBatch = '/answerTopiLog/answerTopiLog/deleteBatch',
importExcel = '/answerTopiLog/answerTopiLog/importExcel',
exportXls = '/answerTopiLog/answerTopiLog/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 43
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/AnswerTopiLog.data.ts View File

@ -0,0 +1,43 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '用户',
align:"center",
dataIndex: 'userId'
},
{
title: '问题?',
align:"center",
dataIndex: 'topId'
},
{
title: '答案',
align:"center",
dataIndex: 'context'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '用户',
field: 'userId',
component: 'Input',
},
{
label: '问题?',
field: 'topId',
component: 'Input',
},
{
label: '答案',
field: 'context',
component: 'Input',
},
];

+ 162
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/AnswerTopiLogList.vue View File

@ -0,0 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<AnswerTopiLogModal @register="registerModal" @success="handleSuccess"></AnswerTopiLogModal>
</div>
</template>
<script lang="ts" name="answerTopiLog-answerTopiLog" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import AnswerTopiLogModal from './components/AnswerTopiLogModal.vue'
import {columns, searchFormSchema} from './answerTopiLog.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './answerTopiLog.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '问答记录',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"问答记录",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 58
- 0
applet-home-api/src/main/java/org/jeecg/modules/answerTopiLog/vue3/components/AnswerTopiLogModal.vue View File

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../answerTopiLog.data';
import {saveOrUpdate} from '../answerTopiLog.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 171
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/controller/HomeBannerController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.homeBanner.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.homeBanner.entity.HomeBanner;
import org.jeecg.modules.homeBanner.service.IHomeBannerService;
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.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 租房banner表
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
@Api(tags="租房banner表")
@RestController
@RequestMapping("/homeBanner/homeBanner")
@Slf4j
public class HomeBannerController extends JeecgController<HomeBanner, IHomeBannerService> {
@Autowired
private IHomeBannerService homeBannerService;
/**
* 分页列表查询
*
* @param homeBanner
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "租房banner表-分页列表查询")
@ApiOperation(value="租房banner表-分页列表查询", notes="租房banner表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<HomeBanner>> queryPageList(HomeBanner homeBanner,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<HomeBanner> queryWrapper = QueryGenerator.initQueryWrapper(homeBanner, req.getParameterMap());
Page<HomeBanner> page = new Page<HomeBanner>(pageNo, pageSize);
IPage<HomeBanner> pageList = homeBannerService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param homeBanner
* @return
*/
@AutoLog(value = "租房banner表-添加")
@ApiOperation(value="租房banner表-添加", notes="租房banner表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody HomeBanner homeBanner) {
homeBannerService.save(homeBanner);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param homeBanner
* @return
*/
@AutoLog(value = "租房banner表-编辑")
@ApiOperation(value="租房banner表-编辑", notes="租房banner表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody HomeBanner homeBanner) {
homeBannerService.updateById(homeBanner);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "租房banner表-通过id删除")
@ApiOperation(value="租房banner表-通过id删除", notes="租房banner表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
homeBannerService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "租房banner表-批量删除")
@ApiOperation(value="租房banner表-批量删除", notes="租房banner表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.homeBannerService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "租房banner表-通过id查询")
@ApiOperation(value="租房banner表-通过id查询", notes="租房banner表-通过id查询")
@GetMapping(value = "/queryById")
public Result<HomeBanner> queryById(@RequestParam(name="id",required=true) String id) {
HomeBanner homeBanner = homeBannerService.getById(id);
if(homeBanner==null) {
return Result.error("未找到对应数据");
}
return Result.OK(homeBanner);
}
/**
* 导出excel
*
* @param request
* @param homeBanner
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, HomeBanner homeBanner) {
return super.exportXls(request, homeBanner, HomeBanner.class, "租房banner表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, HomeBanner.class);
}
}

+ 57
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/entity/HomeBanner.java View File

@ -0,0 +1,57 @@
package org.jeecg.modules.homeBanner.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 租房banner表
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
@Data
@TableName("home_banner")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="home_banner对象", description="租房banner表")
public class HomeBanner implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**图片*/
@Excel(name = "图片", width = 15)
@ApiModelProperty(value = "图片")
private java.lang.String image;
}

+ 17
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/mapper/HomeBannerMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.homeBanner.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.homeBanner.entity.HomeBanner;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 租房banner表
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
public interface HomeBannerMapper extends BaseMapper<HomeBanner> {
}

+ 5
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/mapper/xml/HomeBannerMapper.xml View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.homeBanner.mapper.HomeBannerMapper">
</mapper>

+ 14
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/service/IHomeBannerService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.homeBanner.service;
import org.jeecg.modules.homeBanner.entity.HomeBanner;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 租房banner表
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
public interface IHomeBannerService extends IService<HomeBanner> {
}

+ 19
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/service/impl/HomeBannerServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.homeBanner.service.impl;
import org.jeecg.modules.homeBanner.entity.HomeBanner;
import org.jeecg.modules.homeBanner.mapper.HomeBannerMapper;
import org.jeecg.modules.homeBanner.service.IHomeBannerService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 租房banner表
* @Author: jeecg-boot
* @Date: 2024-11-22
* @Version: V1.0
*/
@Service
public class HomeBannerServiceImpl extends ServiceImpl<HomeBannerMapper, HomeBanner> implements IHomeBannerService {
}

+ 172
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue/HomeBannerList.vue View File

@ -0,0 +1,172 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('租房banner表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<home-banner-modal ref="modalForm" @ok="modalFormOk"></home-banner-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HomeBannerModal from './modules/HomeBannerModal'
export default {
name: 'HomeBannerList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HomeBannerModal
},
data () {
return {
description: '租房banner表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'图片',
align:"center",
dataIndex: 'image',
scopedSlots: {customRender: 'imgSlot'}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/homeBanner/homeBanner/list",
delete: "/homeBanner/homeBanner/delete",
deleteBatch: "/homeBanner/homeBanner/deleteBatch",
exportXlsUrl: "/homeBanner/homeBanner/exportXls",
importExcelUrl: "homeBanner/homeBanner/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'Text',value:'image',text:'图片',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 104
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue/modules/HomeBannerForm.vue View File

@ -0,0 +1,104 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image">
<j-image-upload isMultiple v-model="model.image" ></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'HomeBannerForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/homeBanner/homeBanner/add",
edit: "/homeBanner/homeBanner/edit",
queryById: "/homeBanner/homeBanner/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue/modules/HomeBannerModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<home-banner-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></home-banner-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import HomeBannerForm from './HomeBannerForm'
export default {
name: 'HomeBannerModal',
components: {
HomeBannerForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue/modules/HomeBannerModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<home-banner-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></home-banner-form>
</j-modal>
</template>
<script>
import HomeBannerForm from './HomeBannerForm'
export default {
name: 'HomeBannerModal',
components: {
HomeBannerForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue3/HomeBanner.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/homeBanner/homeBanner/list',
save='/homeBanner/homeBanner/add',
edit='/homeBanner/homeBanner/edit',
deleteOne = '/homeBanner/homeBanner/delete',
deleteBatch = '/homeBanner/homeBanner/deleteBatch',
importExcel = '/homeBanner/homeBanner/importExcel',
exportXls = '/homeBanner/homeBanner/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 26
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue3/HomeBanner.data.ts View File

@ -0,0 +1,26 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '图片',
align:"center",
dataIndex: 'image',
customRender:render.renderAvatar,
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '图片',
field: 'image',
component: 'JImageUpload',
componentProps:{
},
},
];

+ 162
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue3/HomeBannerList.vue View File

@ -0,0 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<HomeBannerModal @register="registerModal" @success="handleSuccess"></HomeBannerModal>
</div>
</template>
<script lang="ts" name="homeBanner-homeBanner" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import HomeBannerModal from './components/HomeBannerModal.vue'
import {columns, searchFormSchema} from './homeBanner.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './homeBanner.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '租房banner表',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"租房banner表",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 58
- 0
applet-home-api/src/main/java/org/jeecg/modules/homeBanner/vue3/components/HomeBannerModal.vue View File

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../homeBanner.data';
import {saveOrUpdate} from '../homeBanner.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 41
- 0
applet-rice-api/pom.xml View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>answer-api</artifactId>
<groupId>org.jeecgframework.boot</groupId>
<version>3.2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>applet-rice-api</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.22</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<!-- lzx:公用工具类每个新模块必加 -->
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>base-core</artifactId>
</dependency>
</dependencies>
</project>

+ 3
- 0
module-base/base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java View File

@ -74,6 +74,9 @@ public class ShiroConfig {
//公共登录
filterChainDefinitionMap.put("/login_common/**", "anon");
filterChainDefinitionMap.put("/info_common/**", "anon");
filterChainDefinitionMap.put("/applet_post/**", "anon");
//百富门答题
filterChainDefinitionMap.put("/applet_index/**", "anon");


+ 0
- 61
module-base/base-core/src/main/java/org/jeecg/modules/bean/LoginReq.java View File

@ -1,61 +0,0 @@
package org.jeecg.modules.bean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class LoginReq {
/**
* 参数信息
*/
@ApiModelProperty(value = "参数信息")
private String code;
/**
* 参数信息
*/
@ApiModelProperty(value = "参数信息")
private String vid;
/**
* 用户唯一标识
*/
@ApiModelProperty(value = "用户唯一标识")
private String openid;
/**
* 会话密钥
*/
@ApiModelProperty(value = "会话密钥")
private String session_key;
/**
* 用户姓名
*/
@ApiModelProperty(value = "用户姓名")
private String nickName;
/**
* 用户头像
*/
@ApiModelProperty(value = "用户头像")
private String headimgurl;
/**
* 解密标签
*/
@ApiModelProperty(value = "解密标签")
private String iv;
/**
* 解密
*/
@ApiModelProperty(value = "解密")
private String encryptedData;
/**
* 邀请者标识
*/
@ApiModelProperty(value = "邀请者销售标识")
private String shareId;
}

+ 8
- 2
module-common/src/main/java/org/jeecg/api/controller/AppletLoginController.java View File

@ -4,6 +4,9 @@ package org.jeecg.api.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.api.bean.LoginReq;
import org.jeecg.api.service.AppletLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -19,11 +22,14 @@ import org.jeecg.common.api.vo.Result;
@Slf4j
public class AppletLoginController {
@Autowired
private AppletLoginService appletLoginService;
//微信小程序授权登录
@ApiOperation(value="微信小程序授权登录", notes="微信小程序授权登录")
@GetMapping(value = "/appletLogin")
public Result<?> appletLogin(){
return Result.OK();
public Result<Object> appletLogin(LoginReq loginReq){
return appletLoginService.appletLogin(loginReq);
}
//微信公众号授权登录


+ 50
- 0
module-common/src/main/java/org/jeecg/api/controller/AppletMyInfoController.java View File

@ -0,0 +1,50 @@
package org.jeecg.api.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Api(tags="项目通用-修改个人信息")
@RestController
@RequestMapping("/info_common")
@Slf4j
public class AppletMyInfoController {
@Resource
private IHanHaiMemberService hanHaiMemberService;
//权限验证
@Resource
private ShiroRealm shiroRealm;
//修改个人信息
@PostMapping(value = "/updateInfo")
@ApiOperation(value="修改个人信息", notes="修改个人信息")
public Result<?> updateInfo(@RequestHeader("X-Access-Token") String token, String nickName, String avatarUrl){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
HanHaiMember member = new HanHaiMember();
member.setId(hanHaiMember.getId());
member.setNickName(nickName);
member.setHeadImage(avatarUrl);
hanHaiMemberService.updateById(member);
return Result.ok("修改成功");
}
//获取个人信息
@GetMapping(value = "/getInfo")
@ApiOperation(value="获取个人信息", notes="获取个人信息")
public Result<?> getInfo(@RequestHeader("X-Access-Token") String token){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
HanHaiMember byId = hanHaiMemberService.getById(hanHaiMember.getId());
return Result.OK(byId);
}
}

+ 2
- 1
module-common/src/main/java/org/jeecg/api/service/AppletLoginService.java View File

@ -1,7 +1,8 @@
package org.jeecg.api.service;
import org.jeecg.api.bean.LoginReq;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.bean.LoginReq;
/**
* @Author lzx


+ 1
- 1
module-common/src/main/java/org/jeecg/api/service/OfficialLoginService.java View File

@ -1,8 +1,8 @@
package org.jeecg.api.service;
import org.jeecg.api.bean.LoginReq;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.bean.LoginReq;
public interface OfficialLoginService {


+ 5
- 5
module-common/src/main/java/org/jeecg/api/service/impl/AppletLoginServiceImpl.java View File

@ -3,14 +3,14 @@ package org.jeecg.api.service.impl;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.api.bean.LoginReq;
import org.jeecg.api.service.AppletLoginService;
import org.jeecg.api.untils.HttpConf;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.bean.HttpConf;
import org.jeecg.modules.bean.LoginReq;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.springframework.beans.factory.annotation.Value;
@ -30,9 +30,9 @@ import java.util.Map;
@SuppressWarnings("all")
public class AppletLoginServiceImpl implements AppletLoginService {
@Value("${wechat.mpAppId}")
@Value("${wechat-dt.mpAppId}")
private String mpAppId;
@Value("${wechat.mpAppSecret}")
@Value("${wechat-dt.mpAppSecret}")
private String mpAppSecret;
@Resource
@ -52,7 +52,7 @@ public class AppletLoginServiceImpl implements AppletLoginService {
* @return
*/
@Transactional(rollbackFor = {Exception.class})
public Result<Object> appletLogin( LoginReq loginReq) {
public Result<Object> appletLogin(LoginReq loginReq) {
Result<Object> result = new Result<>();
Map<String, Object> map = new HashMap<>();
if (StringUtils.isBlank(loginReq.getCode())) {


+ 8
- 15
module-common/src/main/java/org/jeecg/api/service/impl/OfficialLoginServiceImpl.java View File

@ -3,18 +3,19 @@ package org.jeecg.api.service.impl;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.jeecg.api.bean.LoginReq;
import org.jeecg.api.service.OfficialLoginService;
import org.jeecg.api.untils.HttpConf;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.util.PasswordUtil;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.modules.bean.ConvertUtils;
import org.jeecg.modules.bean.HttpConf;
import org.jeecg.modules.bean.LoginReq;
import org.jeecg.api.untils.ConvertUtils;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -39,18 +40,10 @@ public class OfficialLoginServiceImpl implements OfficialLoginService {
private HttpConf httpConf;
/**
* 微信公众号-appid
*/
private String mpAppId = "wx15be4225a7e41a1e";
/**
* 微信公众号-appSecret
*/
private String mpAppSecret = "0fdb77429ffdf206c151af76a663041c";
@Value("${wechat-dt.mpAppId}")
private String mpAppId;
@Value("${wechat-dt.mpAppSecret}")
private String mpAppSecret;
/**


module-base/base-core/src/main/java/org/jeecg/modules/bean/ConvertUtils.java → module-common/src/main/java/org/jeecg/api/untils/ConvertUtils.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;

module-base/base-core/src/main/java/org/jeecg/modules/bean/HttpConf.java → module-common/src/main/java/org/jeecg/api/untils/HttpConf.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils;
import com.alibaba.fastjson.JSONObject;
import org.apache.http.HttpEntity;

+ 16
- 0
module-system/pom.xml View File

@ -82,6 +82,22 @@
<version>${jeecgboot.version}</version>
</dependency>
<!-- lzx:租房 使用必加-->
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>applet-home-api</artifactId>
<version>${jeecgboot.version}</version>
</dependency>
<!-- lzx:大米 使用必加-->
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>applet-rice-api</artifactId>
<version>${jeecgboot.version}</version>
</dependency>
<!-- lzx:公共模块 使用必加-->
<dependency>
<groupId>org.jeecgframework.boot</groupId>


module-system/src/main/java/org/jeecg/modules/bean/HttpRequestUtil.java → module-system/src/main/java/org/jeecg/api/untils/bean/HttpRequestUtil.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils.bean;
import java.io.File;
import java.io.FileNotFoundException;

module-system/src/main/java/org/jeecg/modules/bean/Sign.java → module-system/src/main/java/org/jeecg/api/untils/bean/Sign.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils.bean;
import java.util.UUID;
import java.util.Map;

module-system/src/main/java/org/jeecg/modules/bean/StatisBean.java → module-system/src/main/java/org/jeecg/api/untils/bean/StatisBean.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils.bean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

module-system/src/main/java/org/jeecg/modules/bean/WXUnitl.java → module-system/src/main/java/org/jeecg/api/untils/bean/WXUnitl.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils.bean;
import java.io.UnsupportedEncodingException;

module-system/src/main/java/org/jeecg/modules/bean/WeiXinQRCode.java → module-system/src/main/java/org/jeecg/api/untils/bean/WeiXinQRCode.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils.bean;
import lombok.Data;

module-system/src/main/java/org/jeecg/modules/bean/WeiXinResult.java → module-system/src/main/java/org/jeecg/api/untils/bean/WeiXinResult.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils.bean;
import lombok.Data;

module-system/src/main/java/org/jeecg/modules/bean/WeiXinUnitl.java → module-system/src/main/java/org/jeecg/api/untils/bean/WeiXinUnitl.java View File

@ -1,9 +1,7 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils.bean;
import net.sf.json.JSONObject;
import org.jeecg.modules.bean.Sign;
import org.jeecg.modules.bean.WinXinEntity;
import java.io.InputStream;
import java.net.HttpURLConnection;

module-system/src/main/java/org/jeecg/modules/bean/WinXinEntity.java → module-system/src/main/java/org/jeecg/api/untils/bean/WinXinEntity.java View File

@ -1,4 +1,4 @@
package org.jeecg.modules.bean;
package org.jeecg.api.untils.bean;
import lombok.Data;

+ 35
- 3
module-system/src/main/resources/application-dev.yml View File

@ -331,10 +331,42 @@ third-app:
agent-id: ??
##配置微信
wechat:
mpAppId: wxa4d29e67e8a58d38
mpAppSecret: 866e4ba72bd86a4c79403b6b1341461b
#wechat:
# mpAppId: wxa4d29e67e8a58d38
# mpAppSecret: 866e4ba72bd86a4c79403b6b1341461b
# mchId:
# mchKey:
# keyPath:
# notifyUrl:
##配置微信 - 答题小程序
wechat-dt:
mpAppId: wxd83c5228fffa1b58
mpAppSecret: 582b12c898b16107705bbfdd4843bc1e
mchId:
mchKey:
keyPath:
notifyUrl:
##配置微信 - 三只青蛙大米小程
wechat-dm:
mpAppId: wx0839bc52e7849c13
mpAppSecret: c614fd865951c5246e849501204e6f7f
mchId:
mchKey:
keyPath:
notifyUrl:
##配置微信 - 三只青蛙大米小程
wechat-zf:
mpAppId: wx0839bc52e7849c13
mpAppSecret: c614fd865951c5246e849501204e6f7f
mchId:
mchKey:
keyPath:
notifyUrl:

+ 2
- 0
pom.xml View File

@ -67,6 +67,8 @@
<module>module-system</module>
<module>applet-answer-api</module>
<module>module-common</module>
<module>applet-home-api</module>
<module>applet-rice-api</module>
</modules>


Loading…
Cancel
Save