diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/enter/CqEnterController.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/enter/CqEnterController.java index d3bb0e7..777c049 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/enter/CqEnterController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/enter/CqEnterController.java @@ -31,10 +31,8 @@ public class CqEnterController { @GetMapping("list") public R find(String operator, String cellId){ - System.out.println("cellId = " + cellId); - List fTo = cqEnterMapper.classifiedQuery(cellId); System.out.println(fTo); @@ -49,7 +47,7 @@ public class CqEnterController { firstVos.add(firstVo); } - return R.ok().put("data", firstVos); + return R.ok().put("data", firstVos).put("total", firstVos.size()); } @GetMapping("/getPersonType") diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java index 5ce6f44..faa3f8c 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/CqMemberController.java @@ -355,6 +355,12 @@ public class CqMemberController { @PostMapping("/newVisitor") public R newVisitor(@RequestBody VisitorDto visitorDto) { + + if(visitorDto.getMemberId() != null){ + cqMemberMapper.deleteById(visitorDto.getMemberId()); + } + + TenPersonEntity tenPersonEntity = new TenPersonEntity(); long id = new SnowflakeIdWorker().nextId(); diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/dto/VisitorDto.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/dto/VisitorDto.java index eb0efd4..96b8764 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/dto/VisitorDto.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/controller/member/dto/VisitorDto.java @@ -11,6 +11,8 @@ import java.util.Date; @AllArgsConstructor @NoArgsConstructor public class VisitorDto extends BaseEntity { + + private Integer memberId; private String orgId; private String name; private Integer sex; diff --git a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/enter/CqEnterMapper.java b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/enter/CqEnterMapper.java index 57f7007..79cd1c9 100644 --- a/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/enter/CqEnterMapper.java +++ b/shapelight-admin/src/main/java/net/shapelight/modules/iCq/dal/mysql/enter/CqEnterMapper.java @@ -6,6 +6,7 @@ import net.shapelight.modules.iCq.controller.enter.vo.PeronType; import net.shapelight.modules.iCq.controller.enter.vo.TypeRules; import net.shapelight.modules.iCq.dal.dataobject.enter.TenEnterConfigEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -13,7 +14,7 @@ import java.util.List; public interface CqEnterMapper extends BaseMapper { - List classifiedQuery(String cellId); + List classifiedQuery(@Param("cellId")String cellId); List getPersonType();