修复响应式编程中默认值有些情况默认值不为null的异常
This commit is contained in:
parent
680b91bec8
commit
f8acb21b48
@ -18,16 +18,16 @@ public class MysqlMain {
|
||||
|
||||
public static String save_path = System.getProperty("user.dir");
|
||||
|
||||
public static String mysql_url = "jdbc:mysql://192.168.8.141:3306/guxi_device?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8";
|
||||
public static String mysql_url = "jdbc:mysql://rm-bp1bg0oc8y5vgc021ro.mysql.rds.aliyuncs.com:3306/qiuguo_iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8";
|
||||
|
||||
|
||||
public static String pre = "";
|
||||
|
||||
|
||||
public static String mysql_dbname = "guxi_device";
|
||||
public static String mysql_dbname = "qiuguo_iot";
|
||||
|
||||
public static String mysql_username = "root";
|
||||
public static String mysql_password = "123456";
|
||||
public static String mysql_username = "qiuguo_iot";
|
||||
public static String mysql_password = "Qgjh@2023";
|
||||
public static String dto_exclude = ",is_delete,";//生成dto时排除字段,前后都要加英文逗号
|
||||
public static String req_exclude = ",,";//生成Req时排除字段,前后都要加英文逗号
|
||||
|
||||
@ -64,7 +64,7 @@ public class MysqlMain {
|
||||
List<TablesBean> list = new ArrayList<>();
|
||||
|
||||
// list.add(new TablesBean("aigc_opt"));
|
||||
list.add(new TablesBean("msg_record"));
|
||||
list.add(new TablesBean("map_addr_info"));
|
||||
// list.add(new TablesBean("device_opt"));
|
||||
// list.add(new TablesBean("device_opt_time"));
|
||||
// list.add(new TablesBean("aigc_tts"));
|
||||
@ -81,8 +81,8 @@ public class MysqlMain {
|
||||
obj.setComment(map.get(tableName));
|
||||
list2.add(obj);
|
||||
}
|
||||
//createReactor(list2);
|
||||
createMybatis(list2);
|
||||
createReactor(list2);
|
||||
//createMybatis(list2);
|
||||
//createMonongdb(list2);
|
||||
|
||||
|
||||
|
||||
@ -185,7 +185,15 @@ public class MysqlReactorUtilTable2Bean {
|
||||
}
|
||||
temp += ")\n";
|
||||
}
|
||||
temp += " private " + tb.getJavaType() + " " + tb.getJavaCode() + ";\n";
|
||||
|
||||
if(tb.getColumnDefault() != null &&
|
||||
tb.getColumnDefault().length() > 0 &&
|
||||
!tb.getColumnDefault().equals("CURRENT_TIMESTAMP")){
|
||||
temp += " private " + tb.getJavaType() + " " + tb.getJavaCode() + " = " + tb.getColumnDefault() + ";\n";
|
||||
}else{
|
||||
temp += " private " + tb.getJavaType() + " " + tb.getJavaCode() + ";\n";
|
||||
}
|
||||
|
||||
i++;
|
||||
// System.out.println(temp);
|
||||
bf.append(temp).append("\n");
|
||||
|
||||
91
MysqlToCode/src/test/tmp/MapAddrInfoController.java
Normal file
91
MysqlToCode/src/test/tmp/MapAddrInfoController.java
Normal file
@ -0,0 +1,91 @@
|
||||
package com.admin.service.impl;
|
||||
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import reactor.core.publisher.Mono;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.hswebframework.web.api.crud.entity.PagerResult;
|
||||
import org.hswebframework.web.exception.BusinessException;
|
||||
/**
|
||||
* <p>
|
||||
* 地图地名记录,说明Controller类
|
||||
* </p>
|
||||
*
|
||||
* @author wulin
|
||||
* @since 2024-01-22
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
@RequestMapping("/MapAddrInfo")
|
||||
public class MapAddrInfoController{
|
||||
|
||||
|
||||
@Autowired
|
||||
private MapAddrInfoService mapAddrInfoService;
|
||||
@PostMapping("/info")
|
||||
public Mono<MapAddrInfoResp> selectMapAddrInfoByRequest(@RequestBody MapAddrInfoRequest request){
|
||||
return mapAddrInfoService.selectMapAddrInfoByRequest(request).map(d -> {return new MapAddrInfoResp(d);});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/list")
|
||||
public Mono<PagerResult<MapAddrInfoResp>> selectMapAddrInfosByRequest(@RequestBody MapAddrInfoRequest request){
|
||||
return mapAddrInfoService.selectMapAddrInfosByRequest(request).map(d -> {
|
||||
PagerResult<MapAddrInfoResp> result = new PagerResult<>();
|
||||
result.setPageIndex(d.getPageIndex());
|
||||
result.setPageSize(d.getPageSize());
|
||||
result.setTotal(d.getTotal());
|
||||
List<MapAddrInfoResp> ds = d.getData().stream().map(new Function<MapAddrInfoEntity, MapAddrInfoResp>() {
|
||||
@Override
|
||||
public MapAddrInfoResp apply(MapAddrInfoEntity entity) {
|
||||
return new MapAddrInfoResp(entity);
|
||||
}
|
||||
}
|
||||
|
||||
).collect(Collectors.toList());
|
||||
result.setData(ds);
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/id")
|
||||
public Mono<MapAddrInfoResp> selectMapAddrInfoById(@RequestParam Long id){
|
||||
return mapAddrInfoService.selectMapAddrInfoById(id).map(d -> {return new MapAddrInfoResp(d);});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/save")
|
||||
public Mono<Integer> insertMapAddrInfo(@RequestBody MapAddrInfoEntity entity){
|
||||
return mapAddrInfoService.insertMapAddrInfo(entity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/update")
|
||||
public Mono<Integer> updateMapAddrInfoById(@RequestBody MapAddrInfoEntity entity){
|
||||
return mapAddrInfoService.updateMapAddrInfoById(entity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/updateCover")
|
||||
public Mono<Integer> updateCoverMapAddrInfoById(@RequestBody MapAddrInfoEntity entity){
|
||||
return mapAddrInfoService.updateCoverMapAddrInfoById(entity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/delete")
|
||||
public Mono<Integer> deleteMapAddrInfoById(@RequestParam Long id){
|
||||
return mapAddrInfoService.deleteMapAddrInfoById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
60
MysqlToCode/src/test/tmp/MapAddrInfoEntity.java
Normal file
60
MysqlToCode/src/test/tmp/MapAddrInfoEntity.java
Normal file
@ -0,0 +1,60 @@
|
||||
package com.qiuguo.iot.data.entity;
|
||||
import org.hswebframework.ezorm.rdb.mapping.annotation.Comment;
|
||||
import org.hswebframework.web.crud.annotation.EnableEntityEvent;
|
||||
import org.hswebframework.web.api.crud.entity.GenericEntity;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Table;import lombok.Data;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* </p>*地图地名记录,说明
|
||||
* @author wulin
|
||||
* @since 2024-01-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Comment("地图地名记录,说明")
|
||||
@Table(name = "map_addr_info")
|
||||
@EnableEntityEvent
|
||||
public class MapAddrInfoEntity extends GenericEntity<Long> {
|
||||
@Comment("id")
|
||||
@Column(name = "id", length = 11, nullable = false, unique = true)
|
||||
private Long id;
|
||||
|
||||
@Comment("是否删除:0 否 1 删除")
|
||||
@Column(name = "is_delete", nullable = false)
|
||||
private Integer isDelete = 0;
|
||||
|
||||
@Comment("创建时间")
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@Comment("修改时间")
|
||||
@Column(name = "modify_time")
|
||||
private Date modifyTime;
|
||||
|
||||
@Comment("地名")
|
||||
@Column(name = "name", length = 255, nullable = false)
|
||||
private String name;
|
||||
|
||||
@Comment("地图名称")
|
||||
@Column(name = "map_name", length = 255, nullable = false)
|
||||
private String mapName;
|
||||
|
||||
@Comment("x坐标 单位cm")
|
||||
@Column(name = "x", nullable = false)
|
||||
private Integer x;
|
||||
|
||||
@Comment("y坐标 单位cm")
|
||||
@Column(name = "y", nullable = false)
|
||||
private Integer y = 0;
|
||||
|
||||
@Comment("地名故事介绍 ")
|
||||
@Column(name = "detail", length = 1000)
|
||||
private String detail;
|
||||
|
||||
@Comment("备注说明")
|
||||
@Column(name = "remark", length = 255)
|
||||
private String remark;
|
||||
|
||||
}
|
||||
79
MysqlToCode/src/test/tmp/MapAddrInfoRequest.java
Normal file
79
MysqlToCode/src/test/tmp/MapAddrInfoRequest.java
Normal file
@ -0,0 +1,79 @@
|
||||
package com.qiuguo.iot.data.entity;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
*地图地名记录,说明请求类
|
||||
* @author wulin
|
||||
* @since 2024-01-22
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
public class MapAddrInfoRequest implements java.io.Serializable {
|
||||
|
||||
private int currPage = 1;
|
||||
private int pageSize = 10;
|
||||
private String sort;
|
||||
private String order;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
*是否删除:0 否 1 删除
|
||||
*/
|
||||
private Integer isDelete;
|
||||
/**
|
||||
*创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
*创建时间搜索开始
|
||||
*/
|
||||
|
||||
private Date createTimeStart;
|
||||
|
||||
/**
|
||||
*创建时间搜索结束
|
||||
*/
|
||||
private Date createTimeEnd;
|
||||
/**
|
||||
*修改时间
|
||||
*/
|
||||
private Date modifyTime;
|
||||
/**
|
||||
*修改时间搜索开始
|
||||
*/
|
||||
|
||||
private Date modifyTimeStart;
|
||||
|
||||
/**
|
||||
*修改时间搜索结束
|
||||
*/
|
||||
private Date modifyTimeEnd;
|
||||
/**
|
||||
*地名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
*地图名称
|
||||
*/
|
||||
private String mapName;
|
||||
/**
|
||||
*x坐标 单位cm
|
||||
*/
|
||||
private Integer x;
|
||||
/**
|
||||
*y坐标 单位cm
|
||||
*/
|
||||
private Integer y;
|
||||
/**
|
||||
*地名故事介绍
|
||||
*/
|
||||
private String detail;
|
||||
/**
|
||||
*备注说明
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
63
MysqlToCode/src/test/tmp/MapAddrInfoResp.java
Normal file
63
MysqlToCode/src/test/tmp/MapAddrInfoResp.java
Normal file
@ -0,0 +1,63 @@
|
||||
package com.qiuguo.iot.data.entity;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* </p>*地图地名记录,说明返回类
|
||||
* @author wulin
|
||||
* @since 2024-01-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MapAddrInfoResp {
|
||||
public MapAddrInfoResp(){
|
||||
}
|
||||
public MapAddrInfoResp(MapAddrInfoEntity entity){
|
||||
id = entity.getId();
|
||||
createTime = entity.getCreateTime();
|
||||
modifyTime = entity.getModifyTime();
|
||||
name = entity.getName();
|
||||
mapName = entity.getMapName();
|
||||
x = entity.getX();
|
||||
y = entity.getY();
|
||||
detail = entity.getDetail();
|
||||
remark = entity.getRemark();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
*创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
*修改时间
|
||||
*/
|
||||
private Date modifyTime;
|
||||
/**
|
||||
*地名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
*地图名称
|
||||
*/
|
||||
private String mapName;
|
||||
/**
|
||||
*x坐标 单位cm
|
||||
*/
|
||||
private Integer x;
|
||||
/**
|
||||
*y坐标 单位cm
|
||||
*/
|
||||
private Integer y;
|
||||
/**
|
||||
*地名故事介绍
|
||||
*/
|
||||
private String detail;
|
||||
/**
|
||||
*备注说明
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
212
MysqlToCode/src/test/tmp/MapAddrInfoService.java
Normal file
212
MysqlToCode/src/test/tmp/MapAddrInfoService.java
Normal file
@ -0,0 +1,212 @@
|
||||
package com.admin.service.impl;
|
||||
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import com.qiuguo.iot.base.utils.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.hswebframework.ezorm.core.param.Sort;
|
||||
import org.hswebframework.ezorm.rdb.mapping.ReactiveQuery;
|
||||
import org.hswebframework.ezorm.rdb.mapping.ReactiveUpdate;
|
||||
import org.hswebframework.ezorm.rdb.operator.dml.query.SortOrder;
|
||||
import org.hswebframework.web.api.crud.entity.PagerResult;
|
||||
import org.hswebframework.web.api.crud.entity.QueryParamEntity;
|
||||
import org.hswebframework.web.crud.service.GenericReactiveCrudService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* 地图地名记录,说明服务类
|
||||
* </p>
|
||||
*
|
||||
* @author wulin
|
||||
* @since 2024-01-22
|
||||
*/
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MapAddrInfoService extends GenericReactiveCrudService<MapAddrInfoEntity, Long> {
|
||||
|
||||
|
||||
public Mono<MapAddrInfoEntity> selectMapAddrInfoByRequest(MapAddrInfoRequest request){
|
||||
ReactiveQuery<MapAddrInfoEntity> reactiveQuery = createQuery();
|
||||
reactiveQuery = reactiveQuery.and("is_delete", 0);
|
||||
if(request.getId() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getId, request.getId());
|
||||
}
|
||||
if(request.getIsDelete() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getIsDelete, request.getIsDelete());
|
||||
}
|
||||
if(request.getCreateTime() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getCreateTime, request.getCreateTime());
|
||||
}
|
||||
if(request.getModifyTime() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getModifyTime, request.getModifyTime());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getName())){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getName, request.getName());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getMapName())){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getMapName, request.getMapName());
|
||||
}
|
||||
if(request.getX() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getX, request.getX());
|
||||
}
|
||||
if(request.getY() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getY, request.getY());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getDetail())){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getDetail, request.getDetail());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getRemark())){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getRemark, request.getRemark());
|
||||
}
|
||||
SortOrder sortOrder = null;
|
||||
if(StringUtils.isNotEmpty(request.getOrder())){
|
||||
if(StringUtils.isNotEmpty(request.getSort()) && request.getSort().compareTo("0") == 0){
|
||||
sortOrder = SortOrder.desc(request.getOrder());
|
||||
}else{
|
||||
sortOrder = SortOrder.asc(request.getOrder());
|
||||
}
|
||||
reactiveQuery = reactiveQuery.orderBy(sortOrder);
|
||||
}
|
||||
return reactiveQuery.fetchOne();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Mono<PagerResult<MapAddrInfoEntity>> selectMapAddrInfosByRequest(MapAddrInfoRequest request){
|
||||
ReactiveQuery<MapAddrInfoEntity> reactiveQuery = createQuery();
|
||||
reactiveQuery = reactiveQuery.and("is_delete", 0);
|
||||
if(request.getId() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getId, request.getId());
|
||||
}
|
||||
if(request.getIsDelete() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getIsDelete, request.getIsDelete());
|
||||
}
|
||||
if(request.getCreateTimeStart() != null){
|
||||
reactiveQuery = reactiveQuery.gte(MapAddrInfoRequest::getCreateTime, request.getCreateTimeStart());
|
||||
}
|
||||
if(request.getCreateTimeEnd() != null){
|
||||
reactiveQuery = reactiveQuery.lte(MapAddrInfoRequest::getCreateTime, request.getCreateTimeEnd());
|
||||
}
|
||||
if(request.getModifyTimeStart() != null){
|
||||
reactiveQuery = reactiveQuery.gte(MapAddrInfoRequest::getModifyTime, request.getModifyTimeStart());
|
||||
}
|
||||
if(request.getModifyTimeEnd() != null){
|
||||
reactiveQuery = reactiveQuery.lte(MapAddrInfoRequest::getModifyTime, request.getModifyTimeEnd());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getName())){
|
||||
reactiveQuery = reactiveQuery.$like$(MapAddrInfoRequest::getName, request.getName());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getMapName())){
|
||||
reactiveQuery = reactiveQuery.$like$(MapAddrInfoRequest::getMapName, request.getMapName());
|
||||
}
|
||||
if(request.getX() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getX, request.getX());
|
||||
}
|
||||
if(request.getY() != null){
|
||||
reactiveQuery = reactiveQuery.and(MapAddrInfoRequest::getY, request.getY());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getDetail())){
|
||||
reactiveQuery = reactiveQuery.$like$(MapAddrInfoRequest::getDetail, request.getDetail());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(request.getRemark())){
|
||||
reactiveQuery = reactiveQuery.$like$(MapAddrInfoRequest::getRemark, request.getRemark());
|
||||
}
|
||||
QueryParamEntity param = QueryParamEntity.of(reactiveQuery.getParam());
|
||||
if(StringUtils.isNotEmpty(request.getOrder())){
|
||||
Sort sort = new Sort();
|
||||
sort.setName(request.getOrder());
|
||||
if(StringUtils.isNotEmpty(request.getSort()) && request.getSort().compareTo("0") == 0){
|
||||
sort.desc();
|
||||
}else{
|
||||
sort.asc();
|
||||
}
|
||||
param.setSorts(Arrays.asList(sort));
|
||||
}
|
||||
param.setPageIndex(request.getCurrPage());
|
||||
param.setPageSize(request.getPageSize());
|
||||
param.setPaging(true);
|
||||
param.setFirstPageIndex(1);
|
||||
return queryPager(param);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Mono<MapAddrInfoEntity> selectMapAddrInfoById(Long id){
|
||||
return createQuery()
|
||||
.and("is_delete", 0)
|
||||
.and("id", id)
|
||||
.fetchOne();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Mono<Integer> insertMapAddrInfo(MapAddrInfoEntity entity){
|
||||
entity.setId(null);
|
||||
entity.setCreateTime(null);
|
||||
entity.setModifyTime(null);
|
||||
return insert(entity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Mono<Integer> updateMapAddrInfoById(MapAddrInfoEntity entity){
|
||||
ReactiveUpdate<MapAddrInfoEntity> update = createUpdate()
|
||||
.set(MapAddrInfoEntity::getModifyTime, new Date());
|
||||
if(entity.getIsDelete() != null){
|
||||
update = update.set(MapAddrInfoEntity::getIsDelete, entity.getIsDelete());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(entity.getName())){
|
||||
update = update.set(MapAddrInfoEntity::getName, entity.getName());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(entity.getMapName())){
|
||||
update = update.set(MapAddrInfoEntity::getMapName, entity.getMapName());
|
||||
}
|
||||
if(entity.getX() != null){
|
||||
update = update.set(MapAddrInfoEntity::getX, entity.getX());
|
||||
}
|
||||
if(entity.getY() != null){
|
||||
update = update.set(MapAddrInfoEntity::getY, entity.getY());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(entity.getDetail())){
|
||||
update = update.set(MapAddrInfoEntity::getDetail, entity.getDetail());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(entity.getRemark())){
|
||||
update = update.set(MapAddrInfoEntity::getRemark, entity.getRemark());
|
||||
}
|
||||
return update.where(MapAddrInfoEntity::getId, entity.getId()).and("is_delete", 0).execute();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Mono<Integer> updateCoverMapAddrInfoById(MapAddrInfoEntity entity){
|
||||
ReactiveUpdate<MapAddrInfoEntity> update = createUpdate()
|
||||
.set(MapAddrInfoEntity::getModifyTime, new Date());
|
||||
update = update.set(MapAddrInfoEntity::getIsDelete, entity.getIsDelete());
|
||||
update = update.set(MapAddrInfoEntity::getName, entity.getName());
|
||||
update = update.set(MapAddrInfoEntity::getMapName, entity.getMapName());
|
||||
update = update.set(MapAddrInfoEntity::getX, entity.getX());
|
||||
update = update.set(MapAddrInfoEntity::getY, entity.getY());
|
||||
update = update.set(MapAddrInfoEntity::getDetail, entity.getDetail());
|
||||
update = update.set(MapAddrInfoEntity::getRemark, entity.getRemark());
|
||||
return update.where(MapAddrInfoEntity::getId, entity.getId()).and("is_delete", 0).execute();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Mono<Integer> deleteMapAddrInfoById(Long id){
|
||||
return createUpdate()
|
||||
.set("is_delete", 1)
|
||||
.set("modify_time", new Date())
|
||||
.where("id", id)
|
||||
.execute();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user