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')")
@ApiOperation(value = "关于第三部分分页列表", notes = "关于第三部分分页列表信息")
@GetMapping("/listPage")
@PostMapping("/listPage")
public R listPage(QueryPage queryPage, AboutPartThree aboutPartThree) {
startPage();
List<AboutPartThree> list = aboutPartThreeService.selectAboutPartThreeList(aboutPartThree);
@ -88,6 +88,7 @@ public class AboutPartThreeController extends BaseController {
@ApiOperation(value = "关于第三部分修改信息", notes = "关于第三部分修改信息")
@PostMapping("/edit")
public R<Boolean> edit(AboutPartThree aboutPartThree) {
log.info("aboutPartThree:{}",aboutPartThree);
boolean res = aboutPartThreeService.updateById(aboutPartThree);
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.TableId;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -13,7 +17,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
/**
@ -34,7 +38,7 @@ private static final long serialVersionUID=1L;
/** 主键 */
@ApiModelProperty("主键")
@TableId(value = "id" , type = IdType.ASSIGN_ID)
@JSONField(serializeUsing = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/** 第一标题 */
@ApiModelProperty("第一标题")
@ -56,14 +60,15 @@ private static final long serialVersionUID=1L;
@ApiModelProperty("排序")
@TableField("sorts")
private Long sorts;
/** 创建时间 */
@ApiModelProperty(value = "创建时间",hidden = true)
@TableField("create_time")
@JSONField(serializeUsing = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
private String createTime;
/** 更新时间 */
@ApiModelProperty(value = "更新时间",hidden = true)
@TableField("update_time")
@JSONField(serializeUsing = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
private String updateTime;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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