This commit is contained in:
wyd 2024-04-23 10:23:51 +08:00
parent 5d1e4da737
commit c6cbfe70ce
22 changed files with 111 additions and 91 deletions

View File

@ -32,9 +32,9 @@ public class AboutPartThree{
private static final long serialVersionUID=1L; private static final long serialVersionUID=1L;
/** 主键 */ /** 主键 */
@JSONField(serializeUsing = ToStringSerializer.class)
@ApiModelProperty("主键") @ApiModelProperty("主键")
@TableId(value = "id" , type = IdType.ASSIGN_ID) @TableId(value = "id" , type = IdType.ASSIGN_ID)
@JSONField(serializeUsing = ToStringSerializer.class)
private Long id; private Long id;
/** 第一标题 */ /** 第一标题 */
@ApiModelProperty("第一标题") @ApiModelProperty("第一标题")

View File

@ -3,7 +3,7 @@ jg:
# 名称 # 名称
name: JG name: JG
# 版本 # 版本
version: 3.8.7 version: 4.0.0
# 版权年份 # 版权年份
copyrightYear: 2024 copyrightYear: 2024
# 文件路径 示例( Windows配置D:/jg/uploadPathLinux配置 /home/jg/uploadPath # 文件路径 示例( Windows配置D:/jg/uploadPathLinux配置 /home/jg/uploadPath

View File

@ -23,6 +23,8 @@
<if test="titleTwo != null and titleTwo != ''"> and title_two = #{titleTwo}</if> <if test="titleTwo != null and titleTwo != ''"> and title_two = #{titleTwo}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="icon != null and icon != ''"> and icon = #{icon}</if> <if test="icon != null and icon != ''"> and icon = #{icon}</if>
<if test="id != null and id != ''"> and id = #{id}</if>
</where> </where>
</select> </select>
</mapper> </mapper>

View File

@ -5,7 +5,7 @@ import lombok.extern.slf4j.Slf4j;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import com.jg.common.utils.QueryPage;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -3,6 +3,7 @@ package ${packageName}.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
import java.util.List;
/** /**
* ${functionName}Mapper接口 * ${functionName}Mapper接口
* *
@ -11,7 +12,7 @@ import ${packageName}.domain.${ClassName};
*/ */
public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> { public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
/** /**
* 查询${functionName}列表 * 查询${functionName}分页列表
* *
* @param ${className} ${functionName} * @param ${className} ${functionName}
* @return ${functionName}集合 * @return ${functionName}集合

View File

@ -3,7 +3,7 @@ package ${packageName}.service;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* ${functionName}Service接口 * ${functionName}Service接口
* *
@ -12,7 +12,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface I${ClassName}Service extends IService<${ClassName}> { public interface I${ClassName}Service extends IService<${ClassName}> {
/** /**
* 查询${functionName}列表 * 查询${functionName}分页列表
* *
* @param ${className} ${functionName} * @param ${className} ${functionName}
* @return ${functionName}集合 * @return ${functionName}集合

View File

@ -5,7 +5,7 @@ import ${packageName}.mapper.${ClassName}Mapper;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
import ${packageName}.service.I${ClassName}Service; import ${packageName}.service.I${ClassName}Service;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
/** /**
@ -21,14 +21,14 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C
private ${ClassName}Mapper ${className}Mapper; private ${ClassName}Mapper ${className}Mapper;
/** /**
* 查询${functionName} * 查询${functionName}分页列表
* *
* @param ${pkColumn.javaField} ${functionName}主键 * @param ${className} ${functionName}
* @return ${functionName} * @return ${functionName}
*/ */
@Override @Override
public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) public List<${ClassName}> select${ClassName}List(${ClassName} ${className})
{ {
return ${className}Mapper.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}); return ${className}Mapper.select${ClassName}List(${className});
} }
} }

View File

@ -1,5 +1,13 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询${functionName}分列表
export function listPage${BusinessName}(data) {
return request({
url: '/${moduleName}/listPage',
method: 'post',
data: data
})
}
// 查询${functionName}列表 // 查询${functionName}列表
export function list${BusinessName}() { export function list${BusinessName}() {
return request({ return request({
@ -7,7 +15,6 @@ export function list${BusinessName}() {
method: 'get', method: 'get',
}) })
} }
// 查询${functionName}详细 // 查询${functionName}详细
export function get${BusinessName}(${pkColumn.javaField}) { export function get${BusinessName}(${pkColumn.javaField}) {
return request({ return request({

View File

@ -100,16 +100,6 @@
v-hasPermi="['${moduleName}:${businessName}:remove']" v-hasPermi="['${moduleName}:${businessName}:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['${moduleName}:${businessName}:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -353,7 +343,7 @@
</template> </template>
<script> <script>
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; import { listPage${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
export default { export default {
name: "${BusinessName}", name: "${BusinessName}",
@ -447,7 +437,7 @@ export default {
} }
#end #end
#end #end
list${BusinessName}(this.queryParams).then(response => { listPage${BusinessName}(this.queryParams).then(response => {
this.${businessName}List = response.rows; this.${businessName}List = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -591,12 +581,6 @@ export default {
this.checked${subClassName} = selection.map(item => item.index) this.checked${subClassName} = selection.map(item => item.index)
}, },
#end #end
/** 导出按钮操作 */
handleExport() {
this.download('${moduleName}/${businessName}/export', {
...this.queryParams
}, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
}
} }
}; };
</script> </script>

View File

@ -96,15 +96,6 @@
v-hasPermi="['${moduleName}:${businessName}:remove']" v-hasPermi="['${moduleName}:${businessName}:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['${moduleName}:${businessName}:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -579,12 +570,5 @@ function handle${subClassName}SelectionChange(selection) {
} }
#end #end
/** 导出按钮操作 */
function handleExport() {
proxy.download('${moduleName}/${businessName}/export', {
...queryParams.value
}, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
}
getList(); getList();
</script> </script>

View File

@ -23,4 +23,36 @@
<sql id="select${ClassName}Vo"> <sql id="select${ClassName}Vo">
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName} select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
</sql> </sql>
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
<include refid="select${ClassName}Vo"/>
<where>
#foreach($column in $columns)
#set($queryType=$column.queryType)
#set($javaField=$column.javaField)
#set($javaType=$column.javaType)
#set($columnName=$column.columnName)
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
#if($column.query)
#if($column.queryType == "EQ")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName = #{$javaField}</if>
#elseif($queryType == "NE")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName != #{$javaField}</if>
#elseif($queryType == "GT")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName &gt; #{$javaField}</if>
#elseif($queryType == "GTE")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName &gt;= #{$javaField}</if>
#elseif($queryType == "LT")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName &lt; #{$javaField}</if>
#elseif($queryType == "LTE")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName &lt;= #{$javaField}</if>
#elseif($queryType == "LIKE")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName like concat('%', #{$javaField}, '%')</if>
#elseif($queryType == "BETWEEN")
<if test="params.begin$AttrName != null and params.begin$AttrName != '' and params.end$AttrName != null and params.end$AttrName != ''"> and $columnName between #{params.begin$AttrName} and #{params.end$AttrName}</if>
#end
#end
#end
</where>
</select>
</mapper> </mapper>

View File

@ -3,7 +3,7 @@ jg:
# 名称 # 名称
name: JG name: JG
# 版本 # 版本
version: 3.8.7 version: 4.0.0
# 版权年份 # 版权年份
copyrightYear: 2024 copyrightYear: 2024
# 文件路径 示例( Windows配置D:/jg/uploadPathLinux配置 /home/jg/uploadPath # 文件路径 示例( Windows配置D:/jg/uploadPathLinux配置 /home/jg/uploadPath

View File

@ -23,6 +23,8 @@
<if test="titleTwo != null and titleTwo != ''"> and title_two = #{titleTwo}</if> <if test="titleTwo != null and titleTwo != ''"> and title_two = #{titleTwo}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="icon != null and icon != ''"> and icon = #{icon}</if> <if test="icon != null and icon != ''"> and icon = #{icon}</if>
<if test="id != null and id != ''"> and id = #{id}</if>
</where> </where>
</select> </select>
</mapper> </mapper>

View File

@ -5,7 +5,7 @@ import lombok.extern.slf4j.Slf4j;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import com.jg.common.utils.QueryPage;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -3,6 +3,7 @@ package ${packageName}.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
import java.util.List;
/** /**
* ${functionName}Mapper接口 * ${functionName}Mapper接口
* *
@ -11,7 +12,7 @@ import ${packageName}.domain.${ClassName};
*/ */
public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> { public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {
/** /**
* 查询${functionName}列表 * 查询${functionName}分页列表
* *
* @param ${className} ${functionName} * @param ${className} ${functionName}
* @return ${functionName}集合 * @return ${functionName}集合

View File

@ -3,7 +3,7 @@ package ${packageName}.service;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* ${functionName}Service接口 * ${functionName}Service接口
* *
@ -12,7 +12,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface I${ClassName}Service extends IService<${ClassName}> { public interface I${ClassName}Service extends IService<${ClassName}> {
/** /**
* 查询${functionName}列表 * 查询${functionName}分页列表
* *
* @param ${className} ${functionName} * @param ${className} ${functionName}
* @return ${functionName}集合 * @return ${functionName}集合

View File

@ -5,7 +5,7 @@ import ${packageName}.mapper.${ClassName}Mapper;
import ${packageName}.domain.${ClassName}; import ${packageName}.domain.${ClassName};
import ${packageName}.service.I${ClassName}Service; import ${packageName}.service.I${ClassName}Service;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
/** /**
@ -21,14 +21,14 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C
private ${ClassName}Mapper ${className}Mapper; private ${ClassName}Mapper ${className}Mapper;
/** /**
* 查询${functionName} * 查询${functionName}分页列表
* *
* @param ${pkColumn.javaField} ${functionName}主键 * @param ${className} ${functionName}
* @return ${functionName} * @return ${functionName}
*/ */
@Override @Override
public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) public List<${ClassName}> select${ClassName}List(${ClassName} ${className})
{ {
return ${className}Mapper.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}); return ${className}Mapper.select${ClassName}List(${className});
} }
} }

View File

@ -1,5 +1,13 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询${functionName}分列表
export function listPage${BusinessName}(data) {
return request({
url: '/${moduleName}/listPage',
method: 'post',
data: data
})
}
// 查询${functionName}列表 // 查询${functionName}列表
export function list${BusinessName}() { export function list${BusinessName}() {
return request({ return request({
@ -7,7 +15,6 @@ export function list${BusinessName}() {
method: 'get', method: 'get',
}) })
} }
// 查询${functionName}详细 // 查询${functionName}详细
export function get${BusinessName}(${pkColumn.javaField}) { export function get${BusinessName}(${pkColumn.javaField}) {
return request({ return request({

View File

@ -100,16 +100,6 @@
v-hasPermi="['${moduleName}:${businessName}:remove']" v-hasPermi="['${moduleName}:${businessName}:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['${moduleName}:${businessName}:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -353,7 +343,7 @@
</template> </template>
<script> <script>
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; import { listPage${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
export default { export default {
name: "${BusinessName}", name: "${BusinessName}",
@ -447,7 +437,7 @@ export default {
} }
#end #end
#end #end
list${BusinessName}(this.queryParams).then(response => { listPage${BusinessName}(this.queryParams).then(response => {
this.${businessName}List = response.rows; this.${businessName}List = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -591,12 +581,6 @@ export default {
this.checked${subClassName} = selection.map(item => item.index) this.checked${subClassName} = selection.map(item => item.index)
}, },
#end #end
/** 导出按钮操作 */
handleExport() {
this.download('${moduleName}/${businessName}/export', {
...this.queryParams
}, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
}
} }
}; };
</script> </script>

View File

@ -96,15 +96,6 @@
v-hasPermi="['${moduleName}:${businessName}:remove']" v-hasPermi="['${moduleName}:${businessName}:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['${moduleName}:${businessName}:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -579,12 +570,5 @@ function handle${subClassName}SelectionChange(selection) {
} }
#end #end
/** 导出按钮操作 */
function handleExport() {
proxy.download('${moduleName}/${businessName}/export', {
...queryParams.value
}, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
}
getList(); getList();
</script> </script>

View File

@ -23,4 +23,36 @@
<sql id="select${ClassName}Vo"> <sql id="select${ClassName}Vo">
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName} select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
</sql> </sql>
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
<include refid="select${ClassName}Vo"/>
<where>
#foreach($column in $columns)
#set($queryType=$column.queryType)
#set($javaField=$column.javaField)
#set($javaType=$column.javaType)
#set($columnName=$column.columnName)
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
#if($column.query)
#if($column.queryType == "EQ")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName = #{$javaField}</if>
#elseif($queryType == "NE")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName != #{$javaField}</if>
#elseif($queryType == "GT")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName &gt; #{$javaField}</if>
#elseif($queryType == "GTE")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName &gt;= #{$javaField}</if>
#elseif($queryType == "LT")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName &lt; #{$javaField}</if>
#elseif($queryType == "LTE")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName &lt;= #{$javaField}</if>
#elseif($queryType == "LIKE")
<if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName like concat('%', #{$javaField}, '%')</if>
#elseif($queryType == "BETWEEN")
<if test="params.begin$AttrName != null and params.begin$AttrName != '' and params.end$AttrName != null and params.end$AttrName != ''"> and $columnName between #{params.begin$AttrName} and #{params.end$AttrName}</if>
#end
#end
#end
</where>
</select>
</mapper> </mapper>