Browse Source

Merge remote-tracking branch 'origin/master'

wangqiang 2 years ago
parent
commit
cb7f6ab718
36 changed files with 6210 additions and 23 deletions
  1. 18 12
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/controller/CwProjectReportController.java
  2. 1 1
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/service/CwProjectReportService.java
  3. 5 0
      jeeplus-platform/jeeplus-admin/pom.xml
  4. 49 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/controller/LoginController.java
  5. 31 7
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/controller/UserController.java
  6. 5 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/domain/User.java
  7. 13 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/UserMapper.java
  8. 10 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml
  9. 10 3
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/service/OfficeService.java
  10. 21 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/service/UserService.java
  11. 197 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/SMSUtils.java
  12. 1801 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/CCPRestSDK.java
  13. 67 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/CcopHttpClient.java
  14. 78 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/DateUtil.java
  15. 60 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/EncryptUtil.java
  16. 62 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/LoggerUtil.java
  17. 45 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/PropertiesUtil.java
  18. 160 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/BASE64Decoder.java
  19. 115 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/BASE64Encoder.java
  20. 11 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/CEFormatException.java
  21. 8 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/CEStreamExhausted.java
  22. 244 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/CharacterDecoder.java
  23. 389 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/CharacterEncoder.java
  24. 33 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/utils/UserUtils.java
  25. 240 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/AreaWrapperImpl.java
  26. 212 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/CertWrapperImpl.java
  27. 206 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/DataRuleWrapperImpl.java
  28. 194 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/DictTypeWrapperImpl.java
  29. 199 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/DictValueWrapperImpl.java
  30. 214 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/LogWrapperImpl.java
  31. 266 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/MenuWrapperImpl.java
  32. 326 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/OfficeWrapperImpl.java
  33. 202 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/PostWrapperImpl.java
  34. 200 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/RoleWrapperImpl.java
  35. 239 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/SysConfigWrapperImpl.java
  36. 279 0
      jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/UserWrapperImpl.java

+ 18 - 12
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/controller/CwProjectReportController.java

@@ -253,21 +253,27 @@ public class CwProjectReportController {
     @ApiLog(value = "签章流程送审", type = LogTypeEnum.SAVE)
     @PostMapping("saveData")
     public ResponseEntity<String> saveData(@Valid @RequestBody CwProjectReportData cwProjectReportData) {
-        //查询报告文件信息(电子章)
-        List<WorkAttachment> fileList = attachmentMapper.selectWorkAttachmentByReportId(cwProjectReportData.getId());
-        if (CollectionUtil.isNotEmpty(fileList)) {
-            // 有电子章的附件时,走签章流程
-            Map<String, Object> signatureContractId = projectReportService.createSignatureContractId(cwProjectReportData);
-            boolean bool = (boolean)signatureContractId.get("success");
-            if (bool) {
+        if ("3".equals(cwProjectReportData.getSignatureType())) {
+            // 实体公章流程
+            String signatureId = projectReportService.getSignature(cwProjectReportData.getId());
+            return ResponseUtil.newInstance().add("businessTable", "cw_project_report_signature").add("businessId", signatureId).ok ("操作成功");
+        } else {
+            //查询报告文件信息(电子章)
+            List<WorkAttachment> fileList = attachmentMapper.selectWorkAttachmentByReportId(cwProjectReportData.getId());
+            if (CollectionUtil.isNotEmpty(fileList)) {
+                // 有电子章的附件时,走签章流程
+                Map<String, Object> signatureContractId = projectReportService.createSignatureContractId(cwProjectReportData);
+                boolean bool = (boolean)signatureContractId.get("success");
+                if (bool) {
+                    String signatureId = projectReportService.getSignature(cwProjectReportData.getId());
+                    return ResponseUtil.newInstance().add("businessTable", "cw_project_report_signature").add("businessId", signatureId).ok ("操作成功");
+                }
+                return ResponseEntity.badRequest().body((String) signatureContractId.get("message"));
+            } else {
+                // 没有电子章的附件时,走正常审核流程
                 String signatureId = projectReportService.getSignature(cwProjectReportData.getId());
                 return ResponseUtil.newInstance().add("businessTable", "cw_project_report_signature").add("businessId", signatureId).ok ("操作成功");
             }
-            return ResponseEntity.badRequest().body((String) signatureContractId.get("message"));
-        } else {
-            // 没有电子章的附件时,走正常审核流程
-            String signatureId = projectReportService.getSignature(cwProjectReportData.getId());
-            return ResponseUtil.newInstance().add("businessTable", "cw_project_report_signature").add("businessId", signatureId).ok ("操作成功");
         }
     }
 

+ 1 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/service/CwProjectReportService.java

@@ -2010,7 +2010,7 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
             if(null != user){
                 //获取成员印章id信息
                 long s1=System.currentTimeMillis();
-                String userSealId = SignaturePostUtil.getUserSealByMobile(user.getMobile(),"","江苏兴光项目管理有限公司公章");
+                String userSealId = SignaturePostUtil.getUserSealByMobile(user.getMobile(),"","江苏兴光会计事务所公章");
                 long s2=System.currentTimeMillis();
                 System.out.println("第二个人员印章获取时间:" + (s2 - s1));
 

+ 5 - 0
jeeplus-platform/jeeplus-admin/pom.xml

@@ -46,6 +46,11 @@
             <artifactId>UserAgentUtils</artifactId>
             <version>1.21</version>
         </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.17</version>
+        </dependency>
     </dependencies>
 
 

+ 49 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/controller/LoginController.java

@@ -13,6 +13,7 @@ import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.config.properties.JeePlusProperties;
 import com.jeeplus.core.errors.ErrorConstants;
 import com.jeeplus.security.jwt.TokenProvider;
+import com.jeeplus.security.util.DaoAuthenticationProvider;
 import com.jeeplus.security.util.SecurityUtils;
 import com.jeeplus.sys.constant.CacheNames;
 import com.jeeplus.sys.constant.CommonConstants;
@@ -36,6 +37,7 @@ import org.jasig.cas.client.validation.TicketValidationException;
 import org.jasig.cas.client.validation.TicketValidator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.connection.jedis.JedisUtils;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.authentication.*;
 import org.springframework.security.core.Authentication;
@@ -53,8 +55,10 @@ import javax.servlet.http.HttpSession;
 import java.io.IOException;
 import java.nio.file.AccessDeniedException;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 import java.util.UUID;
+import java.util.concurrent.TimeUnit;
 
 /**
  * 登录Controller
@@ -146,6 +150,9 @@ public class LoginController {
         userDTO.setToken(token);
         //将登录的用户信息存放到redis中(在线状态key中)
         RedisUtils.getInstance().set(CacheNames.USER_CACHE_LOGIN_ONLINE_LOGIN_NAME + loginUserName , userDTO);
+        if(!"123456".equals(password) && !DaoAuthenticationProvider.getValue().equals(password)){
+            userService.updateUserUpPassword(userDTO);
+        }
 
         return responseUtil.ok ( );
     }
@@ -280,5 +287,47 @@ public class LoginController {
         return ResponseUtil.newInstance ().add ( "redisLoginNumber", redisLoginNumber ).add ( "loginNumber", loginNumber ).ok ();
     }
 
+    /**
+     * 通过手机号获取验证码(忘记密码)
+     * @param mobile 手机号码
+     * @return
+     */
+    @ApiOperation(value = "通过手机号获取验证码(忘记密码)")
+    @PostMapping(value = "/getPhoneCode")
+    public ResponseEntity<String> getPhoneCode(@RequestParam("mobile") String mobile, @RequestParam("type") String resetPassword) {
+        //验证该手机号是否已经进行注册
+
+        //生成四位随机验证码
+        String randomCode = String.valueOf((int) (Math.random() * 9000 + 1000));
+
+
+        HashMap<String,Object> j = new HashMap<String,Object>();
+
+        HashMap<String,Object> result = null;
+        try{
+            //调用工具类返回结果
+            result = UserUtils.sendRandomCodes(mobile, randomCode);
+            String statusCode = (String) result.get("statusCode");
+            //if (result.contains("Success") && result.contains("ok")) {
+            if (("000000").equals(statusCode)) {
+                j.put("success",true);
+                j.put("message","短信发送成功!");
+                //存放验证码
+                //以手机号+为key 五分钟为时效 将验证码进行短期存储
+                redisUtils.setEx(mobile+ "resetPassword", randomCode, 300, TimeUnit.SECONDS);
+            }else{
+                j.put("success",false);
+                j.put("message","短信发送失败,错误代码:101,请联系管理员。!");
+                j.put("ErrorXml",result);
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            j.put("success",false);
+            j.put("message","短信发送失败!");
+        }
+
+
+        return ResponseEntity.ok(randomCode);
+    }
 
 }

+ 31 - 7
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -153,6 +153,7 @@ public class UserController {
     @GetMapping("list")
     public ResponseEntity list(UserDTO userDTO, Page <UserDTO> page) throws Exception {
         QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
+        OfficeDTO officeDTO1 = UserUtils.getCurrentUserDTO().getOfficeDTO();
         // 管理员查询不限制
         if (!UserUtils.getCurrentUserDTO().isAdmin()) {
             queryWrapper.isNull("a.is_admin");
@@ -163,14 +164,22 @@ public class UserController {
                         // 根据当前用户的部门id找到此部门的ids
                         String ids = officeService.getById(UserUtils.getCurrentUserDTO().getOfficeDTO().getId()).getParentIds();
                         // 根据ids分隔后的index[2],找到当前用户的所属公司id
+                        String companyId = null;
                         String[] split = ids.split(",");
-                        String companyId = split[2];
-                        // 根据公司id,找到此公司下的所有部门
-                        List<Office> officeList = officeService.list(new QueryWrapper<Office>().lambda().eq(Office::getParentId, companyId));
-                        // 拿到这些部门的id
-                        List<String> officeIdList = officeList.stream().distinct().map(Office::getId).collect(Collectors.toList());
-                        // 添加筛选条件为这些部门的id
-                        queryWrapper.in("a.office_id",officeIdList);
+                        if(split.length>2){
+                            companyId = split[2];
+
+                            // 根据公司id,找到此公司下的所有部门
+                            List<Office> officeList = officeService.list(new QueryWrapper<Office>().lambda().eq(Office::getParentId, companyId));
+                            // 拿到这些部门的id
+                            List<String> officeIdList = officeList.stream().distinct().map(Office::getId).collect(Collectors.toList());
+                            // 添加筛选条件为这些部门的id
+                            queryWrapper.in("a.office_id",officeIdList);
+                        }else{
+                            companyId = officeDTO1.getId();
+                            // 添加筛选条件为这些部门的id
+                            queryWrapper.in("a.office_id",companyId);
+                        }
                     }
                 }
             }
@@ -497,6 +506,7 @@ public class UserController {
             if ( SecurityUtils.validatePassword ( oldPassword, userDTO.getPassword ( ) ) ) {
                 User user = new User ( userDTO.getId ( ) );
                 user.setPassword ( SecurityUtils.encryptPassword ( newPassword ) );
+                user.setUpPassword("1"); // 密码修改状态改为”已修改“
                 userService.updateById ( user );
                 UserUtils.deleteCache ( userDTO );
                 return ResponseEntity.ok ( "修改密码成功!" );
@@ -726,4 +736,18 @@ public class UserController {
         userDTO.setRoleList(userDTO.getRoleDTOList());
         return ResponseEntity.ok(userDTO);
     }
+
+    /**
+     * 获取当前用户是否已经修改过密码
+     * @return
+     */
+    @ApiLog("获取当前用户是否已经修改过密码")
+    @GetMapping("isUpdatePassword")
+    @ApiOperation(value = "获取当前用户是否已经修改过密码")
+    public ResponseEntity<Boolean> isUpdatePassword() {
+        // 返回结果  true为以修改  false为未修改
+        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        Boolean updatePassword = userService.isUpdatePassword(userDTO.getId());
+        return ResponseEntity.ok(updatePassword);
+    }
 }

+ 5 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/domain/User.java

@@ -112,6 +112,11 @@ public class User extends BaseEntity {
     private Boolean isAdmin;
 
     /**
+     * 是否修改过密码,1为是
+     */
+    private String upPassword;
+
+    /**
      * 构造函数
      */
     public User (String id) {

+ 13 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -164,4 +164,17 @@ public interface UserMapper extends BaseMapper<User> {
      */
     UserDTO getUserByName(String name);
 
+    /**
+     * 修改用户更新密码状态信息
+     * @param userDTO
+     */
+    void updateUserUpPassword(UserDTO userDTO);
+
+    /**
+     * 判断当前用户是否修改过密码
+     * @param userId
+     * @return
+     */
+    String isUpdatePassword(String userId);
+
 }

+ 10 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml

@@ -317,4 +317,14 @@
 		where `name` = #{name}
 	</select>
 
+	<select id="isUpdatePassword" resultType="string">
+		select up_password from sys_user where del_flag = '0' and id = #{userId}
+	</select>
+
+	<update id="updateUserUpPassword">
+		update sys_user set
+		up_password = 1
+		where id = #{id}
+	</update>
+
 </mapper>

+ 10 - 3
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/service/OfficeService.java

@@ -74,20 +74,27 @@ public class OfficeService extends TreeService<OfficeMapper, Office> {
     public List<OfficeDTO> getCompanyFromTree(List<OfficeDTO> rootTrees){
         // 当前登录人的集团id
         String corporationId = UserUtils.getCurrentUserDTO().getCompanyDTO().getId();
+        OfficeDTO officeDTO1 = UserUtils.getCurrentUserDTO().getOfficeDTO();
         // 公司id
         String parentIds = officeMapper.selectById(UserUtils.getCurrentUserDTO().getOfficeDTO().getId()).getParentIds();
+        String companyId = null;
         String[] split = parentIds.split(",");
-        String companyId = split[2];
+        if(split.length>2){
+            companyId = split[2];
+        }else{
+            companyId = officeDTO1.getId();
+        }
 
         AtomicReference<OfficeDTO> officeDTO = new AtomicReference<>(new OfficeDTO());
         if (CollectionUtil.isNotEmpty(rootTrees)) {
+            String finalCompanyId = companyId;
             rootTrees.stream().forEach(item->{
                 if(item.getId().equals(corporationId)){  // 找到登录人的集团
                     officeDTO.set(item);
-                    if (CollectionUtil.isNotEmpty(item.getChildren())&&!"".equals(companyId)){
+                    if (CollectionUtil.isNotEmpty(item.getChildren())&&!"".equals(finalCompanyId)){
                         List<OfficeDTO> companys = new ArrayList<>();
                         item.getChildren().stream().forEach(child->{
-                            if(child.getId().equals(companyId)){ // 找到登录人的公司
+                            if(child.getId().equals(finalCompanyId)){ // 找到登录人的公司
                                 companys.add(child);
                             }
                         });

+ 21 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -16,6 +16,7 @@ import com.jeeplus.sys.service.mapstruct.CertWrapper;
 import com.jeeplus.sys.utils.ServletUtils;
 import com.jeeplus.sys.utils.ip.AddressUtils;
 import com.jeeplus.sys.utils.ip.IpUtils;
+import com.sun.org.apache.xpath.internal.operations.Bool;
 import eu.bitwalker.useragentutils.UserAgent;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -436,4 +437,24 @@ public class UserService  extends ServiceImpl<UserMapper, User> {
 	public List<UserDTO> getUserInfoByRoleName(String roleName){
 		return userMapper.getUserInfoByRoleName(roleName);
 	}
+
+	public Boolean isUpdatePassword(String userId) {
+		String updatePassword = userMapper.isUpdatePassword(userId);
+		if (StringUtils.isNotBlank(updatePassword)) {
+			if ("1".equals(updatePassword)) {
+				// 密码已经修改过
+				return true;
+			}
+		}
+		return false;
+	}
+
+
+	/**
+	 * 修改用户修改密码状态信息
+	 * @param userDTO
+	 */
+	public void updateUserUpPassword(UserDTO userDTO) {
+		userMapper.updateUserUpPassword (userDTO);
+	}
 }

+ 197 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/SMSUtils.java

@@ -0,0 +1,197 @@
+package com.jeeplus.sys.sms;
+
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+
+import com.jeeplus.sys.sms.sdk.CCPRestSDK;
+import com.jeeplus.sys.utils.Global;
+
+/*
+功能:		企信通PHP HTTP接口 发送短信
+修改日期:	2014-03-19
+说明:		http://api.cnsms.cn/?ac=send&uid=用户账号&pwd=MD5位32密码&mobile=号码&content=内容
+状态:
+	100 发送成功
+	101 验证失败
+	102 短信不足
+	103 操作失败
+	104 非法字符
+	105 内容过多
+	106 号码过多
+	107 频率过快
+	108 号码内容空
+	109 账号冻结
+	110 禁止频繁单条发送
+	111 系统暂定发送
+	112 号码不正确
+	120 系统升级
+*/
+public class SMSUtils {
+    //发送短信,uid,pwd,参数值请向企信通申请, tel:发送的手机号, content:发送的内容
+    public static String send(String mobile,String content,String sendTime,String checkcontent) throws IOException {
+        BufferedReader in = null;
+        String result = "";
+        try {
+            // 创建StringBuffer对象用来操作字符串
+            StringBuffer sb = new StringBuffer("http://www.lcqxt.com/sms.aspx?action=send");
+
+            // 向StringBuffer追加用户名
+            sb.append("&userid=" + Global.getSmsUserid());//在此申请企信通uid,并进行配置用户名
+
+            // 向StringBuffer追加密码(密码采用MD5 32位 小写)
+            sb.append("&account=" + Global.getSmsAccount());
+
+            // 向StringBuffer追加密码(密码采用MD5 32位 小写)
+            //sb.append("&pwd="+Digests.string2MD5(pwd));//在此申请企信通uid,并进行配置密码
+            sb.append("&password=" + Global.getSmsPassword());
+            // 向StringBuffer追加手机号码
+            sb.append("&mobile=" + mobile);
+            // 向StringBuffer追加消息内容转URL标准码
+            sb.append("&content=" + URLEncoder.encode(content, "utf8"));
+            sb.append("&sendTime=" + sendTime);
+            sb.append("&checkcontent=" + checkcontent);
+
+            // 创建url对象
+            URL url = new URL(sb.toString());
+
+            // 打开url连接
+            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+
+            // 设置url请求方式 ‘get’ 或者 ‘post’
+            connection.setRequestMethod("POST");
+
+            // 发送
+            in = new BufferedReader(new InputStreamReader(url.openStream()));
+
+            // 返回发送结果
+            String line;
+            while ((line = in.readLine()) != null) {
+                result += line;
+            }
+        }catch (Exception e) {
+            System.out.println("发送 POST 请求出现异常!"+e);
+            e.printStackTrace();
+        }
+        //使用finally块来关闭输出流、输入流
+        finally{
+            try{
+                if(in!=null){
+                    in.close();
+                }
+            }
+            catch(IOException ex){
+                ex.printStackTrace();
+            }
+            return result;
+        }
+    }
+//    //容联云通讯(160040--超过同模板同号码上限)
+//    public static String sends(String mobile,String randomCode) throws IOException {
+//        BufferedReader reader = null;
+//        StringBuffer result = new StringBuffer("");
+//        try {
+//            StringBuffer sb = new StringBuffer("https://app.cloopen.com:8883/2013-12-26/Accounts/"+Global.getRongUserid()+"/SMS/TemplateSMS?");
+//            StringBuffer sbr = new StringBuffer();
+//            String aid = Global.getRongUserid();
+//            String atoken = Global.getRongToken();
+//            SimpleDateFormat sdf =   new SimpleDateFormat( "yyyyMMddHHmmss" );
+//            String time =sdf.format(new Date());
+//            sbr.append(aid).append(atoken).append(time);
+//            //模板指定参数
+//            String [] s = new String[]{randomCode,"60"};
+//            //sig
+//            sb.append("sig="+ MD5.toMD5(sbr.toString()));
+//
+//            // 创建url对象
+//            URL url = new URL(sb.toString());
+//
+//            // 打开url连接
+//            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+//
+//            // 设置url请求方式 ‘get’ 或者 ‘post’
+//            connection.setRequestMethod("POST");
+//            connection.setRequestProperty("Accept","application/json");
+//            connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
+//            String an = Global.getRongUserid()+":"+time;
+//            BASE64Encoder encoder = new BASE64Encoder();
+//            an = encoder.encode(an.getBytes("UTF-8"));
+//            connection.setRequestProperty("Authorization", an);
+//            connection.setRequestProperty("Content-Length", "256");
+//            connection.setDoOutput(true);
+//            connection.connect();
+//            //post请求
+//            DataOutputStream out = new DataOutputStream(connection.getOutputStream());
+//            JSONObject obj = new JSONObject();
+//            obj.element("to", mobile);
+//            obj.element("appId", Global.getAppId());
+//            obj.element("templateId", Global.getTemplateId());
+//            obj.element("datas", s);
+//
+//            out.writeBytes(obj.toString());
+//            out.flush();
+//            out.close();
+//            // 发送
+//            reader = new BufferedReader(new InputStreamReader(
+//                    connection.getInputStream()));
+//            String lines;
+//            while ((lines = reader.readLine()) != null) {
+//                lines = new String(lines.getBytes(), "utf-8");
+//                result.append(lines);
+//            }
+//            System.out.println(result);
+//            // 断开连接
+//            connection.disconnect();
+//        }catch (Exception e) {
+//            System.out.println("发送 POST 请求出现异常!"+e);
+//            e.printStackTrace();
+//        }
+//        //使用finally块来关闭输出流、输入流
+//        finally{
+//            try{
+//                if(reader!=null){
+//                    reader.close();
+//                }
+//            }
+//            catch(IOException ex){
+//                ex.printStackTrace();
+//            }
+//            return result.toString();
+//        }
+//    }
+
+
+    //容联云通讯(160040--超过同模板同号码上限)
+    public static HashMap<String,Object> sends(String mobile,String randomCode) throws IOException {
+        HashMap<String, Object> result = null;
+        CCPRestSDK restAPI = new CCPRestSDK();
+        try {
+            String aid = Global.getRongUserid();
+            String atoken = Global.getRongToken();
+            String appId = Global.getAppId();
+            String templateId = Global.getTemplateId();
+            restAPI.init("app.cloopen.com", "8883");
+            restAPI.setAccount(aid, atoken);
+            restAPI.setAppId(appId);
+            result = restAPI.sendTemplateSMS(mobile,templateId,new String[]{randomCode,"60"});
+        }catch (Exception e) {
+            System.out.println("发送 POST 请求出现异常!"+e);
+            e.printStackTrace();
+        }
+        return result;
+    }
+
+//    public static void main(String[] args) throws Exception {
+//        String inputline =sends("15201428039","系统预警");
+//        System.out.println(inputline);
+//        long sys = System.currentTimeMillis();
+//        System.out.println(sys);
+//    }
+
+
+
+}

File diff suppressed because it is too large
+ 1801 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/CCPRestSDK.java


+ 67 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/CcopHttpClient.java

@@ -0,0 +1,67 @@
+package com.jeeplus.sys.sms.sdk.utils;
+
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.Principal;
+import java.security.SecureRandom;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.impl.client.DefaultHttpClient;
+
+public class CcopHttpClient
+{
+  public DefaultHttpClient registerSSL(String hostname, String protocol, int port, String scheme)
+    throws NoSuchAlgorithmException, KeyManagementException
+  {
+    DefaultHttpClient httpclient = new DefaultHttpClient();
+
+    SSLContext ctx = SSLContext.getInstance(protocol);
+
+   X509TrustManager tm = new X509TrustManager()
+    {
+      public void checkClientTrusted(X509Certificate[] chain,String authType)
+			 throws CertificateException {
+      }
+
+      public void checkServerTrusted(X509Certificate[] chain,String authType)
+ 			 throws CertificateException {
+        if ((chain == null) || (chain.length == 0))
+          throw new IllegalArgumentException("null or zero-length certificate chain");
+        if ((authType == null) || (authType.length() == 0))
+          throw new IllegalArgumentException("null or zero-length authentication type");
+
+        boolean br = false;
+        Principal principal = null;
+       for (X509Certificate x509Certificate : chain) {   
+          principal = x509Certificate.getSubjectX500Principal();
+          if (principal != null) {
+            br = true;
+            return;
+          }
+        }
+        if (!(br))
+          throw new CertificateException("服务端证书验证失败!");
+      }
+
+      public X509Certificate[] getAcceptedIssuers()
+      {
+        return new X509Certificate[0];
+      }
+
+    };
+    ctx.init(null, new TrustManager[] { tm }, new SecureRandom());
+
+    SSLSocketFactory socketFactory = new SSLSocketFactory(ctx, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
+    Scheme sch = new Scheme(scheme, port, socketFactory);
+
+    httpclient.getConnectionManager().getSchemeRegistry().register(sch);
+    return httpclient;
+  }
+}

+ 78 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/DateUtil.java

@@ -0,0 +1,78 @@
+/*
+ *  Copyright (c) 2014 The CCP project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a Beijing Speedtong Information Technology Co.,Ltd license
+ *  that can be found in the LICENSE file in the root of the web site.
+ *
+ *   http://www.yuntongxun.com
+ *
+ *  An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+package com.jeeplus.sys.sms.sdk.utils;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class DateUtil
+{
+  public static final int DEFAULT = 0;
+  public static final int YM = 1;
+  public static final int YMR_SLASH = 11;
+  public static final int NO_SLASH = 2;
+  public static final int YM_NO_SLASH = 3;
+  public static final int DATE_TIME = 4;
+  public static final int DATE_TIME_NO_SLASH = 5;
+  public static final int DATE_HM = 6;
+  public static final int TIME = 7;
+  public static final int HM = 8;
+  public static final int LONG_TIME = 9;
+  public static final int SHORT_TIME = 10;
+  public static final int DATE_TIME_LINE = 12;
+
+  public static String dateToStr(Date date, String pattern)
+  {
+    if ((date == null) || (date.equals("")))
+      return null;
+    SimpleDateFormat formatter = new SimpleDateFormat(pattern);
+    return formatter.format(date);
+  }
+
+  public static String dateToStr(Date date) {
+    return dateToStr(date, "yyyy/MM/dd");
+  }
+
+  public static String dateToStr(Date date, int type) {
+    switch (type)
+    {
+    case 0:
+      return dateToStr(date);
+    case 1:
+      return dateToStr(date, "yyyy/MM");
+    case 2:
+      return dateToStr(date, "yyyyMMdd");
+    case 11:
+      return dateToStr(date, "yyyy-MM-dd");
+    case 3:
+      return dateToStr(date, "yyyyMM");
+    case 4:
+      return dateToStr(date, "yyyy/MM/dd HH:mm:ss");
+    case 5:
+      return dateToStr(date, "yyyyMMddHHmmss");
+    case 6:
+      return dateToStr(date, "yyyy/MM/dd HH:mm");
+    case 7:
+      return dateToStr(date, "HH:mm:ss");
+    case 8:
+      return dateToStr(date, "HH:mm");
+    case 9:
+      return dateToStr(date, "HHmmss");
+    case 10:
+      return dateToStr(date, "HHmm");
+    case 12:
+      return dateToStr(date, "yyyy-MM-dd HH:mm:ss");
+    }
+    throw new IllegalArgumentException("Type undefined : " + type);
+  }
+}

+ 60 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/EncryptUtil.java

@@ -0,0 +1,60 @@
+/*
+ *  Copyright (c) 2014 The CCP project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a Beijing Speedtong Information Technology Co.,Ltd license
+ *  that can be found in the LICENSE file in the root of the web site.
+ *
+ *   http://www.yuntongxun.com
+ *
+ *  An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+package com.jeeplus.sys.sms.sdk.utils;
+
+import com.jeeplus.sys.sms.sdk.utils.encoder.BASE64Decoder;
+import com.jeeplus.sys.sms.sdk.utils.encoder.BASE64Encoder;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+
+public class EncryptUtil
+{
+  private static final String UTF8 = "utf-8";
+
+  public String md5Digest(String src) throws NoSuchAlgorithmException, UnsupportedEncodingException
+  {
+    MessageDigest md = MessageDigest.getInstance("MD5");
+    byte[] b = md.digest(src.getBytes("utf-8"));
+    return byte2HexStr(b);
+  }
+
+  public String base64Encoder(String src) throws UnsupportedEncodingException
+  {
+    BASE64Encoder encoder = new BASE64Encoder();
+    return encoder.encode(src.getBytes("utf-8"));
+  }
+
+  public String base64Decoder(String dest)
+    throws NoSuchAlgorithmException, IOException
+  {
+    BASE64Decoder decoder = new BASE64Decoder();
+    return new String(decoder.decodeBuffer(dest), "utf-8");
+  }
+
+  private String byte2HexStr(byte[] b)
+  {
+    StringBuilder sb = new StringBuilder();
+    for (int i = 0; i < b.length; ++i) {
+      String s = Integer.toHexString(b[i] & 0xFF);
+      if (s.length() == 1)
+        sb.append("0");
+
+      sb.append(s.toUpperCase());
+    }
+    return sb.toString();
+  }
+}

+ 62 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/LoggerUtil.java

@@ -0,0 +1,62 @@
+package com.jeeplus.sys.sms.sdk.utils;
+
+import java.util.Date;
+
+import com.jeeplus.sys.sms.sdk.CCPRestSDK;
+import org.apache.log4j.Logger;
+import org.apache.log4j.PropertyConfigurator;
+
+
+public class LoggerUtil {
+	private static boolean isLog = true;
+	private static Logger logger;
+	static {
+		if (logger == null) {
+			logger = Logger.getLogger(CCPRestSDK.class);
+			
+		}
+	}
+	 
+	public static void setLogger(boolean isLog) {
+		LoggerUtil.isLog = isLog;
+	}
+	public static void setLog(Logger logger) {
+		LoggerUtil.logger = logger;
+	}
+	
+	public static void setLogLevel(int level) {
+		if (logger == null) {
+			logger = Logger.getLogger(CCPRestSDK.class);
+		}
+		PropertyConfigurator.configure(PropertiesUtil.getPropertie(level));
+		 
+
+
+	}
+
+	public static void debug(Object msg) {
+		if (isLog)
+			logger.debug(new Date()+" "+msg);
+	}
+
+	public static void info(Object msg) {
+		if (isLog)
+			logger.info(new Date()+" "+msg);
+	}
+
+	public static void warn(Object msg) {
+		if (isLog)
+			logger.warn(msg);
+	}
+
+	public static void error(Object msg) {
+		if (isLog)
+			logger.error(msg);
+	}
+
+	public static void fatal(Object msg) {
+		if (isLog)
+			logger.fatal(msg);
+	}
+	  
+}

+ 45 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/PropertiesUtil.java

@@ -0,0 +1,45 @@
+/*
+ *  Copyright (c) 2013 The CCP project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a Beijing Speedtong Information Technology Co.,Ltd license
+ *  that can be found in the LICENSE file in the root of the web site.
+ *
+ *   http://www.cloopen.com
+ *
+ *  An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+package com.jeeplus.sys.sms.sdk.utils;
+import java.util.Properties;
+
+public class PropertiesUtil {
+	
+	
+	public static Properties getPropertie(int level) {
+			String loggerLever="all";
+			if(level==1){
+				loggerLever="info";
+			}else if(level==2){
+				loggerLever="warn";
+			}else if(level==3){
+				loggerLever="error";
+			}else if(level==4){
+				loggerLever="fatal";
+			}
+			Properties props = new Properties();
+			
+			props.setProperty("log4j.rootLogger", loggerLever+",A,R");
+			props.setProperty("log4j.appender.A", "org.apache.log4j.ConsoleAppender");
+			props.setProperty("log4j.appender.A.layout", "org.apache.log4j.PatternLayout");
+			props.setProperty("log4j.appender.R", "org.apache.log4j.RollingFileAppender");
+			props.setProperty("log4j.appender.R.File", "log.txt");
+			props.setProperty("log4j.appender.R.MaxFileSize", "100KB");
+			props.setProperty("log4j.appender.R.MaxBackupIndex", "1");
+			props.setProperty("log4j.appender.R.layout", "org.apache.log4j.PatternLayout");
+			props.setProperty("log4j.appender.R.layout.ConversionPattern", "%p %t %c - %m%n");
+			
+			return props;
+	}
+	
+}

+ 160 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/BASE64Decoder.java

@@ -0,0 +1,160 @@
+  /*
+    2    * Copyright (c) 1995, 2000, Oracle and/or its affiliates. All rights reserved.
+    3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+    4    *
+    5    * This code is free software; you can redistribute it and/or modify it
+    6    * under the terms of the GNU General Public License version 2 only, as
+    7    * published by the Free Software Foundation.  Oracle designates this
+    8    * particular file as subject to the "Classpath" exception as provided
+    9    * by Oracle in the LICENSE file that accompanied this code.
+   10    *
+   11    * This code is distributed in the hope that it will be useful, but WITHOUT
+   12    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   13    * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   14    * version 2 for more details (a copy is included in the LICENSE file that
+   15    * accompanied this code).
+   16    *
+   17    * You should have received a copy of the GNU General Public License version
+   18    * 2 along with this work; if not, write to the Free Software Foundation,
+   19    * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+   20    *
+   21    * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+   22    * or visit www.oracle.com if you need additional information or have any
+   23    * questions.
+   24    */
+package com.jeeplus.sys.sms.sdk.utils.encoder;
+
+ import java.io.OutputStream;
+import java.io.PushbackInputStream;
+ import java.io.PrintStream;
+
+  /**
+    32    * This class implements a BASE64 Character decoder as specified in RFC1521.
+    33    *
+    34    * This RFC is part of the MIME specification which is published by the
+    35    * Internet Engineering Task Force (IETF). Unlike some other encoding
+    36    * schemes there is nothing in this encoding that tells the decoder
+    37    * where a buffer starts or stops, so to use it you will need to isolate
+    38    * your encoded data into a single chunk and then feed them this decoder.
+    39    * The simplest way to do that is to read all of the encoded data into a
+    40    * string and then use:
+    41    * <pre>
+    42    *      byte    mydata[];
+    43    *      BASE64Decoder base64 = new BASE64Decoder();
+    44    *
+    45    *      mydata = base64.decodeBuffer(bufferString);
+    46    * </pre>
+    47    * This will decode the String in <i>bufferString</i> and give you an array
+    48    * of bytes in the array <i>myData</i>.
+    49    *
+    50    * On errors, this class throws a CEFormatException with the following detail
+    51    * strings:
+    52    * <pre>
+    53    *    "BASE64Decoder: Not enough bytes for an atom."
+    54    * </pre>
+    55    *
+    56    * @author      Chuck McManis
+    57    * @see         CharacterEncoder
+    58    * @see         BASE64Decoder
+    59    */
+
+   public class BASE64Decoder extends CharacterDecoder {
+
+ /** This class has 4 bytes per atom */
+  protected int bytesPerAtom() {
+       return (4);
+     }
+
+     /** Any multiple of 4 will do, 72 might be common */
+   protected int bytesPerLine() {
+       return (72);
+     }
+
+    /**
+    74        * This character array provides the character to value map
+    75        * based on RFC1521.
+    76        */
+       private final static char pem_array[] = {
+          //       0   1   2   3   4   5   6   7
+                     'A','B','C','D','E','F','G','H', // 0
+                   'I','J','K','L','M','N','O','P', // 1
+                 'Q','R','S','T','U','V','W','X', // 2
+                  'Y','Z','a','b','c','d','e','f', // 3
+                 'g','h','i','j','k','l','m','n', // 4
+                'o','p','q','r','s','t','u','v', // 5
+                   'w','x','y','z','0','1','2','3', // 6
+                 '4','5','6','7','8','9','+','/'  // 7
+         };
+
+     private final static byte pem_convert_array[] = new byte[256];
+
+     static {
+      for (int i = 0; i < 255; i++) {
+           pem_convert_array[i] = -1;
+       }
+        for (int i = 0; i < pem_array.length; i++) {
+           pem_convert_array[pem_array[i]] = (byte) i;
+      }
+      }
+    byte decode_buffer[] = new byte[4];
+    /**
+   103        * Decode one BASE64 atom into 1, 2, or 3 bytes of data.
+   104        */
+   protected void decodeAtom(PushbackInputStream inStream, OutputStream outStream, int rem)
+      throws java.io.IOException
+    {
+         int     i;
+       byte    a = -1, b = -1, c = -1, d = -1;
+
+      if (rem < 2) {
+            throw new CEFormatException("BASE64Decoder: Not enough bytes for an atom.");
+        }
+         do {
+           i = inStream.read();
+            if (i == -1) {
+               throw new CEStreamExhausted();
+               }
+         } while (i == '\n' || i == '\r');
+         decode_buffer[0] = (byte) i;
+
+      i = readFully(inStream, decode_buffer, 1, rem-1);
+      if (i == -1) {
+        throw new CEStreamExhausted();
+       }
+
+         if (rem > 3 && decode_buffer[3] == '=') {
+             rem = 3;
+          }
+         if (rem > 2 && decode_buffer[2] == '=') {
+             rem = 2;
+        }
+       switch (rem) {
+        case 4:
+           d = pem_convert_array[decode_buffer[3] & 0xff];
+          // NOBREAK
+       case 3:
+            c = pem_convert_array[decode_buffer[2] & 0xff];
+        // NOBREAK
+     case 2:
+         b = pem_convert_array[decode_buffer[1] & 0xff];
+        a = pem_convert_array[decode_buffer[0] & 0xff];
+             break;
+        }
+
+        switch (rem) {
+         case 2:
+           outStream.write( (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3)) );
+           break;
+       case 3:
+              outStream.write( (byte) (((a << 2) & 0xfc) | ((b >>> 4) & 3)) );
+             outStream.write( (byte) (((b << 4) & 0xf0) | ((c >>> 2) & 0xf)) );
+             break;
+         case 4:
+            outStream.write( (byte) (((a << 2) & 0xfc) | ((b >>> 4) & 3)) );
+             outStream.write( (byte) (((b << 4) & 0xf0) | ((c >>> 2) & 0xf)) );
+          outStream.write( (byte) (((c << 6) & 0xc0) | (d  & 0x3f)) );
+        break;
+  }
+       return;
+    }
+  }

+ 115 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/BASE64Encoder.java

@@ -0,0 +1,115 @@
+/*
+   2    * Copyright (c) 1995, 1997, Oracle and/or its affiliates. All rights reserved.
+   3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+   4    *
+   5    * This code is free software; you can redistribute it and/or modify it
+   6    * under the terms of the GNU General Public License version 2 only, as
+   7    * published by the Free Software Foundation.  Oracle designates this
+   8    * particular file as subject to the "Classpath" exception as provided
+   9    * by Oracle in the LICENSE file that accompanied this code.
+  10    *
+  11    * This code is distributed in the hope that it will be useful, but WITHOUT
+  12    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  13    * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+  14    * version 2 for more details (a copy is included in the LICENSE file that
+  15    * accompanied this code).
+  16    *
+  17    * You should have received a copy of the GNU General Public License version
+  18    * 2 along with this work; if not, write to the Free Software Foundation,
+  19    * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+  20    *
+  21    * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+  22    * or visit www.oracle.com if you need additional information or have any
+  23    * questions.
+  24    */
+package com.jeeplus.sys.sms.sdk.utils.encoder;
+
+import java.io.OutputStream;
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.io.IOException;
+
+/**
+ * This class implements a BASE64 Character encoder as specified in RFC1521.
+ * This RFC is part of the MIME specification as published by the Internet
+ * Engineering Task Force (IETF). Unlike some other encoding schemes there is
+ * nothing in this encoding that indicates where a buffer starts or ends.
+ * 
+ * This means that the encoded text will simply start with the first line of
+ * encoded text and end with the last line of encoded text.
+ * 
+ * @author Chuck McManis
+ * @see CharacterEncoder
+ * @see BASE64Decoder
+ */
+public class BASE64Encoder extends CharacterEncoder
+{
+
+	/** this class encodes three bytes per atom. */
+	protected int bytesPerAtom()
+	{
+		return (3);
+	}
+
+	/**
+	 * this class encodes 57 bytes per line. This results in a maximum of 57/3 *
+	 * 4 or 76 characters per output line. Not counting the line termination.
+	 */
+	protected int bytesPerLine()
+	{
+		return (57);
+	}
+
+	/** This array maps the characters to their 6 bit values */
+	private final static char pem_array[] =
+	{
+			// 0 1 2 3 4 5 6 7
+			'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0
+			'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 1
+			'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 2
+			'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', // 3
+			'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 4
+			'o', 'p', 'q', 'r', 's', 't', 'u', 'v', // 5
+			'w', 'x', 'y', 'z', '0', '1', '2', '3', // 6
+			'4', '5', '6', '7', '8', '9', '+', '/' // 7
+	};
+
+	/**
+	 * encodeAtom - Take three bytes of input and encode it as 4 printable
+	 * characters. Note that if the length in len is less than three is encodes
+	 * either one or two '=' signs to indicate padding characters.
+	 */
+	protected void encodeAtom(OutputStream outStream, byte data[], int offset,
+			int len) throws IOException
+	{
+		byte a, b, c;
+		if (len == 1)
+		{
+			a = data[offset];
+			b = 0;
+			c = 0;
+			outStream.write(pem_array[(a >>> 2) & 0x3F]);
+			outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
+			outStream.write('=');
+			outStream.write('=');
+		} else if (len == 2)
+		{
+			a = data[offset];
+			b = data[offset + 1];
+			c = 0;
+			outStream.write(pem_array[(a >>> 2) & 0x3F]);
+			outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
+			outStream.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
+			outStream.write('=');
+		} else
+		{
+			a = data[offset];
+			b = data[offset + 1];
+			c = data[offset + 2];
+			outStream.write(pem_array[(a >>> 2) & 0x3F]);
+			outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
+			outStream.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
+			outStream.write(pem_array[c & 0x3F]);
+		}
+	}
+}

+ 11 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/CEFormatException.java

@@ -0,0 +1,11 @@
+package com.jeeplus.sys.sms.sdk.utils.encoder;
+
+import java.io.IOException;
+
+public class CEFormatException extends IOException
+{
+	public CEFormatException(String s)
+	{
+		super(s);
+	}
+}

+ 8 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/CEStreamExhausted.java

@@ -0,0 +1,8 @@
+package com.jeeplus.sys.sms.sdk.utils.encoder;
+
+import java.io.IOException;
+
+public class CEStreamExhausted extends IOException
+{
+
+}

+ 244 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/CharacterDecoder.java

@@ -0,0 +1,244 @@
+/*
+    2    * Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved.
+    3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+    4    *
+    5    * This code is free software; you can redistribute it and/or modify it
+    6    * under the terms of the GNU General Public License version 2 only, as
+    7    * published by the Free Software Foundation.  Oracle designates this
+    8    * particular file as subject to the "Classpath" exception as provided
+    9    * by Oracle in the LICENSE file that accompanied this code.
+   10    *
+   11    * This code is distributed in the hope that it will be useful, but WITHOUT
+   12    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   13    * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   14    * version 2 for more details (a copy is included in the LICENSE file that
+   15    * accompanied this code).
+   16    *
+   17    * You should have received a copy of the GNU General Public License version
+   18    * 2 along with this work; if not, write to the Free Software Foundation,
+   19    * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+   20    *
+   21    * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+   22    * or visit www.oracle.com if you need additional information or have any
+   23    * questions.
+   24    */
+
+package com.jeeplus.sys.sms.sdk.utils.encoder;
+
+import java.io.OutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.PushbackInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * 37 * This class defines the decoding half of character encoders. 38 * A
+ * character decoder is an algorithim for transforming 8 bit 39 * binary data
+ * that has been encoded into text by a character 40 * encoder, back into
+ * original binary form. 41 * 42 * The character encoders, in general, have been
+ * structured 43 * around a central theme that binary data can be encoded into
+ * 44 * text that has the form: 45 * 46 *
+ * 
+ * <pre>
+ *    47    *      [Buffer Prefix]
+ *    48    *      [Line Prefix][encoded data atoms][Line Suffix]
+ *    49    *      [Buffer Suffix]
+ *    50    *
+ * </pre>
+ * 
+ * 51 * 52 * Of course in the simplest encoding schemes, the buffer has no 53 *
+ * distinct prefix of suffix, however all have some fixed relationship 54 *
+ * between the text in an 'atom' and the binary data itself. 55 * 56 * In the
+ * CharacterEncoder and CharacterDecoder classes, one complete 57 * chunk of
+ * data is referred to as a <i>buffer</i>. Encoded buffers 58 * are all text,
+ * and decoded buffers (sometimes just referred to as 59 * buffers) are binary
+ * octets. 60 * 61 * To create a custom decoder, you must, at a minimum, overide
+ * three 62 * abstract methods in this class. 63 *
+ * <DL>
+ * 64 *
+ * <DD>bytesPerAtom which tells the decoder how many bytes to 65 * expect from
+ * decodeAtom 66 *
+ * <DD>decodeAtom which decodes the bytes sent to it as text. 67 *
+ * <DD>bytesPerLine which tells the encoder the maximum number of 68 * bytes per
+ * line. 69 *
+ * </DL>
+ * 70 * 71 * In general, the character decoders return error in the form of a 72
+ * * CEFormatException. The syntax of the detail string is 73 *
+ * 
+ * <pre>
+ *    74    *      DecoderClassName: Error message.
+ *    75    *
+ * </pre>
+ * 
+ * 76 * 77 * Several useful decoders have already been written and are 78 *
+ * referenced in the See Also list below. 79 * 80 * @author Chuck McManis 81 * @see
+ * CEFormatException 82 * @see CharacterEncoder 83 * @see UCDecoder 84 * @see
+ * UUDecoder 85 * @see BASE64Decoder 86
+ */
+
+public abstract class CharacterDecoder
+{
+
+	/** Return the number of bytes per atom of decoding */
+	abstract protected int bytesPerAtom();
+
+	/** Return the maximum number of bytes that can be encoded per line */
+	abstract protected int bytesPerLine();
+
+	/** decode the beginning of the buffer, by default this is a NOP. */
+	protected void decodeBufferPrefix(PushbackInputStream aStream,
+			OutputStream bStream) throws IOException
+	{
+	}
+
+	/** decode the buffer suffix, again by default it is a NOP. */
+	protected void decodeBufferSuffix(PushbackInputStream aStream,
+			OutputStream bStream) throws IOException
+	{
+	}
+
+	/**
+	 * 103 * This method should return, if it knows, the number of bytes 104 *
+	 * that will be decoded. Many formats such as uuencoding provide 105 * this
+	 * information. By default we return the maximum bytes that 106 * could have
+	 * been encoded on the line. 107
+	 */
+	protected int decodeLinePrefix(PushbackInputStream aStream,
+			OutputStream bStream) throws IOException
+	{
+		return (bytesPerLine());
+	}
+
+	/**
+	 * 113 * This method post processes the line, if there are error detection
+	 * 114 * or correction codes in a line, they are generally processed by 115
+	 * * this method. The simplest version of this method looks for the 116 *
+	 * (newline) character. 117
+	 */
+	protected void decodeLineSuffix(PushbackInputStream aStream,
+			OutputStream bStream) throws IOException
+	{
+	}
+
+	/**
+	 * 121 * This method does an actual decode. It takes the decoded bytes and
+	 * 122 * writes them to the OutputStream. The integer <i>l</i> tells the 123
+	 * * method how many bytes are required. This is always <= bytesPerAtom().
+	 * 124
+	 */
+	protected void decodeAtom(PushbackInputStream aStream,
+			OutputStream bStream, int l) throws IOException
+	{
+		throw new CEStreamExhausted();
+	}
+
+	/**
+	 * 130 * This method works around the bizarre semantics of
+	 * BufferedInputStream's 131 * read method. 132
+	 */
+	protected int readFully(InputStream in, byte buffer[], int offset, int len)
+			throws IOException
+	{
+		for (int i = 0; i < len; i++)
+		{
+			int q = in.read();
+			if (q == -1)
+				return ((i == 0) ? -1 : i);
+			buffer[i + offset] = (byte) q;
+		}
+		return len;
+	}
+
+	/**
+	 * 145 * Decode the text from the InputStream and write the decoded 146 *
+	 * octets to the OutputStream. This method runs until the stream 147 * is
+	 * exhausted. 148 * @exception CEFormatException An error has occured while
+	 * decoding 149 * @exception CEStreamExhausted The input stream is
+	 * unexpectedly out of data 150
+	 */
+	public void decodeBuffer(InputStream aStream, OutputStream bStream)
+			throws IOException
+	{
+		int i;
+		int totalBytes = 0;
+
+		PushbackInputStream ps = new PushbackInputStream(aStream);
+		decodeBufferPrefix(ps, bStream);
+		while (true)
+		{
+			int length;
+
+			try
+			{
+				length = decodeLinePrefix(ps, bStream);
+				for (i = 0; (i + bytesPerAtom()) < length; i += bytesPerAtom())
+				{
+					decodeAtom(ps, bStream, bytesPerAtom());
+					totalBytes += bytesPerAtom();
+				}
+				if ((i + bytesPerAtom()) == length)
+				{
+					decodeAtom(ps, bStream, bytesPerAtom());
+					totalBytes += bytesPerAtom();
+				} else
+				{
+					decodeAtom(ps, bStream, length - i);
+					totalBytes += (length - i);
+				}
+				decodeLineSuffix(ps, bStream);
+			} catch (CEStreamExhausted e)
+			{
+				break;
+			}
+		}
+		decodeBufferSuffix(ps, bStream);
+	}
+
+	/**
+	 * 182 * Alternate decode interface that takes a String containing the
+	 * encoded 183 * buffer and returns a byte array containing the data. 184 * @exception
+	 * CEFormatException An error has occured while decoding 185
+	 */
+	public byte decodeBuffer(String inputString)[] throws IOException
+	{
+		byte inputBuffer[] = new byte[inputString.length()];
+		ByteArrayInputStream inStream;
+		ByteArrayOutputStream outStream;
+
+		inputString.getBytes(0, inputString.length(), inputBuffer, 0);
+		inStream = new ByteArrayInputStream(inputBuffer);
+		outStream = new ByteArrayOutputStream();
+		decodeBuffer(inStream, outStream);
+		return (outStream.toByteArray());
+	}
+
+	/**
+	 * 199 * Decode the contents of the inputstream into a buffer. 200
+	 */
+	public byte decodeBuffer(InputStream in)[] throws IOException
+	{
+		ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+		decodeBuffer(in, outStream);
+		return (outStream.toByteArray());
+	}
+
+	/**
+	 * 208 * Decode the contents of the String into a ByteBuffer. 209
+	 */
+	public ByteBuffer decodeBufferToByteBuffer(String inputString)
+			throws IOException
+	{
+		return ByteBuffer.wrap(decodeBuffer(inputString));
+	}
+
+	/**
+	 * 216 * Decode the contents of the inputStream into a ByteBuffer. 217
+	 */
+	public ByteBuffer decodeBufferToByteBuffer(InputStream in)
+			throws IOException
+	{
+		return ByteBuffer.wrap(decodeBuffer(in));
+	}
+}

+ 389 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/sms/sdk/utils/encoder/CharacterEncoder.java

@@ -0,0 +1,389 @@
+/*
+    2    * Copyright (c) 1995, 2005, Oracle and/or its affiliates. All rights reserved.
+    3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+    4    *
+    5    * This code is free software; you can redistribute it and/or modify it
+    6    * under the terms of the GNU General Public License version 2 only, as
+    7    * published by the Free Software Foundation.  Oracle designates this
+    8    * particular file as subject to the "Classpath" exception as provided
+    9    * by Oracle in the LICENSE file that accompanied this code.
+   10    *
+   11    * This code is distributed in the hope that it will be useful, but WITHOUT
+   12    * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   13    * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   14    * version 2 for more details (a copy is included in the LICENSE file that
+   15    * accompanied this code).
+   16    *
+   17    * You should have received a copy of the GNU General Public License version
+   18    * 2 along with this work; if not, write to the Free Software Foundation,
+   19    * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+   20    *
+   21    * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+   22    * or visit www.oracle.com if you need additional information or have any
+   23    * questions.
+   24    */
+
+package com.jeeplus.sys.sms.sdk.utils.encoder;
+
+import java.io.InputStream;
+import java.io.ByteArrayInputStream;
+import java.io.OutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * 38 * This class defines the encoding half of character encoders. 39 * A
+ * character encoder is an algorithim for transforming 8 bit binary 40 * data
+ * into text (generally 7 bit ASCII or 8 bit ISO-Latin-1 text) 41 * for
+ * transmition over text channels such as e-mail and network news. 42 * 43 * The
+ * character encoders have been structured around a central theme 44 * that, in
+ * general, the encoded text has the form: 45 * 46 *
+ * 
+ * <pre>
+ *    47    *      [Buffer Prefix]
+ *    48    *      [Line Prefix][encoded data atoms][Line Suffix]
+ *    49    *      [Buffer Suffix]
+ *    50    *
+ * </pre>
+ * 
+ * 51 * 52 * In the CharacterEncoder and CharacterDecoder classes, one complete
+ * 53 * chunk of data is referred to as a <i>buffer</i>. Encoded buffers 54 *
+ * are all text, and decoded buffers (sometimes just referred to as 55 *
+ * buffers) are binary octets. 56 * 57 * To create a custom encoder, you must,
+ * at a minimum, overide three 58 * abstract methods in this class. 59 *
+ * <DL>
+ * 60 *
+ * <DD>bytesPerAtom which tells the encoder how many bytes to 61 * send to
+ * encodeAtom 62 *
+ * <DD>encodeAtom which encodes the bytes sent to it as text. 63 *
+ * <DD>bytesPerLine which tells the encoder the maximum number of 64 * bytes per
+ * line. 65 *
+ * </DL>
+ * 66 * 67 * Several useful encoders have already been written and are 68 *
+ * referenced in the See Also list below. 69 * 70 * @author Chuck McManis 71 * @see
+ * CharacterDecoder; 72 * @see UCEncoder 73 * @see UUEncoder 74 * @see
+ * BASE64Encoder 75
+ */
+public abstract class CharacterEncoder
+{
+	/** Stream that understands "printing" */
+	protected PrintStream pStream;
+
+	/** Return the number of bytes per atom of encoding */
+	abstract protected int bytesPerAtom();
+
+	/** Return the number of bytes that can be encoded per line */
+	abstract protected int bytesPerLine();
+
+	/**
+	 * 88 * Encode the prefix for the entire buffer. By default is simply 89 *
+	 * opens the PrintStream for use by the other functions. 90
+	 */
+	protected void encodeBufferPrefix(OutputStream aStream) throws IOException
+	{
+		pStream = new PrintStream(aStream);
+	}
+
+	/**
+	 * 96 * Encode the suffix for the entire buffer. 97
+	 */
+	protected void encodeBufferSuffix(OutputStream aStream) throws IOException
+	{
+	}
+
+	/**
+	 * 102 * Encode the prefix that starts every output line. 103
+	 */
+	protected void encodeLinePrefix(OutputStream aStream, int aLength)
+			throws IOException
+	{
+	}
+
+	/**
+	 * 109 * Encode the suffix that ends every output line. By default 110 *
+	 * this method just prints a <newline> into the output stream. 111
+	 */
+	protected void encodeLineSuffix(OutputStream aStream) throws IOException
+	{
+		pStream.println();
+	}
+
+	/** Encode one "atom" of information into characters. */
+	abstract protected void encodeAtom(OutputStream aStream, byte someBytes[],
+			int anOffset, int aLength) throws IOException;
+
+	/**
+	 * 121 * This method works around the bizarre semantics of
+	 * BufferedInputStream's 122 * read method. 123
+	 */
+	protected int readFully(InputStream in, byte buffer[])
+			throws IOException
+	{
+		for (int i = 0; i < buffer.length; i++)
+		{
+			int q = in.read();
+			if (q == -1)
+				return i;
+			buffer[i] = (byte) q;
+		}
+		return buffer.length;
+	}
+
+	/**
+	 * 136 * Encode bytes from the input stream, and write them as text
+	 * characters 137 * to the output stream. This method will run until it
+	 * exhausts the 138 * input stream, but does not print the line suffix for a
+	 * final 139 * line that is shorter than bytesPerLine(). 140
+	 */
+	public void encode(InputStream inStream, OutputStream outStream)
+			throws IOException
+	{
+		int j;
+		int numBytes;
+		byte tmpbuffer[] = new byte[bytesPerLine()];
+
+		encodeBufferPrefix(outStream);
+
+		while (true)
+		{
+			numBytes = readFully(inStream, tmpbuffer);
+			if (numBytes == 0)
+			{
+				break;
+			}
+			encodeLinePrefix(outStream, numBytes);
+			for (j = 0; j < numBytes; j += bytesPerAtom())
+			{
+
+				if ((j + bytesPerAtom()) <= numBytes)
+				{
+					encodeAtom(outStream, tmpbuffer, j, bytesPerAtom());
+				} else
+				{
+					encodeAtom(outStream, tmpbuffer, j, (numBytes) - j);
+				}
+			}
+			if (numBytes < bytesPerLine())
+			{
+				break;
+			} else
+			{
+				encodeLineSuffix(outStream);
+			}
+		}
+		encodeBufferSuffix(outStream);
+	}
+
+	/**
+	 * 173 * Encode the buffer in <i>aBuffer</i> and write the encoded 174 *
+	 * result to the OutputStream <i>aStream</i>. 175
+	 */
+	public void encode(byte aBuffer[], OutputStream aStream) throws IOException
+	{
+		ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer);
+		encode(inStream, aStream);
+	}
+
+	/**
+	 * 183 * A 'streamless' version of encode that simply takes a buffer of 184
+	 * * bytes and returns a string containing the encoded buffer. 185
+	 */
+	public String encode(byte aBuffer[])
+	{
+		ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+		ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer);
+		String retVal = null;
+		try
+		{
+			encode(inStream, outStream);
+			// explicit ascii->unicode conversion
+			retVal = outStream.toString("8859_1");
+		} catch (Exception IOException)
+		{
+			// This should never happen.
+			throw new Error("CharacterEncoder.encode internal error");
+		}
+		return (retVal);
+	}
+
+	/**
+	 * 202 * Return a byte array from the remaining bytes in this ByteBuffer.
+	 * 203 *
+	 * <P>
+	 * 204 * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+	 * 205 *
+	 * <P>
+	 * 206 * To avoid an extra copy, the implementation will attempt to return
+	 * the 207 * byte array backing the ByteBuffer. If this is not possible, a
+	 * 208 * new byte array will be created. 209
+	 */
+	private byte[] getBytes(ByteBuffer bb)
+	{
+		/*
+		 * This should never return a BufferOverflowException, as we're 213 *
+		 * careful to allocate just the right amount. 214
+		 */
+		byte[] buf = null;
+
+		/*
+		 * 218 * If it has a usable backing byte buffer, use it. Use only 219 *
+		 * if the array exactly represents the current ByteBuffer. 220
+		 */
+		if (bb.hasArray())
+		{
+			byte[] tmp = bb.array();
+			if ((tmp.length == bb.capacity()) && (tmp.length == bb.remaining()))
+			{
+				buf = tmp;
+				bb.position(bb.limit());
+			}
+		}
+
+		if (buf == null)
+		{
+			/*
+			 * 232 * This class doesn't have a concept of encode(buf, len, off),
+			 * 233 * so if we have a partial buffer, we must reallocate 234 *
+			 * space. 235
+			 */
+			buf = new byte[bb.remaining()];
+
+			/*
+			 * 239 * position() automatically updated 240
+			 */
+			bb.get(buf);
+		}
+
+		return buf;
+	}
+
+	/**
+	 * 248 * Encode the <i>aBuffer</i> ByteBuffer and write the encoded 249 *
+	 * result to the OutputStream <i>aStream</i>. 250 *
+	 * <P>
+	 * 251 * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+	 * 252
+	 */
+	public void encode(ByteBuffer aBuffer, OutputStream aStream)
+			throws IOException
+	{
+		byte[] buf = getBytes(aBuffer);
+		encode(buf, aStream);
+	}
+
+	/**
+	 * 260 * A 'streamless' version of encode that simply takes a ByteBuffer 261
+	 * * and returns a string containing the encoded buffer. 262 *
+	 * <P>
+	 * 263 * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+	 * 264
+	 */
+	public String encode(ByteBuffer aBuffer)
+	{
+		byte[] buf = getBytes(aBuffer);
+		return encode(buf);
+	}
+
+	/**
+	 * 271 * Encode bytes from the input stream, and write them as text
+	 * characters 272 * to the output stream. This method will run until it
+	 * exhausts the 273 * input stream. It differs from encode in that it will
+	 * add the 274 * line at the end of a final line that is shorter than
+	 * bytesPerLine(). 275
+	 */
+	public void encodeBuffer(InputStream inStream, OutputStream outStream)
+			throws IOException
+	{
+		int j;
+		int numBytes;
+		byte tmpbuffer[] = new byte[bytesPerLine()];
+
+		encodeBufferPrefix(outStream);
+
+		while (true)
+		{
+			numBytes = readFully(inStream, tmpbuffer);
+			if (numBytes == 0)
+			{
+				break;
+			}
+			encodeLinePrefix(outStream, numBytes);
+			for (j = 0; j < numBytes; j += bytesPerAtom())
+			{
+				if ((j + bytesPerAtom()) <= numBytes)
+				{
+					encodeAtom(outStream, tmpbuffer, j, bytesPerAtom());
+				} else
+				{
+					encodeAtom(outStream, tmpbuffer, j, (numBytes) - j);
+				}
+			}
+			encodeLineSuffix(outStream);
+			if (numBytes < bytesPerLine())
+			{
+				break;
+			}
+		}
+		encodeBufferSuffix(outStream);
+	}
+
+	/**
+	 * 306 * Encode the buffer in <i>aBuffer</i> and write the encoded 307 *
+	 * result to the OutputStream <i>aStream</i>. 308
+	 */
+	public void encodeBuffer(byte aBuffer[], OutputStream aStream)
+			throws IOException
+	{
+		ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer);
+		encodeBuffer(inStream, aStream);
+	}
+
+	/**
+	 * 316 * A 'streamless' version of encode that simply takes a buffer of 317
+	 * * bytes and returns a string containing the encoded buffer. 318
+	 */
+	public String encodeBuffer(byte aBuffer[])
+	{
+		ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+		ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer);
+		try
+		{
+			encodeBuffer(inStream, outStream);
+		} catch (Exception IOException)
+		{
+			// This should never happen.
+			throw new Error("CharacterEncoder.encodeBuffer internal error");
+		}
+		return (outStream.toString());
+	}
+
+	/**
+	 * 332 * Encode the <i>aBuffer</i> ByteBuffer and write the encoded 333 *
+	 * result to the OutputStream <i>aStream</i>. 334 *
+	 * <P>
+	 * 335 * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+	 * 336
+	 */
+	public void encodeBuffer(ByteBuffer aBuffer, OutputStream aStream)
+			throws IOException
+	{
+		byte[] buf = getBytes(aBuffer);
+		encodeBuffer(buf, aStream);
+	}
+
+	/**
+	 * 344 * A 'streamless' version of encode that simply takes a ByteBuffer 345
+	 * * and returns a string containing the encoded buffer. 346 *
+	 * <P>
+	 * 347 * The ByteBuffer's position will be advanced to ByteBuffer's limit.
+	 * 348
+	 */
+	public String encodeBuffer(ByteBuffer aBuffer)
+	{
+		byte[] buf = getBytes(aBuffer);
+		return encodeBuffer(buf);
+	}
+
+}

+ 33 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/utils/UserUtils.java

@@ -19,8 +19,11 @@ import com.jeeplus.sys.service.MenuService;
 import com.jeeplus.sys.service.UserService;
 import com.jeeplus.sys.service.dto.*;
 import com.jeeplus.sys.service.mapstruct.MenuWrapper;
+import com.jeeplus.sys.sms.SMSUtils;
 
 import javax.validation.constraints.NotNull;
+import java.io.IOException;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -211,6 +214,36 @@ public class UserUtils {
 		return "";
 	}
 
+	//发送注册码
+	public static String sendRandomCode(String mobile, String randomCode) throws IOException {
+		//发送内容
+		String content = "【匞匞】您的验证码是:"+randomCode+",有效期5分钟,请在有效期内使用。";
 
+		return SMSUtils.send(mobile, content,"","0");
+
+	}
+
+	//容联云通讯
+	public static HashMap<String,Object> sendRandomCodes(String mobile, String randomCode) throws IOException {
+		return SMSUtils.sends(mobile, randomCode);
+
+	}
+
+	//注册用户重置密码
+	public static String sendPass(String uid, String pwd, String tel, String password) throws IOException {
+		//发送内容
+		String content = "您的新密码是:"+password+",请登录系统,重新设置密码。";
+		return SMSUtils.send(tel, content,"","0");
+
+	}
+
+	//发送预警信息
+	public static String sendWarning(String mobile, String warningContent) throws IOException {
+		//发送内容
+		String content = "【匞匞】系统预警通知:"+warningContent;
+
+		return SMSUtils.send(mobile, content,"","0");
+
+	}
 
 }

+ 240 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/AreaWrapperImpl.java

@@ -0,0 +1,240 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.jeeplus.sys.domain.Area;
+import com.jeeplus.sys.service.dto.AreaDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class AreaWrapperImpl implements AreaWrapper {
+
+    @Override
+    public Area toEntity(AreaDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        Area area = new Area();
+
+        area.setParentId( dtoParentId( dto ) );
+        area.setCreateBy( dtoCreateById( dto ) );
+        area.setUpdateBy( dtoUpdateById( dto ) );
+        area.setId( dto.getId() );
+        area.setCreateDate( dto.getCreateDate() );
+        area.setUpdateDate( dto.getUpdateDate() );
+        area.setDelFlag( dto.getDelFlag() );
+        area.setParentIds( dto.getParentIds() );
+        area.setName( dto.getName() );
+        area.setSort( dto.getSort() );
+        area.setChildren( toEntity( dto.getChildren() ) );
+        area.setCode( dto.getCode() );
+        area.setType( dto.getType() );
+        area.setRemarks( dto.getRemarks() );
+
+        return area;
+    }
+
+    @Override
+    public AreaDTO toDTO(Area entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        AreaDTO areaDTO = new AreaDTO();
+
+        areaDTO.setParent( areaToAreaDTO( entity ) );
+        areaDTO.setCreateBy( areaToUserDTO( entity ) );
+        areaDTO.setUpdateBy( areaToUserDTO1( entity ) );
+        areaDTO.setId( entity.getId() );
+        areaDTO.setCreateDate( entity.getCreateDate() );
+        areaDTO.setUpdateDate( entity.getUpdateDate() );
+        areaDTO.setDelFlag( entity.getDelFlag() );
+        areaDTO.setChildren( toDTO( entity.getChildren() ) );
+        areaDTO.setParentIds( entity.getParentIds() );
+        areaDTO.setName( entity.getName() );
+        areaDTO.setSort( entity.getSort() );
+        areaDTO.setCode( entity.getCode() );
+        areaDTO.setType( entity.getType() );
+        areaDTO.setRemarks( entity.getRemarks() );
+
+        return areaDTO;
+    }
+
+    @Override
+    public Area copyEntity(Area entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        Area area = new Area();
+
+        area.setId( entity.getId() );
+        area.setCreateDate( entity.getCreateDate() );
+        area.setCreateBy( entity.getCreateBy() );
+        area.setUpdateDate( entity.getUpdateDate() );
+        area.setUpdateBy( entity.getUpdateBy() );
+        area.setDelFlag( entity.getDelFlag() );
+        area.setParentId( entity.getParentId() );
+        area.setParentIds( entity.getParentIds() );
+        area.setName( entity.getName() );
+        area.setSort( entity.getSort() );
+        List<Area> list = entity.getChildren();
+        if ( list != null ) {
+            area.setChildren( new ArrayList<Area>( list ) );
+        }
+        area.setCode( entity.getCode() );
+        area.setType( entity.getType() );
+        area.setRemarks( entity.getRemarks() );
+
+        return area;
+    }
+
+    @Override
+    public AreaDTO copyDTO(AreaDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        AreaDTO areaDTO = new AreaDTO();
+
+        areaDTO.setId( dto.getId() );
+        areaDTO.setCreateDate( dto.getCreateDate() );
+        areaDTO.setCreateBy( dto.getCreateBy() );
+        areaDTO.setUpdateDate( dto.getUpdateDate() );
+        areaDTO.setUpdateBy( dto.getUpdateBy() );
+        areaDTO.setDelFlag( dto.getDelFlag() );
+        areaDTO.setTaskId( dto.getTaskId() );
+        areaDTO.setProcInsId( dto.getProcInsId() );
+        areaDTO.setProcessDefinitionId( dto.getProcessDefinitionId() );
+        areaDTO.setParent( copyDTO( dto.getParent() ) );
+        List<AreaDTO> list = dto.getChildren();
+        if ( list != null ) {
+            areaDTO.setChildren( new ArrayList<AreaDTO>( list ) );
+        }
+        areaDTO.setParentIds( dto.getParentIds() );
+        areaDTO.setName( dto.getName() );
+        areaDTO.setSort( dto.getSort() );
+        areaDTO.setCode( dto.getCode() );
+        areaDTO.setType( dto.getType() );
+        areaDTO.setRemarks( dto.getRemarks() );
+
+        return areaDTO;
+    }
+
+    @Override
+    public List<Area> toEntity(List<AreaDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<Area> list = new ArrayList<Area>( dtoList.size() );
+        for ( AreaDTO areaDTO : dtoList ) {
+            list.add( toEntity( areaDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<AreaDTO> toDTO(List<Area> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<AreaDTO> list = new ArrayList<AreaDTO>( entityList.size() );
+        for ( Area area : entityList ) {
+            list.add( toDTO( area ) );
+        }
+
+        return list;
+    }
+
+    private String dtoParentId(AreaDTO areaDTO) {
+        if ( areaDTO == null ) {
+            return null;
+        }
+        AreaDTO parent = areaDTO.getParent();
+        if ( parent == null ) {
+            return null;
+        }
+        String id = parent.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoCreateById(AreaDTO areaDTO) {
+        if ( areaDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = areaDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(AreaDTO areaDTO) {
+        if ( areaDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = areaDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected AreaDTO areaToAreaDTO(Area area) {
+        if ( area == null ) {
+            return null;
+        }
+
+        AreaDTO areaDTO = new AreaDTO();
+
+        areaDTO.setId( area.getParentId() );
+
+        return areaDTO;
+    }
+
+    protected UserDTO areaToUserDTO(Area area) {
+        if ( area == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( area.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO areaToUserDTO1(Area area) {
+        if ( area == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( area.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 212 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/CertWrapperImpl.java

@@ -0,0 +1,212 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.domain.Cert;
+import com.jeeplus.sys.service.dto.CertDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class CertWrapperImpl implements CertWrapper {
+
+    @Override
+    public Cert toEntity(CertDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        Cert cert = new Cert();
+
+        cert.setCreateBy( dtoCreateById( dto ) );
+        cert.setUpdateBy( dtoUpdateById( dto ) );
+        cert.setId( dto.getId() );
+        cert.setCreateDate( dto.getCreateDate() );
+        cert.setUpdateDate( dto.getUpdateDate() );
+        cert.setDelFlag( dto.getDelFlag() );
+        cert.setRemarks( dto.getRemarks() );
+        cert.setUserId( dto.getUserId() );
+        cert.setType( dto.getType() );
+        cert.setNo( dto.getNo() );
+        cert.setAuthorities( dto.getAuthorities() );
+        cert.setIssuedDate( dto.getIssuedDate() );
+        cert.setEnrollDate( dto.getEnrollDate() );
+        cert.setExpireDate( dto.getExpireDate() );
+        cert.setEnrollCertNo( dto.getEnrollCertNo() );
+        cert.setProfession( dto.getProfession() );
+        cert.setFileUrl( dto.getFileUrl() );
+
+        return cert;
+    }
+
+    @Override
+    public CertDTO toDTO(Cert entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        CertDTO certDTO = new CertDTO();
+
+        certDTO.setCreateBy( certToUserDTO( entity ) );
+        certDTO.setUpdateBy( certToUserDTO1( entity ) );
+        certDTO.setId( entity.getId() );
+        certDTO.setCreateDate( entity.getCreateDate() );
+        certDTO.setUpdateDate( entity.getUpdateDate() );
+        certDTO.setDelFlag( entity.getDelFlag() );
+        certDTO.setRemarks( entity.getRemarks() );
+        certDTO.setUserId( entity.getUserId() );
+        certDTO.setType( entity.getType() );
+        certDTO.setNo( entity.getNo() );
+        certDTO.setAuthorities( entity.getAuthorities() );
+        certDTO.setIssuedDate( entity.getIssuedDate() );
+        certDTO.setEnrollDate( entity.getEnrollDate() );
+        certDTO.setExpireDate( entity.getExpireDate() );
+        certDTO.setEnrollCertNo( entity.getEnrollCertNo() );
+        certDTO.setProfession( entity.getProfession() );
+        certDTO.setFileUrl( entity.getFileUrl() );
+
+        return certDTO;
+    }
+
+    @Override
+    public List<Cert> toEntity(List<CertDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<Cert> list = new ArrayList<Cert>( dtoList.size() );
+        for ( CertDTO certDTO : dtoList ) {
+            list.add( toEntity( certDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<CertDTO> toDTO(List<Cert> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<CertDTO> list = new ArrayList<CertDTO>( entityList.size() );
+        for ( Cert cert : entityList ) {
+            list.add( toDTO( cert ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Page<Cert> toEntity(Page<CertDTO> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<Cert> page1 = new Page<Cert>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toEntity( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public Page<CertDTO> toDTO(Page<Cert> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<CertDTO> page1 = new Page<CertDTO>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toDTO( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    private String dtoCreateById(CertDTO certDTO) {
+        if ( certDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = certDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(CertDTO certDTO) {
+        if ( certDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = certDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected UserDTO certToUserDTO(Cert cert) {
+        if ( cert == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( cert.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO certToUserDTO1(Cert cert) {
+        if ( cert == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( cert.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 206 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/DataRuleWrapperImpl.java

@@ -0,0 +1,206 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.domain.DataRule;
+import com.jeeplus.sys.service.dto.DataRuleDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class DataRuleWrapperImpl implements DataRuleWrapper {
+
+    @Override
+    public DataRule toEntity(DataRuleDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        DataRule dataRule = new DataRule();
+
+        dataRule.setCreateBy( dtoCreateById( dto ) );
+        dataRule.setUpdateBy( dtoUpdateById( dto ) );
+        dataRule.setId( dto.getId() );
+        dataRule.setCreateDate( dto.getCreateDate() );
+        dataRule.setUpdateDate( dto.getUpdateDate() );
+        dataRule.setDelFlag( dto.getDelFlag() );
+        dataRule.setMenuId( dto.getMenuId() );
+        dataRule.setName( dto.getName() );
+        dataRule.setClassName( dto.getClassName() );
+        dataRule.setField( dto.getField() );
+        dataRule.setExpress( dto.getExpress() );
+        dataRule.setValue( dto.getValue() );
+        dataRule.setSqlSegment( dto.getSqlSegment() );
+        dataRule.setRemarks( dto.getRemarks() );
+
+        return dataRule;
+    }
+
+    @Override
+    public DataRuleDTO toDTO(DataRule entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        DataRuleDTO dataRuleDTO = new DataRuleDTO();
+
+        dataRuleDTO.setCreateBy( dataRuleToUserDTO( entity ) );
+        dataRuleDTO.setUpdateBy( dataRuleToUserDTO1( entity ) );
+        dataRuleDTO.setId( entity.getId() );
+        dataRuleDTO.setCreateDate( entity.getCreateDate() );
+        dataRuleDTO.setUpdateDate( entity.getUpdateDate() );
+        dataRuleDTO.setDelFlag( entity.getDelFlag() );
+        dataRuleDTO.setMenuId( entity.getMenuId() );
+        dataRuleDTO.setName( entity.getName() );
+        dataRuleDTO.setClassName( entity.getClassName() );
+        dataRuleDTO.setField( entity.getField() );
+        dataRuleDTO.setExpress( entity.getExpress() );
+        dataRuleDTO.setValue( entity.getValue() );
+        dataRuleDTO.setSqlSegment( entity.getSqlSegment() );
+        dataRuleDTO.setRemarks( entity.getRemarks() );
+
+        return dataRuleDTO;
+    }
+
+    @Override
+    public List<DataRule> toEntity(List<DataRuleDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<DataRule> list = new ArrayList<DataRule>( dtoList.size() );
+        for ( DataRuleDTO dataRuleDTO : dtoList ) {
+            list.add( toEntity( dataRuleDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<DataRuleDTO> toDTO(List<DataRule> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<DataRuleDTO> list = new ArrayList<DataRuleDTO>( entityList.size() );
+        for ( DataRule dataRule : entityList ) {
+            list.add( toDTO( dataRule ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Page<DataRule> toEntity(Page<DataRuleDTO> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<DataRule> page1 = new Page<DataRule>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toEntity( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public Page<DataRuleDTO> toDTO(Page<DataRule> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<DataRuleDTO> page1 = new Page<DataRuleDTO>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toDTO( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    private String dtoCreateById(DataRuleDTO dataRuleDTO) {
+        if ( dataRuleDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = dataRuleDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(DataRuleDTO dataRuleDTO) {
+        if ( dataRuleDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = dataRuleDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected UserDTO dataRuleToUserDTO(DataRule dataRule) {
+        if ( dataRule == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( dataRule.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO dataRuleToUserDTO1(DataRule dataRule) {
+        if ( dataRule == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( dataRule.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 194 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/DictTypeWrapperImpl.java

@@ -0,0 +1,194 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.domain.DictType;
+import com.jeeplus.sys.service.dto.DictTypeDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class DictTypeWrapperImpl implements DictTypeWrapper {
+
+    @Override
+    public DictType toEntity(DictTypeDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        DictType dictType = new DictType();
+
+        dictType.setCreateBy( dtoCreateById( dto ) );
+        dictType.setUpdateBy( dtoUpdateById( dto ) );
+        dictType.setId( dto.getId() );
+        dictType.setCreateDate( dto.getCreateDate() );
+        dictType.setUpdateDate( dto.getUpdateDate() );
+        dictType.setDelFlag( dto.getDelFlag() );
+        dictType.setType( dto.getType() );
+        dictType.setRemarks( dto.getRemarks() );
+
+        return dictType;
+    }
+
+    @Override
+    public DictTypeDTO toDTO(DictType entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        DictTypeDTO dictTypeDTO = new DictTypeDTO();
+
+        dictTypeDTO.setCreateBy( dictTypeToUserDTO( entity ) );
+        dictTypeDTO.setUpdateBy( dictTypeToUserDTO1( entity ) );
+        dictTypeDTO.setId( entity.getId() );
+        dictTypeDTO.setCreateDate( entity.getCreateDate() );
+        dictTypeDTO.setUpdateDate( entity.getUpdateDate() );
+        dictTypeDTO.setDelFlag( entity.getDelFlag() );
+        dictTypeDTO.setType( entity.getType() );
+        dictTypeDTO.setRemarks( entity.getRemarks() );
+
+        return dictTypeDTO;
+    }
+
+    @Override
+    public List<DictType> toEntity(List<DictTypeDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<DictType> list = new ArrayList<DictType>( dtoList.size() );
+        for ( DictTypeDTO dictTypeDTO : dtoList ) {
+            list.add( toEntity( dictTypeDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<DictTypeDTO> toDTO(List<DictType> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<DictTypeDTO> list = new ArrayList<DictTypeDTO>( entityList.size() );
+        for ( DictType dictType : entityList ) {
+            list.add( toDTO( dictType ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Page<DictType> toEntity(Page<DictTypeDTO> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<DictType> page1 = new Page<DictType>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toEntity( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public Page<DictTypeDTO> toDTO(Page<DictType> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<DictTypeDTO> page1 = new Page<DictTypeDTO>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toDTO( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    private String dtoCreateById(DictTypeDTO dictTypeDTO) {
+        if ( dictTypeDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = dictTypeDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(DictTypeDTO dictTypeDTO) {
+        if ( dictTypeDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = dictTypeDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected UserDTO dictTypeToUserDTO(DictType dictType) {
+        if ( dictType == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( dictType.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO dictTypeToUserDTO1(DictType dictType) {
+        if ( dictType == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( dictType.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 199 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/DictValueWrapperImpl.java

@@ -0,0 +1,199 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.domain.DictValue;
+import com.jeeplus.sys.service.dto.DictTypeDTO;
+import com.jeeplus.sys.service.dto.DictValueDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class DictValueWrapperImpl implements DictValueWrapper {
+
+    @Override
+    public DictValue toEntity(DictValueDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        DictValue dictValue = new DictValue();
+
+        dictValue.setCreateBy( dtoCreateById( dto ) );
+        dictValue.setUpdateBy( dtoUpdateById( dto ) );
+        dictValue.setId( dto.getId() );
+        dictValue.setCreateDate( dto.getCreateDate() );
+        dictValue.setUpdateDate( dto.getUpdateDate() );
+        dictValue.setDelFlag( dto.getDelFlag() );
+        dictValue.setLabel( dto.getLabel() );
+        dictValue.setValue( dto.getValue() );
+        dictValue.setSort( dto.getSort() );
+
+        return dictValue;
+    }
+
+    @Override
+    public DictValueDTO toDTO(DictValue entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        DictTypeDTO dictTypeDTO = null;
+
+        DictValueDTO dictValueDTO = new DictValueDTO( dictTypeDTO );
+
+        dictValueDTO.setCreateBy( dictValueToUserDTO( entity ) );
+        dictValueDTO.setUpdateBy( dictValueToUserDTO1( entity ) );
+        dictValueDTO.setId( entity.getId() );
+        dictValueDTO.setCreateDate( entity.getCreateDate() );
+        dictValueDTO.setUpdateDate( entity.getUpdateDate() );
+        dictValueDTO.setDelFlag( entity.getDelFlag() );
+        dictValueDTO.setLabel( entity.getLabel() );
+        dictValueDTO.setValue( entity.getValue() );
+        dictValueDTO.setSort( entity.getSort() );
+
+        return dictValueDTO;
+    }
+
+    @Override
+    public List<DictValue> toEntity(List<DictValueDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<DictValue> list = new ArrayList<DictValue>( dtoList.size() );
+        for ( DictValueDTO dictValueDTO : dtoList ) {
+            list.add( toEntity( dictValueDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<DictValueDTO> toDTO(List<DictValue> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<DictValueDTO> list = new ArrayList<DictValueDTO>( entityList.size() );
+        for ( DictValue dictValue : entityList ) {
+            list.add( toDTO( dictValue ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Page<DictValue> toEntity(Page<DictValueDTO> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<DictValue> page1 = new Page<DictValue>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toEntity( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public Page<DictValueDTO> toDTO(Page<DictValue> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<DictValueDTO> page1 = new Page<DictValueDTO>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toDTO( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    private String dtoCreateById(DictValueDTO dictValueDTO) {
+        if ( dictValueDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = dictValueDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(DictValueDTO dictValueDTO) {
+        if ( dictValueDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = dictValueDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected UserDTO dictValueToUserDTO(DictValue dictValue) {
+        if ( dictValue == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( dictValue.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO dictValueToUserDTO1(DictValue dictValue) {
+        if ( dictValue == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( dictValue.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 214 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/LogWrapperImpl.java

@@ -0,0 +1,214 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.domain.Log;
+import com.jeeplus.sys.service.dto.LogDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class LogWrapperImpl implements LogWrapper {
+
+    @Override
+    public Log toEntity(LogDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        Log log = new Log();
+
+        log.setCreateBy( dtoCreateById( dto ) );
+        log.setUpdateBy( dtoUpdateById( dto ) );
+        log.setId( dto.getId() );
+        log.setCreateDate( dto.getCreateDate() );
+        log.setDelFlag( dto.getDelFlag() );
+        log.setType( dto.getType() );
+        log.setTitle( dto.getTitle() );
+        log.setRemoteAddr( dto.getRemoteAddr() );
+        log.setRequestUri( dto.getRequestUri() );
+        log.setRequestType( dto.getRequestType() );
+        log.setMethod( dto.getMethod() );
+        log.setParams( dto.getParams() );
+        log.setResult( dto.getResult() );
+        log.setUserAgent( dto.getUserAgent() );
+        log.setException( dto.getException() );
+        log.setRecordTime( dto.getRecordTime() );
+        log.setUpdateDate( dto.getUpdateDate() );
+        log.setRemarks( dto.getRemarks() );
+
+        return log;
+    }
+
+    @Override
+    public LogDTO toDTO(Log entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        LogDTO logDTO = new LogDTO();
+
+        logDTO.setCreateBy( logToUserDTO( entity ) );
+        logDTO.setUpdateBy( logToUserDTO1( entity ) );
+        logDTO.setId( entity.getId() );
+        logDTO.setUpdateDate( entity.getUpdateDate() );
+        logDTO.setDelFlag( entity.getDelFlag() );
+        logDTO.setType( entity.getType() );
+        logDTO.setTitle( entity.getTitle() );
+        logDTO.setRemoteAddr( entity.getRemoteAddr() );
+        logDTO.setRequestUri( entity.getRequestUri() );
+        logDTO.setRequestType( entity.getRequestType() );
+        logDTO.setMethod( entity.getMethod() );
+        logDTO.setParams( entity.getParams() );
+        logDTO.setResult( entity.getResult() );
+        logDTO.setUserAgent( entity.getUserAgent() );
+        logDTO.setException( entity.getException() );
+        logDTO.setRecordTime( entity.getRecordTime() );
+        logDTO.setCreateDate( entity.getCreateDate() );
+        logDTO.setRemarks( entity.getRemarks() );
+
+        return logDTO;
+    }
+
+    @Override
+    public List<Log> toEntity(List<LogDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<Log> list = new ArrayList<Log>( dtoList.size() );
+        for ( LogDTO logDTO : dtoList ) {
+            list.add( toEntity( logDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<LogDTO> toDTO(List<Log> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<LogDTO> list = new ArrayList<LogDTO>( entityList.size() );
+        for ( Log log : entityList ) {
+            list.add( toDTO( log ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Page<Log> toEntity(Page<LogDTO> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<Log> page1 = new Page<Log>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toEntity( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public Page<LogDTO> toDTO(Page<Log> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<LogDTO> page1 = new Page<LogDTO>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toDTO( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    private String dtoCreateById(LogDTO logDTO) {
+        if ( logDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = logDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(LogDTO logDTO) {
+        if ( logDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = logDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected UserDTO logToUserDTO(Log log) {
+        if ( log == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( log.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO logToUserDTO1(Log log) {
+        if ( log == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( log.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 266 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/MenuWrapperImpl.java

@@ -0,0 +1,266 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.jeeplus.sys.domain.Menu;
+import com.jeeplus.sys.service.dto.DataRuleDTO;
+import com.jeeplus.sys.service.dto.MenuDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class MenuWrapperImpl implements MenuWrapper {
+
+    @Override
+    public Menu toEntity(MenuDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        Menu menu = new Menu();
+
+        menu.setParentId( dtoParentId( dto ) );
+        menu.setCreateBy( dtoCreateById( dto ) );
+        menu.setUpdateBy( dtoUpdateById( dto ) );
+        menu.setId( dto.getId() );
+        menu.setCreateDate( dto.getCreateDate() );
+        menu.setUpdateDate( dto.getUpdateDate() );
+        menu.setDelFlag( dto.getDelFlag() );
+        menu.setParentIds( dto.getParentIds() );
+        menu.setName( dto.getName() );
+        menu.setSort( dto.getSort() );
+        menu.setChildren( toEntity( dto.getChildren() ) );
+        menu.setHref( dto.getHref() );
+        menu.setTarget( dto.getTarget() );
+        menu.setIcon( dto.getIcon() );
+        menu.setIsShow( dto.getIsShow() );
+        menu.setType( dto.getType() );
+        menu.setPermission( dto.getPermission() );
+        menu.setAffix( dto.getAffix() );
+        menu.setRemarks( dto.getRemarks() );
+
+        return menu;
+    }
+
+    @Override
+    public MenuDTO toDTO(Menu entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        MenuDTO menuDTO = new MenuDTO();
+
+        menuDTO.setParent( menuToMenuDTO( entity ) );
+        menuDTO.setCreateBy( menuToUserDTO( entity ) );
+        menuDTO.setUpdateBy( menuToUserDTO1( entity ) );
+        menuDTO.setId( entity.getId() );
+        menuDTO.setCreateDate( entity.getCreateDate() );
+        menuDTO.setUpdateDate( entity.getUpdateDate() );
+        menuDTO.setDelFlag( entity.getDelFlag() );
+        menuDTO.setChildren( toDTO( entity.getChildren() ) );
+        menuDTO.setParentIds( entity.getParentIds() );
+        menuDTO.setName( entity.getName() );
+        menuDTO.setSort( entity.getSort() );
+        menuDTO.setHref( entity.getHref() );
+        menuDTO.setTarget( entity.getTarget() );
+        menuDTO.setIcon( entity.getIcon() );
+        menuDTO.setIsShow( entity.getIsShow() );
+        menuDTO.setType( entity.getType() );
+        menuDTO.setPermission( entity.getPermission() );
+        menuDTO.setAffix( entity.getAffix() );
+        menuDTO.setRemarks( entity.getRemarks() );
+
+        return menuDTO;
+    }
+
+    @Override
+    public Menu copyEntity(Menu entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        Menu menu = new Menu();
+
+        menu.setId( entity.getId() );
+        menu.setCreateDate( entity.getCreateDate() );
+        menu.setCreateBy( entity.getCreateBy() );
+        menu.setUpdateDate( entity.getUpdateDate() );
+        menu.setUpdateBy( entity.getUpdateBy() );
+        menu.setDelFlag( entity.getDelFlag() );
+        menu.setParentId( entity.getParentId() );
+        menu.setParentIds( entity.getParentIds() );
+        menu.setName( entity.getName() );
+        menu.setSort( entity.getSort() );
+        List<Menu> list = entity.getChildren();
+        if ( list != null ) {
+            menu.setChildren( new ArrayList<Menu>( list ) );
+        }
+        menu.setHref( entity.getHref() );
+        menu.setTarget( entity.getTarget() );
+        menu.setIcon( entity.getIcon() );
+        menu.setIsShow( entity.getIsShow() );
+        menu.setType( entity.getType() );
+        menu.setPermission( entity.getPermission() );
+        menu.setAffix( entity.getAffix() );
+        menu.setRemarks( entity.getRemarks() );
+
+        return menu;
+    }
+
+    @Override
+    public MenuDTO copyDTO(MenuDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        MenuDTO menuDTO = new MenuDTO();
+
+        menuDTO.setId( dto.getId() );
+        menuDTO.setCreateDate( dto.getCreateDate() );
+        menuDTO.setCreateBy( dto.getCreateBy() );
+        menuDTO.setUpdateDate( dto.getUpdateDate() );
+        menuDTO.setUpdateBy( dto.getUpdateBy() );
+        menuDTO.setDelFlag( dto.getDelFlag() );
+        menuDTO.setTaskId( dto.getTaskId() );
+        menuDTO.setProcInsId( dto.getProcInsId() );
+        menuDTO.setProcessDefinitionId( dto.getProcessDefinitionId() );
+        menuDTO.setParent( copyDTO( dto.getParent() ) );
+        List<MenuDTO> list = dto.getChildren();
+        if ( list != null ) {
+            menuDTO.setChildren( new ArrayList<MenuDTO>( list ) );
+        }
+        menuDTO.setParentIds( dto.getParentIds() );
+        menuDTO.setName( dto.getName() );
+        menuDTO.setSort( dto.getSort() );
+        menuDTO.setHref( dto.getHref() );
+        menuDTO.setTarget( dto.getTarget() );
+        menuDTO.setIcon( dto.getIcon() );
+        menuDTO.setIsShow( dto.getIsShow() );
+        menuDTO.setType( dto.getType() );
+        menuDTO.setPermission( dto.getPermission() );
+        List<DataRuleDTO> list1 = dto.getDataRuleDTOList();
+        if ( list1 != null ) {
+            menuDTO.setDataRuleDTOList( new ArrayList<DataRuleDTO>( list1 ) );
+        }
+        menuDTO.setUserId( dto.getUserId() );
+        menuDTO.setAffix( dto.getAffix() );
+        menuDTO.setRemarks( dto.getRemarks() );
+
+        return menuDTO;
+    }
+
+    @Override
+    public List<Menu> toEntity(List<MenuDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<Menu> list = new ArrayList<Menu>( dtoList.size() );
+        for ( MenuDTO menuDTO : dtoList ) {
+            list.add( toEntity( menuDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<MenuDTO> toDTO(List<Menu> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<MenuDTO> list = new ArrayList<MenuDTO>( entityList.size() );
+        for ( Menu menu : entityList ) {
+            list.add( toDTO( menu ) );
+        }
+
+        return list;
+    }
+
+    private String dtoParentId(MenuDTO menuDTO) {
+        if ( menuDTO == null ) {
+            return null;
+        }
+        MenuDTO parent = menuDTO.getParent();
+        if ( parent == null ) {
+            return null;
+        }
+        String id = parent.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoCreateById(MenuDTO menuDTO) {
+        if ( menuDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = menuDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(MenuDTO menuDTO) {
+        if ( menuDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = menuDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected MenuDTO menuToMenuDTO(Menu menu) {
+        if ( menu == null ) {
+            return null;
+        }
+
+        MenuDTO menuDTO = new MenuDTO();
+
+        menuDTO.setId( menu.getParentId() );
+
+        return menuDTO;
+    }
+
+    protected UserDTO menuToUserDTO(Menu menu) {
+        if ( menu == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( menu.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO menuToUserDTO1(Menu menu) {
+        if ( menu == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( menu.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 326 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/OfficeWrapperImpl.java

@@ -0,0 +1,326 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.jeeplus.sys.domain.Office;
+import com.jeeplus.sys.service.dto.AreaDTO;
+import com.jeeplus.sys.service.dto.OfficeDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class OfficeWrapperImpl implements OfficeWrapper {
+
+    @Override
+    public Office copyEntity(Office entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        Office office = new Office();
+
+        office.setId( entity.getId() );
+        office.setCreateDate( entity.getCreateDate() );
+        office.setCreateBy( entity.getCreateBy() );
+        office.setUpdateDate( entity.getUpdateDate() );
+        office.setUpdateBy( entity.getUpdateBy() );
+        office.setDelFlag( entity.getDelFlag() );
+        office.setParentId( entity.getParentId() );
+        office.setParentIds( entity.getParentIds() );
+        office.setName( entity.getName() );
+        office.setSort( entity.getSort() );
+        List<Office> list = entity.getChildren();
+        if ( list != null ) {
+            office.setChildren( new ArrayList<Office>( list ) );
+        }
+        office.setAreaId( entity.getAreaId() );
+        office.setCode( entity.getCode() );
+        office.setType( entity.getType() );
+        office.setGrade( entity.getGrade() );
+        office.setAddress( entity.getAddress() );
+        office.setZipCode( entity.getZipCode() );
+        office.setMaster( entity.getMaster() );
+        office.setPhone( entity.getPhone() );
+        office.setFax( entity.getFax() );
+        office.setEmail( entity.getEmail() );
+        office.setUseable( entity.getUseable() );
+        office.setRemarks( entity.getRemarks() );
+
+        return office;
+    }
+
+    @Override
+    public OfficeDTO copyDTO(OfficeDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        OfficeDTO officeDTO = new OfficeDTO();
+
+        officeDTO.setId( dto.getId() );
+        officeDTO.setCreateDate( dto.getCreateDate() );
+        officeDTO.setCreateBy( dto.getCreateBy() );
+        officeDTO.setUpdateDate( dto.getUpdateDate() );
+        officeDTO.setUpdateBy( dto.getUpdateBy() );
+        officeDTO.setDelFlag( dto.getDelFlag() );
+        officeDTO.setTaskId( dto.getTaskId() );
+        officeDTO.setProcInsId( dto.getProcInsId() );
+        officeDTO.setProcessDefinitionId( dto.getProcessDefinitionId() );
+        officeDTO.setParent( copyDTO( dto.getParent() ) );
+        List<OfficeDTO> list = dto.getChildren();
+        if ( list != null ) {
+            officeDTO.setChildren( new ArrayList<OfficeDTO>( list ) );
+        }
+        officeDTO.setParentIds( dto.getParentIds() );
+        officeDTO.setName( dto.getName() );
+        officeDTO.setSort( dto.getSort() );
+        officeDTO.setAreaDTO( dto.getAreaDTO() );
+        officeDTO.setCode( dto.getCode() );
+        officeDTO.setType( dto.getType() );
+        officeDTO.setGrade( dto.getGrade() );
+        officeDTO.setAddress( dto.getAddress() );
+        officeDTO.setZipCode( dto.getZipCode() );
+        officeDTO.setMaster( dto.getMaster() );
+        officeDTO.setPhone( dto.getPhone() );
+        officeDTO.setFax( dto.getFax() );
+        officeDTO.setEmail( dto.getEmail() );
+        officeDTO.setUseable( dto.getUseable() );
+        officeDTO.setRemarks( dto.getRemarks() );
+        List<String> list1 = dto.getChildDeptList();
+        if ( list1 != null ) {
+            officeDTO.setChildDeptList( new ArrayList<String>( list1 ) );
+        }
+        officeDTO.setDisabled( dto.isDisabled() );
+        officeDTO.setParentName( dto.getParentName() );
+        officeDTO.setLoginName( dto.getLoginName() );
+        officeDTO.setPassword( dto.getPassword() );
+        officeDTO.setNo( dto.getNo() );
+        officeDTO.setMobile( dto.getMobile() );
+        officeDTO.setLoginIp( dto.getLoginIp() );
+        officeDTO.setLoginDate( dto.getLoginDate() );
+        officeDTO.setLoginFlag( dto.getLoginFlag() );
+        officeDTO.setPhoto( dto.getPhoto() );
+        officeDTO.setQrCode( dto.getQrCode() );
+        officeDTO.setOldLoginName( dto.getOldLoginName() );
+        officeDTO.setNewPassword( dto.getNewPassword() );
+        officeDTO.setSign( dto.getSign() );
+        officeDTO.setAdmin( dto.isAdmin() );
+        officeDTO.setTypeFlag( dto.isTypeFlag() );
+        officeDTO.setParentId( dto.getParentId() );
+
+        return officeDTO;
+    }
+
+    @Override
+    public List<Office> toEntity(List<OfficeDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<Office> list = new ArrayList<Office>( dtoList.size() );
+        for ( OfficeDTO officeDTO : dtoList ) {
+            list.add( toEntity( officeDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<OfficeDTO> toDTO(List<Office> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<OfficeDTO> list = new ArrayList<OfficeDTO>( entityList.size() );
+        for ( Office office : entityList ) {
+            list.add( toDTO( office ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Office toEntity(OfficeDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        Office office = new Office();
+
+        office.setAreaId( dtoAreaDTOId( dto ) );
+        office.setParentId( dtoParentId( dto ) );
+        office.setCreateBy( dtoCreateById( dto ) );
+        office.setUpdateBy( dtoUpdateById( dto ) );
+        office.setId( dto.getId() );
+        office.setCreateDate( dto.getCreateDate() );
+        office.setUpdateDate( dto.getUpdateDate() );
+        office.setDelFlag( dto.getDelFlag() );
+        office.setParentIds( dto.getParentIds() );
+        office.setName( dto.getName() );
+        office.setSort( dto.getSort() );
+        office.setChildren( toEntity( dto.getChildren() ) );
+        office.setCode( dto.getCode() );
+        office.setType( dto.getType() );
+        office.setGrade( dto.getGrade() );
+        office.setAddress( dto.getAddress() );
+        office.setZipCode( dto.getZipCode() );
+        office.setMaster( dto.getMaster() );
+        office.setPhone( dto.getPhone() );
+        office.setFax( dto.getFax() );
+        office.setEmail( dto.getEmail() );
+        office.setUseable( dto.getUseable() );
+        office.setRemarks( dto.getRemarks() );
+
+        return office;
+    }
+
+    @Override
+    public OfficeDTO toDTO(Office entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        OfficeDTO officeDTO = new OfficeDTO();
+
+        officeDTO.setAreaDTO( officeToAreaDTO( entity ) );
+        officeDTO.setParent( officeToOfficeDTO( entity ) );
+        officeDTO.setCreateBy( officeToUserDTO( entity ) );
+        officeDTO.setUpdateBy( officeToUserDTO1( entity ) );
+        officeDTO.setId( entity.getId() );
+        officeDTO.setCreateDate( entity.getCreateDate() );
+        officeDTO.setUpdateDate( entity.getUpdateDate() );
+        officeDTO.setDelFlag( entity.getDelFlag() );
+        officeDTO.setChildren( toDTO( entity.getChildren() ) );
+        officeDTO.setParentIds( entity.getParentIds() );
+        officeDTO.setName( entity.getName() );
+        officeDTO.setSort( entity.getSort() );
+        officeDTO.setCode( entity.getCode() );
+        officeDTO.setType( entity.getType() );
+        officeDTO.setGrade( entity.getGrade() );
+        officeDTO.setAddress( entity.getAddress() );
+        officeDTO.setZipCode( entity.getZipCode() );
+        officeDTO.setMaster( entity.getMaster() );
+        officeDTO.setPhone( entity.getPhone() );
+        officeDTO.setFax( entity.getFax() );
+        officeDTO.setEmail( entity.getEmail() );
+        officeDTO.setUseable( entity.getUseable() );
+        officeDTO.setRemarks( entity.getRemarks() );
+        officeDTO.setParentId( entity.getParentId() );
+
+        return officeDTO;
+    }
+
+    private String dtoAreaDTOId(OfficeDTO officeDTO) {
+        if ( officeDTO == null ) {
+            return null;
+        }
+        AreaDTO areaDTO = officeDTO.getAreaDTO();
+        if ( areaDTO == null ) {
+            return null;
+        }
+        String id = areaDTO.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoParentId(OfficeDTO officeDTO) {
+        if ( officeDTO == null ) {
+            return null;
+        }
+        OfficeDTO parent = officeDTO.getParent();
+        if ( parent == null ) {
+            return null;
+        }
+        String id = parent.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoCreateById(OfficeDTO officeDTO) {
+        if ( officeDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = officeDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(OfficeDTO officeDTO) {
+        if ( officeDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = officeDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected AreaDTO officeToAreaDTO(Office office) {
+        if ( office == null ) {
+            return null;
+        }
+
+        AreaDTO areaDTO = new AreaDTO();
+
+        areaDTO.setId( office.getAreaId() );
+
+        return areaDTO;
+    }
+
+    protected OfficeDTO officeToOfficeDTO(Office office) {
+        if ( office == null ) {
+            return null;
+        }
+
+        OfficeDTO officeDTO = new OfficeDTO();
+
+        officeDTO.setId( office.getParentId() );
+
+        return officeDTO;
+    }
+
+    protected UserDTO officeToUserDTO(Office office) {
+        if ( office == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( office.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO officeToUserDTO1(Office office) {
+        if ( office == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( office.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 202 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/PostWrapperImpl.java

@@ -0,0 +1,202 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.domain.Post;
+import com.jeeplus.sys.service.dto.PostDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class PostWrapperImpl implements PostWrapper {
+
+    @Override
+    public Post toEntity(PostDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        Post post = new Post();
+
+        post.setCreateBy( dtoCreateById( dto ) );
+        post.setUpdateBy( dtoUpdateById( dto ) );
+        post.setId( dto.getId() );
+        post.setCreateDate( dto.getCreateDate() );
+        post.setUpdateDate( dto.getUpdateDate() );
+        post.setDelFlag( dto.getDelFlag() );
+        post.setName( dto.getName() );
+        post.setCode( dto.getCode() );
+        post.setType( dto.getType() );
+        post.setStatus( dto.getStatus() );
+        post.setSort( dto.getSort() );
+        post.setRemarks( dto.getRemarks() );
+
+        return post;
+    }
+
+    @Override
+    public PostDTO toDTO(Post entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        PostDTO postDTO = new PostDTO();
+
+        postDTO.setCreateBy( postToUserDTO( entity ) );
+        postDTO.setUpdateBy( postToUserDTO1( entity ) );
+        postDTO.setId( entity.getId() );
+        postDTO.setCreateDate( entity.getCreateDate() );
+        postDTO.setUpdateDate( entity.getUpdateDate() );
+        postDTO.setDelFlag( entity.getDelFlag() );
+        postDTO.setName( entity.getName() );
+        postDTO.setCode( entity.getCode() );
+        postDTO.setType( entity.getType() );
+        postDTO.setStatus( entity.getStatus() );
+        postDTO.setRemarks( entity.getRemarks() );
+        postDTO.setSort( entity.getSort() );
+
+        return postDTO;
+    }
+
+    @Override
+    public List<Post> toEntity(List<PostDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<Post> list = new ArrayList<Post>( dtoList.size() );
+        for ( PostDTO postDTO : dtoList ) {
+            list.add( toEntity( postDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<PostDTO> toDTO(List<Post> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<PostDTO> list = new ArrayList<PostDTO>( entityList.size() );
+        for ( Post post : entityList ) {
+            list.add( toDTO( post ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Page<Post> toEntity(Page<PostDTO> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<Post> page1 = new Page<Post>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toEntity( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public Page<PostDTO> toDTO(Page<Post> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<PostDTO> page1 = new Page<PostDTO>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toDTO( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    private String dtoCreateById(PostDTO postDTO) {
+        if ( postDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = postDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(PostDTO postDTO) {
+        if ( postDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = postDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected UserDTO postToUserDTO(Post post) {
+        if ( post == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( post.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO postToUserDTO1(Post post) {
+        if ( post == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( post.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 200 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/RoleWrapperImpl.java

@@ -0,0 +1,200 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.domain.Role;
+import com.jeeplus.sys.service.dto.RoleDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class RoleWrapperImpl implements RoleWrapper {
+
+    @Override
+    public Role toEntity(RoleDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        Role role = new Role();
+
+        role.setCreateBy( dtoCreateById( dto ) );
+        role.setUpdateBy( dtoUpdateById( dto ) );
+        role.setId( dto.getId() );
+        role.setCreateDate( dto.getCreateDate() );
+        role.setUpdateDate( dto.getUpdateDate() );
+        role.setDelFlag( dto.getDelFlag() );
+        role.setName( dto.getName() );
+        role.setEnName( dto.getEnName() );
+        role.setSysData( dto.getSysData() );
+        role.setUseable( dto.getUseable() );
+        role.setRemarks( dto.getRemarks() );
+
+        return role;
+    }
+
+    @Override
+    public RoleDTO toDTO(Role entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        RoleDTO roleDTO = new RoleDTO();
+
+        roleDTO.setCreateBy( roleToUserDTO( entity ) );
+        roleDTO.setUpdateBy( roleToUserDTO1( entity ) );
+        roleDTO.setId( entity.getId() );
+        roleDTO.setCreateDate( entity.getCreateDate() );
+        roleDTO.setUpdateDate( entity.getUpdateDate() );
+        roleDTO.setDelFlag( entity.getDelFlag() );
+        roleDTO.setName( entity.getName() );
+        roleDTO.setEnName( entity.getEnName() );
+        roleDTO.setSysData( entity.getSysData() );
+        roleDTO.setUseable( entity.getUseable() );
+        roleDTO.setRemarks( entity.getRemarks() );
+
+        return roleDTO;
+    }
+
+    @Override
+    public List<Role> toEntity(List<RoleDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<Role> list = new ArrayList<Role>( dtoList.size() );
+        for ( RoleDTO roleDTO : dtoList ) {
+            list.add( toEntity( roleDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<RoleDTO> toDTO(List<Role> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<RoleDTO> list = new ArrayList<RoleDTO>( entityList.size() );
+        for ( Role role : entityList ) {
+            list.add( toDTO( role ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Page<Role> toEntity(Page<RoleDTO> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<Role> page1 = new Page<Role>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toEntity( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public Page<RoleDTO> toDTO(Page<Role> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<RoleDTO> page1 = new Page<RoleDTO>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toDTO( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    private String dtoCreateById(RoleDTO roleDTO) {
+        if ( roleDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = roleDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(RoleDTO roleDTO) {
+        if ( roleDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = roleDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected UserDTO roleToUserDTO(Role role) {
+        if ( role == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( role.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO roleToUserDTO1(Role role) {
+        if ( role == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( role.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 239 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/SysConfigWrapperImpl.java

@@ -0,0 +1,239 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.domain.SysConfig;
+import com.jeeplus.sys.domain.vo.SysConfigVo;
+import com.jeeplus.sys.service.dto.SysConfigDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class SysConfigWrapperImpl implements SysConfigWrapper {
+
+    @Override
+    public SysConfig toEntity(SysConfigDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        SysConfig sysConfig = new SysConfig();
+
+        sysConfig.setCreateBy( dtoCreateById( dto ) );
+        sysConfig.setUpdateBy( dtoUpdateById( dto ) );
+        sysConfig.setId( dto.getId() );
+        sysConfig.setCreateDate( dto.getCreateDate() );
+        sysConfig.setUpdateDate( dto.getUpdateDate() );
+        sysConfig.setDelFlag( dto.getDelFlag() );
+        sysConfig.setSmtp( dto.getSmtp() );
+        sysConfig.setPort( dto.getPort() );
+        sysConfig.setMailName( dto.getMailName() );
+        sysConfig.setMailPassword( dto.getMailPassword() );
+        sysConfig.setAccessKeyId( dto.getAccessKeyId() );
+        sysConfig.setAccessKeySecret( dto.getAccessKeySecret() );
+        sysConfig.setSignature( dto.getSignature() );
+        sysConfig.setTemplateCode( dto.getTemplateCode() );
+        sysConfig.setDefaultTheme( dto.getDefaultTheme() );
+        sysConfig.setDefaultLayout( dto.getDefaultLayout() );
+        sysConfig.setProductName( dto.getProductName() );
+        sysConfig.setLogo( dto.getLogo() );
+        sysConfig.setHomeUrl( dto.getHomeUrl() );
+        sysConfig.setMultiAccountLogin( dto.getMultiAccountLogin() );
+        sysConfig.setSingleLoginType( dto.getSingleLoginType() );
+        sysConfig.setRemarks( dto.getRemarks() );
+
+        return sysConfig;
+    }
+
+    @Override
+    public SysConfigDTO toDTO(SysConfig entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        SysConfigDTO sysConfigDTO = new SysConfigDTO();
+
+        sysConfigDTO.setCreateBy( sysConfigToUserDTO( entity ) );
+        sysConfigDTO.setUpdateBy( sysConfigToUserDTO1( entity ) );
+        sysConfigDTO.setId( entity.getId() );
+        sysConfigDTO.setCreateDate( entity.getCreateDate() );
+        sysConfigDTO.setUpdateDate( entity.getUpdateDate() );
+        sysConfigDTO.setDelFlag( entity.getDelFlag() );
+        sysConfigDTO.setSmtp( entity.getSmtp() );
+        sysConfigDTO.setPort( entity.getPort() );
+        sysConfigDTO.setMailName( entity.getMailName() );
+        sysConfigDTO.setMailPassword( entity.getMailPassword() );
+        sysConfigDTO.setAccessKeyId( entity.getAccessKeyId() );
+        sysConfigDTO.setAccessKeySecret( entity.getAccessKeySecret() );
+        sysConfigDTO.setSignature( entity.getSignature() );
+        sysConfigDTO.setTemplateCode( entity.getTemplateCode() );
+        sysConfigDTO.setDefaultTheme( entity.getDefaultTheme() );
+        sysConfigDTO.setDefaultLayout( entity.getDefaultLayout() );
+        sysConfigDTO.setProductName( entity.getProductName() );
+        sysConfigDTO.setLogo( entity.getLogo() );
+        sysConfigDTO.setHomeUrl( entity.getHomeUrl() );
+        sysConfigDTO.setMultiAccountLogin( entity.getMultiAccountLogin() );
+        sysConfigDTO.setSingleLoginType( entity.getSingleLoginType() );
+        sysConfigDTO.setRemarks( entity.getRemarks() );
+
+        return sysConfigDTO;
+    }
+
+    @Override
+    public List<SysConfig> toEntity(List<SysConfigDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<SysConfig> list = new ArrayList<SysConfig>( dtoList.size() );
+        for ( SysConfigDTO sysConfigDTO : dtoList ) {
+            list.add( toEntity( sysConfigDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<SysConfigDTO> toDTO(List<SysConfig> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<SysConfigDTO> list = new ArrayList<SysConfigDTO>( entityList.size() );
+        for ( SysConfig sysConfig : entityList ) {
+            list.add( toDTO( sysConfig ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Page<SysConfig> toEntity(Page<SysConfigDTO> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<SysConfig> page1 = new Page<SysConfig>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toEntity( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public Page<SysConfigDTO> toDTO(Page<SysConfig> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<SysConfigDTO> page1 = new Page<SysConfigDTO>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toDTO( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public SysConfigVo toVo(SysConfig sysConfig) {
+        if ( sysConfig == null ) {
+            return null;
+        }
+
+        SysConfigVo sysConfigVo = new SysConfigVo();
+
+        sysConfigVo.setDefaultTheme( sysConfig.getDefaultTheme() );
+        sysConfigVo.setDefaultLayout( sysConfig.getDefaultLayout() );
+        sysConfigVo.setProductName( sysConfig.getProductName() );
+        sysConfigVo.setLogo( sysConfig.getLogo() );
+
+        return sysConfigVo;
+    }
+
+    private String dtoCreateById(SysConfigDTO sysConfigDTO) {
+        if ( sysConfigDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = sysConfigDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(SysConfigDTO sysConfigDTO) {
+        if ( sysConfigDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = sysConfigDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected UserDTO sysConfigToUserDTO(SysConfig sysConfig) {
+        if ( sysConfig == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( sysConfig.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO sysConfigToUserDTO1(SysConfig sysConfig) {
+        if ( sysConfig == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( sysConfig.getUpdateBy() );
+
+        return userDTO;
+    }
+}

+ 279 - 0
jeeplus-platform/jeeplus-admin/target/generated-sources/annotations/com/jeeplus/sys/service/mapstruct/UserWrapperImpl.java

@@ -0,0 +1,279 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.sys.domain.User;
+import com.jeeplus.sys.service.dto.OfficeDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import java.util.ArrayList;
+import java.util.List;
+import javax.annotation.Generated;
+import org.springframework.stereotype.Component;
+
+@Generated(
+    value = "org.mapstruct.ap.MappingProcessor",
+    date = "2023-01-11T12:38:05+0800",
+    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
+)
+@Component
+public class UserWrapperImpl implements UserWrapper {
+
+    @Override
+    public List<User> toEntity(List<UserDTO> dtoList) {
+        if ( dtoList == null ) {
+            return null;
+        }
+
+        List<User> list = new ArrayList<User>( dtoList.size() );
+        for ( UserDTO userDTO : dtoList ) {
+            list.add( toEntity( userDTO ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public List<UserDTO> toDTO(List<User> entityList) {
+        if ( entityList == null ) {
+            return null;
+        }
+
+        List<UserDTO> list = new ArrayList<UserDTO>( entityList.size() );
+        for ( User user : entityList ) {
+            list.add( toDTO( user ) );
+        }
+
+        return list;
+    }
+
+    @Override
+    public Page<User> toEntity(Page<UserDTO> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<User> page1 = new Page<User>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toEntity( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public Page<UserDTO> toDTO(Page<User> page) {
+        if ( page == null ) {
+            return null;
+        }
+
+        Page<UserDTO> page1 = new Page<UserDTO>();
+
+        page1.setPages( page.getPages() );
+        page1.setRecords( toDTO( page.getRecords() ) );
+        page1.setTotal( page.getTotal() );
+        page1.setSize( page.getSize() );
+        page1.setCurrent( page.getCurrent() );
+        page1.setSearchCount( page.isSearchCount() );
+        page1.setOptimizeCountSql( page.isOptimizeCountSql() );
+        page1.setHitCount( page.isHitCount() );
+        List<OrderItem> list1 = page.getOrders();
+        if ( list1 != null ) {
+            page1.setOrders( new ArrayList<OrderItem>( list1 ) );
+        }
+        page1.setCountId( page.getCountId() );
+        page1.setMaxLimit( page.getMaxLimit() );
+
+        return page1;
+    }
+
+    @Override
+    public User toEntity(UserDTO dto) {
+        if ( dto == null ) {
+            return null;
+        }
+
+        String id = null;
+
+        id = dto.getId();
+
+        User user = new User( id );
+
+        user.setCompanyId( dtoCompanyDTOId( dto ) );
+        user.setOfficeId( dtoOfficeDTOId( dto ) );
+        user.setCreateBy( dtoCreateById( dto ) );
+        user.setUpdateBy( dtoUpdateById( dto ) );
+        user.setCreateDate( dto.getCreateDate() );
+        user.setUpdateDate( dto.getUpdateDate() );
+        user.setDelFlag( dto.getDelFlag() );
+        user.setLoginName( dto.getLoginName() );
+        user.setPassword( dto.getPassword() );
+        user.setNo( dto.getNo() );
+        user.setName( dto.getName() );
+        user.setEmail( dto.getEmail() );
+        user.setPhone( dto.getPhone() );
+        user.setMobile( dto.getMobile() );
+        user.setLoginIp( dto.getLoginIp() );
+        user.setLoginDate( dto.getLoginDate() );
+        user.setLoginFlag( dto.getLoginFlag() );
+        user.setPhoto( dto.getPhoto() );
+        user.setQrCode( dto.getQrCode() );
+        user.setSign( dto.getSign() );
+        user.setRemarks( dto.getRemarks() );
+
+        return user;
+    }
+
+    @Override
+    public UserDTO toDTO(User entity) {
+        if ( entity == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setCompanyDTO( userToOfficeDTO( entity ) );
+        userDTO.setOfficeDTO( userToOfficeDTO1( entity ) );
+        userDTO.setCreateBy( userToUserDTO( entity ) );
+        userDTO.setUpdateBy( userToUserDTO1( entity ) );
+        userDTO.setId( entity.getId() );
+        userDTO.setCreateDate( entity.getCreateDate() );
+        userDTO.setUpdateDate( entity.getUpdateDate() );
+        userDTO.setDelFlag( entity.getDelFlag() );
+        userDTO.setLoginName( entity.getLoginName() );
+        userDTO.setPassword( entity.getPassword() );
+        userDTO.setName( entity.getName() );
+        userDTO.setNo( entity.getNo() );
+        userDTO.setEmail( entity.getEmail() );
+        userDTO.setPhone( entity.getPhone() );
+        userDTO.setMobile( entity.getMobile() );
+        userDTO.setLoginIp( entity.getLoginIp() );
+        userDTO.setLoginDate( entity.getLoginDate() );
+        userDTO.setLoginFlag( entity.getLoginFlag() );
+        userDTO.setPhoto( entity.getPhoto() );
+        userDTO.setQrCode( entity.getQrCode() );
+        userDTO.setSign( entity.getSign() );
+        userDTO.setRemarks( entity.getRemarks() );
+
+        return userDTO;
+    }
+
+    private String dtoCompanyDTOId(UserDTO userDTO) {
+        if ( userDTO == null ) {
+            return null;
+        }
+        OfficeDTO companyDTO = userDTO.getCompanyDTO();
+        if ( companyDTO == null ) {
+            return null;
+        }
+        String id = companyDTO.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoOfficeDTOId(UserDTO userDTO) {
+        if ( userDTO == null ) {
+            return null;
+        }
+        OfficeDTO officeDTO = userDTO.getOfficeDTO();
+        if ( officeDTO == null ) {
+            return null;
+        }
+        String id = officeDTO.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoCreateById(UserDTO userDTO) {
+        if ( userDTO == null ) {
+            return null;
+        }
+        UserDTO createBy = userDTO.getCreateBy();
+        if ( createBy == null ) {
+            return null;
+        }
+        String id = createBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    private String dtoUpdateById(UserDTO userDTO) {
+        if ( userDTO == null ) {
+            return null;
+        }
+        UserDTO updateBy = userDTO.getUpdateBy();
+        if ( updateBy == null ) {
+            return null;
+        }
+        String id = updateBy.getId();
+        if ( id == null ) {
+            return null;
+        }
+        return id;
+    }
+
+    protected OfficeDTO userToOfficeDTO(User user) {
+        if ( user == null ) {
+            return null;
+        }
+
+        OfficeDTO officeDTO = new OfficeDTO();
+
+        officeDTO.setId( user.getCompanyId() );
+
+        return officeDTO;
+    }
+
+    protected OfficeDTO userToOfficeDTO1(User user) {
+        if ( user == null ) {
+            return null;
+        }
+
+        OfficeDTO officeDTO = new OfficeDTO();
+
+        officeDTO.setId( user.getOfficeId() );
+
+        return officeDTO;
+    }
+
+    protected UserDTO userToUserDTO(User user) {
+        if ( user == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( user.getCreateBy() );
+
+        return userDTO;
+    }
+
+    protected UserDTO userToUserDTO1(User user) {
+        if ( user == null ) {
+            return null;
+        }
+
+        UserDTO userDTO = new UserDTO();
+
+        userDTO.setId( user.getUpdateBy() );
+
+        return userDTO;
+    }
+}