Browse Source

第三方代码上传

master
zhaoqifeng 5 years ago
parent
commit
3b404b89c4
  1. 65
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
  2. 96
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeAuditResultDTO.java
  3. 121
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeCustomerDTO.java
  4. 91
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeMediaDTO.java
  5. 96
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CustomerCodeOperationHistoryDTO.java
  6. 46
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CodeUploadFormDTO.java
  7. 84
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeAuditResultController.java
  8. 30
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeController.java
  9. 84
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeCustomerController.java
  10. 84
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeMediaController.java
  11. 84
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CustomerCodeOperationHistoryController.java
  12. 33
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeAuditResultDao.java
  13. 33
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeCustomerDao.java
  14. 33
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CodeMediaDao.java
  15. 33
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/dao/CustomerCodeOperationHistoryDao.java
  16. 66
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeAuditResultEntity.java
  17. 91
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeCustomerEntity.java
  18. 61
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeMediaEntity.java
  19. 66
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CustomerCodeOperationHistoryEntity.java
  20. 47
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeAuditResultRedis.java
  21. 47
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeCustomerRedis.java
  22. 47
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeMediaRedis.java
  23. 47
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CustomerCodeOperationHistoryRedis.java
  24. 95
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeAuditResultService.java
  25. 95
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java
  26. 95
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeMediaService.java
  27. 12
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeService.java
  28. 95
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CustomerCodeOperationHistoryService.java
  29. 104
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeAuditResultServiceImpl.java
  30. 104
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeCustomerServiceImpl.java
  31. 104
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeMediaServiceImpl.java
  32. 17
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java
  33. 104
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CustomerCodeOperationHistoryServiceImpl.java
  34. 2
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java
  35. 9
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaCodeAuditStatus.java
  36. 18
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaCodeAuditStatusReq.java
  37. 10
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaCodeCommitReq.java
  38. 145
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaCodeSubmitAuditRequest.java
  39. 36
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaAuditStatusResult.java
  40. 52
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaCategoryResult.java
  41. 28
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaGetCategoryResult.java
  42. 28
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaGetPageResult.java
  43. 76
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java
  44. 179
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java
  45. 22
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeAuditResultDao.xml
  46. 27
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeCustomerDao.xml
  47. 21
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeMediaDao.xml
  48. 22
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerCodeOperationHistoryDao.xml

65
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java

@ -8,6 +8,7 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
@ -27,7 +28,10 @@ import org.springframework.util.CollectionUtils;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
@ -204,6 +208,67 @@ public class HttpClientManager {
return new Result<String>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
/**
* desc: 发送get请求
* param:url, params
* return: CallResult<String>
* date: 2019/2/21 9:16
*
* @author: jianjun liu
*/
public Result<Byte[]> sendGetFile(String url, Map<String, Object> params) {
try {
URIBuilder builder = new URIBuilder(url);
if (!CollectionUtils.isEmpty(params)) {
Set<String> set = params.keySet();
for (String key : set) {
builder.setParameter(key, params.get(key) == null ? "" : String.valueOf(params.get(key)));
}
}
HttpGet httpGet = new HttpGet(builder.build());
httpGet.setConfig(requestConfig);
return executeToByte(httpGet);
} catch (Exception e) {
log.error("sendGet exception", e);
return new Result<Byte[]>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
}
private Result<Byte[]> executeToByte(HttpRequestBase httpMethod) {
CloseableHttpResponse response = null;
try {
response = httpclient.execute(httpMethod);
log.debug("http send response:{}", JSON.toJSONString(response));
if (response != null && response.getStatusLine() != null) {
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
InputStream in = response.getEntity().getContent();
ByteArrayOutputStream output = new ByteArrayOutputStream();
byte[] buffer = new byte[4096];
int n = 0;
while (-1 != (n = in.read(buffer))) {
output.write(buffer, 0, n);
}
return new Result<Byte[]>().ok(ArrayUtils.toObject(output.toByteArray()));
} else {
log.warn("execute http method fail,httpStatus:{0}", response.getStatusLine().getStatusCode());
}
}
} catch (Exception e) {
log.error("execute exception", e);
return new Result<Byte[]>().error(EpmetErrorCode.SERVER_ERROR.getCode(), e.getMessage());
} finally {
httpMethod.releaseConnection();
try {
if (response != null) {
response.close();
}
} catch (IOException e) {
}
}
return new Result<Byte[]>().error(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
public static void main(String[] args) {
String url = "http://localhost:8107/epmetscan/api/textSyncScan";
TextTaskDTO p = new TextTaskDTO();

96
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeAuditResultDTO.java

@ -0,0 +1,96 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

121
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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 CodeCustomerDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 客户名
*/
private String customerName;
/**
* 小程序接口调用令牌ID
*/
private String accessTokenId;
/**
* 模板ID
*/
private String templateId;
/**
* 小程序类型 居民端resi,工作端work
*/
private String type;
/**
* APPID
*/
private String appId;
/**
* 自定义配置
*/
private String extJson;
/**
* 代码版本号
*/
private String userVersion;
/**
* 代码描述
*/
private String userDesc;
/**
* 状态 未审核:unaudited审核中:auditing审核成功audit_success审核被拒绝audit_failed已撤回:withdrawn审核延后:delay发布成功release_success, 发布失败release_failed
*/
private String status;
/**
* 乐观锁
*/
private Integer revision;
/**
* 是否删除
*/
private String delFlag;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

91
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/CodeMediaDTO.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

96
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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 CustomerCodeOperationHistoryDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 代码ID
*/
private String codeId;
/**
* 版本
*/
private String version;
/**
* 操作类型 操作 上传upload审核audit撤回undo发布release
*/
private String operation;
/**
* 描述
*/
private String describe;
/**
* 乐观锁
*/
private Integer revision;
/**
* 是否删除
*/
private String delFlag;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

46
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/CodeUploadFormDTO.java

@ -0,0 +1,46 @@
package com.epmet.dto.form;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/9 14:24
*/
@NoArgsConstructor
@Data
public class CodeUploadFormDTO implements Serializable {
private static final long serialVersionUID = 1295337818281424509L;
/**
* 小程序接口调用令牌ID
*/
private String accessTokenId;
/**
* 小程序类型 居民端resi 工作段work
*/
private String type;
/**
* 客户ID
*/
private String customerId;
/**
* 代码库中的代码模板 ID
*/
private String templateId;
/**
* 第三方自定义的配置
*/
private String extJson;
/**
* 代码版本号
*/
private String userVersion;
/**
* 代码描述
*/
private String userDesc;
}

84
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/CodeAuditResultController.java

@ -0,0 +1,84 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PageData<CodeAuditResultDTO>> page(@RequestParam Map<String, Object> params){
PageData<CodeAuditResultDTO> page = codeAuditResultService.page(params);
return new Result<PageData<CodeAuditResultDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<CodeAuditResultDTO> get(@PathVariable("id") String id){
CodeAuditResultDTO data = codeAuditResultService.get(id);
return new Result<CodeAuditResultDTO>().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();
}
}

30
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<>();
}
}

84
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PageData<CodeCustomerDTO>> page(@RequestParam Map<String, Object> params){
PageData<CodeCustomerDTO> page = codeCustomerService.page(params);
return new Result<PageData<CodeCustomerDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<CodeCustomerDTO> get(@PathVariable("id") String id){
CodeCustomerDTO data = codeCustomerService.get(id);
return new Result<CodeCustomerDTO>().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();
}
}

84
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PageData<CodeMediaDTO>> page(@RequestParam Map<String, Object> params){
PageData<CodeMediaDTO> page = codeMediaService.page(params);
return new Result<PageData<CodeMediaDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<CodeMediaDTO> get(@PathVariable("id") String id){
CodeMediaDTO data = codeMediaService.get(id);
return new Result<CodeMediaDTO>().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();
}
}

84
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<PageData<CustomerCodeOperationHistoryDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomerCodeOperationHistoryDTO> page = customerCodeOperationHistoryService.page(params);
return new Result<PageData<CustomerCodeOperationHistoryDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<CustomerCodeOperationHistoryDTO> get(@PathVariable("id") String id){
CustomerCodeOperationHistoryDTO data = customerCodeOperationHistoryService.get(id);
return new Result<CustomerCodeOperationHistoryDTO>().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();
}
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<CodeAuditResultEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<CodeCustomerEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<CodeMediaEntity> {
}

33
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<CustomerCodeOperationHistoryEntity> {
}

66
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

91
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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_customer")
public class CodeCustomerEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 客户名
*/
private String customerName;
/**
* 小程序接口调用令牌ID
*/
private String accessTokenId;
/**
* 模板ID
*/
private String templateId;
/**
* 小程序类型 居民端resi,工作端work
*/
private String type;
/**
* APPID
*/
private String appId;
/**
* 自定义配置
*/
private String extJson;
/**
* 代码版本号
*/
private String userVersion;
/**
* 代码描述
*/
private String userDesc;
/**
* 状态 未审核:unaudited审核中:auditing审核成功audit_success审核被拒绝audit_failed已撤回:withdrawn审核延后:delay发布成功release_success, 发布失败release_failed
*/
private String status;
}

61
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/entity/CodeMediaEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

66
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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("customer_code_operation_history")
public class CustomerCodeOperationHistoryEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 代码ID
*/
private String codeId;
/**
* 版本
*/
private String version;
/**
* 操作类型 操作 上传upload审核audit撤回undo发布release
*/
private String operation;
/**
* 描述
*/
private String describe;
}

47
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/redis/CodeAuditResultRedis.java

@ -0,0 +1,47 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}
}

47
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}
}

47
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}
}

47
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}
}

95
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.CodeAuditResultDTO;
import com.epmet.entity.CodeAuditResultEntity;
import java.util.List;
import java.util.Map;
/**
* 代码审核j结果
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
public interface CodeAuditResultService extends BaseService<CodeAuditResultEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<CodeAuditResultDTO>
* @author generator
* @date 2020-07-09
*/
PageData<CodeAuditResultDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<CodeAuditResultDTO>
* @author generator
* @date 2020-07-09
*/
List<CodeAuditResultDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return CodeAuditResultDTO
* @author generator
* @date 2020-07-09
*/
CodeAuditResultDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-07-09
*/
void save(CodeAuditResultDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-07-09
*/
void update(CodeAuditResultDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-07-09
*/
void delete(String[] ids);
}

95
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeCustomerService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.CodeCustomerDTO;
import com.epmet.entity.CodeCustomerEntity;
import java.util.List;
import java.util.Map;
/**
* 客户代码关联表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
public interface CodeCustomerService extends BaseService<CodeCustomerEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<CodeCustomerDTO>
* @author generator
* @date 2020-07-09
*/
PageData<CodeCustomerDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<CodeCustomerDTO>
* @author generator
* @date 2020-07-09
*/
List<CodeCustomerDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return CodeCustomerDTO
* @author generator
* @date 2020-07-09
*/
CodeCustomerDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-07-09
*/
void save(CodeCustomerDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-07-09
*/
void update(CodeCustomerDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-07-09
*/
void delete(String[] ids);
}

95
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeMediaService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.CodeMediaDTO;
import com.epmet.entity.CodeMediaEntity;
import java.util.List;
import java.util.Map;
/**
* 代码素材
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
public interface CodeMediaService extends BaseService<CodeMediaEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<CodeMediaDTO>
* @author generator
* @date 2020-07-09
*/
PageData<CodeMediaDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<CodeMediaDTO>
* @author generator
* @date 2020-07-09
*/
List<CodeMediaDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return CodeMediaDTO
* @author generator
* @date 2020-07-09
*/
CodeMediaDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-07-09
*/
void save(CodeMediaDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-07-09
*/
void update(CodeMediaDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-07-09
*/
void delete(String[] ids);
}

12
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CodeService.java

@ -0,0 +1,12 @@
package com.epmet.service;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/10 10:27
*/
public interface CodeService {
}

95
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/CustomerCodeOperationHistoryService.java

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.CustomerCodeOperationHistoryDTO;
import com.epmet.entity.CustomerCodeOperationHistoryEntity;
import java.util.List;
import java.util.Map;
/**
* 客户代码操作历史
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-07-09
*/
public interface CustomerCodeOperationHistoryService extends BaseService<CustomerCodeOperationHistoryEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<CustomerCodeOperationHistoryDTO>
* @author generator
* @date 2020-07-09
*/
PageData<CustomerCodeOperationHistoryDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<CustomerCodeOperationHistoryDTO>
* @author generator
* @date 2020-07-09
*/
List<CustomerCodeOperationHistoryDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return CustomerCodeOperationHistoryDTO
* @author generator
* @date 2020-07-09
*/
CustomerCodeOperationHistoryDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-07-09
*/
void save(CustomerCodeOperationHistoryDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-07-09
*/
void update(CustomerCodeOperationHistoryDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-07-09
*/
void delete(String[] ids);
}

104
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeAuditResultServiceImpl.java

@ -0,0 +1,104 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<CodeAuditResultDao, CodeAuditResultEntity> implements CodeAuditResultService {
@Autowired
private CodeAuditResultRedis codeAuditResultRedis;
@Override
public PageData<CodeAuditResultDTO> page(Map<String, Object> params) {
IPage<CodeAuditResultEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, CodeAuditResultDTO.class);
}
@Override
public List<CodeAuditResultDTO> list(Map<String, Object> params) {
List<CodeAuditResultEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CodeAuditResultDTO.class);
}
private QueryWrapper<CodeAuditResultEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CodeAuditResultEntity> 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));
}
}

104
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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<CodeCustomerDao, CodeCustomerEntity> implements CodeCustomerService {
@Autowired
private CodeCustomerRedis codeCustomerRedis;
@Override
public PageData<CodeCustomerDTO> page(Map<String, Object> params) {
IPage<CodeCustomerEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, CodeCustomerDTO.class);
}
@Override
public List<CodeCustomerDTO> list(Map<String, Object> params) {
List<CodeCustomerEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CodeCustomerDTO.class);
}
private QueryWrapper<CodeCustomerEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CodeCustomerEntity> 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));
}
}

104
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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.CodeMediaDao;
import com.epmet.dto.CodeMediaDTO;
import com.epmet.entity.CodeMediaEntity;
import com.epmet.redis.CodeMediaRedis;
import com.epmet.service.CodeMediaService;
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 CodeMediaServiceImpl extends BaseServiceImpl<CodeMediaDao, CodeMediaEntity> implements CodeMediaService {
@Autowired
private CodeMediaRedis codeMediaRedis;
@Override
public PageData<CodeMediaDTO> page(Map<String, Object> params) {
IPage<CodeMediaEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, CodeMediaDTO.class);
}
@Override
public List<CodeMediaDTO> list(Map<String, Object> params) {
List<CodeMediaEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CodeMediaDTO.class);
}
private QueryWrapper<CodeMediaEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CodeMediaEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public CodeMediaDTO get(String id) {
CodeMediaEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CodeMediaDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(CodeMediaDTO dto) {
CodeMediaEntity entity = ConvertUtils.sourceToTarget(dto, CodeMediaEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(CodeMediaDTO dto) {
CodeMediaEntity entity = ConvertUtils.sourceToTarget(dto, CodeMediaEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

17
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java

@ -0,0 +1,17 @@
package com.epmet.service.impl;
import com.epmet.service.CodeService;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/10 10:27
*/
@Service
public class CodeServiceImpl implements CodeService {
}

104
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CustomerCodeOperationHistoryServiceImpl.java

@ -0,0 +1,104 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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.CustomerCodeOperationHistoryDao;
import com.epmet.dto.CustomerCodeOperationHistoryDTO;
import com.epmet.entity.CustomerCodeOperationHistoryEntity;
import com.epmet.redis.CustomerCodeOperationHistoryRedis;
import com.epmet.service.CustomerCodeOperationHistoryService;
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 CustomerCodeOperationHistoryServiceImpl extends BaseServiceImpl<CustomerCodeOperationHistoryDao, CustomerCodeOperationHistoryEntity> implements CustomerCodeOperationHistoryService {
@Autowired
private CustomerCodeOperationHistoryRedis customerCodeOperationHistoryRedis;
@Override
public PageData<CustomerCodeOperationHistoryDTO> page(Map<String, Object> params) {
IPage<CustomerCodeOperationHistoryEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, CustomerCodeOperationHistoryDTO.class);
}
@Override
public List<CustomerCodeOperationHistoryDTO> list(Map<String, Object> params) {
List<CustomerCodeOperationHistoryEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CustomerCodeOperationHistoryDTO.class);
}
private QueryWrapper<CustomerCodeOperationHistoryEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CustomerCodeOperationHistoryEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public CustomerCodeOperationHistoryDTO get(String id) {
CustomerCodeOperationHistoryEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CustomerCodeOperationHistoryDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(CustomerCodeOperationHistoryDTO dto) {
CustomerCodeOperationHistoryEntity entity = ConvertUtils.sourceToTarget(dto, CustomerCodeOperationHistoryEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(CustomerCodeOperationHistoryDTO dto) {
CustomerCodeOperationHistoryEntity entity = ConvertUtils.sourceToTarget(dto, CustomerCodeOperationHistoryEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

2
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/constant/WxMaCodeConstant.java

@ -6,7 +6,7 @@ package com.epmet.wxapi.constant;
* @author yinzuomei@elink-cn.com
* @date 2020/7/10 12:57
*/
public class WxMaCodeConstant {
public interface WxMaCodeConstant {
/**
* 为授权的小程序帐号上传小程序代码.
*/

9
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaCodeAuditStatus.java

@ -0,0 +1,9 @@
package com.epmet.wxapi.param;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/10 18:05
*/
public class WxMaCodeAuditStatus {
}

18
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaCodeAuditStatusReq.java

@ -0,0 +1,18 @@
package com.epmet.wxapi.param;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/13 15:49
*/
@Data
public class WxMaCodeAuditStatusReq implements Serializable {
private static final long serialVersionUID = -504705519949598098L;
@SerializedName("auditid")
private String auditId;
}

10
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaCodeCommitReq.java

@ -1,5 +1,6 @@
package com.epmet.wxapi.param;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
@ -17,18 +18,23 @@ public class WxMaCodeCommitReq implements Serializable {
/**
* 代码库中的代码模版ID
*/
private Long templateId;
@SerializedName("template_id")
private String templateId;
/**
* 第三方自定义的配置
*/
private WxMaCodeExtConfigReq extConfig;
@SerializedName("ext_json")
private String extJson;
/**
* 代码版本号开发者可自定义
*/
@SerializedName("user_version")
private String userVersion;
/**
* 代码描述开发者可自定义
*/
@SerializedName("user_desc")
private String userDesc;
}

145
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/param/WxMaCodeSubmitAuditRequest.java

@ -0,0 +1,145 @@
package com.epmet.wxapi.param;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/10 18:04
*/
@NoArgsConstructor
@Data
public class WxMaCodeSubmitAuditRequest implements Serializable {
private static final long serialVersionUID = -3919598581372634816L;
/**
* 小程序版本说明和功能解释
*/
@SerializedName("version_desc")
private String versionDesc;
/**
* 反馈内容至多 200
*/
@SerializedName("feedback_info")
private String feedbackInfo;
/**
* | 分割的 media_id 列表至多 5 张图片, 可以通过新增临时素材接口上传而得到
*/
@SerializedName("feedback_stuff")
private String feedbackStuff;
/**
* 审核项列表选填至多填写 5
*/
@SerializedName("item_list")
private List<ItemListBean> itemList;
/**
* 预览信息小程序页面截图和操作录屏
*/
@SerializedName("preview_info")
private List<PreviewInfoBean> previewInfo;
/**
* 用户生成内容场景UGC信息安全声明
*/
@SerializedName("ugc_declare")
private List<UgcDeclareBean> ugcDeclare;
@NoArgsConstructor
@Data
private static class ItemListBean {
/**
* 小程序的页面可通过获取小程序的页面列表接口获得
*/
@SerializedName("address")
private String address;
/**
* 小程序的标签用空格分隔标签至多 10 标签长度至多 20
*/
@SerializedName("tag")
private String tag;
/**
* 一级类目名称
*/
@SerializedName("first_class")
private String firstClass;
/**
* 二级类目名称
*/
@SerializedName("second_class")
private String secondClass;
/**
* 三级类目名称
*/
@SerializedName("third_class")
private String thirdClass;
/**
* 一级类目的 ID
*/
@SerializedName("first_id")
private String firstId;
/**
* 二级类目的 ID
*/
@SerializedName("second_id")
private String secondId;
/**
* 三级类目的 ID
*/
@SerializedName("third_id")
private String thirdId;
/**
* 小程序页面的标题,标题长度至多 32
*/
@SerializedName("title")
private String title;
}
@NoArgsConstructor
@Data
private static class PreviewInfoBean {
/**
* 录屏mediaid列表可以通过提审素材上传接口获得
*/
@SerializedName("Video_id_list")
private List<String> videoIdList;
/**
* 截屏mediaid列表可以通过提审素材上传接口获得
*/
@SerializedName("pic_id_list")
private List<String> picIdList;
}
@NoArgsConstructor
@Data
private static class UgcDeclareBean {
/**
* UGC场景 0,不涉及用户生成内容, 1.用户资料,2.图片,3.视频,4.文本,5其他, 可多选,当scene填0时无需填写下列字段
*/
@SerializedName("scene")
private List<Integer> scene;
/**
* 当scene选其他时的说明,不超时256字
*/
@SerializedName("other_scene_desc")
private String otherSceneDesc;
/**
* 内容安全机制 1.使用平台建议的内容安全API,2.使用其他的内容审核产品,3.通过人工审核把关,4.未做内容审核把关
*/
@SerializedName("method")
private List<Integer> method;
/**
* 是否有审核团队, 0.,1.,默认0
*/
@SerializedName("has_audit_team")
private Integer hasAuditTeam;
/**
* 说明当前对UGC内容的审核机制,不超过256字
*/
@SerializedName("audit_desc")
private String auditDesc;
}
}

36
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaAuditStatusResult.java

@ -0,0 +1,36 @@
package com.epmet.wxapi.result;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/13 15:53
*/
@Data
public class WxMaAuditStatusResult implements Serializable {
private static final long serialVersionUID = 3461409352381952089L;
/**
* 返回码
*/
private String errcode;
/**
* 错误信息
*/
private String errmsg;
/**
* 审核状态
*/
private Integer status;
/**
* status = 1 返回的拒绝原因; status = 4 返回的延后原因
*/
private String reason;
/**
* status = 1 会返回审核失败的小程序截图示例 | 分隔的 media_id 的列表可通过获取永久素材接口拉取截图内容
*/
private String screenshot;
}

52
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaCategoryResult.java

@ -0,0 +1,52 @@
package com.epmet.wxapi.result;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/10 16:51
*/
@Data
public class WxMaCategoryResult implements Serializable {
/**
* 一级类目名称
*/
private String firstClass;
/**
* 二级类目名称
*/
private String secondClass;
/**
* 三级类目名称
*/
private String thirdClass;
/**
* 一级类目的ID编号
*/
private String firstId;
/**
* 二级类目的ID编号
*/
private String secondId;
/**
* 三级类目的ID编号
*/
private String thirdId;
/**
* 小程序的页面可通过获取小程序的第三方提交代码的页面配置接口获得
*/
private String address;
/**
* 小程序的标签多个标签用空格分隔标签不能多于10个标签长度不超过20
*/
private String tag;
/**
* 小程序页面的标题,标题长度不超过32
*/
private String title;
}

28
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaGetCategoryResult.java

@ -0,0 +1,28 @@
package com.epmet.wxapi.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/13 10:17
*/
@Data
public class WxMaGetCategoryResult implements Serializable {
private static final long serialVersionUID = -2665257152145041516L;
/**
* 返回码
*/
private Integer errcode;
/**
* 错误信息
*/
private String errmsg;
/**
* 可填选的类目信息列表
*/
private List<WxMaCategoryResult> categoryList;
}

28
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/result/WxMaGetPageResult.java

@ -0,0 +1,28 @@
package com.epmet.wxapi.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhaoqifeng
* @dscription
* @date 2020/7/13 13:38
*/
@Data
public class WxMaGetPageResult implements Serializable {
private static final long serialVersionUID = -3057343239059623208L;
/**
* 返回码
*/
private Integer errcode;
/**
* 错误信息
*/
private String errmsg;
/**
* 错误信息
*/
private List<String> pageList;
}

76
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/WxMaCodeService.java

@ -1,9 +1,15 @@
package com.epmet.wxapi.service;
import com.epmet.wxapi.param.WxMaCodeAuditStatus;
import com.epmet.wxapi.param.WxMaCodeAuditStatusReq;
import com.epmet.wxapi.param.WxMaCodeCommitReq;
import com.epmet.wxapi.param.WxMaCodeSubmitAuditRequest;
import com.epmet.wxapi.result.WxMaCategoryResult;
import com.epmet.wxapi.result.WxResult;
import me.chanjar.weixin.common.error.WxErrorException;
import java.util.List;
/**
* 小程序代码管理相关 API大部分只能是第三方平台调用
* 文档https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1489140610_Uavc4&token=&lang=zh_CN
@ -14,9 +20,73 @@ import me.chanjar.weixin.common.error.WxErrorException;
public interface WxMaCodeService {
/**
* 为授权的小程序帐号上传小程序代码仅仅支持第三方开放平台.
*
* @param commitRequest 参数
* @author zhaoqifeng
* @date 2020/7/10 14:11
* @param accessToken 小程序接口调用令牌
* @param commitRequest 请求参数
* @return com.epmet.wxapi.result.WxResult
* @throws WxErrorException 上传失败时抛出具体错误码请看类注释文档
*/
WxResult commit(String access_token, WxMaCodeCommitReq commitRequest) throws WxErrorException;
WxResult commit(String accessToken, WxMaCodeCommitReq commitRequest) throws WxErrorException;
/**
* 获取体验小程序的体验二维码.
* @author zhaoqifeng
* @date 2020/7/10 15:25
* @param accessToken 小程序接口调用令牌
* @param path 指定体验版二维码跳转到某个具体页面
* @return com.epmet.wxapi.result.WxResult
* @throws WxErrorException 抛出异常
*/
WxResult getQrCode(String accessToken, String path) throws WxErrorException;
/**
* 获取授权小程序帐号的可选类目.
*
* @param accessToken 提交审核参数
* @return List<WxMaCategory>
*/
WxResult getCategory(String accessToken);
/**
* 获取小程序的第三方提交代码的页面配置仅供第三方开发者代小程序调用.
*
* @param accessToken 提交审核参数
* @return page_list 页面配置列表
*/
WxResult getPage(String accessToken);
/**
* 将第三方提交的代码包提交审核仅供第三方开发者代小程序调用.
*
* @param accessToken 提交审核参数
* @param auditRequest 提交审核参数
* @return 审核编号
*/
WxResult submitAudit(String accessToken, WxMaCodeSubmitAuditRequest auditRequest);
/**
* 查询指定版本审核状态仅供第三方代小程序调用.
*
* @param accessToken 提交审核参数
* @return 审核状态
*/
WxResult getAuditStatus(String accessToken, WxMaCodeAuditStatusReq request);
/**
* 发布已通过审核的小程序仅供第三方代小程序调用.
*
* @param accessToken 提交审核参数
* @return 发布结果
*/
WxResult release(String accessToken);
/**
* 小程序审核撤回.
* 单个帐号每天审核撤回次数最多不超过1次一个月不超过10次
*
* @param accessToken 提交审核参数
* @return 撤回结果
*/
WxResult undoCodeAudit(String accessToken);
}

179
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/wxapi/service/impl/WxMaCodeServiceImpl.java

@ -1,11 +1,30 @@
package com.epmet.wxapi.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.wxapi.constant.WxMaCodeConstant;
import com.epmet.wxapi.param.WxMaCodeAuditStatus;
import com.epmet.wxapi.param.WxMaCodeAuditStatusReq;
import com.epmet.wxapi.param.WxMaCodeCommitReq;
import com.epmet.wxapi.result.WxResult;
import com.epmet.wxapi.param.WxMaCodeSubmitAuditRequest;
import com.epmet.wxapi.result.*;
import com.epmet.wxapi.service.WxMaCodeService;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import io.micrometer.core.instrument.util.JsonUtils;
import lombok.Data;
import me.chanjar.weixin.common.error.WxErrorException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
/**
* 描述一下
*
@ -14,9 +33,161 @@ import org.springframework.stereotype.Service;
*/
@Service
public class WxMaCodeServiceImpl implements WxMaCodeService {
private static final String ERR_CODE = "errcode";
private static final String ERR_MSG = "errmsg";
@Override
public WxResult commit(String accessToken, WxMaCodeCommitReq commitRequest) throws WxErrorException {
WxResult result = new WxResult();
String url = WxMaCodeConstant.COMMIT_URL + "?" + "access_token=" + accessToken;
Result<String> commitResult = HttpClientManager.getInstance().sendPostByJSON(url, toJson(commitRequest));
if(!commitResult.success()) {
result.setErrorCode(commitResult.getCode());
result.setErrorMsg(commitResult.getMsg());
return result;
}
JSONObject jsonObject = JSONObject.parseObject(commitResult.getData());
result.setErrorCode(jsonObject.getInteger(ERR_CODE));
result.setErrorMsg(jsonObject.getString(ERR_MSG));
return result;
}
@Override
public WxResult getQrCode(String accessToken, String path) throws WxErrorException{
WxResult<Byte[]> result = new WxResult<>();
StringBuilder url = new StringBuilder(WxMaCodeConstant.GET_QRCODE_URL).append("?access_token").append(accessToken);
if (StringUtils.isNotBlank(path)) {
try {
url.append("?path=").append(URLEncoder.encode(path, StandardCharsets.UTF_8.name()));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
Result<Byte[]> qrCodeResult = HttpClientManager.getInstance().sendGetFile(url.toString(), null);
if(!qrCodeResult.success()) {
result.setErrorCode(qrCodeResult.getCode());
result.setErrorMsg(qrCodeResult.getMsg());
return result;
}
result.setData(qrCodeResult.getData());
return result;
}
@Override
public WxResult commit(String access_token, WxMaCodeCommitReq commitRequest) throws WxErrorException {
public WxResult getCategory(String accessToken) {
WxResult<List<WxMaCategoryResult>> result = new WxResult<>();
String url = WxMaCodeConstant.GET_CATEGORY_URL + "?" + "access_token=" + accessToken;
Result<String> getCategoryResult = HttpClientManager.getInstance().sendGet(url, null);
if(!getCategoryResult.success()) {
result.setErrorCode(getCategoryResult.getCode());
result.setErrorMsg(getCategoryResult.getMsg());
return result;
}
WxMaGetCategoryResult categoryResult = JSONObject.parseObject(getCategoryResult.getData(), WxMaGetCategoryResult.class);
result.setErrorCode(categoryResult.getErrcode());
result.setErrorMsg(categoryResult.getErrmsg());
result.setData(categoryResult.getCategoryList());
return result;
}
@Override
public WxResult getPage(String accessToken) {
WxResult<List<String>> result = new WxResult<>();
String url = WxMaCodeConstant.GET_PAGE_URL + "?" + "access_token=" + accessToken;
Result<String> getPageResult = HttpClientManager.getInstance().sendGet(url, null);
if(!getPageResult.success()) {
result.setErrorCode(getPageResult.getCode());
result.setErrorMsg(getPageResult.getMsg());
return result;
}
WxMaGetPageResult pageResult = JSONObject.parseObject(getPageResult.getData(), WxMaGetPageResult.class);
result.setErrorCode(pageResult.getErrcode());
result.setErrorMsg(pageResult.getErrmsg());
result.setData(pageResult.getPageList());
return result;
}
return null;
@Override
public WxResult submitAudit(String accessToken, WxMaCodeSubmitAuditRequest auditRequest) {
WxResult result = new WxResult();
String url = WxMaCodeConstant.SUBMIT_AUDIT_URL + "?" + "access_token=" + accessToken;
Result<String> submitResult = HttpClientManager.getInstance().sendPostByJSON(url, toJson(auditRequest));
if(!submitResult.success()) {
result.setErrorCode(submitResult.getCode());
result.setErrorMsg(submitResult.getMsg());
return result;
}
JSONObject jsonObject = JSONObject.parseObject(submitResult.getData());
result.setErrorCode(jsonObject.getInteger(ERR_CODE));
result.setErrorMsg(jsonObject.getString(ERR_MSG));
return result;
}
@Override
public WxResult getAuditStatus(String accessToken, WxMaCodeAuditStatusReq request) {
WxResult<WxMaAuditStatusResult> result = new WxResult<>();
String url = WxMaCodeConstant.COMMIT_URL + "?" + "access_token=" + accessToken;
Result<String> statusResult = HttpClientManager.getInstance().sendPostByJSON(url, toJson(request));
if(!statusResult.success()) {
result.setErrorCode(statusResult.getCode());
result.setErrorMsg(statusResult.getMsg());
return result;
}
WxMaAuditStatusResult auditStatusResult = JSONObject.parseObject(statusResult.getData(), WxMaAuditStatusResult.class);
result.ok(auditStatusResult);
return result;
}
@Override
public WxResult release(String accessToken) {
WxResult result = new WxResult();
String url = WxMaCodeConstant.RELEASE_URL + "?" + "access_token=" + accessToken;
Result<String> releaseResult = HttpClientManager.getInstance().sendPostByJSON(url, null);
if(!releaseResult.success()) {
result.setErrorCode(releaseResult.getCode());
result.setErrorMsg(releaseResult.getMsg());
return result;
}
JSONObject jsonObject = JSONObject.parseObject(releaseResult.getData());
result.setErrorCode(jsonObject.getInteger(ERR_CODE));
result.setErrorMsg(jsonObject.getString(ERR_MSG));
return result;
}
@Override
public WxResult undoCodeAudit(String accessToken) {
WxResult result = new WxResult();
String url = WxMaCodeConstant.UNDO_CODE_AUDIT_URL + "?" + "access_token=" + accessToken;
Result<String> undoResult = HttpClientManager.getInstance().sendGet(url, null);
if(!undoResult.success()) {
result.setErrorCode(undoResult.getCode());
result.setErrorMsg(undoResult.getMsg());
return result;
}
JSONObject jsonObject = JSONObject.parseObject(undoResult.getData());
result.setErrorCode(jsonObject.getInteger(ERR_CODE));
result.setErrorMsg(jsonObject.getString(ERR_MSG));
return result;
}
public static void main(String[] args) {
String url = "{\"errcode\":0,\"errmsg\":\"ok\",\"category_list\":[{\"first_class\":\"工具\",\"second_class\":\"备忘录\",\"first_id\":1,\"second_id\":2,}\n" +
"{\"first_class\":\"教育\",\"second_class\":\"学历教育\",\"third_class\":\"高等\",\"first_id\":3,\"second_id\":4,\"third_id\":5,}]}";
WxMaGetCategoryResult video = JSONObject.parseObject(url, WxMaGetCategoryResult.class);
WxResult<List<WxMaCategoryResult>> result = new WxResult<>();
result.setErrorCode(video.getErrcode());
result.setErrorMsg(video.getErrmsg());
result.setData(video.getCategoryList());
System.out.println(result);
WxMaCodeSubmitAuditRequest request = new WxMaCodeSubmitAuditRequest();
request.setVersionDesc("aasdf");
}
private String toJson(Object object) {
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.setPrettyPrinting();
Gson gson = gsonBuilder.create();
return gson.toJson(object);
}
}
}

22
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeAuditResultDao.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.CodeAuditResultDao">
<resultMap type="com.epmet.entity.CodeAuditResultEntity" id="codeAuditResultMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="codeId" column="CODE_ID"/>
<result property="auditId" column="AUDIT_ID"/>
<result property="result" column="RESULT"/>
<result property="reason" column="REASON"/>
<result property="revision" column="REVISION"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

27
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeCustomerDao.xml

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.CodeCustomerDao">
<resultMap type="com.epmet.entity.CodeCustomerEntity" id="codeCustomerMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="customerName" column="CUSTOMER_NAME"/>
<result property="accessTokenId" column="ACCESS_TOKEN_ID"/>
<result property="templateId" column="TEMPLATE_ID"/>
<result property="type" column="TYPE"/>
<result property="appId" column="APP_ID"/>
<result property="extJson" column="EXT_JSON"/>
<result property="userVersion" column="USER_VERSION"/>
<result property="userDesc" column="USER_DESC"/>
<result property="status" column="STATUS"/>
<result property="revision" column="REVISION"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

21
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CodeMediaDao.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.CodeMediaDao">
<resultMap type="com.epmet.entity.CodeMediaEntity" id="codeMediaMap">
<result property="id" column="ID"/>
<result property="codeId" column="CODE_ID"/>
<result property="mediaId" column="MEDIA_ID"/>
<result property="mediaName" column="MEDIA_NAME"/>
<result property="mediaType" column="MEDIA_TYPE"/>
<result property="revision" column="REVISION"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

22
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerCodeOperationHistoryDao.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.CustomerCodeOperationHistoryDao">
<resultMap type="com.epmet.entity.CustomerCodeOperationHistoryEntity" id="customerCodeOperationHistoryMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="codeId" column="CODE_ID"/>
<result property="version" column="VERSION"/>
<result property="operation" column="OPERATION"/>
<result property="describe" column="DESCRIBE"/>
<result property="revision" column="REVISION"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>
Loading…
Cancel
Save