diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/controller/CityCatController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/controller/CityCatController.java new file mode 100644 index 0000000..13f27fc --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/controller/CityCatController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.cityCat.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.cityCat.entity.CityCat; +import org.jeecg.modules.cityCat.service.ICityCatService; + +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-29 + * @Version: V1.0 + */ +@Api(tags="车找人表") +@RestController +@RequestMapping("/cityCat/cityCat") +@Slf4j +public class CityCatController extends JeecgController { + @Autowired + private ICityCatService cityCatService; + + /** + * 分页列表查询 + * + * @param cityCat + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "车找人表-分页列表查询") + @ApiOperation(value="车找人表-分页列表查询", notes="车找人表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(CityCat cityCat, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(cityCat, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = cityCatService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param cityCat + * @return + */ + @AutoLog(value = "车找人表-添加") + @ApiOperation(value="车找人表-添加", notes="车找人表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody CityCat cityCat) { + cityCatService.save(cityCat); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param cityCat + * @return + */ + @AutoLog(value = "车找人表-编辑") + @ApiOperation(value="车找人表-编辑", notes="车找人表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody CityCat cityCat) { + cityCatService.updateById(cityCat); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "车找人表-通过id删除") + @ApiOperation(value="车找人表-通过id删除", notes="车找人表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + cityCatService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "车找人表-批量删除") + @ApiOperation(value="车找人表-批量删除", notes="车找人表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.cityCatService.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 queryById(@RequestParam(name="id",required=true) String id) { + CityCat cityCat = cityCatService.getById(id); + if(cityCat==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(cityCat); + } + + /** + * 导出excel + * + * @param request + * @param cityCat + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, CityCat cityCat) { + return super.exportXls(request, cityCat, CityCat.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, CityCat.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/entity/CityCat.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/entity/CityCat.java new file mode 100644 index 0000000..04825c6 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/entity/CityCat.java @@ -0,0 +1,86 @@ +package org.jeecg.modules.cityCat.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-29 + * @Version: V1.0 + */ +@Data +@TableName("city_cat") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="city_cat对象", description="车找人表") +public class CityCat 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 imageTitle; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**起点*/ + @Excel(name = "起点", width = 15) + @ApiModelProperty(value = "起点") + private java.lang.String startAddress; + /**终点*/ + @Excel(name = "终点", width = 15) + @ApiModelProperty(value = "终点") + private java.lang.String endAddress; + /**出发时间*/ + @Excel(name = "出发时间", width = 15) + @ApiModelProperty(value = "出发时间") + private java.lang.String startTime; + /**剩余位置*/ + @Excel(name = "剩余位置", width = 15) + @ApiModelProperty(value = "剩余位置") + private java.lang.Integer num; + /**联系电话*/ + @Excel(name = "联系电话", width = 15) + @ApiModelProperty(value = "联系电话") + private java.lang.String phone; + /**用户*/ + @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 userId; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/mapper/CityCatMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/mapper/CityCatMapper.java new file mode 100644 index 0000000..6f0aff1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/mapper/CityCatMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.cityCat.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.cityCat.entity.CityCat; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 车找人表 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +public interface CityCatMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/mapper/xml/CityCatMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/mapper/xml/CityCatMapper.xml new file mode 100644 index 0000000..a9275e4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/mapper/xml/CityCatMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/service/ICityCatService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/service/ICityCatService.java new file mode 100644 index 0000000..79a5bf6 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/service/ICityCatService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.cityCat.service; + +import org.jeecg.modules.cityCat.entity.CityCat; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 车找人表 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +public interface ICityCatService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/service/impl/CityCatServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/service/impl/CityCatServiceImpl.java new file mode 100644 index 0000000..8ee04e9 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/service/impl/CityCatServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.cityCat.service.impl; + +import org.jeecg.modules.cityCat.entity.CityCat; +import org.jeecg.modules.cityCat.mapper.CityCatMapper; +import org.jeecg.modules.cityCat.service.ICityCatService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 车找人表 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +@Service +public class CityCatServiceImpl extends ServiceImpl implements ICityCatService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/CityCatList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/CityCatList.vue new file mode 100644 index 0000000..f526b8b --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/CityCatList.vue @@ -0,0 +1,215 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/modules/CityCatForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/modules/CityCatForm.vue new file mode 100644 index 0000000..875221c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/modules/CityCatForm.vue @@ -0,0 +1,139 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/modules/CityCatModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/modules/CityCatModal.Style#Drawer.vue new file mode 100644 index 0000000..7f920e5 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/modules/CityCatModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/modules/CityCatModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/modules/CityCatModal.vue new file mode 100644 index 0000000..c5007d3 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue/modules/CityCatModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/CityCat.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/CityCat.api.ts new file mode 100644 index 0000000..bb399b2 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/CityCat.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/cityCat/cityCat/list', + save='/cityCat/cityCat/add', + edit='/cityCat/cityCat/edit', + deleteOne = '/cityCat/cityCat/delete', + deleteBatch = '/cityCat/cityCat/deleteBatch', + importExcel = '/cityCat/cityCat/importExcel', + exportXls = '/cityCat/cityCat/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}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/CityCat.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/CityCat.data.ts new file mode 100644 index 0000000..2042abf --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/CityCat.data.ts @@ -0,0 +1,99 @@ +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: 'imageTitle', + customRender:render.renderAvatar, + }, + { + title: '标题', + align:"center", + dataIndex: 'title' + }, + { + title: '起点', + align:"center", + dataIndex: 'startAddress' + }, + { + title: '终点', + align:"center", + dataIndex: 'endAddress' + }, + { + title: '出发时间', + align:"center", + dataIndex: 'startTime' + }, + { + title: '剩余位置', + align:"center", + dataIndex: 'num' + }, + { + title: '联系电话', + align:"center", + dataIndex: 'phone' + }, + { + title: '用户', + align:"center", + dataIndex: 'userId_dictText' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '车头照片', + field: 'imageTitle', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '标题', + field: 'title', + component: 'Input', + }, + { + label: '起点', + field: 'startAddress', + component: 'Input', + }, + { + label: '终点', + field: 'endAddress', + component: 'Input', + }, + { + label: '出发时间', + field: 'startTime', + component: 'Input', + }, + { + label: '剩余位置', + field: 'num', + component: 'InputNumber', + }, + { + label: '联系电话', + field: 'phone', + component: 'Input', + }, + { + label: '用户', + field: 'userId', + component: 'JSearchSelect', + componentProps:{ + dict:"han_hai_member,nick_name,id" + }, + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/CityCatList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/CityCatList.vue new file mode 100644 index 0000000..b519488 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/CityCatList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/components/CityCatModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/components/CityCatModal.vue new file mode 100644 index 0000000..ca81687 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityCat/vue3/components/CityCatModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/controller/CityMemberController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/controller/CityMemberController.java new file mode 100644 index 0000000..53b3051 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/controller/CityMemberController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.cityMember.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.cityMember.entity.CityMember; +import org.jeecg.modules.cityMember.service.ICityMemberService; + +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-29 + * @Version: V1.0 + */ +@Api(tags="人找车表") +@RestController +@RequestMapping("/cityMember/cityMember") +@Slf4j +public class CityMemberController extends JeecgController { + @Autowired + private ICityMemberService cityMemberService; + + /** + * 分页列表查询 + * + * @param cityMember + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "人找车表-分页列表查询") + @ApiOperation(value="人找车表-分页列表查询", notes="人找车表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(CityMember cityMember, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(cityMember, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = cityMemberService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param cityMember + * @return + */ + @AutoLog(value = "人找车表-添加") + @ApiOperation(value="人找车表-添加", notes="人找车表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody CityMember cityMember) { + cityMemberService.save(cityMember); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param cityMember + * @return + */ + @AutoLog(value = "人找车表-编辑") + @ApiOperation(value="人找车表-编辑", notes="人找车表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody CityMember cityMember) { + cityMemberService.updateById(cityMember); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "人找车表-通过id删除") + @ApiOperation(value="人找车表-通过id删除", notes="人找车表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + cityMemberService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "人找车表-批量删除") + @ApiOperation(value="人找车表-批量删除", notes="人找车表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.cityMemberService.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 queryById(@RequestParam(name="id",required=true) String id) { + CityMember cityMember = cityMemberService.getById(id); + if(cityMember==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(cityMember); + } + + /** + * 导出excel + * + * @param request + * @param cityMember + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, CityMember cityMember) { + return super.exportXls(request, cityMember, CityMember.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, CityMember.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/entity/CityMember.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/entity/CityMember.java new file mode 100644 index 0000000..239eebc --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/entity/CityMember.java @@ -0,0 +1,66 @@ +package org.jeecg.modules.cityMember.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-29 + * @Version: V1.0 + */ +@Data +@TableName("city_member") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="city_member对象", description="人找车表") +public class CityMember 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 title; + /**出发地*/ + @Excel(name = "出发地", width = 15) + @ApiModelProperty(value = "出发地") + private java.lang.String startAddress; + /**到达点*/ + @Excel(name = "到达点", width = 15) + @ApiModelProperty(value = "到达点") + private java.lang.String endAddress; + /**联系电话*/ + @Excel(name = "联系电话", width = 15) + @ApiModelProperty(value = "联系电话") + private java.lang.String phone; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/mapper/CityMemberMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/mapper/CityMemberMapper.java new file mode 100644 index 0000000..e2b6027 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/mapper/CityMemberMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.cityMember.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.cityMember.entity.CityMember; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 人找车表 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +public interface CityMemberMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/mapper/xml/CityMemberMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/mapper/xml/CityMemberMapper.xml new file mode 100644 index 0000000..b6f9a46 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/mapper/xml/CityMemberMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/service/ICityMemberService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/service/ICityMemberService.java new file mode 100644 index 0000000..50c8780 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/service/ICityMemberService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.cityMember.service; + +import org.jeecg.modules.cityMember.entity.CityMember; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 人找车表 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +public interface ICityMemberService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/service/impl/CityMemberServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/service/impl/CityMemberServiceImpl.java new file mode 100644 index 0000000..02e3483 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/service/impl/CityMemberServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.cityMember.service.impl; + +import org.jeecg.modules.cityMember.entity.CityMember; +import org.jeecg.modules.cityMember.mapper.CityMemberMapper; +import org.jeecg.modules.cityMember.service.ICityMemberService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 人找车表 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +@Service +public class CityMemberServiceImpl extends ServiceImpl implements ICityMemberService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/CityMemberList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/CityMemberList.vue new file mode 100644 index 0000000..c50e6ab --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/CityMemberList.vue @@ -0,0 +1,189 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/modules/CityMemberForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/modules/CityMemberForm.vue new file mode 100644 index 0000000..8f4e978 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/modules/CityMemberForm.vue @@ -0,0 +1,119 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/modules/CityMemberModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/modules/CityMemberModal.Style#Drawer.vue new file mode 100644 index 0000000..85fa7cb --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/modules/CityMemberModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/modules/CityMemberModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/modules/CityMemberModal.vue new file mode 100644 index 0000000..27614fb --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue/modules/CityMemberModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/CityMember.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/CityMember.api.ts new file mode 100644 index 0000000..03973d6 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/CityMember.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/cityMember/cityMember/list', + save='/cityMember/cityMember/add', + edit='/cityMember/cityMember/edit', + deleteOne = '/cityMember/cityMember/delete', + deleteBatch = '/cityMember/cityMember/deleteBatch', + importExcel = '/cityMember/cityMember/importExcel', + exportXls = '/cityMember/cityMember/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}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/CityMember.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/CityMember.data.ts new file mode 100644 index 0000000..01cc10a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/CityMember.data.ts @@ -0,0 +1,53 @@ +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: 'title' + }, + { + title: '出发地', + align:"center", + dataIndex: 'startAddress' + }, + { + title: '到达点', + align:"center", + dataIndex: 'endAddress' + }, + { + title: '联系电话', + align:"center", + dataIndex: 'phone' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '标题', + field: 'title', + component: 'Input', + }, + { + label: '出发地', + field: 'startAddress', + component: 'Input', + }, + { + label: '到达点', + field: 'endAddress', + component: 'Input', + }, + { + label: '联系电话', + field: 'phone', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/CityMemberList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/CityMemberList.vue new file mode 100644 index 0000000..78a3c65 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/CityMemberList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/components/CityMemberModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/components/CityMemberModal.vue new file mode 100644 index 0000000..8f42edc --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMember/vue3/components/CityMemberModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/controller/CityShopController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/controller/CityShopController.java index 31834aa..8bf907f 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/controller/CityShopController.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/controller/CityShopController.java @@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; /** * @Description: 商铺信息表 * @Author: jeecg-boot - * @Date: 2024-10-25 + * @Date: 2024-10-29 * @Version: V1.0 */ @Api(tags="商铺信息表") diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/entity/CityShop.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/entity/CityShop.java index 84134db..49fed40 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/entity/CityShop.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/entity/CityShop.java @@ -20,7 +20,7 @@ import lombok.experimental.Accessors; /** * @Description: 商铺信息表 * @Author: jeecg-boot - * @Date: 2024-10-25 + * @Date: 2024-10-29 * @Version: V1.0 */ @Data @@ -87,4 +87,20 @@ public class CityShop implements Serializable { @Excel(name = "排序", width = 15) @ApiModelProperty(value = "排序") private java.lang.Integer sort; + /**浏览量*/ + @Excel(name = "浏览量", width = 15) + @ApiModelProperty(value = "浏览量") + private java.lang.Integer isBrowse; + /**评论量*/ + @Excel(name = "评论量", width = 15) + @ApiModelProperty(value = "评论量") + private java.lang.Integer isComment; + /**经度*/ + @Excel(name = "经度", width = 15) + @ApiModelProperty(value = "经度") + private java.lang.String longitude; + /**纬度*/ + @Excel(name = "纬度", width = 15) + @ApiModelProperty(value = "纬度") + private java.lang.String latitude; } diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/mapper/CityShopMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/mapper/CityShopMapper.java index d6fa0b0..c76bd51 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/mapper/CityShopMapper.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/mapper/CityShopMapper.java @@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description: 商铺信息表 * @Author: jeecg-boot - * @Date: 2024-10-25 + * @Date: 2024-10-29 * @Version: V1.0 */ public interface CityShopMapper extends BaseMapper { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/ICityShopService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/ICityShopService.java index 6389278..b27d02a 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/ICityShopService.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/ICityShopService.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description: 商铺信息表 * @Author: jeecg-boot - * @Date: 2024-10-25 + * @Date: 2024-10-29 * @Version: V1.0 */ public interface ICityShopService extends IService { diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/impl/CityShopServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/impl/CityShopServiceImpl.java index fb43b4c..613db93 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/impl/CityShopServiceImpl.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/service/impl/CityShopServiceImpl.java @@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** * @Description: 商铺信息表 * @Author: jeecg-boot - * @Date: 2024-10-25 + * @Date: 2024-10-29 * @Version: V1.0 */ @Service diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/CityShopList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/CityShopList.vue index 65b85de..bdcde22 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/CityShopList.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/CityShopList.vue @@ -200,6 +200,26 @@ align:"center", dataIndex: 'sort' }, + { + title:'浏览量', + align:"center", + dataIndex: 'isBrowse' + }, + { + title:'评论量', + align:"center", + dataIndex: 'isComment' + }, + { + title:'经度', + align:"center", + dataIndex: 'longitude' + }, + { + title:'纬度', + align:"center", + dataIndex: 'latitude' + }, { title: '操作', dataIndex: 'action', @@ -245,6 +265,10 @@ fieldList.push({type:'Text',value:'details',text:'商户介绍',dictCode:''}) fieldList.push({type:'Text',value:'detailsImage',text:'商户图片',dictCode:''}) fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''}) + fieldList.push({type:'int',value:'isBrowse',text:'浏览量',dictCode:''}) + fieldList.push({type:'int',value:'isComment',text:'评论量',dictCode:''}) + fieldList.push({type:'string',value:'longitude',text:'经度',dictCode:''}) + fieldList.push({type:'string',value:'latitude',text:'纬度',dictCode:''}) this.superFieldList = fieldList } } diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/modules/CityShopForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/modules/CityShopForm.vue index 4ea2100..b46bfaa 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/modules/CityShopForm.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue/modules/CityShopForm.vue @@ -20,7 +20,7 @@ - + @@ -35,12 +35,12 @@ - + - + @@ -53,6 +53,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue3/CityShop.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue3/CityShop.data.ts index d6281de..221a306 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue3/CityShop.data.ts +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityShop/vue3/CityShop.data.ts @@ -63,6 +63,26 @@ export const columns: BasicColumn[] = [ align:"center", dataIndex: 'sort' }, + { + title: '浏览量', + align:"center", + dataIndex: 'isBrowse' + }, + { + title: '评论量', + align:"center", + dataIndex: 'isComment' + }, + { + title: '经度', + align:"center", + dataIndex: 'longitude' + }, + { + title: '纬度', + align:"center", + dataIndex: 'latitude' + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ @@ -103,7 +123,7 @@ export const formSchema: FormSchema[] = [ { label: '商户简介', field: 'titleSub', - component: 'Input', + component: 'InputTextArea',//TODO 注意string转换问题 }, { label: '商户标签', @@ -118,12 +138,12 @@ export const formSchema: FormSchema[] = [ { label: '商户地址', field: 'address', - component: 'Input', + component: 'InputTextArea',//TODO 注意string转换问题 }, { label: '商户介绍', field: 'details', - component: 'Input', + component: 'InputTextArea',//TODO 注意string转换问题 }, { label: '商户图片', @@ -137,4 +157,24 @@ export const formSchema: FormSchema[] = [ field: 'sort', component: 'InputNumber', }, + { + label: '浏览量', + field: 'isBrowse', + component: 'InputNumber', + }, + { + label: '评论量', + field: 'isComment', + component: 'InputNumber', + }, + { + label: '经度', + field: 'longitude', + component: 'Input', + }, + { + label: '纬度', + field: 'latitude', + component: 'Input', + }, ]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/entity/CityTrends.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/entity/CityTrends.java index 12a8a75..9287845 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/entity/CityTrends.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/entity/CityTrends.java @@ -127,4 +127,8 @@ public class CityTrends implements Serializable { @Excel(name = "认证方式", width = 15) @ApiModelProperty(value = "认证方式") private java.lang.String isContent; + /**联系方式*/ + @Excel(name = "联系方式", width = 15) + @ApiModelProperty(value = "联系方式") + private java.lang.String phone; } diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue/CityTrendsList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue/CityTrendsList.vue index 1ce266e..230f57f 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue/CityTrendsList.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue/CityTrendsList.vue @@ -253,6 +253,11 @@ align:"center", dataIndex: 'isContent' }, + { + title:'联系方式', + align:"center", + dataIndex: 'phone' + }, { title: '操作', dataIndex: 'action', @@ -308,6 +313,7 @@ fieldList.push({type:'string',value:'sex',text:'性别',dictCode:''}) fieldList.push({type:'int',value:'yearDate',text:'多少年',dictCode:''}) fieldList.push({type:'string',value:'isContent',text:'认证方式',dictCode:''}) + fieldList.push({type:'string',value:'phone',text:'联系方式',dictCode:''}) this.superFieldList = fieldList } } diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue/modules/CityTrendsForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue/modules/CityTrendsForm.vue index e6a1268..f7a6f67 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue/modules/CityTrendsForm.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue/modules/CityTrendsForm.vue @@ -98,6 +98,11 @@ + + + + + diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue3/CityTrends.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue3/CityTrends.data.ts index f29fb23..6e5efca 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue3/CityTrends.data.ts +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityTrends/vue3/CityTrends.data.ts @@ -110,6 +110,11 @@ export const columns: BasicColumn[] = [ align:"center", dataIndex: 'isContent' }, + { + title: '联系方式', + align:"center", + dataIndex: 'phone' + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ @@ -255,4 +260,9 @@ export const formSchema: FormSchema[] = [ field: 'isContent', component: 'Input', }, + { + label: '联系方式', + field: 'phone', + component: 'Input', + }, ]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/entity/HanHaiMember.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/entity/HanHaiMember.java index 3cd32a2..cb864d6 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/entity/HanHaiMember.java +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/entity/HanHaiMember.java @@ -39,8 +39,6 @@ public class HanHaiMember implements Serializable { @ApiModelProperty(value = "创建人") private java.lang.String createBy; /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") - @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "创建日期") private java.util.Date createTime; /**更新人*/ diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue/HanHaiMemberList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue/HanHaiMemberList.vue index 9476577..cf5e30b 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue/HanHaiMemberList.vue +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue/HanHaiMemberList.vue @@ -154,6 +154,11 @@ return parseInt(index)+1; } }, + { + title:'创建日期', + align:"center", + dataIndex: 'createTime' + }, { title:'昵称', align:"center", @@ -269,6 +274,7 @@ }, getSuperFieldList(){ let fieldList=[]; + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) fieldList.push({type:'string',value:'nickName',text:'昵称',dictCode:''}) fieldList.push({type:'string',value:'headImage',text:'用户头像',dictCode:''}) fieldList.push({type:'string',value:'name',text:'真实姓名',dictCode:''}) diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue3/HanHaiMember.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue3/HanHaiMember.data.ts index e1ab97d..3d6dd18 100644 --- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue3/HanHaiMember.data.ts +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/hanHaiMember/vue3/HanHaiMember.data.ts @@ -5,6 +5,11 @@ import { render } from '/@/utils/common/renderUtils'; //列表数据 export const columns: BasicColumn[] = [ { + title: '创建日期', + align:"center", + dataIndex: 'createTime' + }, + { title: '昵称', align:"center", dataIndex: 'nickName' diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuApiService.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuApiService.java index a189277..8815e0c 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuApiService.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/YaoDuApiService.java @@ -5,7 +5,10 @@ import org.jeecg.common.api.vo.Result; import org.jeecg.modules.api.bean.PageBean; import org.jeecg.modules.citiyShopAuthentication.entity.CitiyShopAuthentication; import org.jeecg.modules.citiyUserAuthentication.entity.CitiyUserAuthentication; +import org.jeecg.modules.cityCat.entity.CityCat; import org.jeecg.modules.cityComment.entity.CityComment; +import org.jeecg.modules.cityHome.entity.CityHome; +import org.jeecg.modules.cityJob.entity.CityJob; import org.jeecg.modules.cityTrends.entity.CityTrends; import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; import org.springframework.web.bind.annotation.RequestHeader; @@ -137,5 +140,34 @@ public interface YaoDuApiService { //验证规则 Integer sendMsgSecCheck(String openid,String content) ; + //获取景点详情 + Result getScenicDetail(String id); + + //获取车找人分页列表 + Result getCatPage(PageBean pageBean); + + //获取人找车详情 + Result getCarDetail(String id); + + //获取车找人详情 + Result getCatDetail(String id); + + //获取人找车分页 + Result getCarPage(PageBean pageBean); + + //获取江华人信息接口 + Result getJiangHuInfo(PageBean pageBean); + + + //发布租房信息 + Result publishRent(String token, CityHome home); + + //发布招聘信息 + Result publishJob(String token, CityJob job); + + //发布车找人信息 + Result publishCat(String token, CityCat cat); + + } diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java index 99faac2..71e7d75 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuApiServiceImpl.java @@ -33,6 +33,9 @@ import org.jeecg.modules.cityAddr.service.ICityAddrService; import org.jeecg.modules.cityAddressLog.service.ICityAddressLogService; import org.jeecg.modules.cityBanner.entity.CityBanner; import org.jeecg.modules.cityBanner.service.ICityBannerService; +import org.jeecg.modules.cityCat.entity.CityCat; +import org.jeecg.modules.cityCat.service.ICityCatService; +import org.jeecg.modules.cityCat.service.impl.CityCatServiceImpl; import org.jeecg.modules.cityComment.entity.CityComment; import org.jeecg.modules.cityComment.service.ICityCommentService; import org.jeecg.modules.cityConf.entity.CityConf; @@ -45,6 +48,8 @@ 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.service.ICityJobService; +import org.jeecg.modules.cityMember.entity.CityMember; +import org.jeecg.modules.cityMember.service.ICityMemberService; import org.jeecg.modules.cityPhoneLog.service.ICityPhoneLogService; import org.jeecg.modules.cityShop.entity.CityShop; import org.jeecg.modules.cityShop.service.ICityShopService; @@ -67,6 +72,7 @@ import java.io.*; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.time.LocalDate; import java.util.*; @Service @@ -148,10 +154,21 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { @Resource private RedisUtil redisUtil; + //车找人 + @Resource + private ICityCatService cityCatService; + //人找车 + @Resource + private ICityMemberService cityMemberService; + //获取个人信息接口 @Override public Result getInfo(String token){ HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + hanHaiMember.setIntentionNum( + Math.toIntExact(hanHaiMemberService.lambdaQuery().eq(HanHaiMember::getShareId, hanHaiMember.getId()).count()) + ); + return Result.OK("查询成功", hanHaiMember); } @@ -272,8 +289,10 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { cityTrends.setUserName(one.getName()); } cityTrends.setUserImage(one.getHeadImage()); - cityTrends.setYearDate(one.getYearDate()); - cityTrends.setAddress(one.getAddress()); + + //获取今年是多少年 + cityTrends.setYearDate(LocalDate.now().getYear() - one.getYearDate()); + cityTrends.setAddId(one.getAddress()); if (one.getIdCardOpen() == null){ cityTrends.setIsContent(""); }else if (one.getIdCardOpen()== 1){ @@ -294,12 +313,36 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { @Override public Result getPostDetail(String id){ CityTrends cityTrends = cityTrendsService.getById(id); + + //修改帖子浏览量 cityTrends.setIsBrowse(cityTrends.getIsBrowse() + 1); cityTrendsService.updateById(cityTrends); + + + cityTrends.setIsComment(Math.toIntExact(cityCommentService.lambdaQuery().eq(CityComment::getOrderId, cityTrends.getId()).count())); //根据用户表示查询用信息 - HanHaiMember byId = hanHaiMemberService.getById(cityTrends.getUserId()); - cityTrends.setUserId(byId.getNickName()); + HanHaiMember one = hanHaiMemberService.getById(cityTrends.getUserId()); + if(StringUtils.isBlank(one.getName())){ + cityTrends.setUserName(one.getNickName()); + }else{ + cityTrends.setUserName(one.getName()); + } + cityTrends.setUserImage(one.getHeadImage()); + //获取今年是多少年 + cityTrends.setYearDate(LocalDate.now().getYear() - one.getYearDate()); + + cityTrends.setAddress(one.getAddress()); + if (one.getIdCardOpen() == null){ + cityTrends.setIsContent(""); + }else if (one.getIdCardOpen()== 1){ + cityTrends.setIsContent("个人实名"); + } else if (one.getIdCardOpen()== 2){ + cityTrends.setIsContent("店铺实名"); + }else{ + cityTrends.setIsContent(""); + } + return Result.OK(cityTrends); } @@ -550,8 +593,37 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { .lambdaQuery() .eq(CityTrends::getUserId,hanHaiMember.getId()) .orderByDesc(CityTrends::getCreateTime) - .eq(CityTrends::getIsState,1) .page(page); + + //获取评论数量 + List records = page1.getRecords(); + //创建一个新的集合 + List newRecords = new ArrayList<>(); + for (CityTrends cityTrends : records) { + cityTrends.setIsComment(Math.toIntExact(cityCommentService.lambdaQuery().eq(CityComment::getOrderId, cityTrends.getId()).count())); + HanHaiMember one = hanHaiMemberService.lambdaQuery().eq(HanHaiMember::getId, cityTrends.getUserId()).one(); + if(StringUtils.isBlank(one.getName())){ + cityTrends.setUserName(one.getNickName()); + }else{ + cityTrends.setUserName(one.getName()); + } + cityTrends.setUserImage(one.getHeadImage()); + + //获取今年是多少年 + cityTrends.setYearDate(LocalDate.now().getYear() - one.getYearDate()); + cityTrends.setAddId(one.getAddress()); + if (one.getIdCardOpen() == null){ + cityTrends.setIsContent(""); + }else if (one.getIdCardOpen()== 1){ + cityTrends.setIsContent("个人实名"); + } else if (one.getIdCardOpen()== 2){ + cityTrends.setIsContent("店铺实名"); + }else{ + cityTrends.setIsContent(""); + } + newRecords.add(cityTrends); + } + page1.setRecords(newRecords); return Result.OK(page1); } @@ -915,4 +987,97 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { + + + //获取景点详情 + @Override + public Result getScenicDetail(String id) { + CityJd jd = cityJdService.getById(id); + return Result.OK(jd); + } + + + + //获取车找人分页列表 + @Override + public Result getCatPage(PageBean pageBean) { + Page page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + Page page1 = cityCatService.lambdaQuery() + .orderByDesc(CityCat::getCreateTime) + .page(page); + return Result.OK(page1); + } + + + //获取车找人详情 + @Override + public Result getCatDetail(String id) { + CityCat cat = cityCatService.getById(id); + return Result.OK(cat); + } + + //获取人找车分页 + @Override + public Result getCarPage(PageBean pageBean) { + Page page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + Page page1 = cityMemberService.lambdaQuery() + .orderByDesc(CityMember::getCreateTime) + .page(page); + return Result.OK(page1); + } + + //获取人找车详情 + @Override + public Result getCarDetail(String id) { + CityMember member = cityMemberService.getById(id); + return Result.OK(member); + } + + + //获取江华人信息接口 + @Override + public Result getJiangHuInfo(PageBean pageBean){ + //获取当前用户数量带分页安时间倒序 + Page page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + Page page1 = hanHaiMemberService.lambdaQuery() + .orderByDesc(HanHaiMember::getCreateTime) + .page(page); + return Result.OK(page1); + } + + + //发布租房信息 + @Override + public Result publishRent(String token, CityHome home){ + HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + //设置配置 + home.setUserId(hanHaiMember.getId()); + home.setCreateTime(new Date()); + cityHomeService.saveOrUpdate(home); + return Result.OK("编辑成功"); + } + + //发布招聘信息 + @Override + public Result publishJob(String token, CityJob job){ + HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + //设置配置 + job.setUserId(hanHaiMember.getId()); + job.setCreateTime(new Date()); + cityJobService.saveOrUpdate(job); + return Result.OK("编辑成功"); + } + + //发布车找人信息 + @Override + public Result publishCat(String token, CityCat cat){ + HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + //设置配置 + cat.setUserId(hanHaiMember.getId()); + cat.setCreateTime(new Date()); + cityCatService.saveOrUpdate(cat); + return Result.OK("编辑成功"); + } + + } diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java index e90f573..cd89b75 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiController.java @@ -180,5 +180,49 @@ public class YaoDuApiController { // return yaoDuApiService.sendMsgSecCheck("oFzrW4tqZUvN9T0RQzWPdCT1St68", context); // } + //获取景点详情 + @ApiOperation(value="获取景点详情") + @GetMapping(value = "/getScenicDetail") + public Result getScenicDetail(String id) { + return yaoDuApiService.getScenicDetail(id); + } + + + //获取车找人分页列表 + @ApiOperation(value="获取车找人分页列表") + @GetMapping(value = "/getCatPage") + public Result getCatPage(PageBean pageBean) { + return yaoDuApiService.getCatPage(pageBean); + } + + //获取车找人详情 + @ApiOperation(value="获取车找人详情") + @GetMapping(value = "/getCatDetail") + public Result getCatDetail(String id) { + return yaoDuApiService.getCatDetail(id); + } + + + //获取人找车分页列表 + @ApiOperation(value="获取人找车分页列表") + @GetMapping(value = "/getPeoplePage") + public Result getPeoplePage(PageBean pageBean) { + return yaoDuApiService.getCarPage(pageBean); + } + + //获取人找车详情 + @ApiOperation(value="获取人找车详情") + @GetMapping(value = "/getPeopleDetail") + public Result getPeopleDetail(String id) { + return yaoDuApiService.getCarDetail(id); + } + + + //获取江华人信息接口 + @ApiOperation(value="获取江华人信息接口") + @GetMapping(value = "/getJiangHuInfo") + public Result getJiangHuInfo(PageBean pageBean) { + return yaoDuApiService.getJiangHuInfo(pageBean); + } } diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java index 1c313f0..622277e 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/yaoduapi/YaoDuApiTokenController.java @@ -8,7 +8,10 @@ import org.jeecg.modules.api.bean.PageBean; import org.jeecg.modules.api.service.YaoDuApiService; import org.jeecg.modules.citiyShopAuthentication.entity.CitiyShopAuthentication; import org.jeecg.modules.citiyUserAuthentication.entity.CitiyUserAuthentication; +import org.jeecg.modules.cityCat.entity.CityCat; import org.jeecg.modules.cityComment.entity.CityComment; +import org.jeecg.modules.cityHome.entity.CityHome; +import org.jeecg.modules.cityJob.entity.CityJob; import org.jeecg.modules.cityTrends.entity.CityTrends; import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; import org.springframework.web.bind.annotation.*; @@ -147,6 +150,27 @@ public class YaoDuApiTokenController { return yaoDuApiService.deleteComment(token,commentId); } + //发布租房信息 + @ApiOperation(value="发布租房信息") + @PostMapping("/publishRent") + public Result publishRent(@RequestHeader("X-Access-Token") String token, CityHome home) { + return yaoDuApiService.publishRent(token,home); + } + + + //发布招聘信息 + @ApiOperation(value="发布招聘信息") + @PostMapping("/publishJob") + public Result publishJob(@RequestHeader("X-Access-Token") String token, CityJob job) { + return yaoDuApiService.publishJob(token,job); + } + + //发布车找人信息 + @ApiOperation(value="发布车找人信息") + @PostMapping("/publishCar") + public Result publishCar(@RequestHeader("X-Access-Token") String token, CityCat car) { + return yaoDuApiService.publishCat(token,car); + } }