企业列表出来了
parent
b07cf2fcd9
commit
76d0be89a4
|
@ -5,13 +5,16 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="72651396-d9d2-4022-b080-e21d75d1bedb" name="更改" comment="企业列表出来了">
|
||||
<change afterPath="$PROJECT_DIR$/cloud-market-common/src/main/java/com/muyu/market/domain/ReqMsg.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/cloud-market-server/src/main/java/com/muyu/market/controller/ReqMsgController.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/cloud-market-server/src/main/java/com/muyu/market/mapper/ReqMsgMapper.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/cloud-market-server/src/main/java/com/muyu/market/service/IReqMsgService.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/cloud-market-server/src/main/java/com/muyu/market/service/impl/ReqMsgServiceImpl.java" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/logs/cloud-system/error.2024-09-02.log" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/logs/cloud-system/error.2024-09-03.log" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/logs/cloud-system/info.2024-09-02.log" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/logs/cloud-system/info.2024-09-03.log" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/cloud-market-common/src/main/java/com/muyu/market/config/SimpleWeatherConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-market-common/src/main/java/com/muyu/market/config/SimpleWeatherConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/cloud-market-common/src/main/java/com/muyu/market/config/ThirdPartyConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/cloud-market-common/src/main/java/com/muyu/market/config/ThirdPartyConfig.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/logs/cloud-system/error.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/cloud-system/error.log" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/logs/cloud-system/info.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/cloud-system/info.log" afterDir="false" />
|
||||
</list>
|
||||
|
@ -68,33 +71,34 @@
|
|||
<component name="ProjectViewState">
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"RequestMappingsPanelOrder0": "0",
|
||||
"RequestMappingsPanelOrder1": "1",
|
||||
"RequestMappingsPanelWidth0": "75",
|
||||
"RequestMappingsPanelWidth1": "75",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"settings.editor.selected.configurable": "reference.settings.project.maven.repository.indices",
|
||||
"spring.configuration.checksum": "647853898192e405c7aff8ecac5564ea",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RequestMappingsPanelOrder0": "0",
|
||||
"RequestMappingsPanelOrder1": "1",
|
||||
"RequestMappingsPanelWidth0": "75",
|
||||
"RequestMappingsPanelWidth1": "75",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"last_opened_file_path": "E:/桌面/cloud-market/cloud-market-server/src/main/java/com/muyu/market/controller",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"settings.editor.selected.configurable": "reference.settings.project.maven.repository.indices",
|
||||
"spring.configuration.checksum": "647853898192e405c7aff8ecac5564ea",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
}]]></component>
|
||||
<component name="ReactorSettings">
|
||||
<option name="notificationShown" value="true" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\Administrator\Downloads\cloud-market\cloud-market-server\src\main\resources\mapper\market" />
|
||||
<recent name="C:\Users\Administrator\Downloads\cloud-market\cloud-market-common\src\main\java\com\muyu\market\domain" />
|
||||
<recent name="C:\Users\Administrator\Downloads\cloud-market\cloud-market-server\src\main\java\com\muyu\market\service\impl" />
|
||||
<recent name="C:\Users\Administrator\Downloads\cloud-market\cloud-market-server\src\main\java\com\muyu\market\service" />
|
||||
<recent name="C:\Users\Administrator\Downloads\cloud-market\cloud-market-server\src\main\java\com\muyu\market\mapper" />
|
||||
<recent name="E:\桌面\cloud-market\cloud-market-server\src\main\java\com\muyu\market\controller" />
|
||||
<recent name="E:\桌面\cloud-market\cloud-market-server\src\main\java\com\muyu\market\service\impl" />
|
||||
<recent name="E:\桌面\cloud-market\cloud-market-server\src\main\java\com\muyu\market\service" />
|
||||
<recent name="E:\桌面\cloud-market\cloud-market-server\src\main\java\com\muyu\market\mapper" />
|
||||
<recent name="E:\桌面\cloud-market\cloud-market-common\src\main\java\com\muyu\market\domain" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="E:\桌面\cloud-modules-market" />
|
||||
|
@ -182,7 +186,8 @@
|
|||
<workItem from="1725517357652" duration="1395000" />
|
||||
<workItem from="1725528983357" duration="20000" />
|
||||
<workItem from="1725534330399" duration="6000" />
|
||||
<workItem from="1725535072504" duration="2629000" />
|
||||
<workItem from="1725535072504" duration="2640000" />
|
||||
<workItem from="1725538502773" duration="4219000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="初始化">
|
||||
<created>1724047244829</created>
|
||||
|
@ -422,7 +427,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1725537357138</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="35" />
|
||||
<task id="LOCAL-00035" summary="企业列表出来了">
|
||||
<created>1725537729463</created>
|
||||
<option name="number" value="00035" />
|
||||
<option name="presentableId" value="LOCAL-00035" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1725537729463</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="36" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
package com.muyu.market.domain;
|
||||
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
|
||||
/**
|
||||
* 请求报文对象 req_msg
|
||||
*
|
||||
* @author 2112A
|
||||
* @date 2024-09-05
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Setter
|
||||
@Getter
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("req_msg")
|
||||
public class ReqMsg extends BaseEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
@TableId( type = IdType.AUTO)
|
||||
private Long reqId;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String reqName;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String reqType;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String reqYorn;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String reqMsg;
|
||||
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Long sysId;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("reqId", getReqId())
|
||||
.append("reqName", getReqName())
|
||||
.append("reqType", getReqType())
|
||||
.append("reqYorn", getReqYorn())
|
||||
.append("reqMsg", getReqMsg())
|
||||
.append("sysId", getSysId())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.muyu.market.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.market.domain.ReqMsg;
|
||||
import com.muyu.market.service.IReqMsgService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 请求报文Controller
|
||||
*
|
||||
* @author 2112A
|
||||
* @date 2024-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/msg")
|
||||
public class ReqMsgController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IReqMsgService reqMsgService;
|
||||
|
||||
/**
|
||||
* 查询请求报文列表
|
||||
*/
|
||||
@RequiresPermissions("reqmsg:msg:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<ReqMsg>> list(ReqMsg reqMsg)
|
||||
{
|
||||
startPage();
|
||||
List<ReqMsg> list = reqMsgService.selectReqMsgList(reqMsg);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出请求报文列表
|
||||
*/
|
||||
@RequiresPermissions("reqmsg:msg:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ReqMsg reqMsg)
|
||||
{
|
||||
List<ReqMsg> list = reqMsgService.selectReqMsgList(reqMsg);
|
||||
ExcelUtil<ReqMsg> util = new ExcelUtil<ReqMsg>(ReqMsg.class);
|
||||
util.exportExcel(response, list, "请求报文数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取请求报文详细信息
|
||||
*/
|
||||
@RequiresPermissions("reqmsg:msg:query")
|
||||
@GetMapping(value = "/{reqId}")
|
||||
public Result<List<ReqMsg>> getInfo(@PathVariable("reqId") Long reqId)
|
||||
{
|
||||
return success(reqMsgService.selectReqMsgByReqId(reqId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增请求报文
|
||||
*/
|
||||
@RequiresPermissions("reqmsg:msg:add")
|
||||
@PostMapping
|
||||
public Result<Integer> add(
|
||||
@Validated @RequestBody ReqMsg reqMsg)
|
||||
{
|
||||
if (reqMsgService.checkIdUnique(reqMsg)) {
|
||||
return error("新增 请求报文 '" + reqMsg + "'失败,请求报文已存在");
|
||||
}
|
||||
reqMsg.setCreateBy(SecurityUtils.getUsername());
|
||||
return toAjax(reqMsgService.save(reqMsg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改请求报文
|
||||
*/
|
||||
@RequiresPermissions("reqmsg:msg:edit")
|
||||
@PutMapping
|
||||
public Result<Integer> edit(
|
||||
@Validated @RequestBody ReqMsg reqMsg)
|
||||
{
|
||||
if (!reqMsgService.checkIdUnique(reqMsg)) {
|
||||
return error("修改 请求报文 '" + reqMsg + "'失败,请求报文不存在");
|
||||
}
|
||||
reqMsg.setUpdateBy(SecurityUtils.getUsername());
|
||||
return toAjax(reqMsgService.updateById(reqMsg));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除请求报文
|
||||
*/
|
||||
@RequiresPermissions("reqmsg:msg:remove")
|
||||
@DeleteMapping("/{reqIds}")
|
||||
public Result<Integer> remove(@PathVariable("reqIds") Long[] reqIds)
|
||||
{
|
||||
reqMsgService.removeBatchByIds(Arrays.asList(reqIds));
|
||||
return success();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.muyu.market.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.market.domain.ReqMsg;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 请求报文Mapper接口
|
||||
*
|
||||
* @author 2112A
|
||||
* @date 2024-09-05
|
||||
*/
|
||||
@Mapper
|
||||
public interface ReqMsgMapper extends BaseMapper<ReqMsg>{
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.muyu.market.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.market.domain.ReqMsg;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* 请求报文Service接口
|
||||
*
|
||||
* @author 2112A
|
||||
* @date 2024-09-05
|
||||
*/
|
||||
public interface IReqMsgService extends IService<ReqMsg> {
|
||||
/**
|
||||
* 精确查询请求报文
|
||||
*
|
||||
* @param reqId 请求报文主键
|
||||
* @return 请求报文
|
||||
*/
|
||||
public ReqMsg selectReqMsgByReqId(Long reqId);
|
||||
|
||||
/**
|
||||
* 查询请求报文列表
|
||||
*
|
||||
* @param reqMsg 请求报文
|
||||
* @return 请求报文集合
|
||||
*/
|
||||
public List<ReqMsg> selectReqMsgList(ReqMsg reqMsg);
|
||||
|
||||
/**
|
||||
* 判断 请求报文 id是否唯一
|
||||
* @param reqMsg 请求报文
|
||||
* @return 结果
|
||||
*/
|
||||
Boolean checkIdUnique(ReqMsg reqMsg);
|
||||
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.muyu.market.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.market.mapper.ReqMsgMapper;
|
||||
import com.muyu.market.domain.ReqMsg;
|
||||
import com.muyu.market.service.IReqMsgService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* 请求报文Service业务层处理
|
||||
*
|
||||
* @author 2112A
|
||||
* @date 2024-09-05
|
||||
*/
|
||||
@Service
|
||||
public class ReqMsgServiceImpl
|
||||
extends ServiceImpl<ReqMsgMapper, ReqMsg>
|
||||
implements IReqMsgService {
|
||||
|
||||
/**
|
||||
* 精确查询请求报文
|
||||
*
|
||||
* @param reqId 请求报文主键
|
||||
* @return 请求报文
|
||||
*/
|
||||
@Override
|
||||
public ReqMsg selectReqMsgByReqId(Long reqId)
|
||||
{
|
||||
LambdaQueryWrapper<ReqMsg> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Assert.notNull(reqId, "reqId不可为空");
|
||||
queryWrapper.eq(ReqMsg::getReqId, reqId);
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询请求报文列表
|
||||
*
|
||||
* @param reqMsg 请求报文
|
||||
* @return 请求报文
|
||||
*/
|
||||
@Override
|
||||
public List<ReqMsg> selectReqMsgList(ReqMsg reqMsg)
|
||||
{
|
||||
LambdaQueryWrapper<ReqMsg> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (StringUtils.isNotEmpty(reqMsg.getReqName())){
|
||||
queryWrapper.like(ReqMsg::getReqName, reqMsg.getReqName());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(reqMsg.getReqType())){
|
||||
queryWrapper.eq(ReqMsg::getReqType, reqMsg.getReqType());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(reqMsg.getReqYorn())){
|
||||
queryWrapper.eq(ReqMsg::getReqYorn, reqMsg.getReqYorn());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(reqMsg.getReqMsg())){
|
||||
queryWrapper.eq(ReqMsg::getReqMsg, reqMsg.getReqMsg());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(new Long[]{reqMsg.getSysId()})){
|
||||
queryWrapper.eq(ReqMsg::getSysId, reqMsg.getSysId());
|
||||
}
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 唯一 判断
|
||||
* @param reqMsg 请求报文
|
||||
* @return 请求报文
|
||||
*/
|
||||
@Override
|
||||
public Boolean checkIdUnique(ReqMsg reqMsg) {
|
||||
LambdaQueryWrapper<ReqMsg> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ReqMsg::getReqId, reqMsg.getReqId());
|
||||
return this.count(queryWrapper) > 0;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue