This commit is contained in:
wyd 2024-04-23 11:53:33 +08:00
parent ceec5db424
commit e899b0b8e3
11 changed files with 25 additions and 19 deletions

View File

@ -55,7 +55,7 @@ public class AboutPartThreeController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('PartThree:partthree:listpage')") @PreAuthorize("@ss.hasPermi('PartThree:partthree:listpage')")
@ApiOperation(value = "关于第三部分分页列表", notes = "关于第三部分分页列表信息") @ApiOperation(value = "关于第三部分分页列表", notes = "关于第三部分分页列表信息")
@GetMapping("/listPage") @PostMapping("/listPage")
public R listPage(QueryPage queryPage, AboutPartThree aboutPartThree) { public R listPage(QueryPage queryPage, AboutPartThree aboutPartThree) {
startPage(); startPage();
List<AboutPartThree> list = aboutPartThreeService.selectAboutPartThreeList(aboutPartThree); List<AboutPartThree> list = aboutPartThreeService.selectAboutPartThreeList(aboutPartThree);
@ -88,6 +88,7 @@ public class AboutPartThreeController extends BaseController {
@ApiOperation(value = "关于第三部分修改信息", notes = "关于第三部分修改信息") @ApiOperation(value = "关于第三部分修改信息", notes = "关于第三部分修改信息")
@PostMapping("/edit") @PostMapping("/edit")
public R<Boolean> edit(AboutPartThree aboutPartThree) { public R<Boolean> edit(AboutPartThree aboutPartThree) {
log.info("aboutPartThree:{}",aboutPartThree);
boolean res = aboutPartThreeService.updateById(aboutPartThree); boolean res = aboutPartThreeService.updateById(aboutPartThree);
return R.ok(res); return R.ok(res);
} }

View File

@ -5,6 +5,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -13,7 +17,7 @@ import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
/** /**
@ -34,7 +38,7 @@ private static final long serialVersionUID=1L;
/** 主键 */ /** 主键 */
@ApiModelProperty("主键") @ApiModelProperty("主键")
@TableId(value = "id" , type = IdType.ASSIGN_ID) @TableId(value = "id" , type = IdType.ASSIGN_ID)
@JSONField(serializeUsing = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
/** 第一标题 */ /** 第一标题 */
@ApiModelProperty("第一标题") @ApiModelProperty("第一标题")
@ -56,14 +60,15 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("排序") @ApiModelProperty("排序")
@TableField("sorts") @TableField("sorts")
private Long sorts; private Long sorts;
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(value = "创建时间",hidden = true) @ApiModelProperty(value = "创建时间",hidden = true)
@TableField("create_time") @TableField("create_time")
@JSONField(serializeUsing = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private String createTime; private String createTime;
/** 更新时间 */ /** 更新时间 */
@ApiModelProperty(value = "更新时间",hidden = true) @ApiModelProperty(value = "更新时间",hidden = true)
@TableField("update_time") @TableField("update_time")
@JSONField(serializeUsing = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private String updateTime; private String updateTime;
} }

View File

@ -43,7 +43,7 @@ private static final long serialVersionUID=1L;
#end #end
#end #end
#if($column.isPk == 1) #if($column.isPk == 1)
@JSONField(serializeUsing = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty("$column.columnComment") @ApiModelProperty("$column.columnComment")
@TableId(value = "$column.columnName" , type = IdType.ASSIGN_ID) @TableId(value = "$column.columnName" , type = IdType.ASSIGN_ID)
private $column.javaType $column.javaField; private $column.javaType $column.javaField;
@ -57,7 +57,7 @@ private static final long serialVersionUID=1L;
/** $column.columnComment */ /** $column.columnComment */
@ApiModelProperty(value = "$column.columnComment",hidden = true) @ApiModelProperty(value = "$column.columnComment",hidden = true)
@TableField("$column.columnName") @TableField("$column.columnName")
@JSONField(serializeUsing = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private String $column.javaField; private String $column.javaField;
#end #end
#end #end

View File

@ -5,7 +5,7 @@ export function listPage${BusinessName}(data) {
return request({ return request({
url: '/${moduleName}/listPage', url: '/${moduleName}/listPage',
method: 'post', method: 'post',
data: data params: data
}) })
} }
// 查询${functionName}列表 // 查询${functionName}列表
@ -18,7 +18,7 @@ export function list${BusinessName}() {
// 查询${functionName}详细 // 查询${functionName}详细
export function get${BusinessName}(${pkColumn.javaField}) { export function get${BusinessName}(${pkColumn.javaField}) {
return request({ return request({
url: '/${moduleName}/id=' + ${pkColumn.javaField}, url: '/${moduleName}/query?id=' + ${pkColumn.javaField},
method: 'get' method: 'get'
}) })
} }
@ -28,7 +28,7 @@ export function add${BusinessName}(data) {
return request({ return request({
url: '/${moduleName}/add', url: '/${moduleName}/add',
method: 'post', method: 'post',
data: data params: data
}) })
} }
@ -37,7 +37,7 @@ export function update${BusinessName}(data) {
return request({ return request({
url: '/${moduleName}/edit', url: '/${moduleName}/edit',
method: 'post', method: 'post',
data: data params: data
}) })
} }

View File

@ -438,7 +438,7 @@ export default {
#end #end
#end #end
listPage${BusinessName}(this.queryParams).then(response => { listPage${BusinessName}(this.queryParams).then(response => {
this.${businessName}List = response.rows; this.${businessName}List = response.data;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });

View File

@ -334,7 +334,7 @@
</template> </template>
<script setup name="${BusinessName}"> <script setup name="${BusinessName}">
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}";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
#if(${dicts} != '') #if(${dicts} != '')
@ -412,8 +412,8 @@ function getList() {
} }
#end #end
#end #end
list${BusinessName}(queryParams.value).then(response => { listPage${BusinessName}(queryParams.value).then(response => {
${businessName}List.value = response.rows; ${businessName}List.value = response.data;
total.value = response.total; total.value = response.total;
loading.value = false; loading.value = false;
}); });

View File

@ -18,7 +18,7 @@ export function list${BusinessName}() {
// 查询${functionName}详细 // 查询${functionName}详细
export function get${BusinessName}(${pkColumn.javaField}) { export function get${BusinessName}(${pkColumn.javaField}) {
return request({ return request({
url: '/${moduleName}/id=' + ${pkColumn.javaField}, url: '/${moduleName}/query?id=' + ${pkColumn.javaField},
method: 'get' method: 'get'
}) })
} }

View File

@ -334,7 +334,7 @@
</template> </template>
<script setup name="${BusinessName}"> <script setup name="${BusinessName}">
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}";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
#if(${dicts} != '') #if(${dicts} != '')
@ -412,8 +412,8 @@ function getList() {
} }
#end #end
#end #end
list${BusinessName}(queryParams.value).then(response => { listPage${BusinessName}(queryParams.value).then(response => {
${businessName}List.value = response.rows; ${businessName}List.value = response.data;
total.value = response.total; total.value = response.total;
loading.value = false; loading.value = false;
}); });