| @ -0,0 +1,171 @@ | |||||
| package org.jeecg.modules.employTrade.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.employTrade.entity.EmployTrade; | |||||
| import org.jeecg.modules.employTrade.service.IEmployTradeService; | |||||
| 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: 2025-02-22 | |||||
| * @Version: V1.0 | |||||
| */ | |||||
| @Api(tags="交易订单") | |||||
| @RestController | |||||
| @RequestMapping("/employTrade/employTrade") | |||||
| @Slf4j | |||||
| public class EmployTradeController extends JeecgController<EmployTrade, IEmployTradeService> { | |||||
| @Autowired | |||||
| private IEmployTradeService employTradeService; | |||||
| /** | |||||
| * 分页列表查询 | |||||
| * | |||||
| * @param employTrade | |||||
| * @param pageNo | |||||
| * @param pageSize | |||||
| * @param req | |||||
| * @return | |||||
| */ | |||||
| //@AutoLog(value = "交易订单-分页列表查询") | |||||
| @ApiOperation(value="交易订单-分页列表查询", notes="交易订单-分页列表查询") | |||||
| @GetMapping(value = "/list") | |||||
| public Result<IPage<EmployTrade>> queryPageList(EmployTrade employTrade, | |||||
| @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |||||
| @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |||||
| HttpServletRequest req) { | |||||
| QueryWrapper<EmployTrade> queryWrapper = QueryGenerator.initQueryWrapper(employTrade, req.getParameterMap()); | |||||
| Page<EmployTrade> page = new Page<EmployTrade>(pageNo, pageSize); | |||||
| IPage<EmployTrade> pageList = employTradeService.page(page, queryWrapper); | |||||
| return Result.OK(pageList); | |||||
| } | |||||
| /** | |||||
| * 添加 | |||||
| * | |||||
| * @param employTrade | |||||
| * @return | |||||
| */ | |||||
| @AutoLog(value = "交易订单-添加") | |||||
| @ApiOperation(value="交易订单-添加", notes="交易订单-添加") | |||||
| @PostMapping(value = "/add") | |||||
| public Result<String> add(@RequestBody EmployTrade employTrade) { | |||||
| employTradeService.save(employTrade); | |||||
| return Result.OK("添加成功!"); | |||||
| } | |||||
| /** | |||||
| * 编辑 | |||||
| * | |||||
| * @param employTrade | |||||
| * @return | |||||
| */ | |||||
| @AutoLog(value = "交易订单-编辑") | |||||
| @ApiOperation(value="交易订单-编辑", notes="交易订单-编辑") | |||||
| @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |||||
| public Result<String> edit(@RequestBody EmployTrade employTrade) { | |||||
| employTradeService.updateById(employTrade); | |||||
| 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) { | |||||
| employTradeService.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.employTradeService.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<EmployTrade> queryById(@RequestParam(name="id",required=true) String id) { | |||||
| EmployTrade employTrade = employTradeService.getById(id); | |||||
| if(employTrade==null) { | |||||
| return Result.error("未找到对应数据"); | |||||
| } | |||||
| return Result.OK(employTrade); | |||||
| } | |||||
| /** | |||||
| * 导出excel | |||||
| * | |||||
| * @param request | |||||
| * @param employTrade | |||||
| */ | |||||
| @RequestMapping(value = "/exportXls") | |||||
| public ModelAndView exportXls(HttpServletRequest request, EmployTrade employTrade) { | |||||
| return super.exportXls(request, employTrade, EmployTrade.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, EmployTrade.class); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,68 @@ | |||||
| package org.jeecg.modules.employTrade.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: 2025-02-22 | |||||
| * @Version: V1.0 | |||||
| */ | |||||
| @Data | |||||
| @TableName("employ_trade") | |||||
| @Accessors(chain = true) | |||||
| @EqualsAndHashCode(callSuper = false) | |||||
| @ApiModel(value="employ_trade对象", description="交易订单") | |||||
| public class EmployTrade 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.math.BigDecimal amount; | |||||
| /**状态*/ | |||||
| @Excel(name = "状态", width = 15, dicCode = "employ_trade_status") | |||||
| @Dict(dicCode = "employ_trade_status") | |||||
| @ApiModelProperty(value = "状态") | |||||
| private java.lang.String status; | |||||
| /**关联用户*/ | |||||
| @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; | |||||
| } | |||||
| @ -0,0 +1,17 @@ | |||||
| package org.jeecg.modules.employTrade.mapper; | |||||
| import java.util.List; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import org.jeecg.modules.employTrade.entity.EmployTrade; | |||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
| /** | |||||
| * @Description: 交易订单 | |||||
| * @Author: jeecg-boot | |||||
| * @Date: 2025-02-22 | |||||
| * @Version: V1.0 | |||||
| */ | |||||
| public interface EmployTradeMapper extends BaseMapper<EmployTrade> { | |||||
| } | |||||
| @ -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.employTrade.mapper.EmployTradeMapper"> | |||||
| </mapper> | |||||
| @ -0,0 +1,14 @@ | |||||
| package org.jeecg.modules.employTrade.service; | |||||
| import org.jeecg.modules.employTrade.entity.EmployTrade; | |||||
| import com.baomidou.mybatisplus.extension.service.IService; | |||||
| /** | |||||
| * @Description: 交易订单 | |||||
| * @Author: jeecg-boot | |||||
| * @Date: 2025-02-22 | |||||
| * @Version: V1.0 | |||||
| */ | |||||
| public interface IEmployTradeService extends IService<EmployTrade> { | |||||
| } | |||||
| @ -0,0 +1,19 @@ | |||||
| package org.jeecg.modules.employTrade.service.impl; | |||||
| import org.jeecg.modules.employTrade.entity.EmployTrade; | |||||
| import org.jeecg.modules.employTrade.mapper.EmployTradeMapper; | |||||
| import org.jeecg.modules.employTrade.service.IEmployTradeService; | |||||
| import org.springframework.stereotype.Service; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
| /** | |||||
| * @Description: 交易订单 | |||||
| * @Author: jeecg-boot | |||||
| * @Date: 2025-02-22 | |||||
| * @Version: V1.0 | |||||
| */ | |||||
| @Service | |||||
| public class EmployTradeServiceImpl extends ServiceImpl<EmployTradeMapper, EmployTrade> implements IEmployTradeService { | |||||
| } | |||||
| @ -0,0 +1,190 @@ | |||||
| <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> | |||||
| <employ-trade-modal ref="modalForm" @ok="modalFormOk"></employ-trade-modal> | |||||
| </a-card> | |||||
| </template> | |||||
| <script> | |||||
| import '@/assets/less/TableExpand.less' | |||||
| import { mixinDevice } from '@/utils/mixin' | |||||
| import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||||
| import EmployTradeModal from './modules/EmployTradeModal' | |||||
| import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||||
| export default { | |||||
| name: 'EmployTradeList', | |||||
| mixins:[JeecgListMixin, mixinDevice], | |||||
| components: { | |||||
| EmployTradeModal | |||||
| }, | |||||
| 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: 'title' | |||||
| }, | |||||
| { | |||||
| title:'金额', | |||||
| align:"center", | |||||
| dataIndex: 'amount' | |||||
| }, | |||||
| { | |||||
| title:'状态', | |||||
| align:"center", | |||||
| dataIndex: 'status_dictText' | |||||
| }, | |||||
| { | |||||
| title:'关联用户', | |||||
| align:"center", | |||||
| dataIndex: 'userId_dictText' | |||||
| }, | |||||
| { | |||||
| title: '操作', | |||||
| dataIndex: 'action', | |||||
| align:"center", | |||||
| fixed:"right", | |||||
| width:147, | |||||
| scopedSlots: { customRender: 'action' } | |||||
| } | |||||
| ], | |||||
| url: { | |||||
| list: "/employTrade/employTrade/list", | |||||
| delete: "/employTrade/employTrade/delete", | |||||
| deleteBatch: "/employTrade/employTrade/deleteBatch", | |||||
| exportXlsUrl: "/employTrade/employTrade/exportXls", | |||||
| importExcelUrl: "employTrade/employTrade/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:'title',text:'标题',dictCode:''}) | |||||
| fieldList.push({type:'BigDecimal',value:'amount',text:'金额',dictCode:''}) | |||||
| fieldList.push({type:'string',value:'status',text:'状态',dictCode:'employ_trade_status'}) | |||||
| fieldList.push({type:'string',value:'userId',text:'关联用户',dictCode:"han_hai_member,nick_name,id"}) | |||||
| this.superFieldList = fieldList | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style scoped> | |||||
| @import '~@assets/less/common.less'; | |||||
| </style> | |||||
| @ -0,0 +1,119 @@ | |||||
| <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="title"> | |||||
| <a-input v-model="model.title" placeholder="请输入标题" ></a-input> | |||||
| </a-form-model-item> | |||||
| </a-col> | |||||
| <a-col :span="24"> | |||||
| <a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount"> | |||||
| <a-input-number v-model="model.amount" placeholder="请输入金额" style="width: 100%" /> | |||||
| </a-form-model-item> | |||||
| </a-col> | |||||
| <a-col :span="24"> | |||||
| <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> | |||||
| <j-dict-select-tag type="list" v-model="model.status" dictCode="employ_trade_status" placeholder="请选择状态" /> | |||||
| </a-form-model-item> | |||||
| </a-col> | |||||
| <a-col :span="24"> | |||||
| <a-form-model-item label="关联用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId"> | |||||
| <j-dict-select-tag type="list" v-model="model.userId" dictCode="han_hai_member,nick_name,id" placeholder="请选择关联用户" /> | |||||
| </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: 'EmployTradeForm', | |||||
| 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: "/employTrade/employTrade/add", | |||||
| edit: "/employTrade/employTrade/edit", | |||||
| queryById: "/employTrade/employTrade/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> | |||||
| @ -0,0 +1,84 @@ | |||||
| <template> | |||||
| <a-drawer | |||||
| :title="title" | |||||
| :width="width" | |||||
| placement="right" | |||||
| :closable="false" | |||||
| @close="close" | |||||
| destroyOnClose | |||||
| :visible="visible"> | |||||
| <employ-trade-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></employ-trade-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 EmployTradeForm from './EmployTradeForm' | |||||
| export default { | |||||
| name: 'EmployTradeModal', | |||||
| components: { | |||||
| EmployTradeForm | |||||
| }, | |||||
| 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> | |||||
| @ -0,0 +1,60 @@ | |||||
| <template> | |||||
| <j-modal | |||||
| :title="title" | |||||
| :width="width" | |||||
| :visible="visible" | |||||
| switchFullscreen | |||||
| @ok="handleOk" | |||||
| :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |||||
| @cancel="handleCancel" | |||||
| cancelText="关闭"> | |||||
| <employ-trade-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></employ-trade-form> | |||||
| </j-modal> | |||||
| </template> | |||||
| <script> | |||||
| import EmployTradeForm from './EmployTradeForm' | |||||
| export default { | |||||
| name: 'EmployTradeModal', | |||||
| components: { | |||||
| EmployTradeForm | |||||
| }, | |||||
| 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> | |||||
| @ -0,0 +1,61 @@ | |||||
| import {defHttp} from '/@/utils/http/axios'; | |||||
| import {Modal} from 'ant-design-vue'; | |||||
| enum Api { | |||||
| list = '/employTrade/employTrade/list', | |||||
| save='/employTrade/employTrade/add', | |||||
| edit='/employTrade/employTrade/edit', | |||||
| deleteOne = '/employTrade/employTrade/delete', | |||||
| deleteBatch = '/employTrade/employTrade/deleteBatch', | |||||
| importExcel = '/employTrade/employTrade/importExcel', | |||||
| exportXls = '/employTrade/employTrade/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}); | |||||
| } | |||||
| @ -0,0 +1,59 @@ | |||||
| 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: 'amount' | |||||
| }, | |||||
| { | |||||
| title: '状态', | |||||
| align:"center", | |||||
| dataIndex: 'status_dictText' | |||||
| }, | |||||
| { | |||||
| title: '关联用户', | |||||
| align:"center", | |||||
| dataIndex: 'userId_dictText' | |||||
| }, | |||||
| ]; | |||||
| //查询数据 | |||||
| export const searchFormSchema: FormSchema[] = [ | |||||
| ]; | |||||
| //表单数据 | |||||
| export const formSchema: FormSchema[] = [ | |||||
| { | |||||
| label: '标题', | |||||
| field: 'title', | |||||
| component: 'Input', | |||||
| }, | |||||
| { | |||||
| label: '金额', | |||||
| field: 'amount', | |||||
| component: 'InputNumber', | |||||
| }, | |||||
| { | |||||
| label: '状态', | |||||
| field: 'status', | |||||
| component: 'JDictSelectTag', | |||||
| componentProps:{ | |||||
| dictCode:"employ_trade_status" | |||||
| }, | |||||
| }, | |||||
| { | |||||
| label: '关联用户', | |||||
| field: 'userId', | |||||
| component: 'JDictSelectTag', | |||||
| componentProps:{ | |||||
| dictCode:"han_hai_member,nick_name,id" | |||||
| }, | |||||
| }, | |||||
| ]; | |||||
| @ -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> | |||||
| <!-- 表单区域 --> | |||||
| <EmployTradeModal @register="registerModal" @success="handleSuccess"></EmployTradeModal> | |||||
| </div> | |||||
| </template> | |||||
| <script lang="ts" name="employTrade-employTrade" 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 EmployTradeModal from './components/EmployTradeModal.vue' | |||||
| import {columns, searchFormSchema} from './employTrade.data'; | |||||
| import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './employTrade.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> | |||||
| @ -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 '../employTrade.data'; | |||||
| import {saveOrUpdate} from '../employTrade.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> | |||||
| @ -0,0 +1,50 @@ | |||||
| package org.jeecg.modules.api.employController; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import lombok.extern.slf4j.Slf4j; | |||||
| import org.jeecg.common.api.vo.Result; | |||||
| import org.jeecg.modules.apiBean.PageBean; | |||||
| import org.jeecg.modules.apiService.NewsService; | |||||
| import org.jeecg.modules.apiService.OrderService; | |||||
| import org.jeecg.modules.employOrder.entity.EmployOrder; | |||||
| import org.springframework.web.bind.annotation.RequestHeader; | |||||
| import org.springframework.web.bind.annotation.RequestMapping; | |||||
| import org.springframework.web.bind.annotation.RequestMethod; | |||||
| import org.springframework.web.bind.annotation.RestController; | |||||
| import javax.annotation.Resource; | |||||
| @Api(tags="订单-订单相关接口") | |||||
| @RestController | |||||
| @RequestMapping("/employ/order") | |||||
| @Slf4j | |||||
| public class OrderController { | |||||
| /******************************************************************************************************************/ | |||||
| //订单信息 | |||||
| @Resource | |||||
| private OrderService orderService; | |||||
| /******************************************************************************************************************/ | |||||
| //订单信息-查看订单列表 | |||||
| @ApiOperation(value="订单信息-查看订单列表", notes="role-0:求职方 1:招聘方") | |||||
| @RequestMapping(value = "/queryOrderList", method = {RequestMethod.POST}) | |||||
| public Result<?> queryOrderList(@RequestHeader("X-Access-Token")String token, String status, String role, PageBean pageBean){ | |||||
| return orderService.queryOrderList(token, status, role, pageBean); | |||||
| } | |||||
| //订单信息-添加订单 | |||||
| @ApiOperation(value="订单信息-添加订单", notes="订单信息-添加订单") | |||||
| @RequestMapping(value = "/addOrder", method = {RequestMethod.POST}) | |||||
| public Result<?> addOrder(@RequestHeader("X-Access-Token")String token, EmployOrder employOrder){ | |||||
| return orderService.addOrder(token, employOrder); | |||||
| } | |||||
| //订单信息-添加订单 | |||||
| @ApiOperation(value="订单信息-取消订单", notes="订单信息-取消订单") | |||||
| @RequestMapping(value = "/deleteOrder", method = {RequestMethod.POST}) | |||||
| public Result<?> deleteOrder(@RequestHeader("X-Access-Token")String token, String orderId){ | |||||
| return orderService.deleteOrder(token, orderId); | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,22 @@ | |||||
| package org.jeecg.modules.apiService; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import org.jeecg.common.api.vo.Result; | |||||
| import org.jeecg.modules.apiBean.PageBean; | |||||
| import org.jeecg.modules.employOrder.entity.EmployOrder; | |||||
| import org.springframework.web.bind.annotation.RequestHeader; | |||||
| import org.springframework.web.bind.annotation.RequestMapping; | |||||
| import org.springframework.web.bind.annotation.RequestMethod; | |||||
| public interface OrderService { | |||||
| //订单信息-查看订单列表 | |||||
| public Result<?> queryOrderList(@RequestHeader("X-Access-Token")String token, String status, String role, PageBean pageBean); | |||||
| //订单信息-添加订单 | |||||
| public Result<?> addOrder(@RequestHeader("X-Access-Token")String token, EmployOrder employOrder); | |||||
| //订单信息-添加订单 | |||||
| public Result<?> deleteOrder(@RequestHeader("X-Access-Token")String token, String orderId); | |||||
| } | |||||
| @ -0,0 +1,196 @@ | |||||
| package org.jeecg.modules.apiService.impl; | |||||
| import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; | |||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||||
| import org.jeecg.common.api.vo.Result; | |||||
| import org.jeecg.config.shiro.ShiroRealm; | |||||
| import org.jeecg.modules.apiBean.PageBean; | |||||
| import org.jeecg.modules.apiService.OrderService; | |||||
| import org.jeecg.modules.employAuthenticationCompany.entity.EmployAuthenticationCompany; | |||||
| import org.jeecg.modules.employAuthenticationCompany.service.IEmployAuthenticationCompanyService; | |||||
| import org.jeecg.modules.employAuthenticationPerson.entity.EmployAuthenticationPerson; | |||||
| import org.jeecg.modules.employAuthenticationPerson.service.IEmployAuthenticationPersonService; | |||||
| import org.jeecg.modules.employJob.entity.EmployJob; | |||||
| import org.jeecg.modules.employJob.service.IEmployJobService; | |||||
| import org.jeecg.modules.employNews.entity.EmployNews; | |||||
| import org.jeecg.modules.employOrder.entity.EmployOrder; | |||||
| import org.jeecg.modules.employOrder.service.IEmployOrderService; | |||||
| import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; | |||||
| import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; | |||||
| import org.springframework.stereotype.Service; | |||||
| import javax.annotation.Resource; | |||||
| @Service | |||||
| public class OrderServiceImpl implements OrderService { | |||||
| /******************************************************************************************************************/ | |||||
| //权限验证 | |||||
| @Resource | |||||
| private ShiroRealm shiroRealm; | |||||
| @Resource | |||||
| private IEmployOrderService employOrderService; | |||||
| @Resource | |||||
| private IEmployJobService employJobService; | |||||
| @Resource | |||||
| private IEmployAuthenticationCompanyService employAuthenticationCompanyService; | |||||
| @Resource | |||||
| private IEmployAuthenticationPersonService employAuthenticationPersonService; | |||||
| @Resource | |||||
| private IHanHaiMemberService hanHaiMemberService; | |||||
| /******************************************************************************************************************/ | |||||
| //订单信息-查看订单列表 | |||||
| @Override | |||||
| public Result<?> queryOrderList(String token, String status, String role, PageBean pageBean) { | |||||
| //权限验证 | |||||
| HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); | |||||
| //返回信息 | |||||
| String message = "订单信息列表失败!"; | |||||
| //订单信息列表 | |||||
| Page<EmployOrder> pageList = null; | |||||
| //分页信息 | |||||
| Page<EmployOrder> page = null; | |||||
| try{ | |||||
| //分页 | |||||
| page = new Page<EmployOrder>(pageBean.getPageNo(), pageBean.getPageSize()); | |||||
| LambdaQueryChainWrapper<EmployOrder> query = employOrderService.lambdaQuery(); | |||||
| //组装查询信息 | |||||
| // 用户角色:0-求职方 1-招聘方 | |||||
| if("0".equals(role)){ | |||||
| query.eq(EmployOrder::getEmployeeId, hanHaiMember.getId()); | |||||
| }else if("1".equals(role)){ | |||||
| query.eq(EmployOrder::getBossId, hanHaiMember.getId()); | |||||
| } | |||||
| //订单状态 | |||||
| if(null != status){ | |||||
| query.eq(EmployOrder::getStatus, status); | |||||
| } | |||||
| //按时间倒序 | |||||
| query.orderByDesc(EmployOrder::getCreateTime); | |||||
| //获取订单信息列表 | |||||
| pageList = query.page(page); | |||||
| for (EmployOrder record : pageList.getRecords()) { | |||||
| //招聘工作信息 | |||||
| EmployJob employJob = employJobService.getById(record.getJobId()); | |||||
| if(null != employJob){ | |||||
| record.setEmployJob(employJob); | |||||
| } | |||||
| //招聘方企业实名信息 | |||||
| EmployAuthenticationCompany employAuthenticationCompany = employAuthenticationCompanyService | |||||
| .lambdaQuery() | |||||
| .eq(EmployAuthenticationCompany::getUserId, record.getBossId()) | |||||
| .one(); | |||||
| if(null != employAuthenticationCompany){ | |||||
| record.setEmployAuthenticationCompany(employAuthenticationCompany); | |||||
| } | |||||
| //招聘方个人实名信息 | |||||
| EmployAuthenticationPerson boss = employAuthenticationPersonService | |||||
| .lambdaQuery() | |||||
| .eq(EmployAuthenticationPerson::getUserId, record.getBossId()) | |||||
| .one(); | |||||
| if(null != boss){ | |||||
| record.setEmployAuthenticationPersonBoss(boss); | |||||
| } | |||||
| //求职方个人实名信息 | |||||
| EmployAuthenticationPerson employee = employAuthenticationPersonService | |||||
| .lambdaQuery() | |||||
| .eq(EmployAuthenticationPerson::getUserId, record.getEmployeeId()) | |||||
| .one(); | |||||
| if(null != employee){ | |||||
| record.setEmployAuthenticationPersonEmployee(employee); | |||||
| } | |||||
| } | |||||
| //判断执行结果 | |||||
| if(null != pageList){ | |||||
| message = "订单信息列表"; | |||||
| }else { | |||||
| message = "订单信息列表为空"; | |||||
| } | |||||
| //返回执行结果 | |||||
| return Result.OK(message, pageList); | |||||
| }catch (Exception e){ | |||||
| //错误信息打印 | |||||
| e.printStackTrace(); | |||||
| return Result.error(message, pageList); | |||||
| } | |||||
| } | |||||
| //订单信息-添加订单 | |||||
| @Override | |||||
| public Result<?> addOrder(String token, EmployOrder employOrder) { | |||||
| //权限验证 | |||||
| HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); | |||||
| //返回信息 | |||||
| String message = "订单添加失败"; | |||||
| //执行结果 | |||||
| boolean result = false; | |||||
| try{ | |||||
| //3、执行订单信息添加 | |||||
| result = employOrderService.save(employOrder); | |||||
| //判断执行结果 | |||||
| if(result){ | |||||
| message = "订单添加成功!"; | |||||
| }else { | |||||
| message = "订单添加失败!"; | |||||
| } | |||||
| //4、返回执行结果 | |||||
| return Result.OK(message); | |||||
| }catch (Exception e){ | |||||
| //错误信息打印 | |||||
| e.printStackTrace(); | |||||
| return Result.error(message); | |||||
| } | |||||
| } | |||||
| //订单信息-取消订单 | |||||
| @Override | |||||
| public Result<?> deleteOrder(String token, String orderId) { | |||||
| //权限验证 | |||||
| HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); | |||||
| //返回信息 | |||||
| String message = "订单取消失败"; | |||||
| //执行结果 | |||||
| boolean result = false; | |||||
| try{ | |||||
| //3、执行订单信息添加 | |||||
| result = employOrderService.removeById(orderId); | |||||
| //判断执行结果 | |||||
| if(result){ | |||||
| message = "订单取消成功!"; | |||||
| }else { | |||||
| message = "订单取消失败!"; | |||||
| } | |||||
| //4、返回执行结果 | |||||
| return Result.OK(message); | |||||
| }catch (Exception e){ | |||||
| //错误信息打印 | |||||
| e.printStackTrace(); | |||||
| return Result.error(message); | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,25 @@ | |||||
| -----BEGIN CERTIFICATE----- | |||||
| MIIEKDCCAxCgAwIBAgIUbk+ecNVsxDm1dbgRy0MnYhyBqDkwDQYJKoZIhvcNAQEL | |||||
| BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT | |||||
| FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg | |||||
| Q0EwHhcNMjUwMTEzMDkxMjA2WhcNMzAwMTEyMDkxMjA2WjCBgTETMBEGA1UEAwwK | |||||
| MTcwNDA0NTMwNDEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMS0wKwYDVQQL | |||||
| DCTplb/mspnmsrPkuJzlirPliqHmnI3liqHmnInpmZDlhazlj7gxCzAJBgNVBAYT | |||||
| AkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC | |||||
| AQoCggEBAKn5VPODXobGUSu6ZBqfgEnjiFWZ829s1xfgWXW2N4EM48V4iqZ0Sf0y | |||||
| CNEAhQc4OH5Adt2cZjWG3PE04KQsqg59HE56OFq8szrrk/W4lVLntb19SQHkVXsI | |||||
| +M3RArdzQyixZQ1Di9m5oUIFxlINOiRSlA3fHcwSpKy95FlBZ+ThKNGHiBXVFT8M | |||||
| DULhM0omEc9WssB4KJkIdociJYVqc9diBsSA7eTQT0XtGKPAINrb460P4yIyvtWY | |||||
| wegc5NHvaVO8jDqwIAfiV3N0XJstsYYOq8Nfi4b+qyKhmmy9eaeM8azk6y/16XqQ | |||||
| Zq69pIawqW0JOGrDRryCdmPuK9tT2dkCAwEAAaOBuTCBtjAJBgNVHRMEAjAAMAsG | |||||
| A1UdDwQEAwID+DCBmwYDVR0fBIGTMIGQMIGNoIGKoIGHhoGEaHR0cDovL2V2Y2Eu | |||||
| aXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRC | |||||
| MDZBRDM5NzU0OTg0NkMwMUMzRThFQkQyJnNnPUhBQ0M0NzFCNjU0MjJFMTJCMjdB | |||||
| OUQzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IBAQAnTWfq | |||||
| 232lsiU9XBiINtLq3pnVnhao1OCJ8xWrke6o4ys9bsuBOXk+OP+VifdphRS+o+BU | |||||
| PglRo0UPJHMKDguOZ/dxET0qcKdRMPwB07H19AECz4Z8mhEosMlpO9BbKNbG8XQ6 | |||||
| 5va/CchRU1HMa1I2zNEUl68Deib59dcO2SDLomfs57cu2gZimP0jwvQipe8aFXnn | |||||
| rTzr6Gql4KJcMfpwfNzQYFeEsiRci5RwrcG2ylik5sb/h3qTOJB+TOnwlkP71VlC | |||||
| AWTE8aSY5J9XdwX6avubdvcp/3dZSC4S42KaBmMKKkk0qcA4PVG+RdmXmtbapoCF | |||||
| 20kYEjj7kp+3WYvX | |||||
| -----END CERTIFICATE----- | |||||
| @ -0,0 +1,28 @@ | |||||
| -----BEGIN PRIVATE KEY----- | |||||
| MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCp+VTzg16GxlEr | |||||
| umQan4BJ44hVmfNvbNcX4Fl1tjeBDOPFeIqmdEn9MgjRAIUHODh+QHbdnGY1htzx | |||||
| NOCkLKoOfRxOejhavLM665P1uJVS57W9fUkB5FV7CPjN0QK3c0MosWUNQ4vZuaFC | |||||
| BcZSDTokUpQN3x3MEqSsveRZQWfk4SjRh4gV1RU/DA1C4TNKJhHPVrLAeCiZCHaH | |||||
| IiWFanPXYgbEgO3k0E9F7RijwCDa2+OtD+MiMr7VmMHoHOTR72lTvIw6sCAH4ldz | |||||
| dFybLbGGDqvDX4uG/qsioZpsvXmnjPGs5Osv9el6kGauvaSGsKltCThqw0a8gnZj | |||||
| 7ivbU9nZAgMBAAECggEAM8R0UxYXnASahC7ofhNGBzr9MtUIh08m02bI2Ej+7pb2 | |||||
| aBYmZDvWrP6oIL9/xIsi6ZDIowYXOwYwFGZ+ZIIV6QPBs0UWFMyT6cYF8jidgfqA | |||||
| J44YxjK8thQtcsHNigHY2nPsyvVfipg2vNz1YdgVdSqRXQgvExA6h0HuYiDBe7t4 | |||||
| hqOqPGm+X8iVmwCTam+OovUtPy2is3uXxwjePF1lbfVrWsmn/D7ZpG54Pdyi0v+O | |||||
| WX65NVkZ5h+nwHWs5479V/Cpen6+3O/N+rrdijB1fjBNBWnX9FQ7PKSVC2mR/ugb | |||||
| wvM3LJ2fiMHsDpryrbmsx8ADD7cl+jbVfbeqXDHS4QKBgQDYESJmvOpaNzIz2Ri2 | |||||
| 20LiCLG+AtEaFmMOobZ7nNONjW0P3N6HMkCwTGU6omnLXKLqs0aXnVlWBy8CF4yj | |||||
| iES7OjAQ7i604gpc3vjJkElj3eAStK3kx0N/1tTOnNcOzGHu3Dl8eIJCOjxWeBbC | |||||
| +KfLtqET2xxdvFG9tIvOE+NPGwKBgQDJY2GHIXWFCm3xK+9/D/CC9N7Snrs+7PeN | |||||
| AWxqvT5UCI+S3LGnXZ5sWShIJWRHix7Ke2oK7ZRdodzMBfOCES8UnbrXS5RHze2X | |||||
| VAkqho6HiyxMpVU84kFh3vAsXRpEKvfG2rzzYya/sSzotCabrArIjr1fJvdh2ioo | |||||
| kapKpR2mGwKBgGSoHtGj4r1ih2W2FphhLxhkGoG9iDJSCZWwanXNypRgNVW1fImZ | |||||
| NJ+tB1+4d/bAUjlqiVFqgUrdj922oNMyUWqzod7RRzsHLvKzAU3NhRMcMx4jw/sX | |||||
| hW+R4pPaZynCt0DyoWlGLtCxlphl25y7AFib3RCF/AIDEEWDTboUc8nPAoGBAKqW | |||||
| rlRi+UNa1EpIJzUAcYDcn6rVnlLtM7yTihzYdOWF4uhKXYoh+UJaO47xbYJUzB5E | |||||
| cE0Vdmnh5EBGgkCZAcJ64Xvhn5c7TpizLJiDJlSWhU3fdtZ96VhYGiXaL5eytfQR | |||||
| 8aBRSs9x61Kq11FiaDf/AVaKkV6oCLIYwaE9QGIlAoGBAL1JAn9QxaZk2qkcir94 | |||||
| 7fZtvuVA5U5WUDau2qhdYgPAefVBn1ID65Em52juFQVX2/QpxMdK6NfQurtof731 | |||||
| XoLUnqB5cf1etuL0ihKVgBQsJ4x996Ht8ledwDh8uMc1nyd4IIbgo4TU2b4hjRPO | |||||
| U/7juGQEOUE03MnBpVgGz9YU | |||||
| -----END PRIVATE KEY----- | |||||
| @ -1,8 +1,8 @@ | |||||
| pay.mchId=1681494138 | |||||
| pay.appId=wx15be4225a7e41a1e | |||||
| pay.mchId=1704045304 | |||||
| pay.appId=wx6931d85f7371b032 | |||||
| pay.mchKey=0fdb77429ffdf206c151af76a663041c | pay.mchKey=0fdb77429ffdf206c151af76a663041c | ||||
| pay.keyPath=classpath:apiclient_cert.pem | pay.keyPath=classpath:apiclient_cert.pem | ||||
| pay.notifyUrl=http://h5.xzaiyp.top/massage-api/post/create | |||||
| pay.notifyUrlDev=http://h5.xzaiyp.top/massage-api/post/notify | |||||
| pay.notifyUrl=https://admin.augcl.com/employ-admin/employ/amount/payNotify | |||||
| pay.notifyUrlDev=http://augcl.natapp1.cc/employ-admin/employ/amount/payNotify | |||||