+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 代码审核j结果
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+public class CodeAuditResultDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 代码ID
+ */
+ private String codeId;
+
+ /**
+ * 审核ID
+ */
+ private String auditId;
+
+ /**
+ * 审核结果 审核中:auditing,审核成功audit_success,审核被拒绝audit_failed,已撤回:withdrawn,审核延后:delay
+ */
+ private String result;
+
+ /**
+ * 原因
+ */
+ private String reason;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 是否删除
+ */
+ private String delFlag;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeCustomerDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeCustomerDTO.java
new file mode 100644
index 0000000000..960b9035cb
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeCustomerDTO.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+
+/**
+ * 代码素材
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+public class CodeMediaDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 代码ID
+ */
+ private String codeId;
+
+ /**
+ * 素材ID
+ */
+ private String mediaId;
+
+ /**
+ * 素材名
+ */
+ private String mediaName;
+
+ /**
+ * 素材类型 图片(image)、语音(voice)、视频(video)和缩略图(thumb)
+ */
+ private String mediaType;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 是否删除
+ */
+ private String delFlag;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerCodeOperationHistoryDTO.java b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerCodeOperationHistoryDTO.java
new file mode 100644
index 0000000000..9d400efb40
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerCodeOperationHistoryDTO.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.controller;
+
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.CodeAuditResultDTO;
+import com.epmet.service.CodeAuditResultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+
+/**
+ * 代码审核j结果
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@RestController
+@RequestMapping("codeauditresult")
+public class CodeAuditResultController {
+
+ @Autowired
+ private CodeAuditResultService codeAuditResultService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = codeAuditResultService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ CodeAuditResultDTO data = codeAuditResultService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody CodeAuditResultDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ codeAuditResultService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody CodeAuditResultDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ codeAuditResultService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ codeAuditResultService.delete(ids);
+ return new Result();
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeController.java
new file mode 100644
index 0000000000..1e97bf9ab1
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeController.java
@@ -0,0 +1,30 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.dto.form.CodeUploadFormDTO;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author zhaoqifeng
+ * @dscription 代码管理
+ * @date 2020/7/9 11:02
+ */
+@RestController
+@RequestMapping("code")
+public class CodeController {
+
+ /**
+ * 代码上传
+ * @author zhaoqifeng
+ * @date 2020/7/9 14:23
+ * @param
+ * @return com.epmet.commons.tools.utils.Result
+ */
+ @PostMapping("upload")
+ public Result upload(@RequestBody CodeUploadFormDTO formDTO) {
+ return new Result<>();
+ }
+}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeCustomerController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeCustomerController.java
new file mode 100644
index 0000000000..d4a193821c
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeCustomerController.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.controller;
+
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.CodeCustomerDTO;
+import com.epmet.service.CodeCustomerService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+
+/**
+ * 客户代码关联表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@RestController
+@RequestMapping("codecustomer")
+public class CodeCustomerController {
+
+ @Autowired
+ private CodeCustomerService codeCustomerService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = codeCustomerService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ CodeCustomerDTO data = codeCustomerService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody CodeCustomerDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ codeCustomerService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody CodeCustomerDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ codeCustomerService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ codeCustomerService.delete(ids);
+ return new Result();
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeMediaController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeMediaController.java
new file mode 100644
index 0000000000..c8ad829979
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeMediaController.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.controller;
+
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.CodeMediaDTO;
+import com.epmet.service.CodeMediaService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+
+/**
+ * 代码素材
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@RestController
+@RequestMapping("codemedia")
+public class CodeMediaController {
+
+ @Autowired
+ private CodeMediaService codeMediaService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = codeMediaService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ CodeMediaDTO data = codeMediaService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody CodeMediaDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ codeMediaService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody CodeMediaDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ codeMediaService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ codeMediaService.delete(ids);
+ return new Result();
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerCodeOperationHistoryController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerCodeOperationHistoryController.java
new file mode 100644
index 0000000000..a764889ed6
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerCodeOperationHistoryController.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.controller;
+
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.CustomerCodeOperationHistoryDTO;
+import com.epmet.service.CustomerCodeOperationHistoryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+
+/**
+ * 客户代码操作历史
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@RestController
+@RequestMapping("customercodeoperationhistory")
+public class CustomerCodeOperationHistoryController {
+
+ @Autowired
+ private CustomerCodeOperationHistoryService customerCodeOperationHistoryService;
+
+ @GetMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = customerCodeOperationHistoryService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ CustomerCodeOperationHistoryDTO data = customerCodeOperationHistoryService.get(id);
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ public Result save(@RequestBody CustomerCodeOperationHistoryDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ customerCodeOperationHistoryService.save(dto);
+ return new Result();
+ }
+
+ @PutMapping
+ public Result update(@RequestBody CustomerCodeOperationHistoryDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ customerCodeOperationHistoryService.update(dto);
+ return new Result();
+ }
+
+ @DeleteMapping
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ customerCodeOperationHistoryService.delete(ids);
+ return new Result();
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java
index 7cc03af30e..0b32a836a7 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaCustomerController.java
@@ -1,8 +1,25 @@
package com.epmet.controller;
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.form.CreateAgencyFormDTO;
+import com.epmet.dto.form.MyInfoFormDTO;
+import com.epmet.dto.form.RegisterFormDTO;
+import com.epmet.dto.result.AgencyLevelListResultDTO;
+import com.epmet.dto.result.CreateAgencyResultDTO;
+import com.epmet.dto.result.MyInfoResultDTO;
+import com.epmet.service.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import java.util.List;
+
/**
* 公众号用户的注册、客户创建、跟组织创建 ,查询我的详情等等...api写在这
*
@@ -12,4 +29,65 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("pacustomer")
public class PaCustomerController {
+
+ @Autowired
+ private PaUserService paUserService;
+ @Autowired
+ private PaCustomerService paCustomerService;
+ @Autowired
+ private PaCustomerAgencyService paCustomerAgencyService;
+ @Autowired
+ private PaCustomerUserAgencyService paCustomerUserAgencyService;
+ @Autowired
+ private CustomerMpService customerMpService;
+
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 公众号-手机号注册
+ **/
+ @PostMapping("register")
+ public Result register(@LoginUser TokenDto tokenDTO, @RequestBody RegisterFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, RegisterFormDTO.AddUserInternalGroup.class, RegisterFormDTO.AddUserShowGroup.class);
+ formDTO.setUserId(tokenDTO.getUserId());
+ paCustomerService.register(formDTO);
+ return new Result();
+ }
+
+ /**
+ * @return
+ * @Author sun
+ * @Description 公众号-查询组织级别
+ **/
+ @PostMapping("agencylevellist")
+ public Result> agencyLevelList() {
+ return new Result>().ok(paCustomerService.agencyLevelList());
+ }
+
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 公众号-创建组织
+ **/
+ @PostMapping("createagency")
+ public Result createAgency(@LoginUser TokenDto tokenDTO, @RequestBody CreateAgencyFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, DefaultGroup.class);
+ return new Result().ok(paCustomerService.createAgency(tokenDTO, formDTO));
+ }
+
+ /**
+ * @param formDTO
+ * @return
+ * @Author sun
+ * @Description 公众号-查询我的信息
+ **/
+ @PostMapping("myinfo")
+ public Result myInfo(@LoginUser TokenDto tokenDTO, @RequestBody MyInfoFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, MyInfoFormDTO.AddUserInternalGroup.class);
+ return new Result().ok(paCustomerService.myInfo(formDTO));
+ }
+
+
}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserController.java
index 8f447b191e..d7c07bc506 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserController.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserController.java
@@ -26,8 +26,11 @@ import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.PaUserDTO;
+import com.epmet.dto.result.CustomerUserResultDTO;
+import com.epmet.dto.result.SaveUserResultDTO;
import com.epmet.excel.PaUserExcel;
import com.epmet.service.PaUserService;
+import me.chanjar.weixin.mp.bean.result.WxMpUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -45,24 +48,24 @@ import java.util.Map;
@RestController
@RequestMapping("pauser")
public class PaUserController {
-
+
@Autowired
private PaUserService paUserService;
@GetMapping("page")
- public Result> page(@RequestParam Map params){
+ public Result> page(@RequestParam Map params) {
PageData page = paUserService.page(params);
return new Result>().ok(page);
}
@GetMapping("{id}")
- public Result get(@PathVariable("id") String id){
+ public Result get(@PathVariable("id") String id) {
PaUserDTO data = paUserService.get(id);
return new Result().ok(data);
}
@PostMapping
- public Result save(@RequestBody PaUserDTO dto){
+ public Result save(@RequestBody PaUserDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
paUserService.save(dto);
@@ -70,7 +73,7 @@ public class PaUserController {
}
@PutMapping
- public Result update(@RequestBody PaUserDTO dto){
+ public Result update(@RequestBody PaUserDTO dto) {
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
paUserService.update(dto);
@@ -78,7 +81,7 @@ public class PaUserController {
}
@DeleteMapping
- public Result delete(@RequestBody String[] ids){
+ public Result delete(@RequestBody String[] ids) {
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
paUserService.delete(ids);
@@ -91,4 +94,26 @@ public class PaUserController {
ExcelUtils.exportExcelToTarget(response, null, list, PaUserExcel.class);
}
+ /**
+ * @param wxMpUser
+ * @return
+ * @Author sun
+ * @Description 根据openId新增或更新用户信息
+ **/
+ @PostMapping(value = "/saveuser")
+ public Result saveUser(@RequestBody WxMpUser wxMpUser) {
+ return new Result().ok(paUserService.saveUser(wxMpUser));
+ }
+
+ /**
+ * @param phone
+ * @return
+ * @Author sun
+ * @Description 根据手机号查询公众号用户基本信息,校验用户是否存在
+ **/
+ @PostMapping(value = "/checkpauser/{phone}")
+ public Result checkPaUser(@PathVariable("phone") String phone) {
+ return new Result().ok(paUserService.checkPaUser(phone));
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserVisitedController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserVisitedController.java
index c89fee64a4..16f5caab3a 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserVisitedController.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/PaUserVisitedController.java
@@ -23,9 +23,10 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
-import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.PaUserVisitedDTO;
+import com.epmet.dto.form.SaveUserVisitedFormDTO;
import com.epmet.excel.PaUserVisitedExcel;
import com.epmet.service.PaUserVisitedService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -91,4 +92,16 @@ public class PaUserVisitedController {
ExcelUtils.exportExcelToTarget(response, null, list, PaUserVisitedExcel.class);
}
+ /**
+ * @param visited
+ * @return
+ * @Author sun
+ * @Description 用户登陆,新增访问记录数据
+ **/
+ @PostMapping(value = "/saveuservisited")
+ public Result saveUserVisited(@RequestBody SaveUserVisitedFormDTO visited) {
+ paUserVisitedService.saveUserVisited(visited);
+ return new Result();
+ }
+
}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/WarrantController.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/WarrantController.java
index dfd324ccee..1acb7a60ab 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/WarrantController.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/WarrantController.java
@@ -3,11 +3,7 @@ package com.epmet.controller;
import com.epmet.exception.AesException;
import com.epmet.service.WarrantService;
import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.dom4j.Document;
import org.dom4j.DocumentException;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -15,7 +11,6 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.io.BufferedReader;
import java.io.IOException;
/**
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeAuditResultDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeAuditResultDao.java
new file mode 100644
index 0000000000..efbb43e81e
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeAuditResultDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.CodeAuditResultEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 代码审核j结果
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Mapper
+public interface CodeAuditResultDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java
new file mode 100644
index 0000000000..fe783081fd
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.CodeCustomerEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 客户代码关联表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Mapper
+public interface CodeCustomerDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeMediaDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeMediaDao.java
new file mode 100644
index 0000000000..ef06035847
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeMediaDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.CodeMediaEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 代码素材
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Mapper
+public interface CodeMediaDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerCodeOperationHistoryDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerCodeOperationHistoryDao.java
new file mode 100644
index 0000000000..63ca70fb2b
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerCodeOperationHistoryDao.java
@@ -0,0 +1,33 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.CustomerCodeOperationHistoryEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 客户代码操作历史
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Mapper
+public interface CustomerCodeOperationHistoryDao extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java
index 2c7d386261..e868d6c4d5 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerMpDao.java
@@ -18,8 +18,12 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.CustomerMpDTO;
import com.epmet.entity.CustomerMpEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
/**
* 客户小程序关系表
@@ -29,5 +33,12 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface CustomerMpDao extends BaseDao {
-
+
+ /**
+ * @param customerId
+ * @return
+ * @Author sun
+ * @Description 查询客户小程序授权结果信息
+ **/
+ List selectByCustomerId(@Param("customerId") String customerId);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java
index 179a27459d..219d88fd83 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerAgencyDao.java
@@ -18,6 +18,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.PaCustomerAgencyDTO;
import com.epmet.entity.PaCustomerAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -38,4 +39,11 @@ public interface PaCustomerAgencyDao extends BaseDao {
*/
String getCustomerIdByUserId(@Param("userId")String userId);
+ /**
+ * @param customerId
+ * @return
+ * @Author sun
+ * @Description 公众号-查询客户组织信息
+ **/
+ PaCustomerAgencyDTO selectCustomerAgency(@Param("customerId") String customerId);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java
index 7dc41a284b..ac4f9cd20f 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaCustomerDao.java
@@ -18,8 +18,12 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.PaCustomerDTO;
import com.epmet.entity.PaCustomerEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
/**
* 客户信息
@@ -29,5 +33,12 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface PaCustomerDao extends BaseDao {
-
+
+ /**
+ * @param userId
+ * @return
+ * @Author sun
+ * @Description 公众号-根据userId查询用户对应的客户信息
+ **/
+ List selectCustomerByUserId(@Param("userId") String userId);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java
index 858ac17cb2..2ced9f5760 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserDao.java
@@ -18,8 +18,12 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.PaUserDTO;
import com.epmet.entity.PaUserEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
/**
* 公众号用户信息
@@ -29,5 +33,12 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface PaUserDao extends BaseDao {
-
+
+ /**
+ * @param phone
+ * @return
+ * @Author sun
+ * @Description 根据手机号查询公众号用户基本信息,校验用户是否存在
+ **/
+ List selectUserByPhone(@Param("phone") String phone);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserWechatDao.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserWechatDao.java
index 29e11cb876..8d3f6a6351 100644
--- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserWechatDao.java
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/PaUserWechatDao.java
@@ -18,8 +18,10 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.PaUserWechatDTO;
import com.epmet.entity.PaUserWechatEntity;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
/**
* 公众号用户信息
@@ -29,5 +31,20 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface PaUserWechatDao extends BaseDao {
-
+
+ /**
+ * @param openId
+ * @return
+ * @Author sun
+ * @Description 根据openId查询user_wechat表信息
+ **/
+ PaUserWechatDTO selectWechatByOpenId(@Param("openId") String openId);
+
+ /**
+ * @param dto
+ * @return
+ * @Author sun
+ * @Description 根据userId查询user_wechat表信息
+ **/
+ PaUserWechatEntity selectWechatByUserId(PaUserWechatDTO dto);
}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeAuditResultEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeAuditResultEntity.java
new file mode 100644
index 0000000000..6226a7b08b
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeAuditResultEntity.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 代码审核j结果
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("code_audit_result")
+public class CodeAuditResultEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 代码ID
+ */
+ private String codeId;
+
+ /**
+ * 审核ID
+ */
+ private String auditId;
+
+ /**
+ * 审核结果 审核中:auditing,审核成功audit_success,审核被拒绝audit_failed,已撤回:withdrawn,审核延后:delay
+ */
+ private String result;
+
+ /**
+ * 原因
+ */
+ private String reason;
+
+}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeCustomerEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeCustomerEntity.java
new file mode 100644
index 0000000000..496aeacbc5
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeCustomerEntity.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 代码素材
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("code_media")
+public class CodeMediaEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 代码ID
+ */
+ private String codeId;
+
+ /**
+ * 素材ID
+ */
+ private String mediaId;
+
+ /**
+ * 素材名
+ */
+ private String mediaName;
+
+ /**
+ * 素材类型 图片(image)、语音(voice)、视频(video)和缩略图(thumb)
+ */
+ private String mediaType;
+
+}
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CustomerCodeOperationHistoryEntity.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CustomerCodeOperationHistoryEntity.java
new file mode 100644
index 0000000000..e747bb57d4
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CustomerCodeOperationHistoryEntity.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.redis;
+
+import com.epmet.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 代码审核j结果
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Component
+public class CodeAuditResultRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeCustomerRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeCustomerRedis.java
new file mode 100644
index 0000000000..6b5901d833
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeCustomerRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.redis;
+
+import com.epmet.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 客户代码关联表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Component
+public class CodeCustomerRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeMediaRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeMediaRedis.java
new file mode 100644
index 0000000000..99d1257967
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeMediaRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.redis;
+
+import com.epmet.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 代码素材
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Component
+public class CodeMediaRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CustomerCodeOperationHistoryRedis.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CustomerCodeOperationHistoryRedis.java
new file mode 100644
index 0000000000..247e724de9
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CustomerCodeOperationHistoryRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.redis;
+
+import com.epmet.commons.tools.redis.RedisUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * 客户代码操作历史
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Component
+public class CustomerCodeOperationHistoryRedis {
+ @Autowired
+ private RedisUtils redisUtils;
+
+ public void delete(Object[] ids) {
+
+ }
+
+ public void set(){
+
+ }
+
+ public String get(String id){
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeAuditResultService.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeAuditResultService.java
new file mode 100644
index 0000000000..016a6e5abc
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeAuditResultService.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.dao.CodeAuditResultDao;
+import com.epmet.dto.CodeAuditResultDTO;
+import com.epmet.entity.CodeAuditResultEntity;
+import com.epmet.redis.CodeAuditResultRedis;
+import com.epmet.service.CodeAuditResultService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 代码审核j结果
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Service
+public class CodeAuditResultServiceImpl extends BaseServiceImpl implements CodeAuditResultService {
+
+ @Autowired
+ private CodeAuditResultRedis codeAuditResultRedis;
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, CodeAuditResultDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, CodeAuditResultDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public CodeAuditResultDTO get(String id) {
+ CodeAuditResultEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, CodeAuditResultDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(CodeAuditResultDTO dto) {
+ CodeAuditResultEntity entity = ConvertUtils.sourceToTarget(dto, CodeAuditResultEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(CodeAuditResultDTO dto) {
+ CodeAuditResultEntity entity = ConvertUtils.sourceToTarget(dto, CodeAuditResultEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java
new file mode 100644
index 0000000000..1ccf7d1f28
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ConvertUtils;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.dao.CodeCustomerDao;
+import com.epmet.dto.CodeCustomerDTO;
+import com.epmet.entity.CodeCustomerEntity;
+import com.epmet.redis.CodeCustomerRedis;
+import com.epmet.service.CodeCustomerService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 客户代码关联表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-07-09
+ */
+@Service
+public class CodeCustomerServiceImpl extends BaseServiceImpl implements CodeCustomerService {
+
+ @Autowired
+ private CodeCustomerRedis codeCustomerRedis;
+
+ @Override
+ public PageData page(Map params) {
+ IPage page = baseDao.selectPage(
+ getPage(params, FieldConstant.CREATED_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, CodeCustomerDTO.class);
+ }
+
+ @Override
+ public List list(Map params) {
+ List entityList = baseDao.selectList(getWrapper(params));
+
+ return ConvertUtils.sourceToTarget(entityList, CodeCustomerDTO.class);
+ }
+
+ private QueryWrapper getWrapper(Map params){
+ String id = (String)params.get(FieldConstant.ID_HUMP);
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
+
+ return wrapper;
+ }
+
+ @Override
+ public CodeCustomerDTO get(String id) {
+ CodeCustomerEntity entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, CodeCustomerDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(CodeCustomerDTO dto) {
+ CodeCustomerEntity entity = ConvertUtils.sourceToTarget(dto, CodeCustomerEntity.class);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(CodeCustomerDTO dto) {
+ CodeCustomerEntity entity = ConvertUtils.sourceToTarget(dto, CodeCustomerEntity.class);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(String[] ids) {
+ // 逻辑删除(@TableLogic 注解)
+ baseDao.deleteBatchIds(Arrays.asList(ids));
+ }
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeMediaServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeMediaServiceImpl.java
new file mode 100644
index 0000000000..4447d8ed66
--- /dev/null
+++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeMediaServiceImpl.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *