Browse Source

提交版本

master
主管理员 1 year ago
parent
commit
ce37e32e47
36 changed files with 3136 additions and 45 deletions
  1. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/controller/CityCommentController.java
  2. +29
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/entity/CityComment.java
  3. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/mapper/CityCommentMapper.java
  4. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/service/ICityCommentService.java
  5. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/service/impl/CityCommentServiceImpl.java
  6. +44
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/vue/CityCommentList.vue
  7. +35
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/vue/modules/CityCommentForm.vue
  8. +76
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/vue3/CityComment.data.ts
  9. +171
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/controller/CityJdController.java
  10. +78
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/entity/CityJd.java
  11. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/mapper/CityJdMapper.java
  12. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/mapper/xml/CityJdMapper.xml
  13. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/service/ICityJdService.java
  14. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/service/impl/CityJdServiceImpl.java
  15. +210
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue/CityJdList.vue
  16. +134
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue/modules/CityJdForm.vue
  17. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue/modules/CityJdModal.Style#Drawer.vue
  18. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue/modules/CityJdModal.vue
  19. +61
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue3/CityJd.api.ts
  20. +90
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue3/CityJd.data.ts
  21. +162
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue3/CityJdList.vue
  22. +58
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue3/components/CityJdModal.vue
  23. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/controller/HanHaiMemberController.java
  24. +9
    -8
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/entity/HanHaiMember.java
  25. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/mapper/HanHaiMemberMapper.java
  26. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/service/IHanHaiMemberService.java
  27. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/service/impl/HanHaiMemberServiceImpl.java
  28. +54
    -3
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue/HanHaiMemberList.vue
  29. +18
    -3
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue/modules/HanHaiMemberForm.vue
  30. +64
    -4
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue3/HanHaiMember.data.ts
  31. +1120
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/HttpClientUtil.java
  32. +14
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/WxQrCodeVo.java
  33. +28
    -1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuApiService.java
  34. +389
    -11
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java
  35. +24
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java
  36. +61
    -6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/controller/CityCommentController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/** /**
* @Description: 评论信息表 * @Description: 评论信息表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-14
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
@Api(tags="评论信息表") @Api(tags="评论信息表")


+ 29
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/entity/CityComment.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/** /**
* @Description: 评论信息表 * @Description: 评论信息表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-14
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@ -51,4 +51,32 @@ public class CityComment implements Serializable {
@Excel(name = "评论标题", width = 15) @Excel(name = "评论标题", width = 15)
@ApiModelProperty(value = "评论标题") @ApiModelProperty(value = "评论标题")
private java.lang.String name; private java.lang.String name;
/**评论昵称*/
@Excel(name = "评论昵称", width = 15)
@ApiModelProperty(value = "评论昵称")
private java.lang.String userName;
/**评论头像*/
@Excel(name = "评论头像", width = 15)
@ApiModelProperty(value = "评论头像")
private java.lang.String userHead;
/**评论内容*/
@Excel(name = "评论内容", width = 15)
@ApiModelProperty(value = "评论内容")
private java.lang.String userValue;
/**评论图片*/
@Excel(name = "评论图片", width = 15)
@ApiModelProperty(value = "评论图片")
private java.lang.String userImage;
/**评论标识*/
@Excel(name = "评论标识", width = 15)
@ApiModelProperty(value = "评论标识")
private java.lang.String orderId;
/**评论类型*/
@Excel(name = "评论类型", width = 15)
@ApiModelProperty(value = "评论类型")
private java.lang.String type;
/**用户标识*/
@Excel(name = "用户标识", width = 15)
@ApiModelProperty(value = "用户标识")
private java.lang.String userId;
} }

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/mapper/CityCommentMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
* @Description: 评论信息表 * @Description: 评论信息表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-14
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
public interface CityCommentMapper extends BaseMapper<CityComment> { public interface CityCommentMapper extends BaseMapper<CityComment> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/service/ICityCommentService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* @Description: 评论信息表 * @Description: 评论信息表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-14
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
public interface ICityCommentService extends IService<CityComment> { public interface ICityCommentService extends IService<CityComment> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/service/impl/CityCommentServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/** /**
* @Description: 评论信息表 * @Description: 评论信息表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-14
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service


+ 44
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/vue/CityCommentList.vue View File

@ -126,6 +126,43 @@
align:"center", align:"center",
dataIndex: 'name' dataIndex: 'name'
}, },
{
title:'评论昵称',
align:"center",
dataIndex: 'userName'
},
{
title:'评论头像',
align:"center",
dataIndex: 'userHead',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'评论内容',
align:"center",
dataIndex: 'userValue'
},
{
title:'评论图片',
align:"center",
dataIndex: 'userImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'评论标识',
align:"center",
dataIndex: 'orderId'
},
{
title:'评论类型',
align:"center",
dataIndex: 'type'
},
{
title:'用户标识',
align:"center",
dataIndex: 'userId'
},
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
@ -161,6 +198,13 @@
getSuperFieldList(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'string',value:'name',text:'评论标题',dictCode:''}) fieldList.push({type:'string',value:'name',text:'评论标题',dictCode:''})
fieldList.push({type:'string',value:'userName',text:'评论昵称',dictCode:''})
fieldList.push({type:'Text',value:'userHead',text:'评论头像',dictCode:''})
fieldList.push({type:'Text',value:'userValue',text:'评论内容',dictCode:''})
fieldList.push({type:'Text',value:'userImage',text:'评论图片',dictCode:''})
fieldList.push({type:'string',value:'orderId',text:'评论标识',dictCode:''})
fieldList.push({type:'string',value:'type',text:'评论类型',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'用户标识',dictCode:''})
this.superFieldList = fieldList this.superFieldList = fieldList
} }
} }


+ 35
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/vue/modules/CityCommentForm.vue View File

@ -8,6 +8,41 @@
<a-input v-model="model.name" placeholder="请输入评论标题" ></a-input> <a-input v-model="model.name" placeholder="请输入评论标题" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24">
<a-form-model-item label="评论昵称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName">
<a-input v-model="model.userName" placeholder="请输入评论昵称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="评论头像" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userHead">
<j-image-upload isMultiple v-model="model.userHead" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="评论内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userValue">
<a-textarea v-model="model.userValue" rows="4" placeholder="请输入评论内容" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="评论图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userImage">
<j-image-upload isMultiple v-model="model.userImage" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="评论标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId">
<a-input v-model="model.orderId" placeholder="请输入评论标识" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="评论类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
<a-input v-model="model.type" placeholder="请输入评论类型" ></a-input>
</a-form-model-item>
</a-col>
<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-row> </a-row>
</a-form-model> </a-form-model>
</j-form-container> </j-form-container>


+ 76
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityComment/vue3/CityComment.data.ts View File

@ -9,6 +9,43 @@ export const columns: BasicColumn[] = [
align:"center", align:"center",
dataIndex: 'name' dataIndex: 'name'
}, },
{
title: '评论昵称',
align:"center",
dataIndex: 'userName'
},
{
title: '评论头像',
align:"center",
dataIndex: 'userHead',
customRender:render.renderAvatar,
},
{
title: '评论内容',
align:"center",
dataIndex: 'userValue'
},
{
title: '评论图片',
align:"center",
dataIndex: 'userImage',
customRender:render.renderAvatar,
},
{
title: '评论标识',
align:"center",
dataIndex: 'orderId'
},
{
title: '评论类型',
align:"center",
dataIndex: 'type'
},
{
title: '用户标识',
align:"center",
dataIndex: 'userId'
},
]; ];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
@ -20,4 +57,43 @@ export const formSchema: FormSchema[] = [
field: 'name', field: 'name',
component: 'Input', component: 'Input',
}, },
{
label: '评论昵称',
field: 'userName',
component: 'Input',
},
{
label: '评论头像',
field: 'userHead',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '评论内容',
field: 'userValue',
component: 'InputTextArea',//TODO 注意string转换问题
},
{
label: '评论图片',
field: 'userImage',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '评论标识',
field: 'orderId',
component: 'Input',
},
{
label: '评论类型',
field: 'type',
component: 'Input',
},
{
label: '用户标识',
field: 'userId',
component: 'Input',
},
]; ];

+ 171
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/controller/CityJdController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.cityJd.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.cityJd.entity.CityJd;
import org.jeecg.modules.cityJd.service.ICityJdService;
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-10-27
* @Version: V1.0
*/
@Api(tags="城市景点")
@RestController
@RequestMapping("/cityJd/cityJd")
@Slf4j
public class CityJdController extends JeecgController<CityJd, ICityJdService> {
@Autowired
private ICityJdService cityJdService;
/**
* 分页列表查询
*
* @param cityJd
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "城市景点-分页列表查询")
@ApiOperation(value="城市景点-分页列表查询", notes="城市景点-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<CityJd>> queryPageList(CityJd cityJd,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<CityJd> queryWrapper = QueryGenerator.initQueryWrapper(cityJd, req.getParameterMap());
Page<CityJd> page = new Page<CityJd>(pageNo, pageSize);
IPage<CityJd> pageList = cityJdService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param cityJd
* @return
*/
@AutoLog(value = "城市景点-添加")
@ApiOperation(value="城市景点-添加", notes="城市景点-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody CityJd cityJd) {
cityJdService.save(cityJd);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param cityJd
* @return
*/
@AutoLog(value = "城市景点-编辑")
@ApiOperation(value="城市景点-编辑", notes="城市景点-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody CityJd cityJd) {
cityJdService.updateById(cityJd);
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) {
cityJdService.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.cityJdService.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<CityJd> queryById(@RequestParam(name="id",required=true) String id) {
CityJd cityJd = cityJdService.getById(id);
if(cityJd==null) {
return Result.error("未找到对应数据");
}
return Result.OK(cityJd);
}
/**
* 导出excel
*
* @param request
* @param cityJd
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, CityJd cityJd) {
return super.exportXls(request, cityJd, CityJd.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, CityJd.class);
}
}

+ 78
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/entity/CityJd.java View File

@ -0,0 +1,78 @@
package org.jeecg.modules.cityJd.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-10-27
* @Version: V1.0
*/
@Data
@TableName("city_jd")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="city_jd对象", description="城市景点")
public class CityJd 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 name;
/**景点位置*/
@Excel(name = "景点位置", width = 15)
@ApiModelProperty(value = "景点位置")
private java.lang.String address;
/**经度*/
@Excel(name = "经度", width = 15)
@ApiModelProperty(value = "经度")
private java.lang.String longitude;
/**纬度*/
@Excel(name = "纬度", width = 15)
@ApiModelProperty(value = "纬度")
private java.lang.String latitude;
/**图片*/
@Excel(name = "图片", width = 15)
@ApiModelProperty(value = "图片")
private java.lang.String images;
/**主图*/
@Excel(name = "主图", width = 15)
@ApiModelProperty(value = "主图")
private java.lang.String titleImage;
/**介绍*/
@Excel(name = "介绍", width = 15)
@ApiModelProperty(value = "介绍")
private java.lang.String details;
}

+ 17
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/mapper/CityJdMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.cityJd.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.cityJd.entity.CityJd;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 城市景点
* @Author: jeecg-boot
* @Date: 2024-10-27
* @Version: V1.0
*/
public interface CityJdMapper extends BaseMapper<CityJd> {
}

+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/mapper/xml/CityJdMapper.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.cityJd.mapper.CityJdMapper">
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/service/ICityJdService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.cityJd.service;
import org.jeecg.modules.cityJd.entity.CityJd;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 城市景点
* @Author: jeecg-boot
* @Date: 2024-10-27
* @Version: V1.0
*/
public interface ICityJdService extends IService<CityJd> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/service/impl/CityJdServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.cityJd.service.impl;
import org.jeecg.modules.cityJd.entity.CityJd;
import org.jeecg.modules.cityJd.mapper.CityJdMapper;
import org.jeecg.modules.cityJd.service.ICityJdService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 城市景点
* @Author: jeecg-boot
* @Date: 2024-10-27
* @Version: V1.0
*/
@Service
public class CityJdServiceImpl extends ServiceImpl<CityJdMapper, CityJd> implements ICityJdService {
}

+ 210
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue/CityJdList.vue View File

@ -0,0 +1,210 @@
<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>
<city-jd-modal ref="modalForm" @ok="modalFormOk"></city-jd-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CityJdModal from './modules/CityJdModal'
export default {
name: 'CityJdList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CityJdModal
},
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: 'name'
},
{
title:'景点位置',
align:"center",
dataIndex: 'address'
},
{
title:'经度',
align:"center",
dataIndex: 'longitude'
},
{
title:'纬度',
align:"center",
dataIndex: 'latitude'
},
{
title:'图片',
align:"center",
dataIndex: 'images',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'主图',
align:"center",
dataIndex: 'titleImage',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'介绍',
align:"center",
dataIndex: 'details',
scopedSlots: {customRender: 'htmlSlot'}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/cityJd/cityJd/list",
delete: "/cityJd/cityJd/delete",
deleteBatch: "/cityJd/cityJd/deleteBatch",
exportXlsUrl: "/cityJd/cityJd/exportXls",
importExcelUrl: "cityJd/cityJd/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:'name',text:'景点名称',dictCode:''})
fieldList.push({type:'string',value:'address',text:'景点位置',dictCode:''})
fieldList.push({type:'string',value:'longitude',text:'经度',dictCode:''})
fieldList.push({type:'string',value:'latitude',text:'纬度',dictCode:''})
fieldList.push({type:'Text',value:'images',text:'图片',dictCode:''})
fieldList.push({type:'Text',value:'titleImage',text:'主图',dictCode:''})
fieldList.push({type:'Text',value:'details',text:'介绍',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 134
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue/modules/CityJdForm.vue View File

@ -0,0 +1,134 @@
<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="name">
<a-input v-model="model.name" placeholder="请输入景点名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="景点位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入景点位置" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="经度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="longitude">
<a-input v-model="model.longitude" placeholder="请输入经度" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="纬度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="latitude">
<a-input v-model="model.latitude" placeholder="请输入纬度" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="images">
<j-image-upload isMultiple v-model="model.images" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="主图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="titleImage">
<j-image-upload isMultiple v-model="model.titleImage" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="介绍" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="details">
<j-editor v-model="model.details" />
</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: 'CityJdForm',
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: "/cityJd/cityJd/add",
edit: "/cityJd/cityJd/edit",
queryById: "/cityJd/cityJd/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
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue/modules/CityJdModal.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">
<city-jd-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></city-jd-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 CityJdForm from './CityJdForm'
export default {
name: 'CityJdModal',
components: {
CityJdForm
},
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
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue/modules/CityJdModal.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="关闭">
<city-jd-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></city-jd-form>
</j-modal>
</template>
<script>
import CityJdForm from './CityJdForm'
export default {
name: 'CityJdModal',
components: {
CityJdForm
},
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
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue3/CityJd.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/cityJd/cityJd/list',
save='/cityJd/cityJd/add',
edit='/cityJd/cityJd/edit',
deleteOne = '/cityJd/cityJd/delete',
deleteBatch = '/cityJd/cityJd/deleteBatch',
importExcel = '/cityJd/cityJd/importExcel',
exportXls = '/cityJd/cityJd/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});
}

+ 90
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue3/CityJd.data.ts View File

@ -0,0 +1,90 @@
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: 'name'
},
{
title: '景点位置',
align:"center",
dataIndex: 'address'
},
{
title: '经度',
align:"center",
dataIndex: 'longitude'
},
{
title: '纬度',
align:"center",
dataIndex: 'latitude'
},
{
title: '图片',
align:"center",
dataIndex: 'images',
customRender:render.renderAvatar,
},
{
title: '主图',
align:"center",
dataIndex: 'titleImage',
customRender:render.renderAvatar,
},
{
title: '介绍',
align:"center",
dataIndex: 'details',
slots: { customRender: 'htmlSlot' },
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '景点名称',
field: 'name',
component: 'Input',
},
{
label: '景点位置',
field: 'address',
component: 'Input',
},
{
label: '经度',
field: 'longitude',
component: 'Input',
},
{
label: '纬度',
field: 'latitude',
component: 'Input',
},
{
label: '图片',
field: 'images',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '主图',
field: 'titleImage',
component: 'JImageUpload',
componentProps:{
},
},
{
label: '介绍',
field: 'details',
component: 'JCodeEditor', //TODO String后缀暂未添加
},
];

+ 162
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue3/CityJdList.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>
<!-- 表单区域 -->
<CityJdModal @register="registerModal" @success="handleSuccess"></CityJdModal>
</div>
</template>
<script lang="ts" name="cityJd-cityJd" 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 CityJdModal from './components/CityJdModal.vue'
import {columns, searchFormSchema} from './cityJd.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './cityJd.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
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityJd/vue3/components/CityJdModal.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 '../cityJd.data';
import {saveOrUpdate} from '../cityJd.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>

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/controller/HanHaiMemberController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/** /**
* @Description: 用户账户表 * @Description: 用户账户表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
@Api(tags="用户账户表") @Api(tags="用户账户表")


+ 9
- 8
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/entity/HanHaiMember.java View File

@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/** /**
* @Description: 用户账户表 * @Description: 用户账户表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@ -141,7 +141,7 @@ public class HanHaiMember implements Serializable {
/**是否实名认证*/ /**是否实名认证*/
@Excel(name = "是否实名认证", width = 15) @Excel(name = "是否实名认证", width = 15)
@ApiModelProperty(value = "是否实名认证") @ApiModelProperty(value = "是否实名认证")
private java.lang.String idCardOpen;
private java.lang.Integer idCardOpen;
/**intentionNum*/ /**intentionNum*/
@Excel(name = "intentionNum", width = 15) @Excel(name = "intentionNum", width = 15)
@ApiModelProperty(value = "intentionNum") @ApiModelProperty(value = "intentionNum")
@ -154,9 +154,10 @@ public class HanHaiMember implements Serializable {
@Excel(name = "addNum", width = 15) @Excel(name = "addNum", width = 15)
@ApiModelProperty(value = "addNum") @ApiModelProperty(value = "addNum")
private java.lang.Integer addNum; private java.lang.Integer addNum;
/**shareId*/
@Excel(name = "shareId", width = 15)
@ApiModelProperty(value = "shareId")
/**邀请人*/
@Excel(name = "邀请人", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@ApiModelProperty(value = "邀请人")
private java.lang.String shareId; private java.lang.String shareId;
/**邀请人*/ /**邀请人*/
@Excel(name = "邀请人", width = 15) @Excel(name = "邀请人", width = 15)
@ -166,9 +167,9 @@ public class HanHaiMember implements Serializable {
@Excel(name = "邀请时间", width = 15) @Excel(name = "邀请时间", width = 15)
@ApiModelProperty(value = "邀请时间") @ApiModelProperty(value = "邀请时间")
private java.util.Date vtime; private java.util.Date vtime;
/**兼兼街会员*/
@Excel(name = "兼兼街会员", width = 15)
@ApiModelProperty(value = "兼兼街会员")
/**会员*/
@Excel(name = "会员", width = 15)
@ApiModelProperty(value = "会员")
private java.lang.Integer isPay; private java.lang.Integer isPay;
/**是否关注公众号*/ /**是否关注公众号*/
@Excel(name = "是否关注公众号", width = 15) @Excel(name = "是否关注公众号", width = 15)


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/mapper/HanHaiMemberMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
* @Description: 用户账户表 * @Description: 用户账户表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
public interface HanHaiMemberMapper extends BaseMapper<HanHaiMember> { public interface HanHaiMemberMapper extends BaseMapper<HanHaiMember> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/service/IHanHaiMemberService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* @Description: 用户账户表 * @Description: 用户账户表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
public interface IHanHaiMemberService extends IService<HanHaiMember> { public interface IHanHaiMemberService extends IService<HanHaiMember> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/service/impl/HanHaiMemberServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/** /**
* @Description: 用户账户表 * @Description: 用户账户表
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2024-10-26
* @Date: 2024-10-27
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service


+ 54
- 3
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue/HanHaiMemberList.vue View File

@ -4,6 +4,38 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="昵称">
<a-input placeholder="请输入昵称" v-model="queryParam.nickName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="真实姓名">
<a-input placeholder="请输入真实姓名" v-model="queryParam.name"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="手机号码">
<a-input placeholder="请输入手机号码" v-model="queryParam.phone"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="邀请人">
<j-search-select-tag placeholder="请选择邀请人" v-model="queryParam.shareId" dict="han_hai_member,nick_name,id"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
@ -99,6 +131,7 @@
import { mixinDevice } from '@/utils/mixin' import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HanHaiMemberModal from './modules/HanHaiMemberModal' import HanHaiMemberModal from './modules/HanHaiMemberModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default { export default {
name: 'HanHaiMemberList', name: 'HanHaiMemberList',
@ -160,13 +193,28 @@
{ {
title:'邀请人', title:'邀请人',
align:"center", align:"center",
dataIndex: 'vid'
dataIndex: 'shareId_dictText'
}, },
{ {
title:'邀请时间', title:'邀请时间',
align:"center", align:"center",
dataIndex: 'vtime' dataIndex: 'vtime'
}, },
{
title:'会员',
align:"center",
dataIndex: 'isPay'
},
{
title:'余额',
align:"center",
dataIndex: 'price'
},
{
title:'积分',
align:"center",
dataIndex: 'integerPrice'
},
{ {
title:'性别', title:'性别',
align:"center", align:"center",
@ -222,9 +270,12 @@
fieldList.push({type:'string',value:'phone',text:'手机号码',dictCode:''}) fieldList.push({type:'string',value:'phone',text:'手机号码',dictCode:''})
fieldList.push({type:'string',value:'appletOpenid',text:'小程序标识',dictCode:''}) fieldList.push({type:'string',value:'appletOpenid',text:'小程序标识',dictCode:''})
fieldList.push({type:'string',value:'idCard',text:'身份证号码',dictCode:''}) fieldList.push({type:'string',value:'idCard',text:'身份证号码',dictCode:''})
fieldList.push({type:'string',value:'idCardOpen',text:'是否实名认证',dictCode:''})
fieldList.push({type:'string',value:'vid',text:'邀请人',dictCode:''})
fieldList.push({type:'int',value:'idCardOpen',text:'是否实名认证',dictCode:'card_open_state'})
fieldList.push({type:'sel_search',value:'shareId',text:'邀请人',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
fieldList.push({type:'datetime',value:'vtime',text:'邀请时间'}) fieldList.push({type:'datetime',value:'vtime',text:'邀请时间'})
fieldList.push({type:'int',value:'isPay',text:'会员',dictCode:''})
fieldList.push({type:'BigDecimal',value:'price',text:'余额',dictCode:''})
fieldList.push({type:'BigDecimal',value:'integerPrice',text:'积分',dictCode:''})
fieldList.push({type:'string',value:'sex',text:'性别',dictCode:''}) fieldList.push({type:'string',value:'sex',text:'性别',dictCode:''})
fieldList.push({type:'int',value:'yearDate',text:'出生年',dictCode:''}) fieldList.push({type:'int',value:'yearDate',text:'出生年',dictCode:''})
fieldList.push({type:'string',value:'address',text:'地址',dictCode:''}) fieldList.push({type:'string',value:'address',text:'地址',dictCode:''})


+ 18
- 3
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue/modules/HanHaiMemberForm.vue View File

@ -35,12 +35,12 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="是否实名认证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="idCardOpen"> <a-form-model-item label="是否实名认证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="idCardOpen">
<a-input v-model="model.idCardOpen" placeholder="请输入是否实名认证" ></a-input>
<a-input-number v-model="model.idCardOpen" placeholder="请输入是否实名认证" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="邀请人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="vid">
<a-input v-model="model.vid" placeholder="请输入邀请人" ></a-input>
<a-form-model-item label="邀请人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shareId">
<j-search-select-tag v-model="model.shareId" dict="han_hai_member,nick_name,id" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -48,6 +48,21 @@
<j-date placeholder="请选择邀请时间" v-model="model.vtime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> <j-date placeholder="请选择邀请时间" v-model="model.vtime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24">
<a-form-model-item label="会员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isPay">
<a-input-number v-model="model.isPay" placeholder="请输入会员" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="余额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入余额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="integerPrice">
<a-input-number v-model="model.integerPrice" placeholder="请输入积分" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sex"> <a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sex">
<a-input v-model="model.sex" placeholder="请输入性别" ></a-input> <a-input v-model="model.sex" placeholder="请输入性别" ></a-input>


+ 64
- 4
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue3/HanHaiMember.data.ts View File

@ -43,13 +43,28 @@ export const columns: BasicColumn[] = [
{ {
title: '邀请人', title: '邀请人',
align:"center", align:"center",
dataIndex: 'vid'
dataIndex: 'shareId_dictText'
}, },
{ {
title: '邀请时间', title: '邀请时间',
align:"center", align:"center",
dataIndex: 'vtime' dataIndex: 'vtime'
}, },
{
title: '会员',
align:"center",
dataIndex: 'isPay'
},
{
title: '余额',
align:"center",
dataIndex: 'price'
},
{
title: '积分',
align:"center",
dataIndex: 'integerPrice'
},
{ {
title: '性别', title: '性别',
align:"center", align:"center",
@ -68,6 +83,33 @@ export const columns: BasicColumn[] = [
]; ];
//查询数据 //查询数据
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{
label: "昵称",
field: "nickName",
component: 'Input',
colProps: {span: 6},
},
{
label: "真实姓名",
field: "name",
component: 'Input',
colProps: {span: 6},
},
{
label: "手机号码",
field: "phone",
component: 'Input',
colProps: {span: 6},
},
{
label: "邀请人",
field: "shareId",
component: 'JSearchSelect',
componentProps:{
dict:"han_hai_member,nick_name,id"
},
colProps: {span: 6},
},
]; ];
//表单数据 //表单数据
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
@ -106,18 +148,36 @@ export const formSchema: FormSchema[] = [
{ {
label: '是否实名认证', label: '是否实名认证',
field: 'idCardOpen', field: 'idCardOpen',
component: 'Input',
component: 'InputNumber',
}, },
{ {
label: '邀请人', label: '邀请人',
field: 'vid',
component: 'Input',
field: 'shareId',
component: 'JSearchSelect',
componentProps:{
dict:"han_hai_member,nick_name,id"
},
}, },
{ {
label: '邀请时间', label: '邀请时间',
field: 'vtime', field: 'vtime',
component: 'Input', component: 'Input',
}, },
{
label: '会员',
field: 'isPay',
component: 'InputNumber',
},
{
label: '余额',
field: 'price',
component: 'InputNumber',
},
{
label: '积分',
field: 'integerPrice',
component: 'InputNumber',
},
{ {
label: '性别', label: '性别',
field: 'sex', field: 'sex',


+ 1120
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/HttpClientUtil.java
File diff suppressed because it is too large
View File


+ 14
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/WxQrCodeVo.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.api.bean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class WxQrCodeVo {
/**图片地址*/
@ApiModelProperty(value = "图片地址")
private String url;
@ApiModelProperty(value = "加油站名称")
private String name;
}

+ 28
- 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuApiService.java View File

@ -5,8 +5,10 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean; import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.citiyShopAuthentication.entity.CitiyShopAuthentication; import org.jeecg.modules.citiyShopAuthentication.entity.CitiyShopAuthentication;
import org.jeecg.modules.citiyUserAuthentication.entity.CitiyUserAuthentication; import org.jeecg.modules.citiyUserAuthentication.entity.CitiyUserAuthentication;
import org.jeecg.modules.cityComment.entity.CityComment;
import org.jeecg.modules.cityTrends.entity.CityTrends; import org.jeecg.modules.cityTrends.entity.CityTrends;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
public interface YaoDuApiService { public interface YaoDuApiService {
@ -76,11 +78,17 @@ public interface YaoDuApiService {
//获取评论信息列表 //获取评论信息列表
Result<?> getCommentPage(PageBean pageBean);
Result<?> getCommentPage(String orderId,String type,PageBean pageBean);
//获取发布按钮列表 //获取发布按钮列表
Result<?> getPublishButtonList(); Result<?> getPublishButtonList();
//获取景点列表带分页
Result<?> getScenicPage(PageBean pageBean);
//获取用户列表带分页
Result<?> getUserPage(PageBean pageBean);
//点击查看联系方式 类型 0帖子 1租房 2工作 3门店 //点击查看联系方式 类型 0帖子 1租房 2工作 3门店
@ -104,7 +112,26 @@ public interface YaoDuApiService {
//企业认证 //企业认证
Result<?> companyAuthentication(String token, CitiyShopAuthentication object); Result<?> companyAuthentication(String token, CitiyShopAuthentication object);
//我发布的帖子
Result<?> getMyPostPage(String token,PageBean pageBean);
//根据帖子标识编辑帖子
Result<?> editPost(String token, CityTrends bean);
//根据帖子标识删除帖子
Result<?> deletePost(String token, String id);
//获取推广二维码
Result<?> getQrCode(String token);
//获取粉丝列表接口
Result<?> getFansList(String token, PageBean pageBean);
//发布评论
Result<?> comment(String token, CityComment cityComment);
//删除评论
Result<?> deleteComment(String token,String commentId);


+ 389
- 11
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java View File

@ -1,11 +1,21 @@
package org.jeecg.modules.api.service.impl; package org.jeecg.modules.api.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.config.shiro.ShiroRealm; import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.api.bean.HttpClientUtil;
import org.jeecg.modules.api.bean.PageBean; import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.api.bean.WxQrCodeVo;
import org.jeecg.modules.api.service.YaoDuApiService; import org.jeecg.modules.api.service.YaoDuApiService;
import org.jeecg.modules.citiyClass.entity.CitiyClass; import org.jeecg.modules.citiyClass.entity.CitiyClass;
import org.jeecg.modules.citiyClass.service.ICitiyClassService; import org.jeecg.modules.citiyClass.service.ICitiyClassService;
@ -22,6 +32,7 @@ import org.jeecg.modules.cityAddr.service.ICityAddrService;
import org.jeecg.modules.cityAddressLog.service.ICityAddressLogService; import org.jeecg.modules.cityAddressLog.service.ICityAddressLogService;
import org.jeecg.modules.cityBanner.entity.CityBanner; import org.jeecg.modules.cityBanner.entity.CityBanner;
import org.jeecg.modules.cityBanner.service.ICityBannerService; import org.jeecg.modules.cityBanner.service.ICityBannerService;
import org.jeecg.modules.cityComment.entity.CityComment;
import org.jeecg.modules.cityComment.service.ICityCommentService; import org.jeecg.modules.cityComment.service.ICityCommentService;
import org.jeecg.modules.cityConf.entity.CityConf; import org.jeecg.modules.cityConf.entity.CityConf;
import org.jeecg.modules.cityConf.service.ICityConfService; import org.jeecg.modules.cityConf.service.ICityConfService;
@ -29,6 +40,8 @@ import org.jeecg.modules.cityHome.entity.CityHome;
import org.jeecg.modules.cityHome.service.ICityHomeService; import org.jeecg.modules.cityHome.service.ICityHomeService;
import org.jeecg.modules.cityIcon.entity.CityIcon; import org.jeecg.modules.cityIcon.entity.CityIcon;
import org.jeecg.modules.cityIcon.service.ICityIconService; import org.jeecg.modules.cityIcon.service.ICityIconService;
import org.jeecg.modules.cityJd.entity.CityJd;
import org.jeecg.modules.cityJd.service.ICityJdService;
import org.jeecg.modules.cityJob.entity.CityJob; import org.jeecg.modules.cityJob.entity.CityJob;
import org.jeecg.modules.cityJob.service.ICityJobService; import org.jeecg.modules.cityJob.service.ICityJobService;
import org.jeecg.modules.cityPhoneLog.service.ICityPhoneLogService; import org.jeecg.modules.cityPhoneLog.service.ICityPhoneLogService;
@ -40,9 +53,18 @@ import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecg.modules.hanHaiMember.service.impl.HanHaiMemberServiceImpl; import org.jeecg.modules.hanHaiMember.service.impl.HanHaiMemberServiceImpl;
import org.jeecg.modules.webCase.entity.WebCase; import org.jeecg.modules.webCase.entity.WebCase;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.*;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -107,7 +129,25 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
//获取配置信息 //获取配置信息
@Resource @Resource
private ICityConfService cityConfService; private ICityConfService cityConfService;
//获取景点信息
@Resource
private ICityJdService cityJdService;
@Value("${wechat.mpAppId}")
private String appid;
@Value("${wechat.mpAppSecret}")
private String secret;
@Value("${jeecg.oss.endpoint}")
private String endpoint;
@Value("${jeecg.oss.accessKey}")
private String accessKey;
@Value("${jeecg.oss.secretKey}")
private String secretKey;
@Value("${jeecg.oss.bucketName}")
private String bucketName;
//缓存
@Resource
private RedisUtil redisUtil;
//获取个人信息接口 //获取个人信息接口
@Override @Override
@ -155,12 +195,28 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
map.put("headImage",headImage.getKeyImage()); map.put("headImage",headImage.getKeyImage());
CityConf name = cityConfService.lambdaQuery().eq(CityConf::getKeyIcon, "name").one(); CityConf name = cityConfService.lambdaQuery().eq(CityConf::getKeyIcon, "name").one();
map.put("name",name.getKeyValue()); map.put("name",name.getKeyValue());
//获取客服二维码
CityConf kefu = cityConfService.lambdaQuery().eq(CityConf::getKeyIcon, "kefu").one();
map.put("kefu",kefu.getKeyImage());
map.put("details",kefu.getKeyValue());
//获取所有动态 //获取所有动态
Long count = cityTrendsService.lambdaQuery().count();
Long count = hanHaiMemberService.lambdaQuery().count();
Long count1 = cityTrendsService.lambdaQuery().count();
map.put("userNum",count); map.put("userNum",count);
//获取用户人数 //获取用户人数
Long count1 = hanHaiMemberService.lambdaQuery().count();
map.put("num",count1); map.put("num",count1);
//租房信息数量
map.put("homeNum",cityHomeService.lambdaQuery().count());
//兼职信息数量
map.put("jobNum",cityJobService.lambdaQuery().count());
//门店信息数量
map.put("shopNum",cityShopService.lambdaQuery().count());
//活动信息数量
map.put("activityNum",cityActivityService.lambdaQuery().count());
//景点信息数量
map.put("jdNum",cityJdService.lambdaQuery().count());
return Result.OK(map); return Result.OK(map);
} }
@ -312,8 +368,14 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
//获取评论信息列表 //获取评论信息列表
@Override @Override
public Result<?> getCommentPage(PageBean pageBean){
return Result.OK();
public Result<?> getCommentPage(String orderId,String type,PageBean pageBean){
Page<CityComment> page = new Page<CityComment>(pageBean.getPageNo(), pageBean.getPageSize());
Page<CityComment> page1 = cityCommentService
.lambdaQuery()
.eq(CityComment::getOrderId,orderId)
.orderByDesc(CityComment::getCreateTime)
.page(page);
return Result.OK(page1);
} }
@ -326,6 +388,29 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
return Result.OK(list); return Result.OK(list);
} }
//获取景点列表带分页
@Override
public Result<?> getScenicPage(PageBean pageBean){
Page<CityJd> page = new Page<CityJd>(pageBean.getPageNo(), pageBean.getPageSize());
Page<CityJd> page1 = cityJdService
.lambdaQuery()
.orderByDesc(CityJd::getCreateTime)
.page(page);
return Result.OK(page1);
}
@Override
public Result<?> getUserPage(PageBean pageBean){
Page<HanHaiMember> page = new Page<HanHaiMember>(pageBean.getPageNo(), pageBean.getPageSize());
Page<HanHaiMember> page1 = hanHaiMemberService
.lambdaQuery()
.orderByDesc(HanHaiMember::getCreateTime)
.page(page);
return Result.OK(page1);
}
//点击查看联系方式 类型 0帖子 1租房 2工作 3门店 //点击查看联系方式 类型 0帖子 1租房 2工作 3门店
@Override @Override
public Result<?> checkGivePhone(String token,String type, String id){ public Result<?> checkGivePhone(String token,String type, String id){
@ -358,10 +443,8 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
cityTrends.setCreateTime(new Date()); cityTrends.setCreateTime(new Date());
cityTrends.setSex(hanHaiMember.getSex()); cityTrends.setSex(hanHaiMember.getSex());
cityTrends.setYearDate(hanHaiMember.getYearDate()); cityTrends.setYearDate(hanHaiMember.getYearDate());
boolean save = cityTrendsService.save(cityTrends);
return Result.OK("发布成功");
cityTrendsService.saveOrUpdate(cityTrends);
return Result.OK("编辑成功");
} }
@ -376,23 +459,318 @@ public class YaoDuApiServiceImpl implements YaoDuApiService {
@Override @Override
public Result<?> personalAuthentication(String token, CitiyUserAuthentication object){ public Result<?> personalAuthentication(String token, CitiyUserAuthentication object){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//查询该用户是否已有数据
CitiyUserAuthentication byId = cityUserAuthenticationService.
lambdaQuery()
.eq(CitiyUserAuthentication::getUserId,hanHaiMember.getId())
.one();
//有数据不要重复提交
if(byId!=null){
return Result.error("请勿重复提交");
}
object.setUserId(hanHaiMember.getId()); object.setUserId(hanHaiMember.getId());
object.setCreateTime(new Date()); object.setCreateTime(new Date());
cityUserAuthenticationService.save(object); cityUserAuthenticationService.save(object);
return Result.OK("认证成功");
//修改用户实名状态
hanHaiMember.setIdCardOpen(0);
hanHaiMemberService.updateById(hanHaiMember);
return Result.OK("提交成功,等待审核");
} }
//企业认证 //企业认证
@Override @Override
public Result<?> companyAuthentication(String token, CitiyShopAuthentication object){ public Result<?> companyAuthentication(String token, CitiyShopAuthentication object){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//查询该用户是否已有数据
CitiyShopAuthentication byId = cityShopAuthenticationService.
lambdaQuery()
.eq(CitiyShopAuthentication::getUserId,hanHaiMember.getId())
.one();
if(byId!=null){
return Result.error("请勿重复提交");
}
object.setUserId(hanHaiMember.getId()); object.setUserId(hanHaiMember.getId());
object.setCreateTime(new Date()); object.setCreateTime(new Date());
cityShopAuthenticationService.save(object); cityShopAuthenticationService.save(object);
return Result.OK("认证成功");
//修改用户实名状态
hanHaiMember.setIdCardOpen(0);
hanHaiMemberService.updateById(hanHaiMember);
return Result.OK("提交成功,等待审核");
}
//我发布的帖子
@Override
public Result<?> getMyPostPage(String token, PageBean pageBean){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
Page<CityTrends> page = new Page<CityTrends>(pageBean.getPageNo(), pageBean.getPageSize());
Page<CityTrends> page1 = cityTrendsService
.lambdaQuery()
.eq(CityTrends::getUserId,hanHaiMember.getId())
.orderByDesc(CityTrends::getCreateTime)
.page(page);
return Result.OK(page1);
}
//根据帖子标识编辑帖子
@Override
public Result<?> editPost(String token, CityTrends bean){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//判断标识不能为空
if(StringUtils.isEmpty(bean.getId())){
return Result.error("帖子标识不能为空");
}
bean.setIsState(0);
cityTrendsService.updateById(bean);
return Result.OK("修改成功,等待审核");
} }
//根据帖子标识删除帖子
@Override
public Result<?> deletePost(String token, String id){
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//判断标识不能为空
if(StringUtils.isEmpty(id)){
return Result.error("帖子标识不能为空");
}
//根据帖子标识查询帖子是否存在
CityTrends cityTrends = cityTrendsService
.lambdaQuery()
.eq(CityTrends::getUserId,hanHaiMember.getId())
.eq(CityTrends::getId,id)
.one();
//不存在则返回
if(null==cityTrends){
return Result.error("帖子不存在");
}
cityTrendsService.removeById(id);
return Result.OK("删除成功");
}
//获取推广二维码
@Override
public Result<?> getQrCode(String token){
HanHaiMember member = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
CityConf vsion = cityConfService.lambdaQuery()
.eq(CityConf::getKeyIcon, "v_sion")
.one();
Integer vsionStr = Integer.parseInt(vsion.getKeyValue());
String trial = "release";
if(vsionStr == 0){
trial= "release";
}else if(vsionStr == 1){
trial= "trial";
}else{
trial= "develop";
}
WxQrCodeVo o = (WxQrCodeVo)redisUtil.get("CodeImage::" + trial+ member.getId());
if(o!=null){
o.setName("瑶都万能墙欢迎您的加入");
return Result.OK(o);
}
Map<String, Object> param = new HashMap<>();
CityConf xcxSharePage = cityConfService.lambdaQuery()
.eq(CityConf::getKeyIcon, "xcxSharePage")
.one();
String key = "shareId=" + member.getId();
param.put("path", xcxSharePage.getKeyValue() + "?" + key); //跳转页面
String accessToken = this.getAccessToken();
RestTemplate rest = new RestTemplate();
InputStream inputStream = null;
OutputStream outputStream = null;
File file = null;
// LambdaQueryWrapper<DbConf> configImg = new LambdaQueryWrapper<>();
// configImg.eq(DbConf::getIsDel,0).eq(DbConf::getKeyValue,"codeImg");
// DbConf oneImg = confService.getOne(configImg);
CityConf oneImage = cityConfService.lambdaQuery()
.eq(CityConf::getKeyIcon, "codeImg")
.one();
String codeImg = oneImage.getKeyValue();
try{
String url = "https://api.weixin.qq.com/wxa/getwxacode?access_token=" + accessToken;
param.put("scene", member.getId());
param.put("width", 150);
param.put("auto_color", false);
param.put("env_version", trial);
Map<String, Object> line_color = new HashMap<>();
line_color.put("r", 0);
line_color.put("g", 0);
line_color.put("b", 0);
param.put("line_color", line_color);
MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
org.springframework.http.HttpEntity requestEntity = new org.springframework.http.HttpEntity(JSON.toJSONString(param), headers);
ResponseEntity<byte[]> entity = rest.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]);
byte[] result = entity.getBody();
inputStream = new ByteArrayInputStream(result);
String tempSave = codeImg;
String filePath = tempSave;
file = new File(filePath);
if (!file.exists()) {
file.createNewFile();
}
outputStream = new FileOutputStream(file);
int len = 0;
byte[] buf = new byte[1024];
while ((len = inputStream.read(buf, 0, 1024)) != -1) {
outputStream.write(buf, 0, len);
}
outputStream.flush();
/**
* 将文件上传至阿里云
*/
DiskFileItemFactory factory = new DiskFileItemFactory(16, null);
FileItem item = factory.createItem("File", "text/plain", true, file.getName());
int bytesRead = 0;
byte[] buffer = new byte[8192];
try {
FileInputStream fis = new FileInputStream(file);
OutputStream os = item.getOutputStream();
while ((bytesRead = fis.read(buffer, 0, 8192)) != -1) {
os.write(buffer, 0, bytesRead);
}
os.close();
fis.close();
} catch (IOException e) {
e.printStackTrace();
}
MultipartFile mf = new CommonsMultipartFile(item);
//返回图片下载地址
WxQrCodeVo wxCodeVo = new WxQrCodeVo();
wxCodeVo.setUrl(this.uploadAliYunOss(mf));
wxCodeVo.setName("瑶都万能墙欢迎您的加入");
redisUtil.set("CodeImage::"+trial+member.getId(),wxCodeVo);
return Result.OK(wxCodeVo);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
//删除文件
if (file.exists()) {
file.delete();
}
}
return null;
}
/**
* 获取令牌
*
* @return
*/
private String getAccessToken() {
String requestUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret;
String doGet2 = HttpClientUtil.doGet2(requestUrl);
Map<String, String> map = JSON.parseObject(doGet2, new TypeReference<Map<String, String>>() {
});
return map.get("access_token");
}
/**
* 上传文件至阿里云oss
*
* @return
*/
private String uploadAliYunOss(MultipartFile mf) throws Exception {
String uploadFile = "WxCodeFile";
String fileName = new StringBuffer(mf.getOriginalFilename()).append(".jpg").toString();// 获取文件名
String dbpath = uploadFile + File.separator + fileName;
if (dbpath.contains("\\")) {
dbpath = dbpath.replace("\\", "/");
}
String endpoint = this.endpoint;
String accessKey = this.accessKey;
String secretKey = this.secretKey;
// 创建OSSClient实例
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKey, secretKey);
// 上传Byte数组
byte[] content = mf.getBytes();
String bucketName = this.bucketName;
ossClient.putObject(bucketName, dbpath, new ByteArrayInputStream(content));
// 关闭OSSClient
ossClient.shutdown();
return dbpath;
}
//获取粉丝列表接口
public Result<?> getFansList(String token, PageBean pageBean) {
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//根据用户标识查询粉丝列表带分页
Page<HanHaiMember> page = new Page<HanHaiMember>(pageBean.getPageNo(), pageBean.getPageSize());
Page<HanHaiMember> page1 = hanHaiMemberService
.lambdaQuery()
.orderByDesc(HanHaiMember::getCreateTime)
.eq(HanHaiMember::getShareId, hanHaiMember.getId())
.page(page);
return Result.OK(page1);
}
//发布评论
public Result<?> comment(String token,CityComment cityComment) {
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
cityComment.setUserId(hanHaiMember.getId());
cityComment.setUserName(hanHaiMember.getNickName());
cityComment.setUserHead(hanHaiMember.getHeadImage());
cityComment.setCreateTime(new Date());
cityCommentService.save(cityComment);
return Result.OK("评论成功");
}
//删除评论
public Result<?> deleteComment(String token,String id) {
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
cityCommentService.lambdaUpdate()
.eq(CityComment::getUserId,hanHaiMember.getId())
.eq(CityComment::getId,id)
.remove();
return Result.OK("删除成功");
}
} }

+ 24
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java View File

@ -149,4 +149,28 @@ public class YaoDuApiController {
return yaoDuApiService.getPublishButtonList(); return yaoDuApiService.getPublishButtonList();
} }
//获取景点列表带分页
@ApiOperation(value="获取景点列表带分页")
@GetMapping(value = "/getScenicPage")
public Result<?> getScenicPage(PageBean pageBean) {
return yaoDuApiService.getScenicPage(pageBean);
}
//获取用户列表带分页
@ApiOperation(value="获取用户列表带分页")
@GetMapping(value = "/getUserPage")
public Result<?> getUserPage(PageBean pageBean) {
return yaoDuApiService.getUserPage(pageBean);
}
//获取评论列表
@ApiOperation(value="获取评论列表type/0帖子/1租房/2工作/3景点/4美食/5活动")
@GetMapping(value = "/getCommentPage")
public Result<?> getCommentPage(String orderId,String type,PageBean pageBean) {
return yaoDuApiService.getCommentPage(orderId,type,pageBean);
}
} }

+ 61
- 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java View File

@ -4,9 +4,11 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.api.bean.PageBean;
import org.jeecg.modules.api.service.YaoDuApiService; import org.jeecg.modules.api.service.YaoDuApiService;
import org.jeecg.modules.citiyShopAuthentication.entity.CitiyShopAuthentication; import org.jeecg.modules.citiyShopAuthentication.entity.CitiyShopAuthentication;
import org.jeecg.modules.citiyUserAuthentication.entity.CitiyUserAuthentication; import org.jeecg.modules.citiyUserAuthentication.entity.CitiyUserAuthentication;
import org.jeecg.modules.cityComment.entity.CityComment;
import org.jeecg.modules.cityTrends.entity.CityTrends; import org.jeecg.modules.cityTrends.entity.CityTrends;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -70,12 +72,12 @@ public class YaoDuApiTokenController {
return yaoDuApiService.publishPost(token,cityTrends); return yaoDuApiService.publishPost(token,cityTrends);
} }
//评论
@PostMapping(value = "/comment")
@ApiOperation(value="评论")
public Result<?> comment(@RequestHeader("X-Access-Token") String token,String postId,String content) {
return yaoDuApiService.comment(token,postId,content);
}
// //评论
// @PostMapping(value = "/comment")
// @ApiOperation(value="评论")
// public Result<?> comment(@RequestHeader("X-Access-Token") String token,String postId,String content) {
// return yaoDuApiService.comment(token,postId,content);
// }
//个人认证 //个人认证
@PostMapping(value = "/personalAuthentication") @PostMapping(value = "/personalAuthentication")
@ -92,6 +94,59 @@ public class YaoDuApiTokenController {
} }
//我发布的帖子
@GetMapping(value = "/getMyPostPage")
@ApiOperation(value="我发布的帖子")
public Result<?> getMyPostPage(@RequestHeader("X-Access-Token") String token, PageBean pageBean) {
return yaoDuApiService.getMyPostPage(token,pageBean);
}
// //根据帖子标识编辑帖子
// @ApiOperation(value="根据帖子标识编辑帖子")
// @PostMapping(value = "/editPost")
// public Result<?> editPost(@RequestHeader("X-Access-Token") String token, CityTrends bean) {
// return yaoDuApiService.editPost(token, bean);
// }
//根据帖子标识删除帖子
@ApiOperation(value="根据帖子标识删除帖子")
@PostMapping(value = "/deletePost")
public Result<?> deletePost(@RequestHeader("X-Access-Token") String token, String postId) {
return yaoDuApiService.deletePost(token, postId);
}
//获取推广二维码
@GetMapping(value = "/getQrCode")
@ApiOperation(value="获取推广二维码", notes="获取推广二维码")
public Result<?> getQrCode(@RequestHeader("X-Access-Token") String token){
return yaoDuApiService.getQrCode(token);
}
//获取粉丝列表接口
@ApiOperation(value="获取粉丝列表接口", notes="获取粉丝列表接口")
@GetMapping("/getFansList")
public Result<?> getFansList(@RequestHeader("X-Access-Token") String token, PageBean pageBean)
{
return yaoDuApiService.getFansList(token,pageBean);
}
//发布评论
@ApiOperation(value="发布评论")
@PostMapping("/addComment")
public Result<?> addComment(@RequestHeader("X-Access-Token") String token, CityComment cityComment) {
return yaoDuApiService.comment(token,cityComment);
}
//删除评论
@ApiOperation(value="删除评论")
@PostMapping("/deleteComment")
public Result<?> deleteComment(@RequestHeader("X-Access-Token") String token,String commentId) {
return yaoDuApiService.deleteComment(token,commentId);
}
} }

Loading…
Cancel
Save